[Mapserver-users] zoom to a lat/long from another projection

Beth Fucile bfucile at mapwise.com
Tue Mar 9 13:21:25 PST 2004


I am trying to create an input for the user to enter a latitude and
longitude coordinate to zoom to. I had the idea that the way to accomplish
this is to define an empty layer with the projection defined as
"proj=latlong" and "ellps=GRS80", and to create the point inline with
map_<layer>_feature=new and then somehow zoom to that layer. Our map layers
are in Albers projection, and I have defined the .map file's projection
parameters based on the shapefile .prj's:

PROJECTION
  "proj=aea"
  "ellps=GRS80"
  "lat_1=24"
  "lat_2=31.5"
  "lat_0=24"
  "lon_0=0"
  "x_0=400000"
  "y_0=0"
END

BUT I can't even begin to get this to work. The new feature is not showing
up on the map when I just test setting a map_<layer>_feature_point to a lat
long coordinate within the current extent. I have 2 questions:

1. Can anyone suggest a better way to zoom to lat/long?
2. Any ideas on why my lat/long is not showing up? (if I zoom waaaay out so
that my lat/long coordinate of -81 28 is a reasonable coordinate for the
albers projection, and comment out the ad-hoc layer's PROJECTION info, the
point will show up; so it seems to be a problem with the projection
parameters)

Thanks in advance for any ideas.
Beth Fucile




More information about the MapServer-users mailing list