-
Notifications
You must be signed in to change notification settings - Fork 475
Closed
Labels
Description
Hello, first of all — thanks for this life-saver extension to OpenLayers.
While working with TouchCursor and TouchCursorDraw, I’d like to propose some improvements on mobile/touch devices:
- Align the interaction coordinate to the top-center of the cursor. Currently, the cursor shifts the interaction point to the top-left corner of the visual handle. This is not ideal, especially for left-handed users.
- Use a larger cursor area by default (~ 80px). The current handle is too small for convenient finger placement.
- Change default crosshair to something more visible (e.g. a dot or circle).
Below is the code for my Leaflet-based cursor that I've been using on mobile for years.
let divicon = L.divIcon({ iconSize: null, className: "w-2 h-2 border rounded-full border-black border-solid z-40 bg-orange-400", iconAnchor: [4, 4], html: "<div class="h-20 w-20 bg-transparent border-4 border-solid rounded-2xl mt-4 -ml-10 border-orange-400"/>"}); cursor = map() && L.marker(cursorPosition, { icon: divicon, draggable: true, autoPan: true, autoPanSpeed: 20})