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

A feature with point is shown as a circle #209

Open
aloxe opened this issue Apr 29, 2024 · 3 comments
Open

A feature with point is shown as a circle #209

aloxe opened this issue Apr 29, 2024 · 3 comments

Comments

@aloxe
Copy link
Contributor

aloxe commented Apr 29, 2024

The feature in the example https://pigeon-maps.js.org/docs/geo-json

  features: [
    {
      type: "Feature",
      geometry: { type: "Point", coordinates: [2.0, 48.5] },
      properties: { prop0: "value0" },
    },
  ],

renders as

<svg width="667" height="300" viewBox="0 0 667 300" fill="none" xmlns="http://www.w3.org/2000/svg">
  <g clip-rule="evenodd" style="pointer-events: auto;">
    <circle cx="67.27860400017107" cy="178.1113652196019" fill="#d4e6ec99" stroke-width="1" stroke="white" r="20"></circle>
  </g>
</svg>

This may be useful for some cases but I would not use it as the default behaviour to display a point. When a trace is shown by joining points, this gives an ugly line of circles.

Screenshot 2024-04-29 at 8 02 14
@aloxe
Copy link
Contributor Author

aloxe commented Apr 29, 2024

@mariusandra I don't know what you had in mind in this case but I think that a point should not trace anything but a dot. This may be used with "properties" added to the feature but I would keep this outside of pigeon.

@aloxe
Copy link
Contributor Author

aloxe commented May 4, 2024

I tried the same trace with leaflet and there is also an issue with points because leaflet marks them with a marker.

Screenshot 2024-05-03 at 22 45 37

Nevertheless, I think this could be good if we could choose how we want the points to appear on the map.

@mariusandra
Copy link
Owner

Hey, seems like a bug. Any chance you'd be up for submitting a PR to fix it in some way? I'm not actively using this library myself, so never stumbled upon it, and need to find time to work on a fix. Happy to quickly merge a fix though.

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