Automatically move the map onto the feature, add arguments to helpers

This commit is contained in:
Pieter Vander Vennet 2021-07-20 01:59:19 +02:00
parent 4fa9159da1
commit aa9045fd13
5 changed files with 58 additions and 22 deletions

View file

@ -121,6 +121,10 @@ export default class ValidatedTextField {
// Bit of a hack: we project the centerpoint to the closes point on the road - if available
if(options.feature){
const lonlat: [number, number] = [...options.location]
lonlat.reverse()
options.location = <[number,number]> GeoOperations.nearestPoint(options.feature, lonlat).geometry.coordinates
options.location.reverse()
}
options.feature