Embedded map view: onPress

Hi, I am using the 'Embedded map view (beta), and I am trying to use the Component::onPress event.

When a user clicks on the embedded map, I would like to read the new GPS coordinates directly off the map. Is that possible at all? I just seem get an empty object.Tested this with the iPhone and Android.

Interestingly, it seems to work okay for the Component::onMarkerPress event from the map view component. There I do get the coordinates (for both iPhone/Android).

Also, it would be great to be able to dynamically update the embedded map initial map region/makers (so they do not need to be assigned at page-mount time, as that limits the functionality and the user needs to open a child screen to view the new map coordinates, makes it an awkward user experience).

Any help greatly appreciated, thank you.

Hi. Looks like this question is not responded yet. I am also interested in the same sort of info.

Hi. Which formula do you use to show the coordinates? Thanks

I’m interested of this also. I get empty object, from KeyPress event.

I don’t know how to create new markers, if you can not point new location from the map.

Is the Embedded Map View only possible map solution for Appgyver?
And I know you can use webView, but that does not help eighter.

Hey, folks! Any news about this?

I am using the component and managed to show my data record of markers, however it’s being tricky to allow users to add new markers, the onPress event keeps returning an empty object instead of the tapped point coordinates.

Hello @Quemuel_Vital,
Did you manage to show other users’ current geolocation on the embedded map? I can see where I am on the map, but I haven’t figured out how to show other users (riders) location and track their real-time geolocation. Since you managed to show your data record of markers, I thought you could help me with this. Thank you so much!

Julie

1 Like

@Hiapo_Julie, sorry for the delay!

If you still need help that was my process, I created a data variable to receive the records from the database and used a formula on the Markers to render field, as seen below:

image

The formula was as follow:

MAP(data.[myDataVariable], 
  {label: "Ajude!",
   payload: {data: [item.qtd, item.details]},
   iconName: "heart-o",
   iconSize: 50,
   latitude: +item.geoLoc.coordinates[1],
   iconColor: "#54b254", 
   labelFont: "Poppins", 
   longitude:  +item.geoLoc.coordinates[0],
   labelColor: "#000000"}
)

I used multiline on the formula code only here to easening view, but keep only one line on the Appgyver’s formula field editor.

Some fields I passed a static string and others I mapped to the record properties with the item.property notation. Worked just fine, but I needed the onPress event so ended up using google maps API with a web view.

I hope it will be useful!

Hello,
Thank you so much for this!!! Let me study what you did exactly. I might have some follow-up questions later :slight_smile: