[OpenLayers-Users] OpenLayers and GoogleMaps

Christopher Schmidt crschmidt at metacarta.com
Mon Mar 26 07:15:52 EDT 2007


On Mon, Mar 26, 2007 at 12:48:51PM +1000, bradleyspencer wrote:
> I have noticed that when you overlay WMS data onto GoogleMaps (at zoomscales
> of 4-5-6-7 and almost disappears at 8), there is a projection off set in the
> Y direction.
> 
> See http://demo.cubewerx.com.au/google_wms.html
> 
> This is compensated in the ?wms236? API used in Google Maps.
> 
> Is this being addressed at all or it OL limited in zoomscale when overlaying
> atop of GoogleMaps?

This is due to lack of reprojection support in OpenLayers. At the
moment, there is no plan to fix this limitation -- largely because
without reprojection support, the tools aren't available.

I actually have a few ideas:
 * Actually treat the commercial layers as projected. The end result is
   that instead of declaring a map as having a maxExtent in degrees, you
   would declare it in meters, and there would be a small mercator-only
   reprojection library which would change all the setCenters sent to
   the Google Maps API into decimal degrees. At this point, OpenLayers
   would no longer be internally confused: thinking it's unprojected,
   when really, it is projected.

 * Include an additional 'reproject' option on the layer, which does
   reprojection using the same small javascript, and turns the 'tacked'
   corners of each tile into mercator-projected coordinates with the
   appropriate EPSG code sent.

Neither of these are on the roadmap at the moment.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list