Changeset 222 for linux-za-sve
- Timestamp:
- Apr 12, 2010, 4:47:51 PM (15 years ago)
- Location:
- linux-za-sve/karta/frontend
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
linux-za-sve/karta/frontend/css/style.css
r208 r222 1 1 2 body { padding: 10px; } 2 body { padding: 0; margin: 0; } 3 -
linux-za-sve/karta/frontend/index.html
r209 r222 7 7 8 8 <script src="js/openlayers/OpenLayers.js" type="text/javascript"></script> 9 <script src="js/MapData.js" type="text/javascript"></script> 9 10 <script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js" type="text/javascript"></script> 10 11 <script src="js/LinuxMap.js" type="text/javascript"></script> -
linux-za-sve/karta/frontend/js/LinuxMap.js
r192 r222 6 6 var map, layer, drawControls, selectControl, selectedFeature;; //complex object of type OpenLayers.Map 7 7 8 function onPopupClose( feature) {8 function onPopupClose( feature ) { 9 9 selectControl.unselect(selectedFeature); 10 10 } 11 function onFeatureSelect( feature) {11 function onFeatureSelect( feature ) { 12 12 selectedFeature = feature; 13 13 OpenLayers.Popup.FramedCloud.prototype.autoSize = false; … … 21 21 feature.popup = popup; 22 22 popup.feature = feature; 23 map.addPopup( popup);23 map.addPopup( popup ); 24 24 } 25 25 function onFeatureUnselect(feature) { … … 53 53 map.setCenter (lonLat, zoom); 54 54 } 55 /* 55 56 var attrib = new OpenLayers.Layer.Vector("Attribution", 57 {attribution:"<br/>Linuxzasve.com"}); 58 56 59 var style_default = new OpenLayers.Style({ 57 'externalGraphic': " slike/camper.png",58 'graphicHeight': 18,59 'graphicWidth': 3 2,60 'graphicXOffset': - 9,61 'graphicYOffset': -1 660 'externalGraphic': "images/tux-icon.png", 61 'graphicHeight': 40, 62 'graphicWidth': 36, 63 'graphicXOffset': -20, 64 'graphicYOffset': -18 62 65 }); 63 66 var style_selected = new OpenLayers.Style({ 64 'externalGraphic': " slike/camper_selected.png",65 'graphicHeight': 18,66 'graphicWidth': 3 2,67 'graphicXOffset': - 9,68 'graphicYOffset': -1 667 'externalGraphic': "images/tux-icon.png", 68 'graphicHeight': 40, 69 'graphicWidth': 36, 70 'graphicXOffset': -20, 71 'graphicYOffset': -18 69 72 }); 70 /* 73 71 74 var styleMap = new OpenLayers.StyleMap({'default':style_default, 'select': style_selected }); 72 75 … … 76 79 isBaseLayer: false, 77 80 styleMap: styleMap }); 78 markeri.addFeatures( geojson_format.read(map_data));81 markeri.addFeatures( geojson_format.read( map_data ) ); 79 82 80 83 drawControls = { … … 83 86 select: new OpenLayers.Control.SelectFeature(markeri, {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect}) 84 87 }; 85 */86 // map.addControl(drawControls['select']);87 // drawControls['select'].activate();88 88 89 // map.addLayers([attrib, markeri]); 89 map.addControl(drawControls['select']); 90 drawControls['select'].activate(); 91 92 map.addLayers([attrib, markeri]); 90 93 }
Note: See TracChangeset
for help on using the changeset viewer.