var map; var layer, markers; $(document).ready(function(){ map = new OpenLayers.Map( 'map',{ maxExtent: new OpenLayers.Bounds(0,0,16384,16384), numZoomLevels:5, maxResolution:(4096/256) }); var layer = new OpenLayers.Layer.XYZ( "RMS: RVKMapService", "http://sagnabrunnur.is/images/zoom/${z}/${x}/${y}", { zoomOffset: 2 } ); markers = new OpenLayers.Layer.Vector("Markers"); markers.events.on({ "featureselected": function(feature) { $.facebox({ ajax: this.selectedFeatures[0].data.url }); } }); map.addLayers([markers]); map.addLayers([layer]); map.setCenter(new OpenLayers.LonLat(8192, 8192), 1); map.events.register('zoomend', map, function(evt) { if(map.getZoom() == 0){ markers.setVisibility(false) } else if(map.getZoom() == 1) { markers.setVisibility(true) } }); var feature9 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(13213, 8905), {name:"Skálanes",url:"/docs/?p=339",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature9]);select9 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select9); select9.activate();var feature10 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3341, 5569), {name:"Búðareyri",url:"/docs/?p=26",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature10]);select10 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select10); select10.activate();var feature8 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(10569, 9873), {name:"Brimnes",url:"/docs/?p=8",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature8]);select8 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select8); select8.activate();var feature7 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3745, 7309), {name:"Vestdalseyri",url:"/docs/?p=12",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature7]);select7 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select7); select7.activate();var feature20 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(10469, 7177), {name:"Austdalur",url:"/docs/?p=61",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature20]);select20 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select20); select20.activate();var feature19 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2609, 5357), {name:"Fjarðaraldan",url:"/docs/?p=50",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature19]);select19 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select19); select19.activate();var feature21 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(11793, 7705), {name:"Bæjarstæði",url:"/docs/?p=63",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature21]);select21 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select21); select21.activate();var feature24 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(5101, 7821), {name:"Dvergasteinn",url:"/docs/?p=89",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature24]);select24 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select24); select24.activate();var feature26 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(7725, 8029), {name:"Eyrarþorpið",url:"/docs/?p=121",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature26]);select26 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select26); select26.activate();var feature28 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(1945, 3753), {name:"Fjarðarsel",url:"/docs/?p=130",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature28]);select28 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select28); select28.activate();var feature31 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2473, 5037), {name:"Fjörður",url:"/docs/?p=150",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature31]);select31 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select31); select31.activate();var feature33 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(7385, 7637), {name:"Hánefsstaðir",url:"/docs/?p=160",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature33]);select33 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select33); select33.activate();var feature44 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(6557, 8957), {name:"Selstaðir",url:"/docs/?p=221",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature44]);select44 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select44); select44.activate();var feature46 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(7037, 7453), {name:"Sörlastaðir",url:"/docs/?p=225",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature46]);select46 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select46); select46.activate();var feature50 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(8633, 8253), {name:"Þórarinsstaðir",url:"/docs/?p=266",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature50]);select50 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select50); select50.activate();var feature65 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(5753, 8281), {name:"Sunnuholt",url:"/docs/?p=411",category:21}, {externalGraphic: "/images/markers/21-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature65]);select65 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select65); select65.activate();var feature76 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2801, 5053), {name:"Félagsheimilið Herðubreið",url:"/docs/?p=478",category:22}, {externalGraphic: "/images/markers/22-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature76]);select76 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select76); select76.activate();var feature82 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(13913, 8869), {name:"Glæfraför í Bjargið",url:"/docs/?p=775",category:22}, {externalGraphic: "/images/markers/22-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature82]);select82 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select82); select82.activate();var feature84 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3273, 5349), {name:"Kúabúskapur inni í bæ",url:"/docs/?p=783",category:22}, {externalGraphic: "/images/markers/22-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature84]);select84 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select84); select84.activate();var feature25 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2657, 5013), {name:"Eyjólfur Jónsson ljósmyndari",url:"/docs/?p=97",category:23}, {externalGraphic: "/images/markers/23-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature25]);select25 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select25); select25.activate();var feature58 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2701, 5053), {name:"Brúin",url:"/docs/?p=342",category:23}, {externalGraphic: "/images/markers/23-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature58]);select58 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select58); select58.activate();var feature79 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2893, 5741), {name:"Síldarárin á Seyðisfirði",url:"/docs/?p=601",category:23}, {externalGraphic: "/images/markers/23-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature79]);select79 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select79); select79.activate();var feature80 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2661, 4413), {name:"Sígaunar á ferð 1912",url:"/docs/?p=757",category:23}, {externalGraphic: "/images/markers/23-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature80]);select80 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select80); select80.activate();var feature81 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3425, 5985), {name:"Bræðslan",url:"/docs/?p=762",category:23}, {externalGraphic: "/images/markers/23-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature81]);select81 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select81); select81.activate();var feature73 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2261, 5209), {name:"Seyðisfjörður 75 ára",url:"/docs/?p=472",category:24}, {externalGraphic: "/images/markers/24-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature73]);select73 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select73); select73.activate();var feature74 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(11861, 7037), {name:"Sauðfell",url:"/docs/?p=474",category:24}, {externalGraphic: "/images/markers/24-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature74]);select74 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select74); select74.activate();var feature75 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2181, 5157), {name:"Seyðisfjörður 1962 - 70",url:"/docs/?p=476",category:24}, {externalGraphic: "/images/markers/24-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature75]);select75 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select75); select75.activate();var feature12 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2981, 6105), {name:"El Grillo - Bauja",url:"/docs/?p=30",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature12]);select12 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select12); select12.activate();var feature14 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(5469, 7917), {name:"Dvergasteinn",url:"/docs/?p=379",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature14]);select14 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select14); select14.activate();var feature15 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(6113, 8265), {name:"Slys við Kolstaðahöfn",url:"/docs/?p=337",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature15]);select15 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select15); select15.activate();var feature17 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(11377, 10229), {name:"Sterling strandar",url:"/docs/?p=34",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature17]);select17 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select17); select17.activate();var feature52 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(11013, 9869), {name:"Líkfundur á Brimnesi",url:"/docs/?p=304",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature52]);select52 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select52); select52.activate();var feature22 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(13597, 8989), {name:"Brandsurð",url:"/docs/?p=67",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature22]);select22 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select22); select22.activate();var feature23 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(10989, 9705), {name:"Dularfullt hvarf sýslumanns",url:"/docs/?p=87",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature23]);select23 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select23); select23.activate();var feature27 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(11941, 9229), {name:"Færeyingar að veiðum í Seyðisfirði",url:"/docs/?p=128",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature27]);select27 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select27); select27.activate();var feature29 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(1993, 3669), {name:"Fjarðarselsvirkjun",url:"/docs/?p=133",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature29]);select29 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select29); select29.activate();var feature30 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(7021, 7741), {name:"Fjarðarsíld",url:"/docs/?p=145",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature30]);select30 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select30); select30.activate();var feature32 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3713, 7129), {name:"Gránufélagshúsin brenna",url:"/docs/?p=156",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature32]);select32 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select32); select32.activate();var feature34 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3197, 5521), {name:"Garðarsfélagið",url:"/docs/?p=164",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature34]);select34 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select34); select34.activate();var feature35 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2889, 5349), {name:"Ferjusiglingar yfir Norður-Atlandshafið",url:"/docs/?p=173",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature35]);select35 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select35); select35.activate();var feature36 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3629, 7101), {name:"Herinn á Vestdalseyri",url:"/docs/?p=182",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature36]);select36 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select36); select36.activate();var feature37 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(8273, 8021), {name:"Herinn í Háahrauni",url:"/docs/?p=187",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature37]);select37 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select37); select37.activate();var feature38 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2665, 5313), {name:"Hernámsárin",url:"/docs/?p=192",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature38]);select38 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select38); select38.activate();var feature39 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(6553, 7609), {name:"Hvalur í kafbátanet",url:"/docs/?p=4",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature39]);select39 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select39); select39.activate();var feature40 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3757, 7121), {name:"Hvalveiðar",url:"/docs/?p=197",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature40]);select40 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select40); select40.activate();var feature41 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(8013, 7917), {name:"Ãsleifur skipstjóri",url:"/docs/?p=203",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature41]);select41 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select41); select41.activate();var feature42 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(13929, 9061), {name:"Jón fótalausi",url:"/docs/?p=206",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature42]);select42 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select42); select42.activate();var feature43 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3285, 5577), {name:"Kanóna við Hafnargötu",url:"/docs/?p=212",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature43]);select43 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select43); select43.activate();var feature47 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2577, 5289), {name:"Vélsmiðjan Stál",url:"/docs/?p=255",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature47]);select47 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select47); select47.activate();var feature51 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3257, 5525), {name:"Vélsmiðja Jóhanns Hanssonar",url:"/docs/?p=230",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature51]);select51 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select51); select51.activate();var feature53 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3209, 5605), {name:"Otto Wathne",url:"/docs/?p=308",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature53]);select53 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select53); select53.activate();var feature54 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(12745, 9737), {name:"Óvelkomnir gestir",url:"/docs/?p=323",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature54]);select54 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select54); select54.activate();var feature55 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(15589, 9417), {name:"Seyðfirðingur ferst",url:"/docs/?p=328",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature55]);select55 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select55); select55.activate();var feature56 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3141, 5517), {name:"Síldveiðar Norðmanna í Seyðisfirði",url:"/docs/?p=331",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature56]);select56 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select56); select56.activate();var feature57 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(10545, 9737), {name:"Sigurður ríki",url:"/docs/?p=334",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature57]);select57 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select57); select57.activate();var feature60 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3573, 6157), {name:"Loftárás á Seyðisfjörð",url:"/docs/?p=374",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature60]);select60 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select60); select60.activate();var feature61 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2593, 6145), {name:"Snjóflóð á Vestdalsmjöl",url:"/docs/?p=388",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature61]);select61 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select61); select61.activate();var feature62 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(3065, 5581), {name:"Sæsíminn",url:"/docs/?p=395",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature62]);select62 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select62); select62.activate();var feature63 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2461, 5253), {name:"Snjóflóð 1885",url:"/docs/?p=399",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature63]);select63 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select63); select63.activate();var feature64 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2685, 5141), {name:"Stefán Th.",url:"/docs/?p=402",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature64]);select64 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select64); select64.activate();var feature66 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(7053, 9305), {name:"Tundurdufl við Selstaði",url:"/docs/?p=414",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature66]);select66 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select66); select66.activate();var feature67 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(4257, 5393), {name:"Bretum uppsigað við Strandartind",url:"/docs/?p=418",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature67]);select67 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select67); select67.activate();var feature69 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(13337, 9141), {name:"Varðstöðin á Skálanesi",url:"/docs/?p=425",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature69]);select69 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select69); select69.activate();var feature70 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2717, 5021), {name:"Vélstjórinn frá Aberdeen",url:"/docs/?p=431",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature70]);select70 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select70); select70.activate();var feature71 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(7109, 7737), {name:"Verslun á Hánefsstaðaeyri",url:"/docs/?p=438",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature71]);select71 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select71); select71.activate();var feature77 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(5021, 7833), {name:"Bjarna Dísa",url:"/docs/?p=482",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature77]);select77 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select77); select77.activate();var feature78 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(6033, 7069), {name:"Sjósund á Seyðisfirði",url:"/docs/?p=485",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature78]);select78 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select78); select78.activate();var feature83 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2357, 7057), {name:"Kaupstaðaferðir Héraðsmanna",url:"/docs/?p=215",category:25}, {externalGraphic: "/images/markers/25-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature83]);select83 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select83); select83.activate();var feature48 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(8813, 15041), {name:"Atlas Seyðisfjörður",url:"/docs/?p=218",category:30}, {externalGraphic: "/images/markers/30-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature48]);select48 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select48); select48.activate();var feature68 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(2585, 6393), {name:"Andakofi",url:"/docs/?p=422",category:30}, {externalGraphic: "/images/markers/30-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature68]);select68 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select68); select68.activate();var feature72 = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(5233, 7937), {name:"Kýrnar á Dvergasteini",url:"/docs/?p=462",category:30}, {externalGraphic: "/images/markers/30-active.png", graphicHeight: 76, graphicWidth: 39});markers.addFeatures([feature72]);select72 = new OpenLayers.Control.SelectFeature( markers, { clickout: true, toggle: false, multiple: false, hover: false, toggleKey: "ctrlKey", // ctrl key removes from selection multipleKey: "shiftKey", // shift key adds to selection box: false } ); map.addControl(select72); select72.activate(); }).keydown(function(event) { if (event.keyCode == '37') { panIt(1); event.preventDefault(); } if (event.keyCode == '39') { panIt(2); event.preventDefault(); } if (event.keyCode == '38') { panIt(3); event.preventDefault(); } if (event.keyCode == '40') { panIt(4); event.preventDefault(); } }); function updateInfo(x,y){ map.panTo(new OpenLayers.LonLat(x,y)); if(map.getZoom() < 2) { map.zoomTo(2); } } function toggleLayers(layer,node){ if(layer == 22){ toggleLayers(23,node); toggleLayers(24,node); } for(i=0;i< map.layers[0].features.length;i++){ if (map.layers[0].features[i].style.display != 'none'){ if(map.layers[0].features[i].data.category == layer){ map.layers[0].features[i].style.display = 'none'; $(node).addClass('strikeout'); } } else { if(map.layers[0].features[i].data.category == layer){ map.layers[0].features[i].style.display = ''; $(node).removeClass('strikeout'); } } } markers.redraw(); return } function panIt(num){ switch(num){ case 1: map.pan((-1*256),0); break; case 2: map.pan(256,0); break; case 3: map.pan(0,(-1*256)); break; case 4: map.pan(0,256); break; } }