Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm working on a project that has involved creating many recolourable SVG icons and bringing them into QGIS. These are then used in layer symbologies, with these subsequent layer styles exported as .qmls and .slds.

When I open these .qmls on another computer the svg points are not attached - rather there is just a blank spot. I've tried to get just the svgs to load by exporting the style library from the computer that all of the svgs were created on. However, when I imported this into another computers style library everything was once again blank. Putting the folder with all of the svgs in the C:\Program Files (x86)\Quantum GIS Lisboa\apps\qgis\svg directory is not working either...they show up in the option to select svg icon, however when a layers qml file is loaded it is once again blank.

I'm trying to get my head around this, so if there's an obvious answer please let me know.

How can I move these svg/style to other computers so that when I load a file with a set qml layer the proper svgs load as well?

Thanks anyone for your help.

share|improve this question
    
me too! Would be pleased to hear the word on this behaviour. –  Willy Oct 15 '12 at 9:47

1 Answer 1

This is how an SVG symbol is defined in QML:

  <symbol outputUnit="MapUnit" alpha="0.329412" type="marker" name="0">
    <layer pass="0" class="SvgMarker" locked="0">
      <prop k="angle" v="0"/>
      <prop k="fill" v="#000000"/>
      <prop k="name" v="/leaf2.svg"/>
      <prop k="offset" v="0,0"/>
      <prop k="outline" v="#000000"/>
      <prop k="outline-width" v="1"/>
      <prop k="size" v="2"/>
    </layer>
  </symbol>

It uses a relative paths to look for the symbol in the folders specified in Settings - Options - Rendering - SVG Paths.

To migrate styles, you have to either copy the new SVGs into an existing SVG path or add a new one.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.