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

fix bug with numeric properties in custom map data #8825

Merged
merged 4 commits into from
Dec 7, 2021

Conversation

k-yle
Copy link
Collaborator

@k-yle k-yle commented Nov 23, 2021

If you upload a geojson file under "Custom Map Data" with properties that are numbers, the tag editor gets confused:

image

This PR fixes that bug. It can be tested with this file:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": { "a": 1 },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [174.70733642578122, -36.83456911447563],
          [174.90234375, -36.83237080155681]
        ]
      }
    },
    {
      "type": "Feature",
      "properties": { "a": 2 },
      "geometry": {
        "type": "LineString",
        "coordinates": [
          [174.89273071289062, -36.80928470205938],
          [174.94491577148438, -36.890604744644705]
        ]
      }
    }
  ]
}
Loading

@tyrasd
Copy link
Member

tyrasd commented Nov 23, 2021

I think if we address this, we should address all data types that might potentially be included in a GeoJSON file. Also the raw tag editor module was not the right place to fix this. I've pushed 3373f1b to your branch, which should address both of these issues. Let me know if that is fine for you.

@tyrasd tyrasd added the bug A bug - let's fix this! label Nov 23, 2021
@k-yle
Copy link
Collaborator Author

k-yle commented Nov 23, 2021

thanks @tyrasd !

@tyrasd tyrasd merged commit 144f3e9 into openstreetmap:develop Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants