var map = new OpenLayers.Map("houston-TX-check-n-go");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( -95.2221, 29.7204 ).transform(new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject());map.setCenter (lonLat, zoom);$geo('6348 Telephone Rd, Houston, TX 77087', '6e58f527', '0170adfa');$geo('7093A Highway 6 N, Houston, TX 77095', '5f18942d', '0170adfa');$geo('11709 S Sam Houston Pkwy E, Houston, TX 77089', '19bdfeb6', '0170adfa');$geo('4407 W Fuqua St, Houston, TX 77045', 'b637b9ce', '0170adfa');$geo('12111 Jones Rd, Houston, TX 77070', '62eab712', '0170adfa');$geo('6494 W Little York Rd, Houston, TX 77091', '545fb7c1', '0170adfa');$geo('7093A Highway 6 N, Houston, TX 77095', '5f18942d', '0170adfa');$geo('8409 Hillcroft St, Houston, TX 77096', 'a49fb9d8', '0170adfa');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';});}