Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] how to use a single SVG file containg more than one symbol

I am not sure there is right now - but we could make one. What did you have in mind? We could use the URL#MySymbol for example - but I would like to know how such a reference is usually made where SLD is used in other contexts then GIS.

So a bit of research and then make a proposal here on the list; once we figure out a good approach you make make a bug report and submit a patch.

Cheers,
Jody




On Sat, Mar 7, 2009 at 11:03 PM, Jayansh Shinde <jayansh.shinde@xxxxxxxxx> wrote:

Hi,

I want to use symbols which are present in a single svg file .

e.g. 

I have a svg file :

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
<svg width="10cm" height="3cm" viewBox="0 0 100 30" version="1.1"
  <desc>Example Use02 - 'use' on a 'symbol'</desc>
  <defs>
    <symbol id="MySymbol" viewBox="0 0 20 20">
      <desc>MySymbol - four rectangles in a grid</desc>
      <rect x="1" y="1" width="8" height="8"/>
      <rect x="11" y="1" width="8" height="8"/>
      <rect x="1" y="11" width="8" height="8"/>
      <rect x="11" y="11" width="8" height="8"/>
    </symbol>
  </defs>
  <defs>
    <symbol id="MySymbol2" viewBox="0 0 20 20">
      <desc>MySymbol - four rectangles in a grid</desc>
      <rect x="1" y="1" width="8" height="8"/>
      <rect x="11" y="1" width="8" height="8"/>
      <rect x="1" y="11" width="8" height="8"/>
      <rect x="11" y="11" width="8" height="8"/>
    </symbol>
  </defs>
  
</svg>

The svg has 2 symbols "MySymbol" and "MySymbol2" which I want to use with 2 different points through sld, I can do these by dividing these symbols in 2 svg files, but is there any way I can use them from a single svg.

--
Regards

Jayansh


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top