Kalastaðakoti, Hvalfjarðarstrandarhr., Borgarfjarðarsýslu, Íslandi


 


Athugasemdir:


Heimilisfang : Breiddargráða: 64.388536, Lengdargráða: -21.723533


Heimili

Leitarniðurstöður: 1 til 1 af 1

   Eftirnafn, fornafn    Heimili    Nr. einstaklings 
1 Georg Pétur Jónsson  1881-1882I10483
Scroll to Top
\r\n


Smelltu hér til að fá upplýsingar um það hvernig þú kemst til: til Kalastaðakoti, Hvalfjarðarstrandarhr., Borgarfjarðarsýslu, Íslandi' }); placeStyle[1] = new ol.style.Style({ image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ ({ anchor: [10, 34], anchorXUnits: 'pixels', anchorYUnits: 'pixels', src: 'google_marker.php?image=009.png&text=1' })) }); placeOSM[1].setStyle(placeStyle[1]); var vectorSource = new ol.source.Vector({ features: [placeOSM[1]] }); var vectorLayer = new ol.layer.Vector({ source: vectorSource }); if (mapsrc == "OSM") { var rasterLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); } else { var rasterLayer = new ol.layer.Tile({ source: new ol.source.XYZ({ url: srcurl, attributions: srcatt }) }); } if (!maploaded) zoom = 13; if (!maploaded && zoom > 16) zoom = 16; // The INTERACTIONS below is the added Mouse-Wheel Zoom map = new ol.Map({ interactions: ol.interaction.defaults({mouseWheelZoom:false}), controls: ol.control.defaults({ attributionOptions: { collapsible: false } }).extend([ scaleLineControl ]), layers: [rasterLayer, vectorLayer], target: document.getElementById('map'), view: new ol.View({ center: ol.proj.fromLonLat([longlati[0], longlati[1]]), zoom: zoom }) }); // Below: My question got this reply here // https://stackoverflow.com/questions/50773076/automatic-zoom-depending-on-extreme-points if (!maploaded && 1 > 1) { map.getView().fit(vectorSource.getExtent(), {padding:[40, 16, 32, 40], maxZoom:13} ); } map.on('singleclick', function(event) { map.forEachFeatureAtPixel(event.pixel, function(feature,layer) { d = document.getElementById('infodiv'); x = event.pixel[1]; y = event.pixel[0]; d.innerHTML = "
" + feature.get('name'); d.style.top = x + "px"; d.style.left = y + "px"; d.style.display = "block"; event.preventDefault(); }); }); // The following code was found here: // https://stackoverflow.com/questions/26022029/how-to-change-the-cursor-on-hover-in-openlayers-3 // It's the only one I found that is actually working with the above examplecode... // I also added that the default cursor is "grab" and while dragging the map it's "grabbing". var cursorHoverStyle = "pointer"; var target = map.getTarget(); //target returned might be the DOM element or the ID of this element dependeing on how the map was initialized //either way get a jQuery object for it var jTarget = typeof target === "string" ? $("#"+target) : $(target); map.on("pointermove", function (event) { if (event.dragging) { document.getElementById('map').style.cursor = 'grabbing'; return; } var mouseCoordInMapPixels = [event.originalEvent.offsetX, event.originalEvent.offsetY]; //detect feature at mouse coords var hit = map.forEachFeatureAtPixel(mouseCoordInMapPixels, function (feature, layer) { return true; }); if (hit) { jTarget.css("cursor", cursorHoverStyle); } else { jTarget.css("cursor", "grab"); } event.preventDefault(); // avoid bubbling }); maploaded = true; document.getElementById('osmmapsat').style.padding="4px 4px 4px 4px"; document.getElementById('osmmapsat').style.backgroundColor="#dddddd"; // CHANGED in v7a if ("SAT" == "SAT") { document.getElementById('osmmapsat').innerHTML = ""; } else { document.getElementById('osmmapsat').innerHTML = ""; } // End changed i v7a } function displayMap() { if (jQuery('#map').length) { ShowTheMap(); } } window.onload=displayMap; //]]>