Talk:Overpass turbo/MapCSS

From OpenStreetMap Wiki
Jump to: navigation, search

Support for Labels

Do you plan to include support for labels and maybe derive label texts from actual tags (or maybe even several tags + string operations)? Mmd (talk) 09:19, 13 April 2013 (UTC)

Yes, but I'm not sure about some implementation details yet. It'll be pretty basic, I guess: no fancy label-collision-prevention, no text along paths, etc. - just simple captions at the center of or right next to features. Getting the label text from single tags will be pretty straight-forward. More customizing (multiple tags, etc.) could be done via MapCSS-evals.
This can/will also be implemented for the popup-contents.
--Tyr (talk) 16:52, 13 April 2013 (UTC)

No rendering of nodes

Is there a way to suppress the rendering of nodes in Overpass Turbo (apart from opacity: 0; fill-opacity: 0; ?). I only want to see the ways. Thanks! Nillerdk (talk) 08:37, 17 October 2013 (UTC)

Not via MapCSS in the moment, but there is a handy Overpass trick if you do not want to see the additional data of child elements: the skeleton output mode. So instead of http://overpass-turbo.eu/s/1ie you can just use http://overpass-turbo.eu/s/1if and really only get your ways without any unwanted by-catch. ;) --Tyr (talk) 10:01, 17 October 2013 (UTC)
Thanks! I wasn't aware of the different print-modes! Now the nodes don't show, but some short ways seem to be displayed with circles: http://overpass-turbo.eu/s/1jK. Do you know what is going on? Nillerdk (talk) 11:16, 21 October 2013 (UTC)
Yes, in principle, this is expected behaviour: As soon as a line or polygon gets smaller than a certain threshold, it is rendered with a marker just like a POI. This is necessary to get a “fair” visibility of small objects at low zoom levels (otherwise, when searching for sparsely distributed features you would always be able to see POI nodes but not POI buildings!). That said, I know that under some circumstances (like in your example) this rendering can be quite annoying. At the moment you can only deactivate this feature globally in the settings (settings->map->checkbox at “Don't display small features as POIs”). But, I'm working on a better solution for this.
PS: See this enhancement ticket for further details. --Tyr (talk) 12:45, 21 October 2013 (UTC)

What exactly is "overpass query"?

The page says: <osm-script> ... your overpass query here ... </osm-script> What exactly is "overpass query" in it?

Beacuse the following code returns an error:

Example code

and the error reads: An error occured during the execution of the overpass query! This is what overpass API returned:

Error: line 1: static error: Element "osm-script" must not contain text.

--Rmikke (talk) 19:34, 4 November 2015 (UTC)

http://wiki.openstreetmap.org/wiki/Overpass_turbo/MapCSS#How_to_Use should be now better Mateusz Konieczny (talk) 22:16, 4 November 2015 (UTC)
Hm. I've now changed all examples to use Overpass QL and just dropped the XML-variant (as it is considered obsolete by now).
What do you think?
--Tyr (talk) 07:46, 5 November 2015 (UTC)

maki...

does not support .png anymore (?) Dex2000 (talk) 17:21, 16 March 2017 (UTC)

The icon set is now in SVG format (https://github.com/mapbox/maki/tree/master/icons), but it's easy to derive PNG sets for any size we want, or just add support in MapCSS to include SVG icons directly (unless there are browser problems compatibility to view the rendered maps, but I think we already depend on SVG for rendering Overpass turbo results. The SVG specs already defines simple way to embed or reference SVG icon sets for markers, so I don't think this is a problem). Using SVG would still allow better rendering notably on smartphones with Hi-DPI displays. — Verdy_p (talk) 18:28, 16 March 2017 (UTC)
Hi Verdy, my opinion was not to find a solution. What i mean is, that the wiki-page is wrong for that. Dex2000 (talk) 19:00, 16 March 2017 (UTC)
How exactly is the wiki-page wrong on that? For me, (legacy) maki icons still work on overpass-turbo.eu: http://overpass-turbo.eu/s/nzj --Tyr (talk) 19:30, 16 March 2017 (UTC)
Uh, have not tried this... But the Link to github in #Icon_Sets doesnt works. Dex2000 (talk) 20:06, 16 March 2017 (UTC)
Yes that link is dead. I suggest replacing it (but in fact the icon set is managed in the overpass development repository which holds its own local copy of the icons). I'd say that the link in this page is just informative about its original source. But it is not needed to have Overpass turbo/MapCSS working and being installable (anyway, users of MapCSS can choose the icons sets they want for their stylesheets, any implementation of MapCSS should not depend on the avaiability of the original Maki repository which may change at any time without notice).
But I think that Maki developers should have better left the links to PNG icons still working as is, even if they are no longer maintained, as they were clearly in a separate folder and did not cause any conflict with newer SVG icons; their storage cost in their repository was very small.
May be we can replace the links to PNG icons by a link on one mirror (such as the mirror already made within Overpass's repository). — Verdy_p (talk) 22:41, 16 March 2017 (UTC)
Oh, this is about the links on the wiki-page. Yeah, let's improve that. I put in a link to the old legacy (v0.5) maki icons, which are the ones available on overpass-turbo. And thanks Verdy_p for making it more clear that this section is about the icons that come "pre-installed" with overpass-turbo and that one is not limited to these! -- Tyr (talk) 08:13, 17 March 2017 (UTC)