During carto style definition I would like to enlarge some svg's icons depends on zoom level. I'm wondering if it's possible to override some SVG file attributes in .mss files? In example I would like to override width and height value defined already in SVG file. Or scale up svg for specific scale.
For example: [highway = 'motorway_link'] { [zoom >= 16 ] { marker-scale: 2; } marker-fill: @motorway-oneway-arrow-color; }

or

[highway = 'motorway_link'] { [zoom >= 16 ] { marker-width: 15; marker-height: 15; } marker-fill: @motorway-oneway-arrow-color; }

asked 23 Mar, 10:30

engopy's gravatar image

engopy
1261214
accept rate: 0%


Please look at the Mapnik documentation, there are some marker-related functions like marker-transform:

https://cartocss.readthedocs.io/en/latest/mapnik_api.html#markers

permanent link

answered 23 Mar, 10:47

kocio's gravatar image

kocio
2.0k12141
accept rate: 20%

3

I wasn't aware there are so many possible configurations for SVG. actually: marker-width: marker-height: does what I needed Thanks

(23 Mar, 14:04) engopy

Exactly what you have ordered... :-)

(23 Mar, 14:12) kocio
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:

×334
×61
×21

question asked: 23 Mar, 10:30

question was seen: 119 times

last updated: 23 Mar, 14:12

powered by OSQA