Skip to content

Instantly share code, notes, and snippets.

@jeremycflin
Last active October 12, 2015 22:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremycflin/2913a5bf30c340d8f8fe to your computer and use it in GitHub Desktop.
Save jeremycflin/2913a5bf30c340d8f8fe to your computer and use it in GitHub Desktop.
Google Map + D3 Example
<!doctype html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>Google Map + D3.js </title><?php /* EDIT ME */ ?>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<!-- Latest compiled and minified Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!--LEAFLET CSS -->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.5/leaflet.css" />
<link rel="stylesheet" href="style.css"/>
</head>
<body class="">
<div id="main-wrapper" class="">
<div id="main-content" class="container">
<header class="row">
<div class="social-links col-md-12"></div>
<div class="col-md-12">
<h1>Google Map + D3.js Example</h1>
<div class="byline">By <a href="#">Jeremy C.F. Lin</a></div>
<div class="meta">
Published September 23, 2015
</div>
</div>
</header>
<section class="row">
<div class="col-md-12" id="map"></div>
</section>
<footer>
<div id="source-line">Source: Source goes here.</div>
</footer>
</div>
</div>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<script type="text/javascript"
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB-z__K2Tz1ZKAxvmiZ1mB7rxi9LY4_0JE">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<!-- Latest compiled and minified Bootstrap JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<!-- <script src="js/map.js"></script> -->
<script src="marker.js"></script>
</body>
</html>
var styles = [
{
stylers: [
{ hue: "#00ffe6" },
{ saturation: -70 },
{ lightness: 10 },
{ gamma: 1.0 }
]
},{
featureType: "administrative",
stylers: [
{ gamma: 0 },
{ visibility: "simplified" }
]
},{
featureType: "road.local",
stylers: [
{ gamma: -30 },
{ visibility: "on" },
{ strokeWeight: 3},
{ strokeColor: "black"}
]
},
{
featureType: "landscape.man_made ",
stylers: [
{ visibility: "simplified" },
]
},
{
featureType: "transit",
stylers: [
{ visibility: "off" },
]
}
];
// Create the Google Map…
var map = new google.maps.Map(d3.select("#map").node(), {
zoom: 13,
center: new google.maps.LatLng(34.0554907, -118.41893235),
mapTypeId: google.maps.MapTypeId.ROADMAP,
});
map.setOptions({styles: styles});
// Load the station data. When the data comes back, create an overlay.
d3.json("query.json", function(data) {
// console.log(data.businesses[0].location.coordinate.latitude, data.businesses[0].location.coordinate.longitude);
var overlay = new google.maps.OverlayView();
// Add the container when the overlay is added to the map.
overlay.onAdd = function() {
var layer = d3.select(this.getPanes().overlayLayer).append("div")
.attr("class", "stations");
// Draw each marker as a separate SVG element.
// We could use a single SVG, but what size would it have?
overlay.draw = function() {
var projection = this.getProjection(),
padding = 10;
var flatData = [];
$.each(data.businesses, function(i, item) {
flatData.push({latitude: item.location.coordinate.latitude, longitude: item.location.coordinate.longitude});
})
var marker = layer.selectAll("svg")
// .data(d3.entries(data))
.data(d3.entries(flatData))
.each(transform) // update existing markers
.enter()
.append("svg")
.each(transform)
.attr("class", "marker");
// Add a circle.
marker.append("circle")
.attr("r", 8)
.attr("cx", padding)
.attr("cy", padding);
// Add a label.
marker.append("text")
.attr("x", padding + 7)
.attr("y", padding)
.attr("dy", ".31em")
.text(function(d) { return d.key; });
function transform(d) {
console.log(d);
// d = new google.maps.LatLng(d.value[0], d.value[1]);
d = new google.maps.LatLng(d.value.latitude, d.value.longitude);
// d = new google.maps.LatLng(d[1], d[0]);
// d = new google.maps.LatLng(d.coordinate[0], d.coordinate[1]);
d = projection.fromLatLngToDivPixel(d);
return d3.select(this)
.style("left", (d.x - padding) + "px")
.style("top", (d.y - padding) + "px");
}
};
};
// Bind our overlay to the map…
overlay.setMap(map);
});
{
"region": {
"span": {
"latitude_delta": 0.03529217999999901,
"longitude_delta": 0.046331890000004705
},
"center": {
"latitude": 34.0554907,
"longitude": -118.41893235
}
},
"total": 40,
"businesses": [
{
"is_claimed": true,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/buena-vista-cigar-club-beverly-hills",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 82,
"name": "Buena Vista Cigar Club",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/buena-vista-cigar-club-beverly-hills",
"is_closed": false,
"phone": "3102738100",
"snippet_text": "I can not stress enough how amazing these guys are! First off, the bar is superbly decorated. You won't feel like you are in some stuffy Beverly Hills...",
"image_url": "http://s3-media4.fl.yelpcdn.com/bphoto/JM8NyA55PktuH_O4VQx2fA/ms.jpg",
"categories": [
[
"Lounges",
"lounges"
],
[
"Tobacco Shops",
"tobaccoshops"
]
],
"display_phone": "+1-310-273-8100",
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"id": "buena-vista-cigar-club-beverly-hills",
"snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/wKLk4sgj0cSsaHyQPcViGg/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"9715 S Santa Monica Blvd",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"9715 S Santa Monica Blvd"
],
"coordinate": {
"latitude": 34.0691559677634,
"longitude": -118.406889438629
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/arian-lounge-los-angeles",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 23,
"name": "Arian Lounge",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/arian-lounge-los-angeles",
"is_closed": false,
"phone": "4248323097",
"snippet_text": "Arian Lounge is a small hookah cafe featuring (entirely) glass hookahs.\n\nOkay, okay -- it sounds gimmicky (and it is) -- but these things are pretty awesome...",
"image_url": "http://s3-media4.fl.yelpcdn.com/bphoto/PtXLoGAfzwcAx9ulrjS9jA/ms.jpg",
"categories": [
[
"Hookah Bars",
"hookah_bars"
],
[
"Lounges",
"lounges"
]
],
"display_phone": "+1-424-832-3097",
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"id": "arian-lounge-los-angeles",
"snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/D0ks2xhN96F8cidtauCQ_A/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"1561 Westwood Blvd",
"Westwood",
"Los Angeles, CA 90024"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Westwood"
],
"postal_code": "90024",
"country_code": "US",
"address": [
"1561 Westwood Blvd"
],
"coordinate": {
"latitude": 34.0530188,
"longitude": -118.4399923
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/spaghettini-and-the-dave-koz-lounge-beverly-hills-3",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 182,
"name": "Spaghettini & the Dave Koz Lounge",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/spaghettini-and-the-dave-koz-lounge-beverly-hills-3",
"is_closed": false,
"id": "spaghettini-and-the-dave-koz-lounge-beverly-hills-3",
"phone": "3104244600",
"snippet_text": "Returned after receiving a very generous offer to experience Spaghettini on a whole other level. Who knew my amateur review could be noticed by the...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/Dv9RjtRvtWlFbezZlKHngw/ms.jpg",
"categories": [
[
"Italian",
"italian"
],
[
"Music Venues",
"musicvenues"
],
[
"Lounges",
"lounges"
]
],
"display_phone": "+1-310-424-4600",
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"menu_provider": "single_platform",
"menu_date_updated": 1442207513,
"snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/IrhkURUdgoKwSmZdgqvnFQ/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"184 N Canon Dr",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"184 N Canon Dr"
],
"coordinate": {
"latitude": 34.0676256,
"longitude": -118.3978724
},
"state_code": "CA"
}
},
{
"is_claimed": false,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/grand-havana-room-beverly-hills",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 40,
"name": "Grand Havana Room",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/grand-havana-room-beverly-hills",
"is_closed": false,
"snippet_text": "The Grand Havana Room in Beverly Hills is unparalleled. Hands down, this is the best place in all of Los Angeles to enjoy a cigar.\n\nThe lounge is spacious,...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/8FdPiIu0LstEJxCHRoYr3A/ms.jpg",
"categories": [
[
"Lounges",
"lounges"
]
],
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"id": "grand-havana-room-beverly-hills",
"snippet_image_url": "http://s3-media3.fl.yelpcdn.com/photo/hs5wf23LYFKWRHjwyqlWDg/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"301 N Canon Dr",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"301 N Canon Dr"
],
"coordinate": {
"latitude": 34.0692177,
"longitude": -118.3997498
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/the-honor-bar-beverly-hills-3",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 727,
"name": "The Honor Bar",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/the-honor-bar-beverly-hills-3",
"is_closed": false,
"phone": "3105500292",
"snippet_text": "Omg sooooooo good. \n\nI love Honor Bar. From their sushi to their burgers, I've never been dissatisfied after eating here. Special shoutout to their veggie...",
"image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/kw0ZtBN_Bvo2XsWH4ucBqw/ms.jpg",
"categories": [
[
"Bars",
"bars"
],
[
"Sandwiches",
"sandwiches"
],
[
"Burgers",
"burgers"
]
],
"display_phone": "+1-310-550-0292",
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"id": "the-honor-bar-beverly-hills-3",
"snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/1QQ2KgMHcKnYutpOexkTEQ/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"122 S Beverly Dr",
"Beverly Hills",
"Beverly Hills, CA 90212"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90212",
"country_code": "US",
"address": [
"122 S Beverly Dr"
],
"coordinate": {
"latitude": 34.0661660581827,
"longitude": -118.399065434933
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/bar-on-4-beverly-hills",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 26,
"name": "Bar On 4",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/bar-on-4-beverly-hills",
"is_closed": false,
"phone": "3105505900",
"snippet_text": "Nicole was my server, who was the best ever. She made great drinks. I absolutely enjoyed her 'rose risky'. Very refreshing but not strong which I like. She...",
"image_url": "http://s3-media4.fl.yelpcdn.com/bphoto/3HOYc9s8KjhIxY80Ju9w8w/ms.jpg",
"categories": [
[
"Bars",
"bars"
],
[
"American (New)",
"newamerican"
]
],
"display_phone": "+1-310-550-5900",
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"id": "bar-on-4-beverly-hills",
"snippet_image_url": "http://s3-media1.fl.yelpcdn.com/photo/rmGiAiGs2nd4YIMFeceJhA/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"Neiman Marcus",
"9700 Wilshire Blvd",
"4th Fl",
"Beverly Hills",
"Beverly Hills, CA 90212"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90212",
"country_code": "US",
"address": [
"Neiman Marcus",
"9700 Wilshire Blvd",
"4th Fl"
],
"coordinate": {
"latitude": 34.0667496,
"longitude": -118.4063492
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/vampire-lounge-and-tasting-room-beverly-hills-4",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 130,
"name": "Vampire Lounge & Tasting Room",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/vampire-lounge-and-tasting-room-beverly-hills-4",
"reservation_url": "https://www.seatme.yelp.com/r/biz/CxeEpVeKcaLSfchelOrb2w/?locale=en_US",
"is_closed": false,
"phone": "3108267473",
"snippet_text": "They make all their own wine, which I love. If you're looking for a specific brand outside of their own, then you should try a different place. They have...",
"image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/DvFxnCkl2tOGbpUav1StOw/ms.jpg",
"categories": [
[
"Lounges",
"lounges"
],
[
"Wine Tasting Room",
"winetastingroom"
]
],
"display_phone": "+1-310-826-7473",
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"id": "vampire-lounge-and-tasting-room-beverly-hills-4",
"snippet_image_url": "http://s3-media1.fl.yelpcdn.com/photo/PwL9PEgcIh3IMCLMHLW4sQ/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"9865 S Santa Monica Blvd",
"Beverly Hills",
"Beverly Hills, CA 90212"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90212",
"country_code": "US",
"address": [
"9865 S Santa Monica Blvd"
],
"coordinate": {
"latitude": 34.0662388919117,
"longitude": -118.41091811657
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.5,
"mobile_url": "http://m.yelp.com/biz/ten-pound-bar-beverly-hills",
"rating_img_url": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/99493c12711e/ico/stars/v1/stars_4_half.png",
"review_count": 12,
"name": "Ten Pound Bar",
"rating_img_url_small": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/a5221e66bc70/ico/stars/v1/stars_small_4_half.png",
"url": "http://www.yelp.com/biz/ten-pound-bar-beverly-hills",
"is_closed": false,
"phone": "3109067218",
"snippet_text": "We went here for my dad's 75th birthday. We were not disappointed. You do need to make reservations which they make VERY CLEAR. When we checked in at...",
"image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/pJsO3Y_i7xo3aYIVIkzKqQ/ms.jpg",
"categories": [
[
"Lounges",
"lounges"
]
],
"display_phone": "+1-310-906-7218",
"rating_img_url_large": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/9f83790ff7f6/ico/stars/v1/stars_large_4_half.png",
"id": "ten-pound-bar-beverly-hills",
"snippet_image_url": "http://s3-media3.fl.yelpcdn.com/photo/RM7M-Lk1PeTNg1kRwVUy8w/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"Montage Beverly Hills",
"225 N Canon Dr",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"Montage Beverly Hills",
"225 N Canon Dr"
],
"coordinate": {
"latitude": 34.0617109,
"longitude": -118.4017053
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/craft-los-angeles",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 1368,
"name": "Craft",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/craft-los-angeles",
"is_closed": false,
"id": "craft-los-angeles",
"phone": "3102794180",
"snippet_text": "Seduction doesn't always come in a red dress and wind blown hair. Seduction comes from the ever-glow of ephemeral candles. It comes from the charm of a...",
"image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/YwgbdRJ_ANB_QMKsB8FfyA/ms.jpg",
"categories": [
[
"American (New)",
"newamerican"
]
],
"display_phone": "+1-310-279-4180",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1442003999,
"snippet_image_url": "http://s3-media1.fl.yelpcdn.com/photo/e6gCLjdMQZjcjFukNuZtxg/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"10100 Constellation Blvd",
"Century City",
"Los Angeles, CA 90067"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Century City"
],
"postal_code": "90067",
"country_code": "US",
"address": [
"10100 Constellation Blvd"
],
"coordinate": {
"latitude": 34.0589561,
"longitude": -118.4151958
},
"state_code": "CA"
}
},
{
"is_claimed": false,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/moes-cafe-los-angeles",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 26,
"name": "Moe's Cafe",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/moes-cafe-los-angeles",
"is_closed": false,
"phone": "3103692670",
"snippet_text": "Great place for Grilled sandwiches, quesadillas, criss cut or sweet potatoe fries, etc etc... options are endless, these guys can make anything...\n\nExtra...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/wbzryYULx6q2VGTdMyqXdA/ms.jpg",
"categories": [
[
"Coffee & Tea",
"coffee"
],
[
"American (Traditional)",
"tradamerican"
],
[
"Cafeteria",
"cafeteria"
]
],
"display_phone": "+1-310-369-2670",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"id": "moes-cafe-los-angeles",
"snippet_image_url": "http://s3-media3.fl.yelpcdn.com/photo/Evr0y8fwFEOqXBf7cNW8zg/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"Fox Studios",
"10201 W Pico Blvd, Bldg 103",
"Century City",
"Los Angeles, CA 90064"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Century City"
],
"postal_code": "90064",
"country_code": "US",
"address": [
"Fox Studios",
"10201 W Pico Blvd, Bldg 103"
],
"coordinate": {
"latitude": 34.0512613514749,
"longitude": -118.409706348166
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/nics-beverly-hills-beverly-hills",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 621,
"name": "Nic's Beverly Hills",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/nics-beverly-hills-beverly-hills",
"is_closed": false,
"id": "nics-beverly-hills-beverly-hills",
"phone": "3105505707",
"snippet_text": "One of the best places I've ever found on yelp! Was in town for the week and wanted to try something that had great happy hour specials. Nic's Beverly...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/WHFsFJQVEScc7tw458Un4w/ms.jpg",
"categories": [
[
"Lounges",
"lounges"
],
[
"American (New)",
"newamerican"
],
[
"Cocktail Bars",
"cocktailbars"
]
],
"display_phone": "+1-310-550-5707",
"gift_certificates": [
{
"url": "http://www.yelp.com/gift-certificates/nics-beverly-hills-beverly-hills",
"unused_balances": "CREDIT",
"id": "lrLLV_TVaGSAmigrJMmh8Q",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/oC0Lz4ZOa1XHFUumP0XUEg/m.jpg",
"options": [
{
"price": 2500,
"formatted_price": "$25"
},
{
"price": 5000,
"formatted_price": "$50"
},
{
"price": 7500,
"formatted_price": "$75"
},
{
"price": 10000,
"formatted_price": "$100"
}
],
"currency_code": "USD"
}
],
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1441282693,
"snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/JUDa_HRQ52_NmJR3542tMw/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"453 N Canon Dr",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"453 N Canon Dr"
],
"coordinate": {
"latitude": 34.0715009719133,
"longitude": -118.401797264814
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/sfixio-beverly-hills",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 186,
"name": "Sfixio",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/sfixio-beverly-hills",
"is_closed": false,
"id": "sfixio-beverly-hills",
"phone": "3103851800",
"snippet_text": "A week from my bday, I called Sfixio and talked to an amazing lady by the name of Mara. We arranged that I will have my bday dinner there and then we can...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/m8hXtQkE8F_AUCVWUppn5Q/ms.jpg",
"categories": [
[
"Italian",
"italian"
],
[
"Cocktail Bars",
"cocktailbars"
]
],
"display_phone": "+1-310-385-1800",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1442093180,
"snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/xTnLEM1GogJ-PUV2IzX2uw/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"9737 S Santa Monica Blvd",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"9737 S Santa Monica Blvd"
],
"coordinate": {
"latitude": 34.068587,
"longitude": -118.40803
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/the-wellesbourne-los-angeles",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 645,
"name": "The Wellesbourne",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/the-wellesbourne-los-angeles",
"is_closed": false,
"phone": "3104740102",
"snippet_text": "I'd definitely come back to this place again! It's a nice bar with an old English feel too it. Great ambience! It's very chill, not too crowded or rowdy.\n\nI...",
"image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/awKKdnUvh3liUFpFLj2yNQ/ms.jpg",
"categories": [
[
"Lounges",
"lounges"
]
],
"display_phone": "+1-310-474-0102",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"id": "the-wellesbourne-los-angeles",
"snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/aKXedy0TZKDxYtLbIM_lSA/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"10929 W Pico Blvd",
"West Los Angeles",
"Los Angeles, CA 90064"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"West Los Angeles"
],
"postal_code": "90064",
"country_code": "US",
"address": [
"10929 W Pico Blvd"
],
"coordinate": {
"latitude": 34.0393847,
"longitude": -118.4303922
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/hinoki-and-the-bird-los-angeles",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 731,
"name": "Hinoki & The Bird",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/hinoki-and-the-bird-los-angeles",
"is_closed": false,
"id": "hinoki-and-the-bird-los-angeles",
"phone": "3105521200",
"snippet_text": "Cute spot for a night out. Dimly lit, with a cute indoor/outdoor space. Lots of denim going on.\n\nSmall plates get spendy, so be prepared. This is a spot to...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/sBNPyLSa8Ah_Fj4bTfWAUA/ms.jpg",
"categories": [
[
"American (New)",
"newamerican"
]
],
"display_phone": "+1-310-552-1200",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1442113039,
"snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/DhG-iByQuleelrUJgngD-w/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"10 W Century Dr",
"Century City",
"Los Angeles, CA 90067"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Century City"
],
"postal_code": "90067",
"country_code": "US",
"address": [
"10 W Century Dr"
],
"coordinate": {
"latitude": 34.0569244980711,
"longitude": -118.414795273819
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/bedford-and-burns-beverly-hills",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 122,
"name": "Bedford & Burns",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/bedford-and-burns-beverly-hills",
"is_closed": false,
"id": "bedford-and-burns-beverly-hills",
"phone": "3102738585",
"snippet_text": "Man is this place incredible! Bedford & Burns might just be my favorite new restaurant in Beverly Hills. I stopped in here for a nice dinner with some...",
"image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/eb5AUlidPtfoPMtaU2ve2w/ms.jpg",
"categories": [
[
"American (Traditional)",
"tradamerican"
],
[
"Salad",
"salad"
],
[
"Comfort Food",
"comfortfood"
]
],
"display_phone": "+1-310-273-8585",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1442112995,
"snippet_image_url": "http://s3-media2.fl.yelpcdn.com/photo/IFSnccbf0G8-2q4DMrV0nQ/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"369 Bedford Dr",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"369 Bedford Dr"
],
"coordinate": {
"latitude": 34.0675239562988,
"longitude": -118.40503692627
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/westside-tavern-los-angeles",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 1112,
"name": "Westside Tavern",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/westside-tavern-los-angeles",
"is_closed": false,
"id": "westside-tavern-los-angeles",
"phone": "3104701539",
"snippet_text": "Totally and completely baffled by the less than stellar reviews for the food and service for Westside Tavern. \n\nGot there around 6ish on a Wednesday evening...",
"image_url": "http://s3-media1.fl.yelpcdn.com/bphoto/GgGQAGZJpU3NmtoUgwGKPg/ms.jpg",
"categories": [
[
"American (New)",
"newamerican"
],
[
"Pubs",
"pubs"
]
],
"display_phone": "+1-310-470-1539",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1442031814,
"snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/miDteFZceED_IdqWkxY02Q/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"10850 W Pico Blvd",
"Rancho Park",
"Los Angeles, CA 90064"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Rancho Park"
],
"postal_code": "90064",
"country_code": "US",
"address": [
"10850 W Pico Blvd"
],
"coordinate": {
"latitude": 34.0396004,
"longitude": -118.4285431
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/hakkasan-beverly-hills-beverly-hills",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 316,
"name": "Hakkasan Beverly Hills",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/hakkasan-beverly-hills-beverly-hills",
"is_closed": false,
"id": "hakkasan-beverly-hills-beverly-hills",
"phone": "3108888661",
"snippet_text": "I was here last week.\n\nIf you have the means to splurge on some delicious cocktails and delicious food, Hakkasan is the place to go.\n\nI recommend going here...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/8Ko_NsNosit8KYhD62dm_g/ms.jpg",
"categories": [
[
"Chinese",
"chinese"
],
[
"Lounges",
"lounges"
]
],
"display_phone": "+1-310-888-8661",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1442171819,
"snippet_image_url": "http://s3-media1.fl.yelpcdn.com/photo/Yk0Vn4aFg9LSAVak_xV23A/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"233 N Beverly Dr",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"233 N Beverly Dr"
],
"coordinate": {
"latitude": 34.0675275,
"longitude": -118.3995624
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/the-west-end-craft-bar-and-neighborhood-kitchen-los-angeles",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 74,
"name": "The West End: Craft Bar and Neighborhood Kitchen",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/the-west-end-craft-bar-and-neighborhood-kitchen-los-angeles",
"is_closed": false,
"phone": "3104706601",
"snippet_text": "This place seems to be pretty hit or miss with the crowds, according to other reviews. I was here on a Sunday night, when no one else was (literally, the...",
"image_url": "http://s3-media3.fl.yelpcdn.com/bphoto/PQhh30IxB39vxHg0mA4uZQ/ms.jpg",
"categories": [
[
"Tapas/Small Plates",
"tapasmallplates"
],
[
"American (New)",
"newamerican"
],
[
"Gastropubs",
"gastropubs"
]
],
"display_phone": "+1-310-470-6601",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"id": "the-west-end-craft-bar-and-neighborhood-kitchen-los-angeles",
"snippet_image_url": "http://s3-media1.fl.yelpcdn.com/photo/Wa40EZRtaxQvymTJ6vUFig/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"2116-B Westwood Blvd",
"West Los Angeles",
"Los Angeles, CA 90025"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"West Los Angeles"
],
"postal_code": "90025",
"country_code": "US",
"address": [
"2116-B Westwood Blvd"
],
"coordinate": {
"latitude": 34.045078,
"longitude": -118.432335
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 3.5,
"mobile_url": "http://m.yelp.com/biz/on-rodeo-bistro-and-lounge-beverly-hills",
"rating_img_url": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/5ef3eb3cb162/ico/stars/v1/stars_3_half.png",
"review_count": 38,
"name": "On Rodeo Bistro & Lounge",
"rating_img_url_small": "http://s3-media1.fl.yelpcdn.com/assets/2/www/img/2e909d5d3536/ico/stars/v1/stars_small_3_half.png",
"url": "http://www.yelp.com/biz/on-rodeo-bistro-and-lounge-beverly-hills",
"is_closed": false,
"phone": "3102730300",
"snippet_text": "Simple, elegant. Good for Privacy, small business meetings, if you have to lunch alone. I used to treat myself when I worked in the stores on Rodeo for many...",
"image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/p_KkvatUvzUY2BfbTNITZA/ms.jpg",
"categories": [
[
"American (New)",
"newamerican"
],
[
"Lounges",
"lounges"
]
],
"display_phone": "+1-310-273-0300",
"rating_img_url_large": "http://s3-media3.fl.yelpcdn.com/assets/2/www/img/bd9b7a815d1b/ico/stars/v1/stars_large_3_half.png",
"id": "on-rodeo-bistro-and-lounge-beverly-hills",
"snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/8KaMe--71JTk-FHtxtNb6A/ms.jpg",
"location": {
"city": "Beverly Hills",
"display_address": [
"360 N Rodeo Dr",
"Beverly Hills",
"Beverly Hills, CA 90210"
],
"geo_accuracy": 9.5,
"neighborhoods": [
"Beverly Hills"
],
"postal_code": "90210",
"country_code": "US",
"address": [
"360 N Rodeo Dr"
],
"coordinate": {
"latitude": 34.0693173954665,
"longitude": -118.402278
},
"state_code": "CA"
}
},
{
"is_claimed": true,
"rating": 4.0,
"mobile_url": "http://m.yelp.com/biz/gulfstream-los-angeles-4",
"rating_img_url": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/c2f3dd9799a5/ico/stars/v1/stars_4.png",
"review_count": 519,
"name": "Gulfstream",
"rating_img_url_small": "http://s3-media4.fl.yelpcdn.com/assets/2/www/img/f62a5be2f902/ico/stars/v1/stars_small_4.png",
"url": "http://www.yelp.com/biz/gulfstream-los-angeles-4",
"is_closed": false,
"id": "gulfstream-los-angeles-4",
"phone": "3105533636",
"snippet_text": "Gulfstream is one of those restaurants that's always a safe choice. The menu is nothing novel, the service is nothing special and the ambiance is nice but...",
"image_url": "http://s3-media2.fl.yelpcdn.com/bphoto/swZUVJj2dlBfaO2ssHv_0g/ms.jpg",
"categories": [
[
"American (New)",
"newamerican"
],
[
"Seafood",
"seafood"
]
],
"display_phone": "+1-310-553-3636",
"rating_img_url_large": "http://s3-media2.fl.yelpcdn.com/assets/2/www/img/ccf2b76faa2c/ico/stars/v1/stars_large_4.png",
"menu_provider": "single_platform",
"menu_date_updated": 1441914606,
"snippet_image_url": "http://s3-media4.fl.yelpcdn.com/photo/qlzkToYlQQhLKYSgwNgsQA/ms.jpg",
"location": {
"city": "Los Angeles",
"display_address": [
"10250 Santa Monica Blvd",
"Century City",
"Los Angeles, CA 90067"
],
"geo_accuracy": 8.0,
"neighborhoods": [
"Century City"
],
"postal_code": "90067",
"country_code": "US",
"address": [
"10250 Santa Monica Blvd"
],
"coordinate": {
"latitude": 34.0599594,
"longitude": -118.4198227
},
"state_code": "CA"
}
}
]
}
#map {
height: 500px;
}
.stations, .stations svg {
position: absolute;
}
.stations svg {
width: 60px;
height: 20px;
padding-right: 100px;
font: 10px sans-serif;
}
.stations circle {
fill:#C74848;
opacity:0.8;
stroke:white;
stroke-width:1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment