aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-google-ol.js
blob: a0e58cdc2cc7b86934964743e96de2bf26e1c829 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$(function(){
    $('#map_layer_toggle').toggle(function(){
        $(this).text(translation_strings.map_satellite);
        fixmystreet.map.setBaseLayer(fixmystreet.map.layers[1]);
    }, function(){
        $(this).text(translation_strings.map_map);
        fixmystreet.map.setBaseLayer(fixmystreet.map.layers[0]);
    });
});

function set_map_config(perm) {
    var permalink_id;
    if ($('#map_permalink').length) {
        permalink_id = 'map_permalink';
    }

    fixmystreet.controls = [
        new OpenLayers.Control.ArgParser(),
        new OpenLayers.Control.Navigation(),
        new OpenLayers.Control.PermalinkFMS(permalink_id),
        new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' })
    ];

    fixmystreet.map_type = OpenLayers.Layer.Google;
    fixmystreet.map_options = {
        zoomDuration: 10
    };
    fixmystreet.layer_options = [
        { type: google.maps.MapTypeId.HYBRID },
        {}
    ];
}