[Users] Add Bing Maps as baselayer

Eric Lemoine eric.lemoine at camptocamp.com
Fri Dec 11 15:33:09 CET 2009


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,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: application/octet-stream
Size: 1435 bytes
Desc: not available
Url : http://www.geoext.org/pipermail/users/attachments/20091211/22fcf20f/attachment-0001.obj 


More information about the Users mailing list