The sledrun name is shown when moving the mouse over it.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 10 Dec 2012 21:34:02 +0000 (21:34 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Mon, 10 Dec 2012 21:34:02 +0000 (21:34 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/trunk/extensions/wrmap@1228 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrmap.js

index fc82e64c70d1c0069bcce7983695e0a43d072ab2..42b71a912bac1ba0d8f4ba71983aa5b34b8aef4b 100644 (file)
--- a/wrmap.js
+++ b/wrmap.js
@@ -47,7 +47,9 @@ function init_wrmap(i, jq_map) {
                                title: "${label}"
                        }),
                        "highlight": new OpenLayers.Style({
-                               label: "${label}"
+                               label: "${label}",
+                               labelOutlineColor: "white",
+                               fontWeight: "bold"
                        })
 
                }),
@@ -60,6 +62,12 @@ function init_wrmap(i, jq_map) {
                var point = new OpenLayers.Geometry.Point(lon, lat).transform(EPSG4326, EPSG3857);
                layer_sledruns.addFeatures([new OpenLayers.Feature.Vector(point, {label: jq_sledrun.attr('data-title')})]);
        });
+       map.addControl(new OpenLayers.Control.SelectFeature(layer_sledruns, {
+               hover: true,
+               highlightOnly: true,
+               autoActivate: true,
+               renderIntent: "highlight"
+       }));
 
        // Center map
        map.addLayers([layer_map, layer_sledruns]);