It works well in the desk side, but it seems that this geolocation field type cannot be seem in a web form. When I create a new field in the web form, I see the geoposition field from the doctype, but the is no “Geolocation” in the list of field type.
Is there any standard way to show this field in web form?
I’m running into a similar issue. I’m trying to read data from form field then change the market on the map. This is my code, but it doesn’t move the market.
frappe.ui.form.on("Shipment", "vessel_location", function(frm) {
var imo = cur_frm.doc.imo_number_vessel;
var latitude= 50.454100;
var longitude= -2.370833;
cur_frm.get_field("location").locate_control._marker._latlng.lat = latitude;
cur_frm.get_field("location").locate_control._marker._latlng.lng = longitude;
Any suggestions pls ? Also, if the html header approach isn’t feasible, could you pls give some guidance on how to add the plugin via custom script? If I can get a better idea how to add a plugin, I think I could figure the rest out
Could you pls give some more insight on how you achieved this? How were you able to access the map’s HTML? Did you have to use a separate field other than the geolocation field itself?