diff --git a/serendipity_event_osm/serendipity_event_osm.php b/serendipity_event_osm/serendipity_event_osm.php index 4902e014..b1dab3a4 100644 --- a/serendipity_event_osm/serendipity_event_osm.php +++ b/serendipity_event_osm/serendipity_event_osm.php @@ -90,7 +90,7 @@ $propbag->add('default', 'all'); break; case 'path': - $propbag->add('type', 'string'); + $propbag->add('type', 'text'); $propbag->add('name', PLUGIN_EVENT_OSM_PATH); $propbag->add('description', PLUGIN_EVENT_OSM_PATH_DESC); $propbag->add('default', ''); diff --git a/serendipity_event_static_osm/osm.js b/serendipity_event_static_osm/osm.js index ad0071a1..937fb5b6 100644 --- a/serendipity_event_static_osm/osm.js +++ b/serendipity_event_static_osm/osm.js @@ -18,7 +18,7 @@ window.onload = () => { const data = divMap.dataset; const entries = geo.entries.filter(x => ["all", "none"].includes(data.category) || x.categories.includes(data.category)); - const uploads = geo.uploads.filter(x => x.url.startsWith(data.path)); + const uploads = geo.uploads.filter(x => data.path.split("\n").some(y => x.url.startsWith(y))); const features = entries.map((entry, id) => { const feature = new ol.Feature(new ol.geom.Point(ol.proj.fromLonLat(entry.pos.reverse()))); feature.setId(id);