Opened 13 years ago
Last modified 13 years ago
#27 closed enhancement
Upgrade to Google Maps API 3.0 — at Initial Version
Reported by: | bfraser | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 2.6 |
Component: | GeoMOOSE/JS | Version: | 2.6 |
Keywords: | Cc: |
Description
OpenLayers has already upgraded; we just need to follow their advice. This will eliminate the requirement for an API key.
When creating OpenLayers.Layer.Google instances, the only difference to the V2 API is the way the layer types are configured:
var gphy = new OpenLayers.Layer.Google( "Google Physical", {type: google.maps.MapTypeId.TERRAIN} // used to be {type: G_PHYSICAL_MAP} ); var gmap = new OpenLayers.Layer.Google( "Google Streets", // the default {numZoomLevels: 20} // default type, no change needed here ); var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", {type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20} // used to be {type: G_HYBRID_MAP, numZoomLevels: 20} ); var gsat = new OpenLayers.Layer.Google( "Google Satellite", {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22} // used to be {type: G_SATELLITE_MAP, numZoomLevels: 22} );
Use the following to reference the API:
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=ja"></script>
Note:
See TracTickets
for help on using tickets.