diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-04 15:00:06 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:38:56 +0200 |
commit | df8ac2b90a6e819e9199b168213c250e437eded9 (patch) | |
tree | fb4a5840698b2a0a2084e647f22d8b1c3a87ba22 /ishtar_common | |
parent | 3f698444f50b2030d7feec21c6f8a60669484bb5 (diff) | |
download | Ishtar-df8ac2b90a6e819e9199b168213c250e437eded9.tar.bz2 Ishtar-df8ac2b90a6e819e9199b168213c250e437eded9.zip |
Map: display default cursor
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/static/js/ishtar-map.js | 24 |
1 files changed, 5 insertions, 19 deletions
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; |