[OpenLayers-Users] registering an SVG "image"

Mr. Puneet Kishor punk.kish at gmail.com
Thu Mar 31 09:33:23 EDT 2011


On Mar 31, 2011, at 6:01 AM, Andreas Hocevar wrote:

> Hi,
> 
> you may want to have a look at this addin: http://trac.osgeo.org/openlayers/wiki/Addins/InlineXhtml


Andreas, I am quite sure the above is what I want, many thanks for the pointer. However, looking at the examples, I am confused about the following -- the examples seem to use SVG layer generated on the server. I am generating the SVG layer right in the user's browser. So, I need something like the following

    var svgLayer = function(whatever) (
        return svg;
    );

    var aus_states = new OpenLayers.Layer.ScalableInlineXhtml(
        "Australia States",
        svgLayer(whatever),
        new OpenLayers.Bounds(98.0859375,-55.322265625,171.9140625,5.322265625),
        new OpenLayers.Size(840, 690),
        {isBaseLayer: false, opacity: '0.6'}
    );

In other words, instead of the "url" parameter to the initialization, I want to give it an svgLayer created right in the browser. Is that possible?


> 
> Regards,
> Andreas.
> 
> On Mar 31, 2011, at 07:02 , Mr. Puneet Kishor wrote:
> 
>> Perhaps the answer to the following is obvious, but I would appreciate a nudge in the right direction.
>> 
>> I have a Google base layer on which I am overlaying a few WMS layers, and an Image layer. Everything is working mostly fine. Now, I would like to add an SVG layer to the mix. I am creating an SVG layer using some JavaScript code. How do I register this SVG "image" so it positions and overlays correctly on the OL map even when zooming in/out or panning?
>> 
>> Many thanks,
>> 
>> Puneet._______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> 
> 
> 
> -- 
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> 



More information about the Users mailing list