From df8ac2b90a6e819e9199b168213c250e437eded9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 4 Feb 2019 15:00:06 +0100 Subject: Map: display default cursor --- ishtar_common/static/js/ishtar-map.js | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'ishtar_common/static/js') diff --git a/ishtar_common/static/js/ishtar-map.js b/ishtar_common/static/js/ishtar-map.js index ce8f9b616..402284da3 100644 --- a/ishtar_common/static/js/ishtar-map.js +++ b/ishtar_common/static/js/ishtar-map.js @@ -1,6 +1,7 @@ /* layers */ -var default_pointer = "../media/images/default-pointer.png"; + +var default_pointer = "/media/images/default-pointer.png"; var view_projection = 'EPSG:3857'; @@ -39,34 +40,19 @@ var get_markers = function(points){ /* styles */ var get_style = function(feature){ - /* properties = feature.getProperties(); - var size = [properties.icon_width, properties.icon_height]; - var anchor = [properties.icon_offset_x, - properties.icon_offset_y]; - + console.log(properties); return new ol.style.Style({ image: new ol.style.Icon({ anchor: [17, 50], anchorXUnits: 'pixels', anchorYUnits: 'pixels', - src: default_pointer, - size: [35, 50] + size: [35, 50], + src: static_path + default_pointer }) }); - */ - var image = new ol.style.Circle({ - radius: 5, - fill: null, - stroke: new ol.style.Stroke({color: 'red', width: 1}) - }); - - return new ol.style.Style({ - image: image - }); }; - /* display map */ var vector_source; var vector_layer; -- cgit v1.2.3