Skip to content

Feature suggestion: style function #27

@vincentsels

Description

@vincentsels

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions