• Resolved vilarik

    (@vilarik)


    Hi,

    We have a task is to show service men and their contacts on the map. Each service man has his own service area, and the areas may overlap.

    The idea is that the customer can hovering the mouse over the marker to see the area the serviceman serves, and to see contacts on click on the marker.

    Service areas can overlap, and the highlighted area will help the customer find several service people who can come to him.

    Please advice how it is possible to realize. If it is needed to change some code, please advice what part of code should we start.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author hupe13

    (@hupe13)

    I would use geojson files with the areas and the information needed instead of marker. Highlight it with [hover].

    Thread Starter vilarik

    (@vilarik)

    @hupe13 Thank you for advice,
    I have tested this approach before. There is an issue that areas are crossed and in overlaped places only one area is accessebel to show popup message. In case an area completly into annother area it is not possibly to get contact informaton at all.

    Thread Starter vilarik

    (@vilarik)

    @hupe13?Lets me add

    If the task is not supported out of the box and it is nessesary to change code, please advice right derection in general. I have developer skills but not in this case.

    Plugin Author hupe13

    (@hupe13)

    You mean geojson areas, right? Do the areas overlap completely or partially?

    I’m revising hover at the moment, the error seems to be there too.

    • This reply was modified 1 year, 11 months ago by hupe13.
    Plugin Author hupe13

    (@hupe13)

    I will release the new version very soon, there you can distinguish which elements should react on hover. Then you could place geojson areas and markers on the map and let only the markers react on hover.

    If you like to test it, here is the documentation. You should use [hover markertooltip].

    There are possibilities to solve the overlapping problem. Maybe leaflet-pip or Turf.js. However, the difficulty is to determine all the geojson layers that might respond. It has to work for all users.

    I put it on the wishlist.

    Thread Starter vilarik

    (@vilarik)

    Yes, I have tested geojson – geometry: type: Polygon
    The areas often overlap partially and there are some cases then several areas overal partlly each other. Sometimes one area can be into another.

    Current behaviar shows popup-text from one area only. If it is possible to show all popup-texts in one message box from all crossed areas at cursor point it will solve my issue.

    Thread Starter vilarik

    (@vilarik)

    @hupe13

    I tested version 3.4.1-230331 and option [hover markertooltip] works propely.

    TBH I don’t see how this option to help in my issue.

    I understand that it is complecated task to control all overlapped areas and I have to choose more easy approach.

    As workaround I am going to show service men on general map as markers. In popup box of marker I will add link to invidual service man’s page with personal map with his work area and contact details.

    Thank you for support

    • This reply was modified 1 year, 11 months ago by vilarik.
    Plugin Author hupe13

    (@hupe13)

    I made an example for this task with circle and markers. Maybe it helps.

    I have tried to solve the problem with the overlapping areas – without success. It is to difficult at the moment.

    Thread Starter vilarik

    (@vilarik)

    @hupe13 Many thanks

    Plugin Author hupe13

    (@hupe13)

    There is a new shortcode [hoverlap] in version 3.5. You can try it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Is it possible to highlight the area around the marker?’ is closed to new replies.