Feature suggestion: style function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 193
- Forks
- 91
- PR merge metrics
- No merged PRs in 30d
Description
The resulting kml is without style, which isn't surprising - GeoJson doesn't inherently contain any style information either. However, Google Maps (and probably pretty much any maps library which supports GeoJson) has a way to give each feature a style, based on some properties. In the case of Google Maps, you can supply a single 'styling function', which is executed for every feature that's displayed on the map. Could we introduce a similar concept in this library? A styling function which accepts a feature and should return e.g. a json representation of the kml Style element? In its most basic form, this could generate inline style. Another option would be to work with style references, where a function determines which (static) style should be used for the specified feature, and then an map containing the definition of each of these (static) styles (still in json form). A combination of both would be ideal, so that a combination of both static as well as dynamic styles (depending on the feature's properties) is possible.
Any thoughts? If you agree, I'll be happy to give it a shot.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points; begin by locating the GeoJSON-to-KML conversion entry point and its tests. Confirm the styling API and supported inline, static-reference, and mixed styles with maintainers; done means the agreed behavior is implemented and tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100