[OpenLayers-Users] SVG external graphic preserves aspect ratio

Alberto Romeu aromeu at prodevelop.es
Wed Apr 11 06:16:58 EDT 2012


Hi,

I'm trying to apply a SVG external graphic to a points layer. What I 
need is that the graphic size will be scale dependant and will not 
preserve the aspect ratio.

What I've found is whatever graphicHeight and graphicWidth I set to the 
externalGraphic, the SVG is rendered preserving the aspect ratio... If I 
use png works OK.

I've published an example [1] of what's happening. The green boats are 
PNG scaled correctly, the brown ones are SVG not scaled correctly, both 
have the same graphicHeight and graphicWidth.

Am I missing something? Is there a way to use SVG in the way I need?

Best regards.

[1] http://gis.prodevelop.es/openlayers/svg.html

-- 

Alberto Romeu
---

Prodevelop SL, Valencia (España)
Tlf.: 96.351.06.12 -- Fax: 96.351.09.68
http://www.prodevelop.es
---



More information about the Users mailing list