Please help! I need to show the current location of the user (like the blue dot in G maps) in my web app maps,but i have no idea how.
You need to perform an api call that retrieves the current geographic location of the user
I donât mean to discourage you, but this is a broad question. Many answers are already online or easy to find with a quick search.
The steps will depend on which map service you use, Google Maps or something else. When you get to the specifics, the group is good at helping out.
Here are couple of pages to help you get started:
Hi @lester1 . I know those documents and my question is not broad. I want to show the real time location (or almost real time) of a user on a map on a web app. and in fact this documents donât go into detail. Thatâs the problem
Thanks mate. Wouldnât that just kill the API quota if i have many users accessing that feature daily? e.g. going to maps and looking for something near them and literally calling the api every 5 seconds..fore very user?
Sort of needing to call an api to get current location, but not exactly. Bubble has the built in âcurrent geographic positionâ dynamic expression, nothing else.
One thing to note, users MUST give consent to provide that information to your app, and in the event they do not consent, there is nothing that would alert you necessarily except the fact that 'current geographic positionâ will be empty, at which point the best thing you could do is run an api call to get the details from the browser (of which many free plugins already have that functionality) and use the browser details which can be wildly off base due to the very nature of how that works.
Yes, so many different map elements and plugins and different reasons why it is such a headache for the OP, such as is the issue the âblue dotâ instead of a traditional icon marker or is it the retrieval of the actual location and why the âcurrent geographic positionâ is not working.
Thanks a lot Matthew. But my challenge is I want to show the user position AND a list of markers (hotels) on the map, at the same time. So in the ânumber of markersâ tab Iâve put a list and in the markers address field, naturally, Iâve put the list of hotels. Think of looking for âhotels near youâ on google maps and seeing the blue dot and markers around. Thatâs what I want to achieve
Feed the map two lists at once using merged with operator. Its lists of address, not things. But that might be difficult depending on map element and requirements for how to populate the map. I personally do not use native map element and have used leafy map plugin mostly.
This topic was automatically closed after 70 days. New replies are no longer allowed.
