From bb035bdc54559969a4ec045ee4305d3504952290 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Sun, 31 Dec 2006 11:42:57 +0000 Subject: [PATCH] don't project query point if host projection is geographic --- src/map.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index b0ead6395..d96d5327a 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -329,8 +329,13 @@ namespace mapnik double x = lon; double y = lat; double z = 0; - mapnik::projection dest(srs_); - dest.forward(x,y); + mapnik::projection dest(srs_); + + if (!dest.is_geographic()) + { + dest.forward(x,y); + } + mapnik::projection source(layer.srs()); proj_transform prj_trans(source,dest); prj_trans.backward(x,y,z); @@ -371,7 +376,7 @@ namespace mapnik mapnik::Layer const& layer = layers_[index]; CoordTransform tr = view_transform(); tr.backward(&x,&y); - + try { mapnik::projection dest(srs_);