Adres poczty elektronicznej jest chroniony przed robotami spamującymi. W przeglądarce musi być włączona obsługa JavaScript, żeby go zobaczyć. map = new OpenLayers.Map('mapdiv'), map.addLayer(new OpenLayers.Layer.OSM()), //Set start centrepoint and zoom var lonLat = new OpenLayers.LonLat( 16.903092, 52.427737 ) .transform( new OpenLayers.Projection('EPSG:4326'), // transform from WGS 1984 map.getProjectionObject() // to Spherical Mercator Projection ), var features = [], features[0] = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(lonLat.lon, lonLat.lat), { street: 'ul.Wojska Polskiego 38/42', instName: 'Katedra Fizyki i Biofizyki', name: 'Uniwersytet Przyrodniczy', postalCode: '60637 Poznań' }), layerListeners = { 'featureover':function(evt){ var feature = evt.feature, var popup = new OpenLayers.Popup.FramedCloud('popup', OpenLayers.LonLat.fromString(feature.geometry.toShortString()), null, '' + feature.attributes.instName + ' ' + feature.attributes.name + ' ' + feature.attributes.street + ' ' +feature.attributes.postalCode + '', null, false ), feature.popup = popup, map.addPopup(popup), }, 'featureout':function(evt){ var feature = evt.feature, map.removePopup(feature.popup), feature.popup.destroy(), feature.popup = null, } }, //create the layer with listeners to create and destroy popups var vector = new OpenLayers.Layer.Vector('Points',{ eventListeners: layerListeners, styleMap: new OpenLayers.StyleMap({ externalGraphic: 'http://openlayers.org/api/img/marker.png', graphicWidth: 20, graphicHeight: 24, graphicYOffset: -24 }) }), Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 18, 2016 @ 8:09 am