Function ID in OpenLayers 3: undefined

The object identifier OL2 was created internally. In OL3, this does not seem to be the case, since id is undefined. I tried using WKT, JSON, and KML sources, and none of them have identifiers assigned to functions. Is the identifier of the internal function removed from OL3? If not, what do I need to do to get the generated identifier. I am requesting an id via:

feature.getId();

This is a real drag and drop problem as I have no control over the files.

Greetings

+4
source share
1 answer

No, OL3 does not generate any function identifiers.

, . GeoJSON "id" ( ).

. setId . Draw, drawend .

OL3:

. , , .

, 1234 "1234" .

Identifiers are included when serializing functions in accordance with each format specification for function identifiers.

+4
source

Source: https://habr.com/ru/post/1622344/


All Articles