var map = new OpenLayers.Map("charlotte-NC-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( -80.8263, 35.193 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('3039 South Blvd, Charlotte, NC 28209-1856', '31f3218e', '0336d372');$geo('7200F Albemarle Rd, Charlotte, NC 28227-8129', '854a43a6', '0336d372');$geo('3111 N Sharon Amity Rd, Charlotte, NC 28205-6538', '955d8d3c', '0336d372');$geo('6308 The Plz Ste A1, Charlotte, NC 28215-2771', 'd24447da', '0336d372');$geo('6404 F Albemarle Road, Charlotte, NC 28212', 'f628cd04', '0336d372');$geo('5210-D1 North Tryon St, Charlotte, NC 28213', '8dafaf83', '0336d372');$geo('7808 S Tryon St, Charlotte, NC 28273-4155', '3dc210d8', '0336d372');$geo('10110 Johnston Rd Ste 2, Charlotte, NC 28210-9200', '2a1ad5ef', '0336d372');$geo('2023 Beatties Ford Rd, Charlotte, NC 28216-4513', '180ba822', '0336d372');$geo('9622 Monroe Rd, Charlotte, NC 28270-1447', '6399b76f', '0336d372');$geo('4749 - A South Blvd, Charlotte, NC 28217', '4626720f', '0336d372');$geo('2611B Central Ave, Charlotte, NC 28205-5334', 'e82c7dce', '0336d372');$geo('3509J David Cox Rd, Charlotte, NC 28269-1228', '57234451', '0336d372');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';});}