[OpenLayers-Users] SVG Overlay

miles miles.togoe at gmail.com
Wed Dec 12 16:49:26 EST 2007


Pierre GIRAUD wrote:
> If you need vector symbols you should have a look at this example.
>
> http://dev.openlayers.org/sandbox/camptocamp/vectorSymbols/examples/vector-symbols.html
>   

This seems backwards to me to have to replicate graphic or symbol 
libraries in yet another graphics api - if we're outputting dynamic 
graphics in SVG in our code, now we have to change our output code to 
OpenLayers vector language ?  Which then converts it back to SVG ?  
duh?  The advantage of using an open xml standard like SVG is that it 
can be displayed not just on the screen in OpenLayers but converted via 
ImageMagik, saved to an xml output file to be used in Inkscape (or even 
in a text editor), or in reverse, created in Inkscape and brought in 
from there, and likewise used in other programs.   I'm starting to 
wonder if we should or need to patch or fork a version of OpenLayers 
with direct handling of SVG ? 


> Two notes :
>  - This only works for point features,
>  - this converts svg symbols into vml groups so that they can be
> rendered into IE.
>
> Regards,
> Pierre
>
> On Dec 12, 2007 9:28 PM, miles <miles.togoe at gmail.com> wrote:
>   
>> Tim Schaub wrote:
>>     
>>> Hey-
>>>
>>> miles wrote:
>>>
>>>       
>>>> Are there any examples of using a SVG overlay?  I didn't see any.  I
>>>> suspect it's kind of tricky since I assume the SVG coordinate system
>>>> would need to be translated to the coordinate system/projection being
>>>> used for the base layer.
>>>>
>>>>         
>>> If you open the following page in Firefox, you're looking at an "SVG
>>> overlay."
>>>
>>> http://openlayers.org/dev/examples/rotate-features.html
>>>
>>> Did you mean something different?
>>>
>>>       
>> yes, I realize OpenLayers renders in SVG or VML but I meant overlaying
>> an actual SVG xml file.  This would permit displaying icons made in
>> Inkscape, etc and I would think be faster since OpenLayers does not have
>> to convert the vector language code to SVG.  Obviously it would only
>> display in a browser that supports SVG - or should we say won't display
>> in IE, the only browser that does not support SVG ):
>>
>> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
>> <!-- Created with Inkscape (http://www.inkscape.org/) -->
>> <svg
>>    xmlns:svg="http://www.w3.org/2000/svg"
>>    xmlns="http://www.w3.org/2000/svg"
>>    version="1.0"
>>    width="744.09448"
>>    height="1052.3622"
>>    id="svg2">
>>   <defs
>>      id="defs4" />
>>   <g
>>      id="layer1">
>>     <path
>>        d="M 231.42858 336.64789 A 48.57143 47.142857 0 1 1
>> 134.28572,336.64789 A 48.57143 47.142857 0 1 1  231.42858 336.64789 z"
>>
>> style="fill:#ff0000;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
>>        id="path2160" />
>>   </g>
>> </svg>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>     
>
>   




More information about the Users mailing list