Forum Documentation Showcase Pricing Learn more

Map marker caption: Current marker's address distance from


#1

Hello.

I have a Map, and in the Marker caption, I want to set the distance of the current marker to a different location.

The problem is that when I try to set the caption for the current marker, the only point I can choose to measure the distance from is the actual current marker, which obviously doesn’t make sense (it’d always be 0).

Is this a bug?

Regards.


#2

Hmm, this may be a bug. For example, I would anticipate that you would be able to select the distance based on inputs (search box or input) on the page or reference the current user.

Previously, I’ve only set up the caption window to reference a fixed (static) point. For example, with WorkMaps, it references how far away the employee is from a fixed association (ie. their company HQ address). So I can’t definitively say if this was an option previously.


#3

Thanks. I have reported it as a bug.


#4

We currently do not support ‘do a search’ to get distance from another marker within marker caption as that field has filtered available data. A workaround is to add a text element that references current marker.


#5

Hello Neerja.

Thanks for your message.

I am actually not trying to do a query on the Marker’s caption.

In fact, what I’m trying to achieve is what @dan1 said. I want to ask the customer for a location, store it in a input (of type geographic location). Then the user would be able to see a map with several other locations, and when the user clicks on one of these locations on the map, the marker would show a caption which would contain the distance between the clicked marker and the location stored in the input.

I believe you have everything in place to achieve this functionality (because now, when I set the marker’s caption to show the distance from the current marker to itself, it returns 0). So, in ‘origin address’ (see screenshot), instead of providing the option of current marker (which as I explained, it makes no sense), provide for example all the geographic inputs or search fields on the page).

Not sure if I explained myself correctly. Please let me know if you need more info.

Regards.


#6

@miguel - an interim solution for you. If you want to make things more dynamic, you can trigger a popup (or other container) when a map marker is clicked. In that popup, you can send specifically an address, or the relevant database record to make for a more design-friendly and dynamic experience.

GIF below of how to set it up.


#7

This is very interesting. I will explore it, thanks!


closed #8

This topic was automatically closed after 14 days. New replies are no longer allowed.