Skip to content

Instantly share code, notes, and snippets.

@amiad
Last active August 1, 2023 11:20
Show Gist options
  • Save amiad/e4e7187e906a716ec279fdd0bb28b051 to your computer and use it in GitHub Desktop.
Save amiad/e4e7187e906a716ec279fdd0bb28b051 to your computer and use it in GitHub Desktop.
{
"version": 8,
"name": "Overpass-treee",
"sources": {
"overpass-points": {
"type": "geojson",
"data": "overpass://Q/nw%0A%20%20%5Bnatural%3D%22tree%22%5D%0A%20%20(area%3A3606195356)%3B%0Aout%20meta%20geom%3B"
}
},
"layers": [
{
"id": "tree",
"type": "symbol",
"source": "overpass-points",
"minzoom": 12,
"layout": {
"text-field": [
"coalesce",
["get", "name:he"],
["get", "name_en"],
["get", "name"],
["get", "species:he"],
["get", "species"]
],
"text-font": ["Open Sans Cond Bold"],
"text-anchor": "top",
"text-offset": [0, 0.5],
"text-size": 18,
"text-letter-spacing": 0.2,
"text-optional": true
},
"paint": {
"text-color": "#43634d",
"text-halo-color": "white",
"text-halo-width": 1.5,
"text-halo-blur": 1.5
}
}
]
}
@HarelM
Copy link

HarelM commented Jun 26, 2023

It should be
overpass://Q/nw...
The Q was added at a later part of the implementation, sorry...

@amiad
Copy link
Author

amiad commented Jun 27, 2023

I added overpass://Q/nw..., and The circles displayed. But I want to show labels form species tag only and still not working.

@HarelM
Copy link

HarelM commented Jun 27, 2023

Looking at the overpass data most tree don't have those, some are using the language tag.
Out of 10K tree only 74 has this tag, I think you should refine the query to bring only trees otherwise you'll hit the overpass turbo limit quickly...
Also the font that you have selected are not supported I think, try Open Sans Regular or Open Sans Cond Bold
Hope that helps...
Feel free to send a PR to improve the docs, or add that in the issue you reported the original problem.

@amiad
Copy link
Author

amiad commented Jul 10, 2023

הקוד עדיין לא עובד ב־ihm.
אני מקבל שגיאה במסוף:

Line 1: "type" member required

@HarelM
Copy link

HarelM commented Jul 11, 2023

See the following gist:
https://gist.github.com/HarelM/5350902c7245a34ad1eaf69d02b732d0
Here is how it looks when I zoom in.
image

@amiad
Copy link
Author

amiad commented Aug 1, 2023

תודה, עכשיו זה כמו שרציתי. רק ביטלתי את השכבה של הנקודה ושיניתי צבעים.

תמונה

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment