[OpenLayers-Users] Re: google and map with projection 4352
teknocreator
teknocreator at gmail.com
Tue Mar 27 22:16:30 EDT 2012
VM,
Well, I think perhaps now your mapfile should be in spherical mercator vs
lat/lon. And Mapserver may not understand 900913, but 3857 (ours understood
the latter, version 6.0.1).
So some snippets from ours:
MAP
NAME "WMS_Server_test"
STATUS ON
IMAGETYPE PNG
EXTENT -14000000 3000000 -7000000 7000000 #map extents in meters
...
WEB
IMAGEPATH "/ourpath/test/img/tmp/ms_tmp/"
IMAGEURL "http://oursite/test/img/tmp/ms_tmp/"
METADATA
"wms_title" "WMS Test " ## REQUIRED
"wms_onlineresource"
"http://localhost:8080/cgi-bin/mapserv?" ## Recommended
"wms_srs" "EPSG:3857 EPSG:4326" ## Recommended
"wms_abstract" "This text describes my WMS service."
## Recommended
"wms_enable_request" "*"
"ows_enable_request" "*"
"ows_sld_enable" "true"
"wms_feature_info_mime_type" "text/html"
END
END
PROJECTION
"init=epsg:3857"
END
There's more to it than this but hopefully this will help. See the issue is
that if you define your map in lat/lon, you probably won't be able to use
the Google Maps backgrounds as the extents are defined in meters for
spherical mercator without somehow changing the map definition to match
(which might be possible somehow, but I haven't seen that in any examples).
So to keep things consistent if you want to use the Google Maps layers, you
may want to change your mapfile so your map is in spherical mercator instead
of lat/lon. Otherwise, you may have create some custom backgrounds that are
similar to Google Maps but in lat/lon instead.
Dave M
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/google-and-map-with-projection-4352-tp4657348p4662875.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list