var map = new OpenLayers.Map("salt-lake-city-UT-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( -111.899, 40.7564 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('1132 E 3300 S, Salt Lake City, UT 84106-2598', 'f577109a', 'b7bfb93c');$geo('5648 S Redwood Rd Ste B, Salt Lake City, UT 84123-5393', '8c1959a6', 'b7bfb93c');$geo('4093 S Redwood Rd, Salt Lake City, UT 84123-1131', '6dda126c', 'b7bfb93c');$geo('112 N 900 W, Salt Lake City, UT 84116-3334', '07e145eb', 'b7bfb93c');$geo('4901 S State St Ste C, Salt Lake City, UT 84107-4873', '0cf86f1e', 'b7bfb93c');$geo('3863 W 5400 S, Salt Lake City, UT 84118', 'd76baa6d', 'b7bfb93c');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';});}