mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
71159d83c3
Add display_raw_geometry setting to the map widget.
14 lines
416 B
JavaScript
14 lines
416 B
JavaScript
(function () {
|
|
farmOS.map.behaviors.geofield = {
|
|
attach: function (instance) {
|
|
instance.editAttached.then(() => {
|
|
instance.edit.wktOn('featurechange', function(wkt) {
|
|
instance.map.getTargetElement().parentElement.querySelector('[data-map-geometry-field]').value = wkt;
|
|
});
|
|
});
|
|
},
|
|
|
|
// Make sure this runs after farmOS.map.behaviors.wkt.
|
|
weight: 101,
|
|
};
|
|
}());
|