Openlayers 2.13 InlineXhtml content is created dynamically client side

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Openlayers 2.13 InlineXhtml content is created dynamically client side

Tsolmon
This post has NOT been accepted by the mailing list yet.
Hi everyone,

I have been using ScalableInlineXhtml layer loaded from server. Now, I wanted to modify content of this layer client side as a text object and then would like to add as a new layer.

Since ScalableInlineXhtml requires URL, how should I skip this part and instead, loading the object that I modified in client side?

For example:
// get the layer content from url
input_inlineXhtl_content = $http.get(URL);

// then modify it using replace

// then create new layer
var svg_layer = new OpenLayers.Layer.ScalableInlineXhtml(
    name,
    url,
    new OpenLayers.Bounds(0, 0, width, height),
    new OpenLayers.Size(width, height),
    {
        isBaseLayer: false,
        opacity: '0.8',
        minResolution: 1 / 256,
        maxResolution: Math.pow(2, numberOfTiers - 1),
        numZoomLevels: numberOfTiers,
        singleTile: false,
        styleMap: style,
        rendererOptions: {zIndexing: true},
        extractAttributes: true
    }
);

I don't have a url for this file. Since it is created on-the-fly client side. I have object text.

How should I create new ScalableInlineXhtml layer?

Thanks in advance