Quick correction so that the map bouding code will be working again in all browsers

This commit is contained in:
echarp 2016-06-25 16:16:05 +02:00
parent b6c5a735f1
commit 6b92c40ea8

View File

@ -39,7 +39,7 @@ $(document).ready ->
map.addLayer layer
controls.addOverlay layer, text + ' - ' + json.length
if (location.href.contains('maps/') || url.contains('maps.json')) && layer.getBounds()._northEast && layer.getBounds()._southWest
if (/maps\//.test(location.href) || /maps.json/.test url) && layer.getBounds()._northEast && layer.getBounds()._southWest
# Automatic focus to all displayed events
map.fitBounds layer.getBounds()