I want a control circle as a icon (transparent). That I can set on in Mappaintstyle. Josm and zoom levels, in relation to the length and width of an icon

Is there a table to see these relations? zoomlevel 1= x px or x mm zoomlevel 2 = y px or y mm

So I can make for every zoomlevel a icon.

For example 500 meter icons

asked 05 Feb '17, 18:30

Allroads's gravatar image

Allroads
168121322
accept rate: 0%

edited 05 Feb '17, 20:59

just for clarification: is your question about programming a map style for JOSM?

And please could you emphasize your "question"? I do not see a single "?" in your text. :-)

(05 Feb '17, 19:34) aseerel4c26 ♦

My question is about the size for making icons for use in the Map Paint Style. So that i can give (programming mapstyle) each zoomlevel, there own icon. That size fits, for example 500 meter radius on each zoomlevel.

There must be a relation between zoomlevel, size of the icon, to showing the correct, example 500 meter radius circle on the map. Just like the distance indicator on the JOSM screen. I would like to have a circle on a node.

I was looking for this JOSM relation table.

Also for programming mapstyle. Node is the middle of the circle. Must be set like; icon-offset-x:65;
icon-offset-y:65; must be the middle of the icon and maybe there is information if you have a icon in px or mm, what this offset is. to set middle point.

(05 Feb '17, 21:32) Allroads

If you want to display a circle then using symbol instead of an icon sounds more reasonable. See https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Iconandsymbolstyles

Regarding size calculations, you could have a look how its done in the Lane and Road Attributes mappaint style https://josm.openstreetmap.de/wiki/Styles/Lane_and_Road_Attributes

some extracts from there:

/*------------------------------*/
/* Pixel per metre (on average) */
/*------------------------------*/
*|z16  { pixel_per_metre: 0.625; }
*|z17  { pixel_per_metre: 1.25; }
*|z18  { pixel_per_metre: 2.5; }
*|z19  { pixel_per_metre: 5; }
*|z20  { pixel_per_metre: 10; }
*|z21  { pixel_per_metre: 20; }
*|z22  { pixel_per_metre: 40; }
*|z23  { pixel_per_metre: 80; }
*|z24  { pixel_per_metre: 160; }
*|z25  { pixel_per_metre: 320; }
*|z26- { pixel_per_metre: 640; }


/*-------------*/
/* Street lamp */  
/*-------------*/
node|z17-[highway="street_lamp"]::Lighting_1
{
symbol-shape: circle;
symbol-size: eval(12 * prop(pixel_per_metre,"default"));
symbol-fill-color: white;
symbol-fill-opacity: 0.07;
}
node|z17-[highway="street_lamp"]::Lighting_2
{
symbol-shape: circle;
symbol-size: eval(18 * prop(pixel_per_metre,"default"));
symbol-fill-color: white;
symbol-fill-opacity: 0.05;
}
node|z17-[highway="street_lamp"]::Lighting_3
{
symbol-shape: circle;
symbol-size: eval(25 * prop(pixel_per_metre,"default"));
symbol-fill-color: white;
symbol-fill-opacity: 0.05;
}
permanent link

answered 11 Apr '17, 21:56

Klumbumbus's gravatar image

Klumbumbus
483178
accept rate: 9%

Thanks, I must try it out.

(11 Apr '17, 22:47) Allroads
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×521
×49

question asked: 05 Feb '17, 18:30

question was seen: 1,260 times

last updated: 11 Apr '17, 22:47

powered by OSQA