var map = new OpenLayers.Map("memphis-TN-cash-america-pawn");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( -89.9576, 35.0681 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('3454 S Third Street, Memphis, TN 38109', 'fecd25aa', 'fc529f0a');$geo('4619 Elvis Presley Blvd, Memphis, TN 38116-7109', 'c7cb6ec5', 'fc529f0a');$geo('4275 Summer Ave, Memphis, TN 38122-4048', 'b44dd0c8', 'fc529f0a');$geo('3447 Millbranch Rd, Memphis, TN 38116-3625', '24ee5db9', 'fc529f0a');$geo('3644 Lamar Ave, Memphis, TN 38118', '255b6a8c', 'fc529f0a');$geo('2421 Covington Pike, Memphis, TN 38128-6935', 'aaf4969d', 'fc529f0a');$geo('3305 Austin Peay Hwy, Memphis, TN 38128', '2f30debb', 'fc529f0a');$geo('3880 Park Ave, Memphis, TN 38111', '06040170', 'fc529f0a');$geo('1302 Poplar Ave, Memphis, TN 38104', '613bdb37', 'fc529f0a');$geo('2378 Lamar Ave, Memphis, TN 38114', 'f8d1bb73', 'fc529f0a');$geo('1910 S 3rd St, Memphis, TN 38109-7714', '299815bb', 'fc529f0a');$geo('1133 S Bellevue Blvd, Memphis, TN 38106', '041813c0', 'fc529f0a');$geo('3500 S Mendenhall Rd Suite 104, Memphis, TN 38115-4501', 'a157786d', 'fc529f0a');$geo('3337 Overton Crossing St, Memphis, TN 38127-6545', 'c540c2e6', 'fc529f0a');$geo('2198 Frayser Blvd, Memphis, TN 38127', '43b437e2', 'fc529f0a');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';});}