Changeset 222 for linux-za-sve


Ignore:
Timestamp:
Apr 12, 2010, 4:47:51 PM (14 years ago)
Author:
Andrej Dundović
Message:

sitne revizije

Location:
linux-za-sve/karta/frontend
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • linux-za-sve/karta/frontend/css/style.css

    r208 r222  
    11
    2 body { padding: 10px; }
     2body { padding: 0; margin: 0; }
     3
  • linux-za-sve/karta/frontend/index.html

    r209 r222  
    77
    88    <script src="js/openlayers/OpenLayers.js" type="text/javascript"></script>
     9    <script src="js/MapData.js" type="text/javascript"></script>
    910    <script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js" type="text/javascript"></script>
    1011    <script src="js/LinuxMap.js" type="text/javascript"></script>
  • linux-za-sve/karta/frontend/js/LinuxMap.js

    r192 r222  
    66    var map, layer, drawControls, selectControl, selectedFeature;; //complex object of type OpenLayers.Map
    77 
    8         function onPopupClose(feature) {
     8        function onPopupClose( feature ) {
    99            selectControl.unselect(selectedFeature);
    1010        }
    11         function onFeatureSelect(feature) {
     11        function onFeatureSelect( feature ) {
    1212            selectedFeature = feature;
    1313            OpenLayers.Popup.FramedCloud.prototype.autoSize = false;
     
    2121            feature.popup = popup;
    2222            popup.feature = feature;
    23             map.addPopup(popup);
     23            map.addPopup( popup );
    2424        }
    2525        function onFeatureUnselect(feature) {
     
    5353                map.setCenter (lonLat, zoom);
    5454            }
    55 /*         
     55           
     56            var attrib = new OpenLayers.Layer.Vector("Attribution",
     57                              {attribution:"<br/>Linuxzasve.com"});
     58
    5659            var style_default = new OpenLayers.Style({
    57                   'externalGraphic': "slike/camper.png",
    58                   'graphicHeight': 18,
    59                   'graphicWidth': 32,
    60                   'graphicXOffset': -9,
    61                   'graphicYOffset': -16
     60                  'externalGraphic': "images/tux-icon.png",
     61                  'graphicHeight': 40,
     62                  'graphicWidth': 36,
     63                  'graphicXOffset': -20,
     64                  'graphicYOffset': -18
    6265            });
    6366            var style_selected = new OpenLayers.Style({
    64                   'externalGraphic': "slike/camper_selected.png",
    65                   'graphicHeight': 18,
    66                   'graphicWidth': 32,
    67                   'graphicXOffset': -9,
    68                   'graphicYOffset': -16
     67                  'externalGraphic': "images/tux-icon.png",
     68                  'graphicHeight': 40,
     69                  'graphicWidth': 36,
     70                  'graphicXOffset': -20,
     71                  'graphicYOffset': -18
    6972            });
    70 /*
     73
    7174            var styleMap = new OpenLayers.StyleMap({'default':style_default, 'select': style_selected });
    7275
     
    7679                                                  isBaseLayer: false,
    7780                                                  styleMap: styleMap });
    78             markeri.addFeatures(geojson_format.read(map_data));
     81            markeri.addFeatures( geojson_format.read( map_data ) );
    7982
    8083            drawControls = {
     
    8386                select: new OpenLayers.Control.SelectFeature(markeri, {onSelect: onFeatureSelect, onUnselect: onFeatureUnselect})
    8487            };
    85 */
    86 //          map.addControl(drawControls['select']);
    87 //          drawControls['select'].activate();
    8888
    89 //          map.addLayers([attrib, markeri]);
     89            map.addControl(drawControls['select']);
     90            drawControls['select'].activate();
     91
     92            map.addLayers([attrib, markeri]);
    9093        }
Note: See TracChangeset for help on using the changeset viewer.