Skip to content

Add feature option and perhaps other callback properties to geojson2mapml options #1031

Open
@prushforth

Description

@prushforth

I found that it's convenient to use the geometryFunction option to set classes on the root map-(point,line etc) element. I am thinking that there should be other callback opportunities (I believe there is the possibility to provide a function for the caption and properties options, but I didn't experiment with them yet).

One such callback could be a feature (callback) option, which would give you the opportunity to post-process the <map-feature> to say, add class values and whatever else. You could pass it the javascript feature by default for convenience, so you could derive class values from readily available javascript properties. This would be more efficient that first setting classes on a geometry root element and then having to post-process the feature to copy/move the classes from there to the <map-feature> element, for example. Also, it could be an opportunity to fire an event, etc.

Ideas below!

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIMap and associated elements' non-declarative API (events and methods)enhancementidea

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions