Commit e3adb645e72f01a0aea8d8dbafa08bc37c64cc49
Fixing UX issues
- The mural now does not move out of the screen, it stays fixed at the center of viewport.
- Adding expermimental code for buffering tiles at the client side.
| | | | 129 | controls: [], | 129 | controls: [], |
---|
130 | maxExtent: new OpenLayers.Bounds( 0.0, -4668.0, 31110.0, 0.0 ), | 130 | maxExtent: new OpenLayers.Bounds( 0.0, -4668.0, 31110.0, 0.0 ), |
---|
131 | maxResolution: 128.000000, | 131 | maxResolution: 128.000000, |
---|
132 | numZoomLevels: 8 | | numZoomLevels: 8 |
---|
| | 132 | numZoomLevels: 8, | | | 133 | restrictedExtent: new OpenLayers.Bounds( 0.0, -4668.0, 31110.0, 0.0 ) |
---|
133 | }; | 134 | }; |
---|
134 | map = new OpenLayers.Map('map', options); | 135 | map = new OpenLayers.Map('map', options); |
---|
135 | $.get(config.indexer+"/fetch", function(data){ | 136 | $.get(config.indexer+"/fetch", function(data){ |
---|
… | | … | |
---|
146 | } | 146 | } |
---|
147 | | 147 | |
---|
148 | }); | 148 | }); |
---|
| | 149 | |
---|
| | 150 | buffer0 = new OpenLayers.Layer.TMS( "TMS Layer","static/", |
---|
| | 151 | { url: '', serviceVersion: '.', layername: 'buffer0', alpha: true, |
---|
| | 152 | type: 'png', getURL: overlay_getTileURL, buffer:0, singleTile: false |
---|
| | 153 | }); |
---|
| | 154 | |
---|
| | 155 | buffer1 = new OpenLayers.Layer.TMS( "TMS Layer","static/", |
---|
| | 156 | { url: '', serviceVersion: '.', layername: 'buffer1', alpha: true, |
---|
| | 157 | type: 'png', getURL: overlay_getTileURL, buffer:1, singleTile: false |
---|
| | 158 | }); |
---|
| | 159 | |
---|
| | 160 | buffer2 = new OpenLayers.Layer.TMS( "TMS Layer","static/", |
---|
| | 161 | { url: '', serviceVersion: '.', layername: 'buffer2', alpha: true, |
---|
| | 162 | type: 'png', getURL: overlay_getTileURL, buffer:2, singleTile: false |
---|
| | 163 | }); |
---|
| | 164 | |
---|
149 | var layer = new OpenLayers.Layer.TMS( "TMS Layer","static/", | 165 | var layer = new OpenLayers.Layer.TMS( "TMS Layer","static/", |
---|
150 | { url: '', serviceVersion: '.', layername: '.', alpha: true, | 166 | { url: '', serviceVersion: '.', layername: '.', alpha: true, |
---|
151 | type: 'png', getURL: overlay_getTileURL | | type: 'png', getURL: overlay_getTileURL |
---|
| | 167 | type: 'png', getURL: overlay_getTileURL, isBaseLayer:true | 152 | }); | 168 | }); |
---|
153 | boxes = new OpenLayers.Layer.Vector( "Boxes" ); | 169 | boxes = new OpenLayers.Layer.Vector( "Boxes" ); |
---|
154 | map.addLayers([layer, boxes]); | | map.addLayers([layer, boxes]); |
---|
| | 170 | map.addLayers([layer, buffer0, buffer1, buffer2, boxes]); | 155 | | 171 | |
---|
156 | boxes.events.register('featureadded', boxes, myfeatureadded); | 172 | boxes.events.register('featureadded', boxes, myfeatureadded); |
---|
157 | box2 = new OpenLayers.Layer.Vector( "Boxes" ); | 173 | box2 = new OpenLayers.Layer.Vector( "Boxes" ); |
---|
… | | … | |
---|
213 | addLabel('4263.0000','-1345.33337', 'Video'); | 213 | addLabel('4263.0000','-1345.33337', 'Video'); |
---|
214 | map.addControl(new OpenLayers.Control.PanZoomBar()); | 214 | map.addControl(new OpenLayers.Control.PanZoomBar()); |
---|
215 | map.addControl(new OpenLayers.Control.MousePosition()); | 215 | map.addControl(new OpenLayers.Control.MousePosition()); |
---|
216 | map.addControl(new OpenLayers.Control.MouseDefaults()); | | map.addControl(new OpenLayers.Control.MouseDefaults()); |
---|
| | 216 | map.addControl(new OpenLayers.Control.Navigation()); | 217 | map.addControl(new OpenLayers.Control.KeyboardDefaults()); | 217 | map.addControl(new OpenLayers.Control.KeyboardDefaults()); |
---|
218 | map.addControl(new OpenLayers.Control.LayerSwitcher()); | 218 | map.addControl(new OpenLayers.Control.LayerSwitcher()); |
---|
219 | map.zoomToExtent( mapBounds ); | 219 | map.zoomToExtent( mapBounds ); |
---|
| | | | 1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
---|
2 | <html> | 2 | <html> |
---|
3 | <meta charset="utf-8"> | | <meta charset="utf-8"> |
---|
4 | <head> | | <head> |
---|
| | 3 | <head> | | | 4 | <meta charset="utf-8"> |
---|
| | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> |
---|
5 | <script type="text/javascript"> | 6 | <script type="text/javascript"> |
---|
6 | function annotationTree() { | 7 | function annotationTree() { |
---|
7 | $('#annotation-tree').modal(); | 8 | $('#annotation-tree').modal(); |
---|
… | | … | |
---|
11 | <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script> | 11 | <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script> |
---|
12 | <script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script> | 12 | <script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script> |
---|
13 | <script type="text/javascript" src="http://backbonejs.org/backbone-min.js"></script> | 13 | <script type="text/javascript" src="http://backbonejs.org/backbone-min.js"></script> |
---|
14 | <script type="text/javascript" src="static/tree.js"></script> | | <script type="text/javascript" src="static/tree.js"></script> |
---|
| | 14 | <!-- <script type="text/javascript" src="static/tree.js"></script> --> | 15 | <style type='text/css'> | 15 | <style type='text/css'> |
---|
16 | /*#annotation-tree { | 16 | /*#annotation-tree { |
---|
17 | position:fixed; | 17 | position:fixed; |
---|
… | | … | |
---|
94 | <button onclick="handler.trigger1();" class="btn btn-small"> Face</button> | 94 | <button onclick="handler.trigger1();" class="btn btn-small"> Face</button> |
---|
95 | <button onclick="handler.trigger2();" class="btn btn-small">Jewellery</button> | 95 | <button onclick="handler.trigger2();" class="btn btn-small">Jewellery</button> |
---|
96 | </div> | 96 | </div> |
---|
97 | | | |
---|
| | 97 | | 98 | <p></p> | 98 | <p></p> |
---|
99 | | 99 | |
---|
100 | <input type="text" id="tree-json-file" value="old.json"> | 100 | <input type="text" id="tree-json-file" value="old.json"> |
---|
… | | … | |
---|
128 | <div class="modal-body"> | 128 | <div class="modal-body"> |
---|
129 | <div id="infovis"> </div> | 129 | <div id="infovis"> </div> |
---|
130 | <div id="tree-info" class="well text-info"> | 130 | <div id="tree-info" class="well text-info"> |
---|
131 | <ul></ul> | | <ul></ul> |
---|
| | 131 | <ul></ul> | 132 | </div> | 132 | </div> |
---|
133 | </div> | 133 | </div> |
---|
134 | <div class="modal-footer"> | 134 | <div class="modal-footer"> |
---|