Author: kake Date: 2012-05-13 10:23:57 +0100 (Sun, 13 May 2012) New Revision: 1403
Modified: trunk/static/map-leaflet.js Log: Fixed node maps (that I broke in [1399]).
Modified: trunk/static/map-leaflet.js =================================================================== --- trunk/static/map-leaflet.js 2012-05-13 09:20:51 UTC (rev 1402) +++ trunk/static/map-leaflet.js 2012-05-13 09:23:57 UTC (rev 1403) @@ -27,14 +27,14 @@ layers: [ osm_layer ], } );
- if ( min_lat && ( min_lat != max_lat ) ) { + if ( !min_lat ) { + map.setView( map_centre, 13 ); + } else if ( min_lat == max_lat && min_long == max_long) { + map.setView( new L.LatLng( min_lat, min_long ), 18 ); + } else { var bounds = new L.LatLngBounds( new L.LatLng( min_lat, min_long ), new L.LatLng( max_lat, max_long ) ); map.fitBounds( bounds ); - } else if ( min_lat == max_lat ) { - map.setView( new L.LatLng( min_lat, min_long ), 18 ); - } else { - map.setView( map_centre, 13 ); }
var layersControl = new L.Control.Layers( {
openguides-commits@lists.openguides.org