Mercurial > public > sg101
comparison bandmap/static/js/bandmap.js @ 830:b9973588af28
Bandmap: use green & red markers for active/inactive.
Other tweaks to admin & added explanatory text.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 28 Sep 2014 15:23:15 -0500 |
parents | 5103edd3acc4 |
children | c285a86fb4d5 |
comparison
equal
deleted
inserted
replaced
829:5a00dcf563a8 | 830:b9973588af28 |
---|---|
51 $.each(data, function(i, band) { | 51 $.each(data, function(i, band) { |
52 band_sel.append($('<option>', {value: i, text: band.name})); | 52 band_sel.append($('<option>', {value: i, text: band.name})); |
53 var marker = new google.maps.Marker({ | 53 var marker = new google.maps.Marker({ |
54 position: {lat: band.lat, lng: band.lon}, | 54 position: {lat: band.lat, lng: band.lon}, |
55 title: band.name, | 55 title: band.name, |
56 icon: band.is_active ? "http://maps.google.com/mapfiles/ms/icons/green-dot.png" | |
57 : "http://maps.google.com/mapfiles/ms/icons/red-dot.png", | |
56 map: bandmap | 58 map: bandmap |
59 | |
57 }); | 60 }); |
58 google.maps.event.addListener(marker, 'click', function() { | 61 google.maps.event.addListener(marker, 'click', function() { |
59 info_win.setContent(band.note); | 62 info_win.setContent(band.note); |
60 info_win.open(bandmap, marker); | 63 info_win.open(bandmap, marker); |
61 }); | 64 }); |