Hello, I think this need to be more discussed. I agrees with the fact that it would be better for some applications to provides SVG icons into single files as externalGraphics already do with png/gif/jpeg files.
I did some quick investigation, and it seems like there is no standard way to load icons from a external file. As said in the specification "Unlike 'image', the 'use' element cannot reference entire files." but the spec allows to use external references (<use xlink:href="some.svg#some_symbol"/>). However, we won't be able to handle it in OpenLayers since Firefox doesn't support external documents references. [1] [2] Any other suggestion on a way to go ? [1] http://www.mozilla.org/projects/svg/status.html [2] https://bugzilla.mozilla.org/show_bug.cgi?id=269482 On Dec 12, 2007 11:38 PM, miles <[EMAIL PROTECTED]> wrote: > Pierre GIRAUD wrote: > > I'm just wondering if you noticed that we are using a svg symbols catalogue. > > http://dev.openlayers.org/sandbox/camptocamp/vectorSymbols/examples/symbol_catalog.svg > > > ahh, okay, maybe this is what I'm trying to figure out - I can see the > usefulness for many people of having a ready-to-use symbol library. But > since there's obviously code that translates SVG from the symbol > library, couldn't there be or is there an api call that imports directly > from a separate SVG file rather than from the symbol library - thus, > instead of having to put a dynamically created SVG in the symbol > library, we could just call something like map.importsvg(mysvg, > x,y,scale,rotate) - then the SVG import file gets the advantage of being > geo-positioned (if that is the right term) and converted to VML, if IE. > > > > > > Regards, > > Pierre > > > > On Dec 12, 2007 10:49 PM, miles <[EMAIL PROTECTED]> wrote: > > > >> 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 <[EMAIL PROTECTED]> 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 > >>>> [email protected] > >>>> http://openlayers.org/mailman/listinfo/users > >>>> > >>>> > >>>> > >>> > >> > > > > > > _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
