var map = new OpenLayers.Map("albuquerque-NM-bank-of-the-west");map.addLayer(new OpenLayers.Layer.OSM("OpenStreetMap", ['//a.tile.openstreetmap.org/${z}/${x}/${y}.png','//b.tile.openstreetmap.org/${z}/${x}/${y}.png','//c.tile.openstreetmap.org/${z}/${x}/${y}.png'], null)); var zoom=9;var lonLat = new OpenLayers.LonLat( -106.643, 35.2005 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('5401 Central Ave NE, Albuquerque, NM 87108', '3ea8b234', '9ba55037');$geo('10050 Coors Bypass Blvd NW, Albuquerque, NM 87114', '83a47427', '9ba55037');$geo('5228 Central Avenue SW, Albuquerque, NM 87105', '9145c96b', '9ba55037');$geo('5501 Jefferson Street NE, Albuquerque, NM 87109', 'a4e9cc8f', '9ba55037');$geo('3201 Juan Tabo Blvd NE, Albuquerque, NM 87111', 'd3ef2720', '9ba55037');$geo('5901 Menaul Boulevard NE, Albuquerque, NM 87110', '9062136e', '9ba55037');$geo('6600 Central Avenue SW, Albuquerque, NM 87121', '27d1f1b0', '9ba55037');$geo('3733 Isleta Boulevard SW, Albuquerque, NM 87105', 'e3707ef1', '9ba55037');$geo('4221 San Mateo Blvd, Albuquerque, NM 87110', 'e8ee96f5', '9ba55037');$geo('780 Juan Tabo Boulevard NE, Albuquerque, NM 87123', '115b493f', '9ba55037');$geo('6701 Academy Road NE, Albuquerque, NM 87109', '6e7833e6', '9ba55037');$geo('7900 Wyoming Blvd NE, Albuquerque, NM 87109', '7963fb0b', '9ba55037');$geo('500 Marquette NW, Albuquerque, NM 87102', 'adca9480', '9ba55037');$geo('6125 4th Street NW, Albuquerque, NM 87107', '20726d99', '9ba55037');$geo('500 Dr Martin Luther King Dr, Albuquerque, NM 87102', 'd5351277', '9ba55037');function $setCenter($lon, $lat){map.setCenter(new OpenLayers.LonLat($lon,$lat).transform(new OpenLayers.Projection('EPSG:4326'), map.getProjectionObject() ), 18);}function $geo($location, $hash, $hash2){var $geocode = 'https://nominatim.openstreetmap.org/search?q='+$location+'&format=json'; $.getJSON($geocode, function(data) {var lonLat = new OpenLayers.LonLat( data[0]['lon'] , data[0]['lat'] ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());var markers = new OpenLayers.Layer.Markers( "Markers" );map.addLayer(markers);markers.addMarker(new OpenLayers.Marker(lonLat));map.setCenter (lonLat, 12);document.getElementById($hash).innerHTML += ' | View Map';});}