var map = new OpenLayers.Map("lansing-MI-firstmerit-bank");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( -84.5533, 42.7323 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('6101 W. Saginaw Hwy, Lansing, MI 48917', '18f9c784', '81ff6484');$geo('3015 E Saginaw St, Lansing, MI 48912', '80806d02', '81ff6484');$geo('2017 Lake Lansing Rd, Lansing, MI 48912', '3d4ca275', '81ff6484');$geo('15431 South Us-27 Hwy, Lansing, MI 48906', '21348f05', '81ff6484');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';});}