ThinkGeo.com    |     Documentation    |     Premium Support

Accessing map in Client side using AJAX call

Hi,

I am using Thinkgeo web edition for my project. And I am new to Web edition.

I am having an issue in map layers refresh and map layers transparency. Actually i wanted to do it from
client side and not from server side. So can anyone please give me a sample how to interact or access map in client side through AJAX call or some other .

my code is below

Thinkgeo:Map ID=“wfMap” Height=“100%” Width=“100%” runat=“server”></Thinkgeo:Map>

var map = document.getElementById(“wfMap”);
var overlay = wfMap.getLayer(‘FIROverlay’);
overlay.transparancy = ui.value;
overlay.redraw(true);

But i am getting error in wfMap.getLayer. getLayer() method not found.

Thanks,
Ashok

Hi Ashok,

Please refer this sample:

ClientSideGetLayer.zip (173.9 KB)

Regards,

Ethan