aboutsummaryrefslogtreecommitdiff
path: root/src/js/app/places.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/app/places.js')
-rw-r--r--src/js/app/places.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/js/app/places.js b/src/js/app/places.js
new file mode 100644
index 0000000..9b915cb
--- /dev/null
+++ b/src/js/app/places.js
@@ -0,0 +1,16 @@
+define(['leaflet'], function(L) {
+
+ // GeoJSON feature grouping
+ function returnMarker(feature, latlng) {
+ return L.marker(latlng);
+ };
+
+ var place = L.geoJson([], {
+ pointToLayer: returnMarker
+ });
+
+ return function(data) {
+ place.addData(data);
+ return L.layerGroup().addLayer(place);
+ };
+});