Changeset 5195 in ntrip


Ignore:
Timestamp:
Jun 9, 2013, 4:45:06 PM (8 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/map/OpenStreetMaps/index.html

    r5194 r5195  
    2525 
    2626        map.addLayer(mapnik);
    27         map.setCenter(position, zoom );
     27
     28        var markers = new OpenLayers.Layer.Markers("Markers");
     29        var size   = new OpenLayers.Size(40,40);
     30        var offset = new OpenLayers.Pixel(size.w/2, size.h/2);
     31        var icon = new OpenLayers.Icon('http://www.openlayers.org/dev/img/marker.png',size,offset);
     32        markers.addMarker(new OpenLayers.Marker(position, icon));
     33       
     34        map.addLayer(markers);
     35
     36        map.setCenter(position, zoom);
    2837      }
    2938    </script>
Note: See TracChangeset for help on using the changeset viewer.