From 9f741681559458c9b293470fb93b5a3000f8a634 Mon Sep 17 00:00:00 2001 From: sanj Date: Tue, 26 Oct 2010 02:49:55 +0200 Subject: [PATCH] most things should now work --- rizk/static/js/rizk.js | 9 +++++---- rizk/templates/rizk.html | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/rizk/static/js/rizk.js b/rizk/static/js/rizk.js index 9732923..5517dd7 100644 --- a/rizk/static/js/rizk.js +++ b/rizk/static/js/rizk.js @@ -47,19 +47,19 @@ $(function() { ); geojson_format = new OpenLayers.Format.GeoJSON(); //yes, jsonLayer is global. Yes, I know it's wrong. -/* + var symbolizer = OpenLayers.Util.applyDefaults( {fillColor: 'green', opacity: 0.5, strokeColor: '#000', cursor: 'pointer'}, OpenLayers.Feature.Vector.style["default"]); defaultStyles = new OpenLayers.StyleMap({"default": symbolizer, "selected": symbolizer}); -*/ + jsonLayer = layers[1] = new OpenLayers.Layer.Vector({'geometryType': 'Point'}); // map.addLayer(vector_layer); map.addLayers(layers); map.setCenter(center, 12); // mapControl = new OpenLayers.Control.SelectFeature(layers[1], {hover: true}); - mapControl = new OpenLayers.Control.SelectFeature(layers[1], {hover: true}); + mapControl = new OpenLayers.Control.SelectFeature(layers[1]); zoomControl = new OpenLayers.Control.ZoomToMaxExtent(); map.addControl(mapControl); // map.addControl(zoomControl); @@ -260,7 +260,7 @@ function getLocationById(id) { } $('.mediaThumb').live("mouseover", function() { - var id = $(this).attr("data-location"); + var id = $(this).data("location"); // console.log(id); // var location = getLocationById(id); // mapControl.select(flyover); @@ -270,6 +270,7 @@ $('.mediaThumb').live("mouseover", function() { }); $('.mediaThumb').live("mouseout", function() { + var id = $(this).data("location"); highlightFeatures([]); $('#event_' + id).removeClass("highlightedEvent"); }); diff --git a/rizk/templates/rizk.html b/rizk/templates/rizk.html index 335aa5c..89d7130 100644 --- a/rizk/templates/rizk.html +++ b/rizk/templates/rizk.html @@ -59,8 +59,9 @@ +