var map = new OpenLayers.Map("virginia-beach-VA-liberty-tax-service");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( -76.0931, 36.844 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('1943 A Lynnhaven Parkway, Virginia Beach, VA 23453', '19c7064e', 'ac8b4514');$geo('4609 Haygood Rd, Virginia Beach, VA 23455-5429', 'cb7060a6', 'ac8b4514');$geo('5020 Ferrell Pkwy Ste 206, Virginia Beach, VA 23464-8869', 'bd98d01d', 'ac8b4514');$geo('737 First Colonial Rd Ste 208, Virginia Beach, VA 23451-6103', 'efece6fa', 'ac8b4514');$geo('2129 General Booth Blvd Ste 116, Virginia Beach, VA 23454-5872', '5c16d314', 'ac8b4514');$geo('1615 General Booth Blvd, Virginia Beach, VA 23454-5692', '49049d06', 'ac8b4514');$geo('1716 Corporate Landing Pkwy, Virginia Beach, VA 23454-5681', '2526346d', 'ac8b4514');$geo('5650 Virginia Beach Blvd, Virginia Beach, VA 23462-5687', '58098426', 'ac8b4514');$geo('2372 Virginia Beach Blvd Ste 102, Virginia Beach, VA 23454-4065', 'db1cbcb0', 'ac8b4514');$geo('509 London Bridge Rd, Virginia Beach, VA 23454-5211', '051e1194', 'ac8b4514');$geo('4720 Virginia Beach Blvd, Virginia Beach, VA 23462-6709', '729a66a7', 'ac8b4514');$geo('1064 Lynnhaven Pkwy Ste 102, Virginia Beach, VA 23452-6344', '6dab6f9f', 'ac8b4514');$geo('3800 Holland Rd, Virginia Beach, VA 23452-2800', '93a1f37e', 'ac8b4514');$geo('6672A Indian River Rd, Virginia Beach, VA 23464-3422', '94e916c4', 'ac8b4514');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';});}