The CoordinatesUpdateHook will be called whenever the coordinates of a feature are added, updated or removed ('Coordinates.update' operation).
the feature whose coordinates are updated
the previous coordinates before they are updated
The Possible types of an EditorEvent
The FeatureRemoveHook will be called when a feature is being removed ('Feature.remove' operation).
The NavlinkDisconnectHook is called whenever a Navlink is disconnected from an intersection ('Navlink.disconnect' operation).
The NavlinkSplitHook is called whenever a Navlink is devided into two new Navlinks. ('Navlink.split' operation).
The two newly created Navlinks that are replacing the original Navlink.
The index of the coordinate in which the split takes place and the new navlinks are connected to one another.
The Navlink that will be split.
The relative position on the Navlink's geometry where the split happened. The range of values is from 0.0 to 1.0, where 0 represents the position on the first and 1 on the last coordinate.
A RangeSegment is the part of a "Range" that's located at a specific LineString geometry or Navlink feature.
The GeoJSONFeature or Navlink the RangeSegment is located at.
Relative start position on the geometry of the Navlink. 0 -> 0% -> start, 0.5 -> 50% -> middle, 1 -> 100% -> end
The indicates if the direction of travel of the Navlink is in reverse order, compared to the direction of travel of the first Navlink that's has been added of the RangeSelector.
Relative end position on the geometry of the Navlink. 0.5 -> 50% -> middle, 1 -> 100% -> end
Generated using TypeDoc
XYZ Maps JS: Editor
XYZ Maps is an experimental and work in progress open-source map editor written in TypeScript/JavaScript. The editor module provides an API for editing map data that can be used to easily access, add, remove and edit various types of map data. Changes can be automatically synchronized with various remote backends services.
Links
Installation
Install XYZ Map Editor by using
# install using npm npm install @here/xyz-maps-editor
or
# install using yarn yarn add @here/xyz-maps-editor
Example Usage:
Create a map editor
import MapDisplay from '@here/xyz-maps-display'; import {Editor} from '@here/xyz-maps-editor'; const map = new MapDisplay( display, { zoomLevel : 18, center: { longitude: 8.53422, latitude: 50.16212 }, // add layers to the display layers: layerSetup }); const editor = new Editor( map, { // add the layers that should be edited layers: layerSetup });
Start developing
Install node module dependencies
yarn install
In case yarn is not installed already: install yarn
watch for source code changes and build dev version
yarn run watch-dev
Builds are located in located in
./dist/
Other
build dev version once
yarn run build-dev
(located in packages/*/dist/)build release version only
yarn run build-release
(minified...)License
Copyright (C) 2019-2022 HERE Europe B.V.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details