ThinkGeo.com    |     Documentation    |     Premium Support

Layer is not adding via client side

Hi @Ethan,

var graphic0 = new OpenLayers.Layer.Image(
‘City Lights’,
https://tilecache.rainviewer.com/v2/composite/1542172200/16000.png?color=1’ ,
new OpenLayers.Bounds(-180, -88.759, 180, 88.759),
new OpenLayers.Size(580, 288),
{numZoomLevels: 3}
);

this code is working in openlayers example but not thinkgeo openlayers script.
I have attached a sample you can check.
example.zip (1.3 MB)

Hi Bibek,

It looks we discussed about it in this post: Layer not coming when adding from client side

If you want to add the openstreet layer into our map, I think you should want to call GetOpenLayersMap to get it first.

Please view the documentation Client API Documentation for Map Suite Web Edition

Wish that’s helpful.

Regards,

Ethan

I tried but it’s not working .

If you are able to create a sample of it. Just add a image Layer (from the above URL) in thinkgeo map from client side.

Thanks .

Hi Bibek,

It looks the layer had been added into map in client side, but it don’t appear on map.

Our developer will look into it and build a sample to you.

Regards,

Ethan

Hi Bibek,

In our map, we don’t use ImageLayer, which is because we override the draw image function, and it is used for all tile image.

If you want to use Imagelayer, you have to write this function again, I created a sample here, you can see the ImageLayer works now.

9334.zip (173.7 KB)

Regards,

Ethan