Commit 071057198df57914dbec61feedb74ab571df67a3

  • avatar
  • arvind
  • Tue Jun 12 18:14:46 IST 2012
Publish the annotation, added JSON style saving to a annotation
myVector.js
(11 / 4)
  
1010var box_extents1 = [
1111 [4263.0000, -1630.33337, 4559.0000, -1342.33337]
1212];
13var myJSON = {};
13var myJSON = [];
1414// avoid pink tiles
1515OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
1616OpenLayers.Util.onImageLoadErrorColor = "transparent";
240240 "bottom": bottom,
241241 "right": right,
242242 "left": left,
243 "name": name,
244 "character": $("#character-value").text(),
245 "material": $("#material-value").text()
243 "name": name
246244 };
247245 }
248246 else
303303 }
304304 }
305305onresize=function(){ resize();};
306function publish()
307{
308 console.log(myJSON);
309 $.post("http://192.168.100.56:82/submit", JSON.stringify(myJSON), function(data)
310 {
311 alert(data);
312 }
313 );
314}
  
3939 function treeClose()
4040 {
4141 $('#annotation-tree').hide();
42 myJSON['attribs'] = attribs;
42 attribs["character"] = $("#character-value").text();
43 attribs["material"] = $("#material-value").text();
44 myJSON.push(attribs);
4345 }
4446 </script>
4547 </head>
7373 <script type="text/javascript" >resize()</script>
7474 <div id="annotation-tree">
7575 <input type="button" value="close" onClick="treeClose();"/>
76 <input type="button" value="publish" onClick="publish();"/>
7677 <div id="infovis">
7778 <form>
7879 <div>Character: <span id="character-value"></span></div>