[OpenLayers-Users] Unable to use both OpenLayers.Layer.Google and OpenLayers.Layer.TMS

Christopher Schmidt crschmidt at metacarta.com
Mon Jun 4 11:30:32 EDT 2007


On Mon, Jun 04, 2007 at 04:27:19PM +0100, Nick Burch wrote:
> On Mon, 4 Jun 2007, Christopher Schmidt wrote:
> >There isn't one. Other than that, I can't offer any assistance.
> 
> Is the reason there isn't a fix 

Because I don't have time, and I don't use Google Maps, and all the
stuff that I've seen which does fix this functionality seems to do it in
a brittle way. (At least, that's why I haven't approved anything: I
can't speak for other committers.)  

If I needed to display OSM tiles on top of Google, I'd use Tim's
google-mercator layer, from his sandbox. I know that it works with
TileCache, and it treats Google like a mercator-projected layer, which
seems like the right way to go to me.

> If so, could we not tweak the google layer code to detect if the main 
> openlayer is in mercator, and in that case, re-project the co-ordinates 
> and bounds before passing them into the google js?

Yes. This is the thing that Tim's code mentioned above does. I expect
that the next version of OpenLayers will have code which better
understands the way Google works one way or another, because too many
people have a need to display tiles on top of Google for it to not get
taken care of.   

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list