Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature properties as attributes #7

Open
kroneman opened this issue Oct 29, 2019 · 1 comment
Open

feature properties as attributes #7

kroneman opened this issue Oct 29, 2019 · 1 comment

Comments

@kroneman
Copy link

Hey,

First of all great library, took a bit to find but does what I need it to do and works well.

Is it currently possible via configuration or otherwise to take a feature's properties and add them to the path that's created?

GeoJson

{
  "type": "Feature",
  "properties": {
    "country": "indonesia",
    "continent": "asia",
    "canReach": "irkutsk, yakutsk, mongolia, kazakhstan"
  },
  "geometry": {
    "coordinates": [
      ...
    ],
    "type": "Polygon"
  },
  "id": "indonesia"
}

Svg Path

<path
        class="polygon indonesia"
        id="indonesia"
        country="indonesia"
        continent="asia"
        d="M65.143936 69.31215L64.577561 ...."
        stroke="#333"
        stroke-opacity="0.7"
        stroke-width="0.2"
        stroke-linecap="round"
        stroke-linejoin="round"
        fill="#FFAA00"
      />
@NMC92
Copy link

NMC92 commented Sep 17, 2022

+1. I'd also like this feature to be made available. I need to export the id attribute from the GEOJson feature to the SVG paths and circles that are generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants