aboutsummaryrefslogtreecommitdiff
path: root/examples/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'examples/index.html')
-rw-r--r--examples/index.html21
1 files changed, 6 insertions, 15 deletions
diff --git a/examples/index.html b/examples/index.html
index b5a5a5a..9dcc2cf 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -34,7 +34,6 @@
<script src="jquery.min.js"></script>
<script src="leaflet-src.js"></script>
<script src="../leaflet-indoor.js"></script>
- <script src="osmtogeojson.js"></script>
<script type="text/JavaScript">
// Create the map
@@ -50,20 +49,12 @@
zoom: 19
});
- // This example uses OpenStreetMap data, fetched from the OverpassAPI,
- // note however that leaflet-indoor does not fetch any data.
- //
- // 1370729 is the OSM ID for the relation of the building used in this
- // example, it can be viewed online here:
- // http://www.openstreetmap.org/relation/1370729
- var query = '(relation(1370729);>>->.rels;>;);out;';
-
- $.get("//overpass-api.de/api/interpreter?data=" + query, function(data) {
- var geoJSON = osmtogeojson(data, {
- polygonFeatures: {
- buildingpart: true
- }
- });
+ // This example uses a GeoJSON FeatureCollection saved to a file
+ // (data.json), see the other example (live/index.html) for details on
+ // fetching data using the OverpassAPI (this is also how the data in
+ // data.json was generated)
+
+ $.getJSON("data.json", function(geoJSON) {
var indoorLayer = new L.Indoor(geoJSON, {
getLevel: function(feature) {