[OpenLayers-Dev] Re: Layer.GoogleNG with less overhead and better OpenLayers integration

Andreas Hocevar ahocevar at opengeo.org
Tue May 24 17:05:28 EDT 2011


Hi,

thanks for your pointers. The differences you mention are intentional,
but in case Layer.GoogleNG will become the replacement for
Layer.Google, these are worth considering.

On Tue, May 24, 2011 at 7:50 PM, Joe Franklin <traderboy at yahoo.com> wrote:
> Seems to work great.  The only change I added to make it work the same as the old Google layer was to add "wrapDateLine: true" to the options  object in initialize().

This is because other layer types also don't have it turned on by default.

>Also, I have to call layer.redraw() if I change the map type (ie. after calling layer.mapObject.setMapTypeId with a different map type).

This is because in OpenLayers, when you want to switch between
different layer types, you're supposed to create one layer instance
for every layer type and switch between them. In the case of
Layer.Google(NG), there won't be much overhead - all share the same
google.maps.Map instance.

Andreas.

>
>
>
> --- On Mon, 5/23/11, Andreas Hocevar <ahocevar at opengeo.org> wrote:
>
>> From: Andreas Hocevar <ahocevar at opengeo.org>
>> Subject: Re: [OpenLayers-Dev] Re: Layer.GoogleNG with less overhead and better OpenLayers integration
>> To: "Fabian Patzke (OL)" <listensammler at patzi.de>
>> Cc: dev at openlayers.org
>> Date: Monday, May 23, 2011, 9:03 AM
>> Thanks for the pointer. Fixed in the
>> sandbox and patch updated.
>>
>> Andreas.
>>
>> On Mon, May 23, 2011 at 2:56 PM, Fabian Patzke (OL)
>> <listensammler at patzi.de>
>> wrote:
>> > Looks really nice, though in your example the link to
>> the google-ng.js source
>> > points to google-v3.js. But that's just a small glitch
>> :)
>> > Thanks for that work,
>> > Fabian
>> >
>> > --
>> > View this message in context: http://osgeo-org.1803224.n2.nabble.com/Layer-GoogleNG-with-less-overhead-and-better-OpenLayers-integration-tp6392366p6394314.html
>> > Sent from the OpenLayers Dev mailing list archive at
>> Nabble.com.
>> > _______________________________________________
>> > Dev mailing list
>> > Dev at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>> >
>>
>>
>>
>> --
>> Andreas Hocevar
>> OpenGeo - http://opengeo.org/
>> Expert service straight from the developers.
>> _______________________________________________
>> Dev mailing list
>> Dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>>
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev
>



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


More information about the Dev mailing list