var map = new OpenLayers.Map("houston-TX-first-cash-advance");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('10950 Cypress Creek Pkwy, Houston, TX 77070', 'af0ee6a7', 'c9eff060');$geo('11460 Fuqua St, Houston, TX 77089', 'df542aa8', 'c9eff060');$geo('2036 Cypress Creek Pkwy, Houston, TX 77090', 'd2b7aa4a', 'c9eff060');$geo('5551 Highway 6 N, Houston, TX 77084', '2d418815', 'c9eff060');$geo('7330 Southwest Fwy, Houston, TX 77074', 'f30f604d', 'c9eff060');$geo('9507 Westheimer Rd, Houston, TX 77063', 'e94a210c', 'c9eff060');$geo('1231 W 11th St, Houston, TX 77008', '89cc565c', 'c9eff060');$geo('4010 Broadway St, Houston, TX 77087', 'f8eb9779', 'c9eff060');$geo('10701 North Fwy, Houston, TX 77037', '5f63adf6', 'c9eff060');$geo('16510 FM 529 Rd, Houston, TX 77095', '12d410ee', 'c9eff060');$geo('7306 W Tidwell Rd, Houston, TX 77040', '3a8c7b12', 'c9eff060');$geo('6211 FM 1960 Rd W, Houston, TX 77069', 'ef4610ba', 'c9eff060');$geo('2395 Highway 6 S, Houston, TX 77077', '68cf39b5', 'c9eff060');$geo('8017 Main St, Houston, TX 77025', '1a24eaf4', 'c9eff060');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';});}