Looking for some a place to eat in Charleston? We've got you covered

Here's the deal, type the name, style, or food item you're looking for in the box just below. Then press search, and grab and drag the map to wherever you want to find somewhere to eat. Yelp's best pick will automatically open first.

If you like what you see here, we really suggest hoping on over to Yelp.com for the full experience.

body.sidebars #main {width: 980px; }
#sidebarcap, #sidebar-left, #sidebar-right { display:none; }
#mapContainer {padding-top: 50px;}
#map, #mapContainer {width:980px; height: 450px;}
#top { width: 100%; height: 50px; line-height: 50px;}
#spinner { visibility: hidden; margin-left:3px;}
#poweredby, #searchbox {line-height: 50px;}
#searchbox {text-align: center;}
#poweredby { float: right; margin-right: 3px;}
#poweredby img { vertical-align: baseline;}
.marker {font-size: 11px; color: black; line-height: 15px;}
.marker .businessimage { float: left;}
.marker .ratingsimage {vertical-align:middle; margin-top:0px;}
.marker .businessinfo { margin-left: 110px;}

var YWSID = "5IwQf1W4FxTyLzL6-mY16w"; // common required parameter (api key)

var map = null;
var icon = null;

/*
* Creates the map object and calls setCenterAndBounds
* to instantiate it.
*/
function load() {
map = new GMap2(document.getElementById("map"));
GEvent.addListener(map, "load", function() {updateMap();});
GEvent.addListener(map, "dragend", function() {updateMap();});
GEvent.addListener(map, "zoomend", function() {updateMap();});
map.setCenter(new GLatLng(32.801128,-79.942017),13);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setMapType(G_NORMAL_MAP);

if (window.attachEvent) window.attachEvent("onresize", function() { map.checkResize()} );
else if (window.addEventListener) window.addEventListener("resize", function() { map.checkResize()}, false);

// setup our marker icon
icon = new GIcon();
icon.image = "/sites/all/modules/yelp/images/marker_star.png";
icon.shadow = "/sites/all/modules/yelp/images/marker_shadow.png";
icon.iconSize = new GSize(20, 29);
icon.shadowSize = new GSize(38, 29);
icon.iconAnchor = new GPoint(15, 29);
icon.infoWindowAnchor = new GPoint(15, 3);
}

/*
* Construct the URL to call for the API request
*/
function constructYelpURL() {
var mapBounds = map.getBounds();
var URL = "http://api.yelp.com/" +
"business_review_search?"+
"callback=" + "handleResults" +
"&term=" + document.getElementById("term").value +
"&num_biz_requested=20" +
"&tl_lat=" + mapBounds.getSouthWest().lat() +
"&tl_long=" + mapBounds.getSouthWest().lng() +
"&br_lat=" + mapBounds.getNorthEast().lat() +
"&br_long=" + mapBounds.getNorthEast().lng() +
"&ywsid=" + YWSID;
return encodeURI(URL);
}

/*
* Called on the form submission: updates the map by
* placing markers on it at the appropriate places
*/
function updateMap() {
// turn on spinner animation
document.getElementById("spinner").style.visibility = 'visible';

var yelpRequestURL = constructYelpURL();

/* clear existing markers */
map.clearOverlays();

/* do the api request */
var script = document.createElement('script');
script.src = yelpRequestURL;
script.type = 'text/javascript';
var head = document.getElementsByTagName('head').item(0);
head.appendChild(script);
return false;
}

/*
* If a sucessful API response is received, place
* markers on the map. If not, display an error.
*/
function handleResults(data) {
// turn off spinner animation
document.getElementById("spinner").style.visibility = 'hidden';
if(data.message.text == "OK") {
if (data.businesses.length == 0) {
// alert("Error: No businesses were found near that location");
return;
}
for(var i=0; i';

// image and rating
text += '';

// div start
text += '';
// name/url
text += ''+biz.name+'
';
// stars
text += ' based on ';
// reviews
text += biz.review_count + ' reviews

';
// categories
text += formatCategories(biz.categories);
// neighborhoods
if(biz.neighborhoods.length)
text += formatNeighborhoods(biz.neighborhoods);
// address
text += biz.address1 + '
';
// address2
if(biz.address2.length)
text += biz.address2+ '
';
// city, state and zip
text += biz.city + ', ' + biz.state + ' ' + biz.zip + '
';
// phone number
if(biz.phone.length)
text += formatPhoneNumber(biz.phone);
// Read the reviews
text += '
Read the reviews »
';
// div end
text += ''
return text;
}

/*
* Formats the categories HTML
*/
function formatCategories(cats) {
var s = 'Categories: ';
for(var i=0; i';
return s;
}

/*
* Formats the neighborhoods HTML
*/
function formatNeighborhoods(neighborhoods) {
s = 'Neighborhoods: ';
for(var i=0; i' + neighborhoods[i].name + '';
if (i != neighborhoods.length-1) s += ', ';
}
s += '
';
return s;
}

/*
* Formats the phone number HTML
*/
function formatPhoneNumber(num) {
if(num.length != 10) return '';
return '(' + num.slice(0,3) + ') ' + num.slice(3,6) + '-' + num.slice(6,10) + '
';
}

/*
* Creates a marker for the given business and point
*/
function createMarker(biz, point, markerNum) {
var infoWindowHtml = generateInfoWindowHtml(biz)
var marker = new GMarker(point, icon);
map.addOverlay(marker);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(infoWindowHtml, {maxWidth:400});
});
// automatically open first marker
if (markerNum == 0)
marker.openInfoWindowHtml(infoWindowHtml, {maxWidth:400});
}

//]]>

$(document).ready(function() {
load();
});

function checkForm(){return false;}

Powered by

Search for

Filed in