File: osm-google.js

package info (click to toggle)
openlayers 2.13.1%2Bds2-10
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 67,252 kB
  • sloc: javascript: 61,721; xml: 7,435; python: 907; sh: 44; makefile: 19
file content (23 lines) | stat: -rw-r--r-- 561 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
var map;

function init() {
    map = new OpenLayers.Map({
        div: "map",
        projection: new OpenLayers.Projection("EPSG:900913")
    });
    
    var osm = new OpenLayers.Layer.OSM();            
    var gmap = new OpenLayers.Layer.Google("Google Streets");
    
    map.addLayers([osm, gmap]);

    map.addControl(new OpenLayers.Control.LayerSwitcher());

    map.setCenter(
        new OpenLayers.LonLat(10.2, 48.9).transform(
            new OpenLayers.Projection("EPSG:4326"),
            map.getProjectionObject()
        ), 
        5
    );
}