Web 2.0 LocationSelected event wrong location

Hi team,

Xojo 2023r3.1 on Mac Ventura 13.5
I’m adding WebMapLocations of bushfires on a default WebMapViewer directly placed on a web page (not in a container).

The locations are displayed correctly with the default pins and the titles are correctly labelling the locations.

I make a route from GeoJOSON to show the bounds of each bushfire. Is there a way I can draw multiple routes at once? I wasn’t able to do this, so I added the selectedLocation event to draw a route when the user selects a specific location. This works.

me.Mode = WebMapViewer.Modes.View
me.RemoveRoute
me.RouteDrawingColor = Color.Teal
me.DrawRoute(route)

But, when I click on a pin, the LocationSelected event displays another location, and when I click again it cycles through the different locations on the map.

What am I doing wrong? Is this the correct event to use for a user to select a location? I tried using the Pressed event but that doesn’t always match the lat and long of the location.

thanks!

Hi Michelle,

Is this happening with the latest Xojo version? Could you please create a new Issue attaching a sample project?

This is not possible at the moment, but you can create a Feature Request for that, I think it’s reasonable.

Thank you.
I have created a new issue https://tracker.xojo.com/xojoinc/xojo/-/issues/75305
and a feature request https://tracker.xojo.com/xojoinc/xojo/-/issues/75306

1 Like