Commit f5eceaa8ddd92d5cd5ae443f1b30ce6961608776
Minor changes
- Images taken at the waypoint show up at the bottom with their associated numbers which are shown on the labels in the map.
- Added underscore templates.
| | | | 1 | <!doctype html> | 1 | <!doctype html> |
---|
2 | <head> | 2 | <head> |
---|
3 | <script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script> | 3 | <script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script> |
---|
| | 4 | <script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script> |
---|
4 | <script src="src/Label.js" type="text/javascript"></script> | 5 | <script src="src/Label.js" type="text/javascript"></script> |
---|
5 | <script type="text/javascript" src="src/Marker.Label.js"></script> | 6 | <script type="text/javascript" src="src/Marker.Label.js"></script> |
---|
6 | <script src="src/Path.Label.js"></script> | 7 | <script src="src/Path.Label.js"></script> |
---|
… | | … | |
---|
16 | </head> | 16 | </head> |
---|
17 | <body> | 17 | <body> |
---|
18 | <div id="map" style="width: 1024px; height: 800px; margin-top:30px;"></div> | 18 | <div id="map" style="width: 1024px; height: 800px; margin-top:30px;"></div> |
---|
| | 19 | <script type="text/template" id="image-item-template"> |
---|
| | 20 | <div id="image-wrapper"> |
---|
| | 21 | <em><%= cnt %></em> |
---|
| | 22 | <img src="<%= src %>" style="height:200px;width:200px;"> |
---|
| | 23 | </div> |
---|
| | 24 | </script> |
---|
19 | <script type="text/javascript" src="main.js"></script> | 25 | <script type="text/javascript" src="main.js"></script> |
---|
20 | <script> | 26 | <script> |
---|
21 | init(); | 27 | init(); |
---|
| | | | 25 | else { | 25 | else { |
---|
26 | count++; | 26 | count++; |
---|
27 | var m = L.marker(latlng).bindLabel(count.toString(), {noHide: true}).addTo(map).showLabel(); | 27 | var m = L.marker(latlng).bindLabel(count.toString(), {noHide: true}).addTo(map).showLabel(); |
---|
| | 28 | var template = _.template($('#image-item-template').html()); |
---|
| | 29 | x = $('body').append(template({cnt: count, src: feature.properties.link1_href})); |
---|
| | 30 | console.log(x); |
---|
28 | return m; | 31 | return m; |
---|
29 | } | 32 | } |
---|
30 | } | 33 | } |
---|