Is there a way to remove the geometry picker add location button? Essentially turning it into a list of coordinates
-
It sounds like you want the user to choose from a list of pre-defined geometries, rather than allowing them to draw one on the map. The Item Picker would be the more appropriate component for this.
The Geometry Picker shows the "Add Location" button until the user has added the number of geometries specified by "Maximum Geometries". The button is then hidden.
0 -
I would like the user to type coordinates into a text input box and have them get added to a list. Part of the workflow I would like to include is the ability to remove a coordinate if entered in error. The geometry picker allows the user to remove a feature if needed. Has everything i need except I do not want the user to have the ability to manually add geometry.
0 -
Interesting question. This is doable, but you may need to play around to remove that button. You can throw css updates before and after you form to hide/show that sort of button using display:none; You may be able to even select that button specifically to hide it but I've not had much fortune isolating forms to do this myself, so you might need to toggle off all buttons of the type before getting to the form and then turn them back on after your form.
Then, add a button and two text boxes. On the button press, get the coords from their boxes and create your points. Throw them into the geometry picker's .value property. Also create some objects for each with a property {content: $point.geometry}, put them into an array and throw them into the geometry picker's .state property. Then clear your boxes and you're good to go!
0 -
Hi Zack, that solution worked great to remove the button. I appreciate your help. I ended up putting this line of code in the inject CSS function
.gcx-forms.defaults .GeometryPicker .add-shape .add, .gcx-forms.defaults .FilePicker .add-file .add div {
display:none;
}
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare