Permalink
Browse files

fix bug with spotlight and marker-click; update images in json

  • Loading branch information...
1 parent 8aa1ec8 commit 3a165fbc73620fb06312aaf11ab4b545b03a018c Chris Herwig committed Aug 6, 2013
Showing with 16 additions and 70 deletions.
  1. +15 −0 _includes/rover.js
  2. +1 −70 js/locations.geojson
View
@@ -80,7 +80,22 @@ $.getJSON('/planets/js/locations.geojson', function (geoJson) {
markerLayer.on('click', function (e) {
e.layer.unbindPopup();
var n = e.layer.feature.properties;
+ var coords = [e.latlng.lng,e.latlng.lat];
+ var id = $(this).attr('id')
$('#pictures').scrollTo('#' + n['uid'], 500);
+ if ($('.image-marker') != undefined) {
+ $('.image-marker').remove()
+ }
+ var marker = new L.marker([coords[1], coords[0]], {
+ id: id,
+ icon: L.divIcon({
+ className: 'image-marker',
+ html: '<div class="spotlight"></div>',
+ iconSize: new L.Point(90, 90),
+ })
+ }).addTo(map);
+ map.setView(new L.LatLng(coords[1], coords[0]), 18);
+
});
});
})
Oops, something went wrong.

0 comments on commit 3a165fb

Please sign in to comment.