aboutsummaryrefslogtreecommitdiff
path: root/underlays
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-03-18 17:07:01 -0400
committerJoey Hess <joey@kitenet.net>2012-03-18 17:07:01 -0400
commit917cdb7ade640c1e88f26d99acb42cff55a4c6fc (patch)
treef3dab1533ae3de4f6a1f108bfca8b95ad1384496 /underlays
parent3867f038a79784119e67ad36a191b64d2f574a3b (diff)
downloadikiwiki-917cdb7ade640c1e88f26d99acb42cff55a4c6fc.tar
ikiwiki-917cdb7ade640c1e88f26d99acb42cff55a4c6fc.tar.gz
multiple osm fixes
* fix will_render calls to pass proper relative filenames * fix urls to kml etc files to not assume wiki's top is at / * avoid building the javascript to display the map in two different ways between the cgi and on-page maps * refactor duplicate code
Diffstat (limited to 'underlays')
-rw-r--r--underlays/osm/ikiwiki/osm.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/underlays/osm/ikiwiki/osm.js b/underlays/osm/ikiwiki/osm.js
index 7994c62fc..d7e3d53f4 100644
--- a/underlays/osm/ikiwiki/osm.js
+++ b/underlays/osm/ikiwiki/osm.js
@@ -41,13 +41,13 @@ function mapsetup(divname, options) {
map.addLayer(new OpenLayers.Layer.OSM());
if (options.format == 'CSV') {
pois = new OpenLayers.Layer.Text( "CSV",
- { location:"/" + options.map + "/pois.txt",
+ { location: options.csvurl,
projection: map.displayProjection
});
} else if (options.format == 'GeoJSON') {
pois = new OpenLayers.Layer.Vector("GeoJSON", {
protocol: new OpenLayers.Protocol.HTTP({
- url: "/" + options.map + "/pois.json",
+ url: options.jsonurl,
format: new OpenLayers.Format.GeoJSON()
}),
strategies: [new OpenLayers.Strategy.Fixed()]
@@ -55,7 +55,7 @@ function mapsetup(divname, options) {
} else {
pois = new OpenLayers.Layer.Vector("KML", {
protocol: new OpenLayers.Protocol.HTTP({
- url: "/" + options.map + "/pois.kml",
+ url: options.kmlurl,
format: new OpenLayers.Format.KML({
extractStyles: true,
extractAttributes: true