Commit 071057198df57914dbec61feedb74ab571df67a3
- Diff rendering mode:
- inline
- side by side
myVector.js
(11 / 4)
  | |||
10 | 10 | var box_extents1 = [ | |
11 | 11 | [4263.0000, -1630.33337, 4559.0000, -1342.33337] | |
12 | 12 | ]; | |
13 | var myJSON = {}; | ||
13 | var myJSON = []; | ||
14 | 14 | // avoid pink tiles | |
15 | 15 | OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3; | |
16 | 16 | OpenLayers.Util.onImageLoadErrorColor = "transparent"; | |
… | … | ||
240 | 240 | "bottom": bottom, | |
241 | 241 | "right": right, | |
242 | 242 | "left": left, | |
243 | "name": name, | ||
244 | "character": $("#character-value").text(), | ||
245 | "material": $("#material-value").text() | ||
243 | "name": name | ||
246 | 244 | }; | |
247 | 245 | } | |
248 | 246 | else | |
… | … | ||
303 | 303 | } | |
304 | 304 | } | |
305 | 305 | onresize=function(){ resize();}; | |
306 | function 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 | } |
openlayers.html
(4 / 1)
  | |||
39 | 39 | function treeClose() | |
40 | 40 | { | |
41 | 41 | $('#annotation-tree').hide(); | |
42 | myJSON['attribs'] = attribs; | ||
42 | attribs["character"] = $("#character-value").text(); | ||
43 | attribs["material"] = $("#material-value").text(); | ||
44 | myJSON.push(attribs); | ||
43 | 45 | } | |
44 | 46 | </script> | |
45 | 47 | </head> | |
… | … | ||
73 | 73 | <script type="text/javascript" >resize()</script> | |
74 | 74 | <div id="annotation-tree"> | |
75 | 75 | <input type="button" value="close" onClick="treeClose();"/> | |
76 | <input type="button" value="publish" onClick="publish();"/> | ||
76 | 77 | <div id="infovis"> | |
77 | 78 | <form> | |
78 | 79 | <div>Character: <span id="character-value"></span></div> |