| 25 | | function init(){ |
|---|
| 26 | | map = new OpenLayers.Map( 'map' , |
|---|
| 27 | | { controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20}); |
|---|
| 28 | | |
|---|
| 29 | | var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} ); |
|---|
| | 22 | function init() { |
|---|
| | 23 | map = new OpenLayers.Map('map'); |
|---|
| | 24 | map.addControl(new OpenLayers.Control.LayerSwitcher()); |
|---|
| | 25 | |
|---|
| | 26 | var gphy = new OpenLayers.Layer.Google( |
|---|
| | 27 | "Google Physical", |
|---|
| | 28 | {type: G_PHYSICAL_MAP} |
|---|
| | 29 | ); |
|---|
| | 30 | var gmap = new OpenLayers.Layer.Google( |
|---|
| | 31 | "Google Streets" // the default |
|---|
| | 32 | ); |
|---|
| | 33 | var ghyb = new OpenLayers.Layer.Google( |
|---|
| | 34 | "Google Hybrid", |
|---|
| | 35 | {type: G_HYBRID_MAP} |
|---|
| | 36 | ); |
|---|
| | 37 | var gsat = new OpenLayers.Layer.Google( |
|---|
| | 38 | "Google Satellite", |
|---|
| | 39 | {type: G_SATELLITE_MAP} |
|---|
| | 40 | ); |
|---|
| 32 | | map.addLayers([satellite]); |
|---|
| 33 | | layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", |
|---|
| 34 | | "http://labs.metacarta.com/wms/vmap0", {layers: 'basic', 'transparent':true}, |
|---|
| 35 | | {isBaseLayer: false} ); |
|---|
| 36 | | layer.setVisibility(false); |
|---|
| 37 | | var twms = new OpenLayers.Layer.WMS( "World Map", |
|---|
| 38 | | "http://world.freemap.in/cgi-bin/mapserv?", |
|---|
| 39 | | {map: '/www/freemap.in/world/map/factbooktrans.map', transparent:'true', |
|---|
| 40 | | layers: 'factbook', 'format':'png'}, {'reproject': true} ); |
|---|
| 41 | | map.addLayer(twms); |
|---|
| | 43 | map.addLayers([gphy, gmap, ghyb, gsat]); |
|---|
| 61 | | For best performance, you must be using a version of the Google Maps |
|---|
| 62 | | API which is v2.93 or higher. In order to use this version of the API, |
|---|
| 63 | | it is best to simply set your application to use the string "v=2" in |
|---|
| 64 | | the request, rather than tying your application to an explicit version. |
|---|
| | 61 | For best performance, you must be using a version of the Google Maps |
|---|
| | 62 | API which is v2.93 or higher. In order to use this version of the API, |
|---|
| | 63 | it is best to simply set your application to use the string "v=2" in |
|---|
| | 64 | the request, rather than tying your application to an explicit version. |
|---|