[OpenLayers-Dev] Re: How to find correct bounds to display an SVG at a correct location using addin inlineXhtml

hhudson at katmandu.org hhudson at katmandu.org
Tue Oct 11 02:17:16 EDT 2011


You might want to consider either, adding a vector layer with a
feature point using your SVG specified as the externalGraphic,
or a use a marker layer with your SVG as the icon.  Both cases
however will render your SVG as a static image (an loose any emdedded
interactivity).  Currently, I don't think there is a InlineXhtml
layer type to suit exactly what you need - that is, adding a fixed
size interactive SVG to an arbitrary map location.



>  Hello Harris,
> Unfortunately, it doesn't come from spatial data/query but from a svg
> editor. For the moment, I don't want it to be scalable. I thus leave the
> width and height (120x120) in the svg tag, I set the
> OpenLayers.Size(120,120) but I have no correct idea on which bounds to set
> in the OpenLayers.Bounds() if I want to pin the svg at some precise
> coordinates. I guess its linked to the resolution specified and the
> conversion of map units / image units.
> Tanguy MEZZANO
> -----Original Message-----
> From: openlayers-dev-bounces at lists.osgeo.org
> [mailto:openlayers-dev-bounces at lists.osgeo.org] On Behalf Of hhudson
> Sent: samedi 8 octobre 2011 08:25
> To: dev at openlayers.org
> Subject: [OpenLayers-Dev] Re: How to find correct bounds to display an SVG
> at a correct location using addin inlineXhtml
> Hi,
> If you are adding a scalable SVG image, you will need to specify the image
> extent.  Depends how you created your SVG images in the first place - if
> the SVG's are generated from spatial data/query you should know the extent
> when you created the image.
> Regards,
> Harris.
> --
> View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/How-to-find-correct-bounds-to-display-an-SVG-at-a-correct-location-using-addin-inlineXhtml-tp6865466p6871934.html
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev

More information about the Dev mailing list