Commit 7f5c53688be0e5c78de8c4926ef247a6e2feed60

  • avatar
  • arvind
  • Mon Jun 11 18:40:04 IST 2012
Closing annotation div, JSON to store the annotations
myVector.js
(12 / 4)
  
1010var box_extents1 = [
1111 [4263.0000, -1630.33337, 4559.0000, -1342.33337]
1212];
13var myJSON = {};
1314// avoid pink tiles
1415OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
1516OpenLayers.Util.onImageLoadErrorColor = "transparent";
6565}
6666function onMyFeatureSelect(feature, json, x, y)
6767{
68// str = "";
69// x = 1;
7068 z = new OpenLayers.Popup.FramedCloud(
7169 "test",
7270 new OpenLayers.LonLat(x, y), // Always should be at the center of the map, not the center of viewport.
225225 console.log(labelFeature.attributes['name']);
226226 if(labelFeature.attributes['name'])
227227 {
228 //console.log(myObj.feature.geometry.bounds.top); Use this to get the bounds.
229 top = myObj.feature.geometry.bounds.top;
228 console.log(myObj.feature.geometry.bounds.top); //Use this to get the bounds.
229 topValue = myObj.feature.geometry.bounds.top;
230230 bottom = myObj.feature.geometry.bounds.bottom;
231231 left = myObj.feature.geometry.bounds.left;
232232 right = myObj.feature.geometry.bounds.right;
235235 vectorLayer.drawFeature(labelFeature);
236236 vectorLayer.addFeatures([labelFeature]);
237237 annotationTree();
238 attribs = {
239 "top": topValue,
240 "bottom": bottom,
241 "right": right,
242 "left": left,
243 "name": name,
244 "character": $("#character-value").text(),
245 "material": $("#material-value").text()
246 };
238247 }
239248 else
240249 myObj.feature.destroy();
  
3535 </style>
3636 <script src="http://www.openlayers.org/api/2.11/OpenLayers.js" type="text/javascript"></script>
3737 <script type="text/javascript" src="myVector.js"></script>
38 <script type="text/javascript">
39 function treeClose()
40 {
41 $('#annotation-tree').hide();
42 myJSON['attribs'] = attribs;
43 }
44 </script>
3845 </head>
39<body onload="init();inits();">
46<body onload="init();">
4047 <div id="header"><h1>Lepakshi Mural</h1></div>
4148 <div id="subheader">Generated by <a href="http://www.maptiler.org/">MapTiler</a><a href="http://www.klokan.cz/projects/gdal2tiles/">GDAL2Tiles</a>, Copyright &copy; 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> &amp; <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a>
4249 <!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU -->
4350 </div>
44 <input onclick="handler.trigger();" type="button" style="background-color:#00CC00;height:15px;-moz-border-radius:75px;-webkit-border-radius:75px; width:15px;" value="Mural" /><br /><div id="content"></div>
45 <input onclick="handler.trigger1();" type="button" style="background-color:#00CC00;height:15px;-moz-border-radius:75px;-webkit-border-radius:75px; width:15px;" value="Face" /><br /><div id="content1"></div>
46 <input onclick="handler.trigger2();" type="button" style="background-color:#00CC00;height:15px;-moz-border-radius:75px;-webkit-border-radius:75px; width:15px;" value="Jewelery" /><br /><div id="content2"></div>
51 <input onclick="handler.trigger();" type="button" style="background-color:#00CC00;height:15px;-moz-border-radius:75px;-webkit-border-radius:75px; width:15px;"/>Mural<div id="content"></div>
52 <input onclick="handler.trigger1();" type="button" style="background-color:#00CC00;height:15px;-moz-border-radius:75px;-webkit-border-radius:75px; width:15px;"/>Face<div id="content1"></div>
53 <input onclick="handler.trigger2();" type="button" style="background-color:#00CC00;height:15px;-moz-border-radius:75px;-webkit-border-radius:75px; width:15px;"/>Jewellery<div id="content2"></div>
4754 <div id="map"></div>
4855 <div>
4956 <ul>
6969 </ul>
7070 </div>
7171 <script type="text/javascript" >resize()</script>
72 <div id="annotation-tree"><div id="infovis">
72 <div id="annotation-tree">
73 <input type="button" value="close" onClick="treeClose();"/>
74 <div id="infovis">
7375 <form>
74 <div>Charater: <span id="character-value"></span></div>
76 <div>Character: <span id="character-value"></span></div>
7577 <div>Ornament </div>
7678 <div>Material: <span id="material-value"></span></div>
7779 <div>Jewellery: <span id="jewellery-value"></span></div>