diff --git a/resources/public/jrw-lines-example.html b/resources/public/jrw-lines-example.html index f488dc5..79c1f47 100644 --- a/resources/public/jrw-lines-example.html +++ b/resources/public/jrw-lines-example.html @@ -3,18 +3,18 @@ Welcome to mapmap - - - -
-
- -
- + + +
+
+ + + +
diff --git a/resources/public/js/jrw-lines-example.js b/resources/public/js/jrw-lines-example.js index 19fd9b0..e3a1e6b 100644 --- a/resources/public/js/jrw-lines-example.js +++ b/resources/public/js/jrw-lines-example.js @@ -86,7 +86,7 @@ $(function() { function mapZoomEnd(event) { // log(event.type + "/" + map.numZoomLevels + "/" + map.getZoom()); - var displayStationLabel = (map.getZoom() > 12); +// var displayStationLabel = (map.getZoom() > 12); } // function log(msg) { @@ -103,25 +103,31 @@ $(function() { "JRW-005-himisen.geojson", "JRW-006-takayamasen.geojson", "JRW-007-ooitosen.geojson", +*/ "JRW-008-kansaisen.geojson", +/* "JRW-009-kusatsusen.geojson", "JRW-010-narasen.geojson", "JRW-011-sakuraisen.geojson", "JRW-012-wakayamasen.geojson", +*/ "JRW-013-hanwasen.geojson", "JRW-014-kiseisen.geojson", "JRW-015-tokaidosen.geojson", "JRW-016-koseisen.geojson", "JRW-017-fukuchiyamasen.geojson", +/* "JRW-018-obamasen.geojson", "JRW-019-kakogawasen.geojson", "JRW-020-bantansen.geojson", "JRW-021-maizurusen.geojson", +*/ "JRW-022-kanjosen.geojson", "JRW-023-katamachisen.geojson", "JRW-024-tozaisen.geojson", "JRW-025-oosakahigashisen.geojson", "JRW-026-sanyosen.geojson", +/* "JRW-027-kishinsen.geojson", "JRW-028-akosen.geojson", "JRW-029-tsuyamasen.geojson", @@ -149,7 +155,7 @@ $(function() { $.each(urls, function(i, val) { var layer = new OpenLayers.Layer.Vector("L" + i, { styleMap: composedDrawStyle }); map.addLayer(layer); - var file = "/map/" + val; // TODO: ajax化 + var file = "/map/" + val; create_features(file, feature_composed_fn, layer); }); }); diff --git a/src/mapmap/routes/map.clj b/src/mapmap/routes/map.clj index 364356e..a914e13 100644 --- a/src/mapmap/routes/map.clj +++ b/src/mapmap/routes/map.clj @@ -5,8 +5,8 @@ (defn map-page "returns JSON string" - [id] - (slurp (str "src/mapmap/model/json/" id))) + [params] + (slurp (str "src/mapmap/model/json/" (get-in params [:params :id])))) (defroutes map-routes - (GET "/map/:id" id (map-page id))) + (GET "/map/:id" params (map-page params)))