My current location on map

Hi,

I’m looking for a way to see my actual location on Maps at the same time I see my records. Did someone try (and success) to do it ?

Many thanks for your ideas :pray:

Hi,

You cannot adjust the size of the map plugin, so you cannot see the plugin and the entries of your base in a browser window.

Hi,

Thanks for your answer.
My question is : I want to see a point on the map wich show my live positon. See exemple attached (Red circle is me, green and yellow points are records in my base).

Thank you

Hello @Ruby_Kioube , and happy new year by the way !
I recently developed a rather manual solution that could maybe help you : I wrote my own script to create a map from my Seatable records. You can find it at GitHub - basteks/seatable-cartography: A Seatable script that allow you to display your records on a map
Basically, it’s just a .js script that display markers on a map based on the GPS coordinates of your records. I added an option in the script that let’s you decide if you want to display your current location or not, in addition to the markers.
As I said, this script requires the GPS coordinates of the markers you want to display. If you don’t have the coordinates but only the addresses and they are addresses from France, you can use my other script here GitHub - basteks/seatable-french-geocoding: A Seatable script that allows you to geocode your french addresses. As it is base on the national Addresses API, it won’t unfortunately work for anything but addresses from France.

I hope it can help you.

Bests,
Benjamin

Hi @bennhatton ,

Thanks a lot. I’ll have a look about your solution. I hope I’ll understand because I’m not a technical profil :wink:
I understand your map use GPS coordonnates in a field. I need to see my current location during my way. I don’t know if your solution is a dynamic one.

And Happy New year too :slight_smile:

Hi @Ruby_Kioube ,
The GPS coordinates are for static markers only (I understood you wanted to display such markers as shown on your screenshot, but maybe I’m wrong). You current position, though, doesn’t need GPS coordinates stored in Seatable, it’s actually your browser that gets it.
However, I didn’t understand that you want to track your position, for now I think the browser only gets the position once, but I think it’s easy to change (I’ll have to search a bit further). In the meantime, do not hesitate to ask if you have questions, I’ll let you know once I had a look.

Bests,
Benjamin

Hi @Ruby_Kioube, I checked further the geolocation feature of the browser, and it’s definitely possible to do what you want.
I slightly modified my cartography script : you can now choose between three values for the curPos variable setting how you would like to display your current location on the map :

  • "no" which is relatively obvious I gues :laughing:
  • "static" which gets your current position only once when the page opens
  • "track" which will updates the marker’s position while your position is changing.

You can try the tracking options on this link showing you few restaurants in an around Paris (be aware that the map centers on the markers, not on your position).

Bests,
Benjamin

Many thanks Benjamin :smiley: !

I think the second one (tracking) is exactly what I’m looking for. I’ll try to deploy by myself (not sure my poor skills are enough)

Thank you

Hi @Ruby_Kioube, the process should be simple even for a non-technician (but maybe I’m not objective, being on the other side of the line :joy: ) :

  1. (Optional) If you don’t have the GPS coordinates of your markers, you will need to find them. If they are french addresses only, you can use my script address_geocoding.js of https://github.com/basteks/seatable-french-geocoding. See bellow (steps 1 to ) for the process
  2. Create an empty JavaScript script in your base (you can read Creating a script on the Seatable user manual to help you).
  3. Go to https://github.com/basteks/seatable-cartography, copy the content of the map_generation.js file and paste it into your empty script.
  4. Modify the parameters in the //// Script configuration //// part at the beginning of the script. You can find a description of each parameter on the main page of the project. Basically, you’ll have to enter the names of the columns containing the longitude, the latitude, and other information concerning the popup that will display on each marker. For the moment, don’t worry about storing the html map file somewhere and just let the map URL has is (https://basteks.github.io/basemap.html).
  5. For your specific need, do not forget to set the curPos parameter to track (const curPos = "track";)
  6. Click the orange Run script button on the bottom of this window : the script should return, in the right-handed panel, the two following lines :
    • a link to the map (Click on this link to see the map) (please keep in mind that a simple click won’t open in a new tab)
    • the mention Script completed successfully

Let me know if you encounter problems or errors, I can help you in Private Message to set everything as needed

Bests,
Benjamin

1 Like

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