Commit a006ea8fc9628c788b5df8fb854fba84c697afdd
- myVector.js 6 ++++++
- openlayers.html 20 ----------++++++++++
- Diff rendering mode:
- inline
- side by side
myVector.js
227 | if(labelFeature.attributes['name']) | 227 | if(labelFeature.attributes['name']) |
---|---|---|---|
228 | { | 228 | { |
229 | //console.log(myObj.feature.geometry.bounds.top); Use this to get the bounds. | 229 | //console.log(myObj.feature.geometry.bounds.top); Use this to get the bounds. |
230 | top = myObj.feature.geometry.bounds.top; | ||
231 | bottom = myObj.feature.geometry.bounds.bottom; | ||
232 | left = myObj.feature.geometry.bounds.left; | ||
233 | right = myObj.feature.geometry.bounds.right; | ||
234 | name = labelFeature.attributes['name']; | ||
230 | map.addLayer(vectorLayer); | 235 | map.addLayer(vectorLayer); |
231 | vectorLayer.drawFeature(labelFeature); | 236 | vectorLayer.drawFeature(labelFeature); |
232 | vectorLayer.addFeatures([labelFeature]); | 237 | vectorLayer.addFeatures([labelFeature]); |
238 | annotationTree(); | ||
233 | } | 239 | } |
234 | else | 240 | else |
235 | myObj.feature.destroy(); | 241 | myObj.feature.destroy(); |
openlayers.html
1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
---|---|---|---|
2 | <html xmlns="http://www.w3.org/1999/xhtml" | 2 | <html xmlns="http://www.w3.org/1999/xhtml" |
3 | <head> | 3 | <head> |
4 | |||
5 | |||
6 | |||
7 | |||
8 | |||
9 | |||
10 | |||
11 | |||
12 | 4 | <!-- <script type="text/javascript"> --> | |
5 | <!-- function annotationTree() { --> | ||
6 | <!-- tree_div = document.getElementById('annotation-tree'); --> | ||
7 | <!-- tree_div.style.display = 'block'; --> | ||
8 | <!-- } --> | ||
9 | <!-- </script> --> | ||
10 | <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.min.js"></script> --> | ||
11 | <!-- <script type="text/javascript" src="./jit.js"></script> --> | ||
12 | <!-- <script type="text/javascript" src="./tree.js"></script> --> | ||
13 | <style type='text/css'> | 13 | <style type='text/css'> |
14 | #annotation-tree { | 14 | #annotation-tree { |
15 | position:fixed; | 15 | position:fixed; |
… | … | ||
36 | <script src="http://www.openlayers.org/api/2.11/OpenLayers.js" type="text/javascript"></script> | 36 | <script src="http://www.openlayers.org/api/2.11/OpenLayers.js" type="text/javascript"></script> |
37 | <script type="text/javascript" src="myVector.js"></script> | 37 | <script type="text/javascript" src="myVector.js"></script> |
38 | </head> | 38 | </head> |
39 | 39 | <body onload="init();inits();"> | |
40 | <div id="header"><h1>Lepakshi Mural</h1></div> | 40 | <div id="header"><h1>Lepakshi Mural</h1></div> |
41 | <div id="subheader">Generated by <a href="http://www.maptiler.org/">MapTiler</a><a href="http://www.klokan.cz/projects/gdal2tiles/">GDAL2Tiles</a>, Copyright © 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> & <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a> | 41 | <div id="subheader">Generated by <a href="http://www.maptiler.org/">MapTiler</a><a href="http://www.klokan.cz/projects/gdal2tiles/">GDAL2Tiles</a>, Copyright © 2008 <a href="http://www.klokan.cz/">Klokan Petr Pridal</a>, <a href="http://www.gdal.org/">GDAL</a> & <a href="http://www.osgeo.org/">OSGeo</a> <a href="http://code.google.com/soc/">GSoC</a> |
42 | <!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU --> | 42 | <!-- PLEASE, LET THIS NOTE ABOUT AUTHOR AND PROJECT SOMEWHERE ON YOUR WEBSITE, OR AT LEAST IN THE COMMENT IN HTML. THANK YOU --> |