function Onafterupdatehtml(sender) { // The overlay layer for our marker, with a simple diamond as symbol overlay = new OpenLayers.Layer.Vector('Overlay', { styleMap: new OpenLayers.StyleMap({ externalGraphic: '${img}', graphicWidth: 20, graphicHeight: 24, graphicYOffset: -24, title: '${tooltip}' }) }); // alert('marko'); var myLocation = new OpenLayers.Geometry.Point(10.2, 48.9).transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:3857")); // map.setCenter(new OpenLayers.LonLat(-90, 38).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject()),12); // The location of our marker and popup. We usually think in geographic // coordinates ('EPSG:4326'), but the map is projected ('EPSG:3857'). // We add the marker with a tooltip text to the overlay overlay.addFeatures([ new OpenLayers.Feature.Vector(myLocation, {tooltip: 'OpenLayers', img: '/files/1run.png'}) ]); // A popup with some information about our location var popup = new OpenLayers.Popup.FramedCloud("Popup", myLocation.getBounds().getCenterLonLat(), null, 'We ' + 'could be here.
Or elsewhere.', null, true // <-- true if we want a close (X) button, false otherwise ); // Finally we create the map var mapnik=new OpenLayers.Layer.OSM(); // var yahoo = new OpenLayers.Layer.Yahoo("Yahoo"); // and add the popup to it. map = new OpenLayers.Map({ div: 'uni_map_canvas', projection: 'EPSG:3857', layers: [mapnik,overlay], center: myLocation.getBounds().getCenterLonLat(), zoom: 15 }); olMap = map; mapnikLayer=mapnik; map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addPopup(popup); alert('marko'); }