[Users] [Dev] Add Bing Maps as baselayer

Andreas Hocevar ahocevar at opengeo.org
Mon Feb 1 20:29:20 CET 2010


I think Eric's approach is a better one, and can even be simplified. See 
http://trac.geoext.org/ticket/214.

Regards,
Andreas.

Andreas Hocevar wrote:
> Hi,
>
> I just created http://trac.geoext.org/ticket/192 and
> http://trac.openlayers.org/ticket/2397. The former depends on the
> latter. The changes made are intended to get rid of problems with the
> map init sequence of unrendered maps, including the Bing initialization
> problems reported in the quoted thread.
>
> Comments and reviews are welcome.
>
> Regards,
> Andreas.
>
>
> On 2009-12-11 15:33, Eric Lemoine wrote:
>   
>> 2009/12/10 Cédric Moullet <cedric.moullet at camptocamp.com>:
>>   
>>     
>>> Hi,
>>> I tried to find a solution for this problem and I have found... a
>>> wrokaround. But, maybe, this will help to find a solution ;-)
>>>
>>> Have a look at:
>>> http://dev.geoext.org/sandbox/cmoullet/ux/Bing/examples/BingExample.html
>>> The problem comes from the loadMapObject function of
>>> http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer/VirtualEarth.js#L103
>>> When this function is called, the map size is 1x1. So,in order to workaround
>>> that in the example, I firstly created  the mappanel with an empty map and
>>> then added the VE layers in the map. Seems to work, but any more elegant
>>> solution is welcome,
>>>     
>>>       
>> Hi Cédric. Thanks for the research on this. If the problem cannot be
>> solved on the OpenLayers side I guess we could add a "deferAddLayers"
>> boolean option or something to the MapPanel. When this option is set
>> the MapPanel will make sure the layers added to the map in the
>> renderMap method after calling map.render(). Something like the
>> attached patch (be warned, untested patch).
>>
>> Cheers,
>>
>>   
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>   
>>     
>
>
>   


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list