OpenLayers OpenLayers

Ticket #1082 (closed feature: fixed)

Opened 1 year ago

Last modified 1 year ago

Custom Maps in Layer.Google

Reported by: crschmidt Assigned to: euzuro
Priority: minor Milestone: 2.6 Release
Component: Layer.Google Version: 2.5
Keywords: Cc:
State: Complete

Description

Google allows hte use of Custom GMapTypes. With just a few lines of code, we can check if a type we are given is not in the map's list of types, and if so, add it.

This might make an easier transition for users using a set of custom layers in an existing Google Maps application.

Example usage:

var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: new GMapType([G_HYBRID_MAP.getTileLayers()[1]], G_HYBRID_MAP.getProjection(), "Hybrid labels only",  G_HYBRID_MAP), 'maxZoomLevel':18} );

Attachments

custom_map_layer.2.patch (2.1 kB) - added by crschmidt on 10/13/07 21:15:41.

Change History

10/13/07 21:15:41 changed by crschmidt

  • attachment custom_map_layer.2.patch added.

12/13/07 23:17:52 changed by crschmidt

  • keywords set to review.

12/18/07 17:09:27 changed by tschaub

  • state changed from Review to Commit.

Looks great. Good to know about.

12/18/07 20:33:21 changed by crschmidt

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [5504]) Allow the use of custom GMapTypes via the Layer.Google. When passed a type in the Layer.Google constructor, we check if the type we are given is not in the map's list of types, and if so, add it. (Closes #1082) r=tschaub