If I remember well, I had to add “Geolocation” in the list of Options in the fieldtype within Web Form Field doctype. Doing this you can use it on the webform you are using. For example, if you need a geolocation field in the Address webform, you should go to that web form (/desk#Form/Web Form/addresses in v12) and add the field with the Geolocation fieldtype. Only then you can use the code I post before. The data is stored automatically, like any other fieldtype in a webform.
at the moment a user has to manually select a pin n drop in the map n then save,
can the pin come by default on the current location so user dont have to manually put it…
i want to make it a “read only” field in attandence check in and so we should know where user checkin from… if usr can manually select then they can sit at home n drop pin at office location n checkin… which is very wrong…
Hi, right now i have problems using the geolocation field to just show the geolocation of the address I have on my document. I know I will have to convert the address to coordinates but how do I feed these coordinates to the geolocation field to display this location on the document?
Trust you’re doing great. Can you give a simple example of how to achieve this via script ? Issue is that the geolocation field seems to always remain undefined until the user directly interacts with the map like adding a marker etc. The issue with this is that when a map view is automatically set via script, it doesn’t get saved! Once the form is saved, map view reverts to default
This only works when the form is launched. It doesn’t persist upon saving because we are setting the location via script and there is no property in the geoJSON data for this. I guess it just uses some default value for the zoom
There is a small problem. There is a default marker placed at 100,10 so the camera flies from that default location to the newly added location. How to solve that.