Class: Config

.xyz.maps.editor.Editor. Config

Configuration of map edit engine.
Example:
var config = {
     services: {
         reverseGeocoder: {
             'getISOCC': function(lon, lat, callback){
                 // do reverse geocode request to get isocc value
                 callback && callback(isocc);
             }
         }
     }
 };

 

Members Summary

autoConnectShapeDistance :number

If distance (meters) below value. auto connect shape to existing geometry will be executed.

autoSnapShape :Boolean

Enable/disable auto snap to existing link network while dragging link shapes.

disconnectShapeDistance :number

featureSelectionByDefault :Boolean

Select feature by default on tap/pointerup event

geoFence :Boolean

The area a link shape point can be dragged. turn off geoFence by default.

intersectionScale :number

Numeric scale of WGS coordinates for detecting an intersection.

keepFeatureSelection :Boolean|string

Keep features selected after mapviewchange or click on ground.
if set to false -> will be cleared after viewport change and click on ground.
if set to "viewportChange" -> will only be cleared on ground click.
if set to true -> no clear at all.

maxRoutingPointDistance :number

maximum distance of Routing Point in meters

minShapeDistance :number

Minimum distance in meters between two shape points for creating new links.

services :Object

Object specifies setting for backend service.
-reverseGeocoder: define function for accessing 'isocc'.

XTestMaxDistance :number

Maximum variance for crossing candidate detection in meter

Methods Summary

editRestrictions(feature, restriction) → {Boolean}

Callback for editRestriction validation.

Members Details

autoConnectShapeDistance :number [Optional]

If distance (meters) below value. auto connect shape to existing geometry will be executed.
Type:
number
Default Value:
  • 2

autoSnapShape :Boolean [Optional]

Enable/disable auto snap to existing link network while dragging link shapes.
Type:
Boolean
Default Value:
  • false

disconnectShapeDistance :number [Optional]

Type:
number
Default Value:
  • 3

featureSelectionByDefault :Boolean [Optional]

Select feature by default on tap/pointerup event
Type:
Boolean
Default Value:
  • true

geoFence :Boolean [Optional]

The area a link shape point can be dragged. turn off geoFence by default.
Type:
Boolean
Default Value:
  • false

intersectionScale :number [Optional]

Numeric scale of WGS coordinates for detecting an intersection.
Type:
number
Default Value:
  • 5

keepFeatureSelection :Boolean|string [Optional]

Keep features selected after mapviewchange or click on ground.
if set to false -> will be cleared after viewport change and click on ground.
if set to "viewportChange" -> will only be cleared on ground click.
if set to true -> no clear at all.
Type:
Boolean | string
Default Value:
  • "viewportChange"

maxRoutingPointDistance :number [Optional]

maximum distance of Routing Point in meters
Type:
number
Default Value:
  • 1000

minShapeDistance :number [Optional]

Minimum distance in meters between two shape points for creating new links.
Type:
number
Default Value:
  • 2

services :Object [Optional]

Object specifies setting for backend service.
-reverseGeocoder: define function for accessing 'isocc'.
Type:
Object
Example:
{
     reverseGeocoder:
     {
         'getISOCC': function(lon, lat, callback){
             // do reverse geocode request to get isocc value
             callback && callback(isocc);
         }
     }
 }

XTestMaxDistance :number [Optional]

Maximum variance for crossing candidate detection in meter
Type:
number
Default Value:
  • 2

Methods Details

editRestrictions(feature, restriction) → {Boolean}

Callback for editRestriction validation.
Parameters:
Name Type Description
feature here.xyz.maps.editor.features.Feature the map feature
restriction number restriction number representing a bitmask for the desired edit operations. 1 -> GEOMETRY CHANGE 2 -> REMOVE
Returns:
true -> yes. allow edit. false -> no. edit won't be executed
Type:
Boolean