add marker to geolocate button

المشرف العام

Administrator
طاقم الإدارة
I'm doing a map to describe trekking paths and I need a button for the geolocation function. I saw ol examples about custom control, button and geolocation, and thanks to the drupal geolocate button I managed to get a map. It works, but I need to a marker to locate the position, and I added the following code at row 86, but it doesn't work, I'm doing something wrong? Ok, for sure, but what?

positionFeature.setStyle(new ol.style.Style({ image: new ol.style.Circle({ radius: 6, fill: new ol.style.Fill({ color: '#3399CC' }), stroke: new ol.style.Stroke({ color: '#fff', width: 2 }) })}));

أكثر...
 
أعلى