Skip to content

Commit

Permalink
don't project query point if host projection is geographic
Browse files Browse the repository at this point in the history
  • Loading branch information
artemp committed Dec 31, 2006
1 parent 4772a16 commit bb035bd
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/map.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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_);
Expand Down

0 comments on commit bb035bd

Please sign in to comment.