From e9c4306362b7561d648656166395ee018f31714c Mon Sep 17 00:00:00 2001 From: Arvind Date: Thu, 14 Jun 2012 20:07:27 +0530 Subject: [PATCH] Added capability for fetching JSON --- myVector.js | 6 + openlayers.html | 33 +- tree.js | 1313 ++++++++++++++++++------------------------------------- 3 files changed, 445 insertions(+), 907 deletions(-) diff --git a/myVector.js b/myVector.js index 616b880..0fed65b 100644 --- a/myVector.js +++ b/myVector.js @@ -11,6 +11,9 @@ var box_extents1 = [ [4263.0000, -1630.33337, 4559.0000, -1342.33337] ]; var myJSON = []; +var ans = { + ans: [] +}; // avoid pink tiles OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; OpenLayers.Util.onImageLoadErrorColor = "transparent"; @@ -76,6 +79,9 @@ function onMyFeatureSelect(feature, json, x, y) map.addPopup(z); } function init(){ + $.get("http://192.168.100.56:82/fetch", function(data){ + ans.ans = JSON.parse(data); + }); var options = { controls: [], maxExtent: new OpenLayers.Bounds( 0.0, -4668.0, 31110.0, 0.0 ), diff --git a/openlayers.html b/openlayers.html index de4a771..7868acb 100644 --- a/openlayers.html +++ b/openlayers.html @@ -1,29 +1,15 @@ - + + + Lepakshi Mural - +