diff options
author | Struan Donald <struan@exo.org.uk> | 2012-11-12 12:38:18 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-11-12 12:38:18 +0000 |
commit | 43d9f7ee5c22a330ef413504373a587814070128 (patch) | |
tree | 01b0e33564cdb567df291720550a02c45668be67 /www/js/map-OpenLayers.js | |
parent | 02e8038084fc8eb8c041018fe8dc79f807b4c37d (diff) |
remove some code that does not relate to mobile
Diffstat (limited to 'www/js/map-OpenLayers.js')
-rw-r--r-- | www/js/map-OpenLayers.js | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/www/js/map-OpenLayers.js b/www/js/map-OpenLayers.js index aa8b577..efd58bf 100644 --- a/www/js/map-OpenLayers.js +++ b/www/js/map-OpenLayers.js @@ -45,24 +45,6 @@ function fms_markers_list(pins, transform) { } function fixmystreet_onload() { - if ( fixmystreet.area ) { - var area = new OpenLayers.Layer.Vector("KML", { - strategies: [ new OpenLayers.Strategy.Fixed() ], - protocol: new OpenLayers.Protocol.HTTP({ - url: CONFIG.FMS_URL + "/mapit/area/" + fixmystreet.area + ".kml?simplify_tolerance=0.0001", - format: new OpenLayers.Format.KML() - }) - }); - fixmystreet.map.addLayer(area); - area.events.register('loadend', null, function(a,b,c) { - var bounds = area.getDataExtent(); - if (bounds) { - var center = bounds.getCenterLonLat(); - fixmystreet.map.setCenter(center, fixmystreet.map.getZoomForExtent(bounds), false, true); - } - }); - } - var pin_layer_style_map = new OpenLayers.StyleMap({ 'default': new OpenLayers.Style({ graphicTitle: "${title}", @@ -277,36 +259,6 @@ function show_map(event) { fixmystreet.map.setCenter(centre, fixmystreet.zoom || 3); } - if (fixmystreet.state_map && fixmystreet.state_map == 'full') { - console.log('full page'); - // TODO Work better with window resizing, this is pretty 'set up' only at present - var $content = $('.content'), - q = ( $content.offset().left + $content.width() ) / 2; - // Need to try and fake the 'centre' being 75% from the left - fixmystreet.map.pan(-q, -25, { animate: false }); - fixmystreet.map.events.register("movestart", null, function(e){ - fixmystreet.map.moveStart = { zoom: this.getZoom(), center: this.getCenter() }; - }); - fixmystreet.map.events.register("zoomend", null, function(e){ - if ( fixmystreet.map.moveStart && !fixmystreet.map.moveStart.zoom && fixmystreet.map.moveStart.zoom !== 0 ) { - return true; // getZoom() on Firefox appears to return null at first? - } - if ( !fixmystreet.map.moveStart || !this.getCenter().equals(fixmystreet.map.moveStart.center) ) { - // Centre has moved, e.g. by double-click. Same whether zoom in or out - fixmystreet.map.pan(-q, -25, { animate: false }); - return; - } - var zoom_change = this.getZoom() - fixmystreet.map.moveStart.zoom; - if (zoom_change == -1) { - // Zoomed out, need to re'centre' - fixmystreet.map.pan(-q/2, 0, { animate: false }); - } else if (zoom_change == 1) { - // Using a zoom button - fixmystreet.map.pan(q, 0, { animate: false }); - } - }); - } - fixmystreet_onload(); fixContentHeight(fixmystreet.map); |