[OpenLayers-Users] Switch to google layer set diff center then at other layers

Salvaro asufsc at gmail.com
Fri Sep 5 07:29:12 EDT 2008


I've the same problem. It seems the Google Layer have no data (including the
center) when was loaded for the first time.
Temporarily I solved it getting the center before change the layer, and
setting a new center after. Isn't the best solution, but works well hehehe.

(To solve the problem with Markers, I just redraw the layer when the layer
is changed).

Salvaro.



Mikesamar wrote:
> 
> 
> 
> 
> Christopher Schmidt-4 wrote:
>> 
>> On Wed, Sep 03, 2008 at 12:51:35AM -0700, Mikesamar wrote:
>>> 
>>> Hello forum members,
>>> 
>>> I've a problem with google maps layers when integrated with other layer.
>>> If
>>> I switch between a layer to a google layer then the map gets a new
>>> center
>>> and my markers are out of the view. If I switch to a non google maps
>>> marker
>>> then the center is allright again and the icons are back in view.
>>> See my page at
>>> http://tech.reumer.net/component/option,com_joomlamaps/Itemid,49/
>>> 
>>> The javascript generating the map is:
>>> http://tech.reumer.net/components/com_joomlamaps/main/mapopenlayers.js
>> 
>> http://faq.openlayers.org/google/why-does-the-map-move-to-the-southeast-when-i-switch-to-a-google-maps-layer/
>> 
>> So, your options are:
>>  * Upgrade to SVN
>>  * Wait for 2.7.
>> 
>> 
> 
> I've tested it on it works allmost.
> First time a google layer is selected then it still centers wrong.
> Selecting
> a other google layer the markers are back in view and is the center
> allright. But the first layer stays wrong!
> 
> I only replaced the google.js file.
> 
> Regards Mike
> 
> -- 
> View this message in context:
> http://www.nabble.com/Switch-to-google-layer-set-diff-center-then-at-other-layers-tp19277367p19318774.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Switch-to-google-layer-set-diff-center-then-at-other-layers-tp835689p840977.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list