[Users] Add Bing Maps as baselayer
Andreas Hocevar
ahocevar at opengeo.org
Fri Dec 11 16:03:33 CET 2009
Eric,
I think your idea makes sense, and could even be made the default
behavior. In addition to your patch, we would have to make an API review
of the whole library and add the possibility to add a
GeoExt.data.LayerRecord instead of an OpenLayers.Layer everywhere we
work with layers. And the same with GeoExt.MapPanel and OpenLayers.Map.
Otherwise we may run into problems with components doing things like
accessing layer.map before the map is rendered.
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