[josm-dev] Custom K/V Tags in MAPCSS?
Alex Rollin
alex.rollin at gmail.com
Thu Jul 17 01:07:46 UTC 2014
Hi!
Let me try again, I am sorry I am not giving the right information.
We work with OSM! You can check out our city on the map:
http://www.openstreetmap.org/#map=13/-6.5988/106.7778
We do a LOT of tracing and we also add a lot of POIs. We have a very nice
JOSM Style that works very well.
However, we also use some local OSM files. The example is JULY_SURVEY.osm
(a local OSM file, saved on the desktop)
In the survey file we put some points that have key=oursurvey
value=information
Our issue is that the MAPCSS in JOSM refuses to style this data. We assume
this is because it is a custom key.
This is the style we are trying to use:
node[oursurvey=information] {
icon-image: "icons/triangle.png";
This common key DOES work :
node[amenity=information] {
icon-image: "icons/triangle.png";
This ACTUAL key also works:
node[tourism=information] {
icon-image: "icons/triangle.png";
But, why can't we use a custom tag? If we use an OSM tag, there is a
chance we will accidentally upload this data, which is just some
housekeeping data, and not good data for the OSM database.
This seems like a bug, that the MAPCSS engine in JOSM won't recognize a
custom key.
I highly recommend you try it for yourself!
I just added a JOSM ticket because I must think after so much testing that
this is not desired behavior. It seems the folks here think I have some
kind of data or issue making a style. No! I have a VERY long MAPCSS file
with lots of POI tags working very well, really!
https://josm.openstreetmap.de/ticket/10271#ticket
--
Alex
On Thu, Jul 17, 2014 at 7:42 AM, Tod Fitch <tod at fitchdesign.com> wrote:
>
> On Jul 16, 2014, at 5:11 PM, Alex Rollin wrote:
>
> > I think this is a bug. Maybe someone would like to check it for
> themselves.
> >
> > Basically, it seems to me that it is not possible to use a custom key to
> > create a new style rule.
> >
> > These are MapCSS examples we have tried:
> >
> > We want to use a custom tag for our style, like this, but it does not
> work:
> >
> > node[oursurvey=information] {
> > icon-image: "icons/triangle.png";
> >
> >
> > This common key DOES work :
> >
> > node[amenity=information] {
> > icon-image: "icons/triangle.png";
> >
> > This ACTUAL key also works:
> >
> > node[tourism=information] {
> > icon-image: "icons/triangle.png";
> >
> >
> > Why doesn't our custom key work? Is there a list of pre-approved tags
> that
> > are allowed?
> >
> > --
> > Alex
>
> I haven't used the CartoCSS setup yet but I did a custom map using the
> older Mapnik XML styles and one thing that comes to light pretty quick it
> that you need two things for something to render: First it has to get into
> your local database, so you need to change osm2pgsql.style to tell
> osm2pgsql what tags and tag values you need. Second you need to describe
> how the tag/values should be rendered in Mapnik either through mapnik XML
> directly or via CartoCSS.
>
> Sounds like you have the second items covered but I don't recall you
> mentioning that you've addressed the first part about getting your custom
> tags into the PostgreSQL database.
>
> Tod
More information about the josm-dev
mailing list