[OpenLayers-Users] Using external/inline SVG for a map feature

Matt Wintercorn matt at stackframe.com
Tue Nov 27 08:05:43 PST 2012


I did, however I see that there is a tile and layer implementation, but I am looking for just a feature, not something that is always shown as a single layer. Plus, these features will be dynamically added and there may be several features on a single layer.

My use case is this: There is a service that generates SVG graphics based upon various input locations (1 to many points). The returned graphic may contain some complex SVG. Therefore, I must be able to support adding these to the layer dynamically and at various locations, (while supporting panning and zooming, of course).

My initial plan was to take the InlineXhtml code and try to make it work for features, but it looked like a hefty task (looking into how the SVG renderer drew the features and "generated" SVG didn't seem to have much flexibility if I wanted to use my own SVG inline with a feature), so I figured I'd ask to see if there was an easier way first.

Matt Wintercorn
matt at stackframe.com



On Nov 27, 2012, at 10:53 AM, Bart van den Eijnden <bartvde at opengeo.org> wrote:

> Did you look into:
> 
> http://trac.osgeo.org/openlayers/wiki/Addins/InlineXhtml
> 
> already?
> 
> Best regards,
> Bart
> 
> -- 
> Bart van den Eijnden
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> 
> 
> 
> On Nov 27, 2012, at 9:26 AM, Matt Wintercorn <matt at stackframe.com> wrote:
> 
>> Is it possible to use an external SVG definition as the source for a feature graphic in OpenLayers. My SVG already has the necessary <g> tags with all of the <path> elements containing my graphic. The only thing that I am seeing is that OpenLayers really only supports drawing points, lines, rectangles, and simple polygons by taking a list of points and "generating" an SVG. What can I do if I just want to use my existing SVG definition??? (I am using the SVG renderer and would like to take advantage of the built in SVG transforms to correctly scale and position my SVG element on the map)
>> 
>> 
>> Matt Wintercorn
>> matt at stackframe.com
>> 
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121127/6ae2d264/attachment.html>


More information about the Users mailing list