var map = new OpenLayers.Map("bellevue-WA-wells-fargo-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( -122.209, 47.6172 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('15015 Main St, STE 101, Bellevue, WA 98007', '2fc87ce7', '0f3408cf');$geo('1130 Bellevue Way Ne, Bellevue, WA 98004', '4fd6ce3f', '0f3408cf');$geo('4020 Factoria Blvd SE, Bellevue, WA 98006', 'd376416b', '0f3408cf');$geo('225 108th Ave Ne, Bellevue, WA 98004', '2427b04f', '0f3408cf');$geo('2201 156th Ave NE, Bellevue, WA 98007', '47cf1b0d', '0f3408cf');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';});}