forked from MapComplete/MapComplete
Automatically move the map onto the feature, add arguments to helpers
This commit is contained in:
parent
4fa9159da1
commit
aa9045fd13
5 changed files with 58 additions and 22 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue