How can I select markers created on the map?

I have a list with latitude and longitude. With that list, I put several markers on the map. But I can not select the marker. I want to press a marker to display information about the marker on another screen. What should I do?

what about using the same screen?
see also tip 1 here

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

Within the tutorial How to display Map runtime Markers, calculate distances, determine closest is information you can use.

The Markers you create have a click event Click()

The Click event runs when the user taps on the design time Marker … See Marker
You are using a run time Marker which requires coding using the Any components. You use a different approach … see the Blocks.
Based on your press of a run time Marker, you want to display information about the marker on another screen.

Part of what you might need to do

clickMarker

using this code
dynamicMarkerClick

displays the latitude and longitude of the design time component in Label1.

You have two options to transfer this information somewhere:

  1. do not use another screen, use virtual screens and use the information in Label1 immediately (preferred)
  2. Switch screens and pass the information you provide in the ‘Click’ block to the ‘other’ screen using either a TinyDB or one of the awkward methods some beginners insist on using perhaps a Block like sendToScreen I avoid this by using virtual screens.

What you code depends on what you expect to display in the other ‘screen’ …
You don’t have to send latitude and longitude… use the Click event to do other things, display an image, play a sound.

Use the above tutorial link as a guide work with run time Markers.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.