Reading/writing foreign members from/to GeoJSON
See original GitHub issueThe GeoJSON format allows to store additional properties in objects (RFC 7946, section 6.1), but OpenLayers does not read and write them.
Expected behavior:
import GeoJSON from 'ol/format/GeoJSON';
const parser = new GeoJSON();
const geometry = parser.readGeometry({
type: 'Point',
coordinates: [0, 0],
kind: 'bakery'
});
console.log(geometry.getProperties()); // currently: {}, expected: {kind: 'bakery'}
console.log(geometry.getKeys()); // currently: [], expected: ['kind']
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Converting between GeoJSON and sf
As per GeoJSON (RFC 7946 specification), foreign members are ignored, and nested objects and arrays inside the properties object are converted ...
Read more >What does it mean to extend GeoJSON without using a foreign ...
Implementations MUST NOT extend the fixed set of GeoJSON types. They're referring to the type, which is stored in type , for example...
Read more >geojson - Rust - Docs.rs
This crate helps you read and write GeoJSON — a format for encoding geographic ... if you only need geometry and properties (and...
Read more >GeoJSON
GeoJSON is a format for encoding a variety of geographic data structures. ... GeoJSON supports the following geometry types: Point , LineString ,...
Read more >GeoJSON — GDAL documentation
This driver implements read/write support for access to features encoded in GeoJSON format. GeoJSON is a dialect based on the JavaScript Object Notation ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your preferred way of doing it is incorrect.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.