1

I am looking for help to modify mouse click so that I can click a line segment without having to be directly over it.

I have been looking at Leaflet.AlmostOver but have been having difficulty getting it integrated.

Has anyone done this and have any suggestions on how I might resolve my issue?

3
  • 1
    Please be more specific about the technology stack you are using. To be clear you are designing a web map/application with Leaflet? – GeoSharp Nov 19 '16 at 0:36
  • Correct. I am designing with Leaflet. Here is the code that I am attempting to modify to go from a pure lat/long selection to allowing a near to lat/long selection. The goal is to be able to select a line segment layer without having to have the cursor directly over it. – user1387639 Nov 21 '16 at 3:38
  • fn: function (e) { if (!App.isTouch) { var latLng = e.latlng; document.getElementById('lat').innerHTML = latLng.lat.toFixed(4); document.getElementById('lng').innerHTML = latLng.lng.toFixed(4); document.getElementById('latLng').style.display = 'block'; } }, – user1387639 Nov 21 '16 at 3:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.