diff options
author | Christopher Baines <cb15g11@soton.ac.uk> | 2014-09-06 18:22:54 +0100 |
---|---|---|
committer | Christopher Baines <cb15g11@soton.ac.uk> | 2014-09-06 18:22:54 +0100 |
commit | 063c97feb6a9cafc822fab0b53e66ff1cd0c10a3 (patch) | |
tree | 78b1fb3f2d0b33507cda61d85e74ee0b30c0f3fb /src | |
parent | 6efe207d14c79229cb4c02ffd56270ad05f671ce (diff) | |
download | leaflet-soton-063c97feb6a9cafc822fab0b53e66ff1cd0c10a3.tar leaflet-soton-063c97feb6a9cafc822fab0b53e66ff1cd0c10a3.tar.gz |
Precalculate centers for buildings
Currently done because this is the simplist way of doing it.
Diffstat (limited to 'src')
-rw-r--r-- | src/leaflet-soton.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js index b9818bc..e5bb696 100644 --- a/src/leaflet-soton.js +++ b/src/leaflet-soton.js @@ -821,15 +821,9 @@ SELECT * WHERE {\ map, function() { map.closeInfo(); }); - var temp = { _rings: building.geometry.coordinates, _map: this }; + map.panTo(building.properties.center); - - var center = building.geometry.coordinates[0][0]; - center = [center[1], center[0]]; - - map.panTo(center); - - map.showInfo(content, center); + map.showInfo(content, building.properties.center); return; } |