Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GoogleAPI可以处理更少的JSON数据,但不能处理更多的JSON数据?_Json_Api_Google Maps - Fatal编程技术网

GoogleAPI可以处理更少的JSON数据,但不能处理更多的JSON数据?

GoogleAPI可以处理更少的JSON数据,但不能处理更多的JSON数据?,json,api,google-maps,Json,Api,Google Maps,我使用GoogleAPI为一个项目创建了一张喝酒地点的地图。当我测试了几个数据项时,它就工作了,但当我添加更多数据项时,它就停止了?我想知道从哪里开始解决这个问题-有人能帮忙吗 先谢谢你 这是我的密码: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script src="http://maps.google.com/maps/ap

我使用GoogleAPI为一个项目创建了一张喝酒地点的地图。当我测试了几个数据项时,它就工作了,但当我添加更多数据项时,它就停止了?我想知道从哪里开始解决这个问题-有人能帮忙吗

先谢谢你

这是我的密码:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js" type="text/javascript"></script>
</head>
<body>
<script>
    var json = [
        {
            "title": "320 Main",
            "lat": 33.7432219,
            "lng": -118.103218,
            "description": "320 Main is a Tesla-esque lab for cocktail experimentation. Old-Fashioneds come out with the frequency of water with ice, and mustard isn't just a condiment for fries; it also comes in drinks."
        },
        {
            "title": "The Playground",
            "lat": 33.7477745,
            "lng": -117.865719,
            "description": "Here chef Jason Quinn exhibits the ballsy confidence that's gotten him this far. The Playground's famous burger is the bloodiest in all of OC, for instance, but it's also one of the greatest."
        },
          {
            "title": "Noble Ale Works",
            "lat": 33.808411,
            "lng": -117.882799,
            "description": "Noble Ale Works' double IPA, Tongue Tickles, may be the best beer it's ever brewed. Plus, you can park there for free on game nights, have a great beer for five bucks, and then walk to Angels Stadium or the Pond."
        },
          {
            "title": "Valiant Brewing",
            "lat": 33.8255472,
            "lng": -117.8641555,
            "description": "The owners of Valiant Brewing Company (a husband and wife team) have an evident passion for perfecting craft beer. Their specialty is in ales, particularly those over 8% abv."
        },
          {
            "title": "Broadway by Amar Santana",
            "lat": 33.5428096,
            "lng": -117.7821256,
            "description": "At Broadway by Amar, you'll get drinks that are exquisitely balanced—like their Santa Prisca Swizzle. Expect to be refreshed—never overwhelmed."
        },
          {
            "title": "The Cellar",
            "lat": 33.4264417,
            "lng": -117.6146645,
            "description": "One of the county's last places for classic French cuisine, in a downstairs setting perfect for its fine dining atmosphere."
        },
          {
            "Harlow's Kitchen & Craft Bar",
            "lat": 33.5083731,
            "lng": -117.6587784,
            "description": "At Harlow's, you'll find farm-to-table seasonal fare and a delightful craft bar. You'll want to try Old Fashioned, which comes with cherries cured in spice syrup."
        },
          {
            "title": "Three Seventy Common",
            "lat": 33.5425307,
            "lng": -117.7820889,
            "description": "Three Seventy Common is cozy and rustic restaurant in Laguna Beach with incredibly in-depth and beautiful, American comfort food. You will find tasty small bites, juicy scallops, the perfect steak, toasty mac and cheese, exotic bone marrow, and impeccable sides."
        },
          {
            "title": "Pub at Fiddler's Green",
            "lat": 33.7948668,
            "lng": -118.0552037,
            "description": "Fiddler's Green is a bar in Los Alamitos. It's the last military bar left in OC, positioned on the Los Al Joint Forces Training Base."
        },
          {
            "title": "The North Left",
            "lat": 33.7480046,
            "lng": -117.8697248,
            "description": "The North Left is what replaced the Crosby. But for all intents, the North Left is the same restaurant Phil Nisco, Chris Alfaro and Marc Yamaoka once opened, even if it doesn’t look like it."
        },
          {
            "title": "Juliette Kitchen and Bar",
            "lat": 33.657849,
            "lng": -117.8665962,
            "description": "Juliette Kitchen and Bar is a place for good conversations, drinks with friends—oh, and food. Ask for the smoked ocean trout salad. You won't have a sharper, more complex plate of food involving arugula than this."
        },
          {
            "title": "Pizzeria Ortica",
            "lat": 33.6903721,
            "lng": -117.8831607,
            "description": "Pizzeria Ortica's pizzas are blasted in a wood-burning oven that reaches up to 900 degrees. Th result? A blistered crust that will make you feel like you're tasting pizza for the first time."
        },
          {
            "title": "Anepalco's Café (at the Ayres Hotel)",
            "lat": 33.7895588,
            "lng": -117.8915762,
            "description": "At Anepalco's Café on Chapman, Baguettes are served with guajillo chile butter. Dessert is from a roster of crepes that include one with Nutella and banana. The single best dish, though, is a pan-sautéed tilapia where Godinez turns a bargain fish into something as delicate as seabass."
        },
          {
            "title": "The Globe Belgian Gastropub",
            "lat": 33.7555024,
            "lng": -117.9984994,
            "description": "Start with a Belgian draft beer poured into a curvy chalice, or try one of more than a dozen Trappist brews, artisan beer produced by a select few monasteries, largely in Belgium."
        },
          {
            "title": "Lola Gaspar",
            "lat": 33.7463008,
            "lng": -117.8690729,
            "description": "Lola Gaspar is a bar more than it’s a restaurant since it’s in a room so small it couldn’t serve as the waiting area for your local Black Angus. Your first order of business here should be a glass of sangria ladled from a big jug, then an order of hot bacon wrapped dates with blue cheese."
        },
          {
            "title": "Posse Bar",
            "lat": 33.7728759,
            "lng": -118.023379,
            "description": "Posse Bar is that rarest of breeds in OC: a completely unpretentious, normal, middle-class American bar, with friendly bartenders, great prices (especially at happy hour, which extends all day on Sunday) and a fun, happy crowd."
        },
          {
            "title": "Cismontane Brewing Company",
            "lat": 33.6366357,
            "lng": -117.609366,
            "description": "Cismontane Brewing Co. is full of Southern Californian pride: started by two native southern Californians, it creates beers named after local features."
        },
          {
            "title": "C4 Deli",
            "lat": 33.7464613,
            "lng": -117.869922,
            "description": "C4 Deli is a deli in Santa Ana. It’s housed in a doozy of a room, with a soaring ceiling, Gatsby-esque Art Deco design motifs, exposed brick walls, and a window that stares directly at the equally beautiful Santora building across Broadway. Get the Reuben."
        },
          {
            "title": "Mineshaft Bar",
            "lat": 33.7675122,
            "lng": -118.1709261,
            "description": "No matter where in the gayborhood you start your pub crawl, you will end up at Mine Shaft. This bar is all things to all people, with a comforting minimum of the trappings of a post-Stonewall gay bar: There is no porn on the television, no neon penis signs, and the bartenders are dressed as bartenders."
        },
          {
            "title": "Alex's Bar",
            "lat": 33.7828017,
            "lng": -118.1573649,
            "description": "Everyone loves Alex's Bar for the amazing music, for its cameo as Fangtasia on True Blood, for its griminess and sheer beauty, but within these walls lies a bona fide cocktail program."
        },
          {
            "title": "Barley Forge Brewing Co.",
            "lat": 33.6787002,
            "lng": -117.8882863,
            "description": "Barley Forge's initial beers, brewed on Nylen's pilot batch system in the Santa Monica Mountains, and they're good; he's deliberately thinking about beer that can be paired with food."
        },
          {
            "title": "Johnny's Saloon",
            "lat": 33.7091941,
            "lng": -117.9883462,
            "description": "Led by owner Johnny Kresimir's behemoth social-media following and the bar's die-hard regulars, patrons flock to this bar not only to drink from the 100 craft whiskeys and beers offered, but also to donate money, clothes, time and goods to members of the community who need it most."
        },
          {
            "title": "Bosscat Kitchen",
            "lat": 33.670023,
            "lng": -117.8653105,
            "description": "Bosscat Kitchen & Libations is a southern restaurant in Newport Beach. Its chef, Peter Petro, is fluent in okra and cornbread in a menu that’s as Southern-accented as Polly Holliday’s Flo."
        },
          {
            "title": "Take 5",
            "lat": 33.6632423,
            "lng": -117.9710362,
            "description": "Welcome to the new old dive bar, a neighborhood hangout straight out of a sitcom set in an industrial Midwestern city, with a strange beer selection, more flavored alcohol than anyplace north of Ladera Ranch, and patrons who actually talk to one another."
        },
          {
            "title": "Memphis Cafe",
            "lat": 33.6768746,
            "lng": -117.8866391,
            "description": "For $20, you can buy a veritable three-course meal, plus a cocktail, at Memphis Cafe's happy hour. From 3 to 6:30 p.m. daily, the sweet, stylish, southern-comfort restaurant and bar offers up its tastiest plates starting at $5 apiece, with cocktails starting at just $4."
        },
          {
            "title": "The Quill",
            "lat": 33.7590317,
            "lng": -117.8438493,
            "description": " Next to a liquor store, the Quill is what a neighborhood bar should be, attracting regulars and newcomers of all ages, ethnicities and economic classes."
        },
          {
            "title": "Kelly's Korner Tavern",
            "lat": 33.8897058,
            "lng": -117.8471695,
            "description": "Tucked away in the nook of a Placentia strip mall, this bar generously serves up a wealth of distractions along with its beer selection."
        },
          {
            "title": "Las Vegas Bar",
            "lat": 33.7155251,
            "lng": -117.8852988,
            "description": " While the nights at Las Vegas Bar feature working-class Mexicans ready to get borracho on Mexican, Salvadoran, even Guatemalan cervezas, daytime at this SanTana standard is a more languid affair, bringing in viejitos in guayaberas, union guys drinking some cold ones for lunch and plebes with nowhere to go."
        },
          {
            "title": "The V Room",
            "lat": 33.7717053,
            "lng": -118.1808523,
            "description": "V Room is a true whole-in-the-wall—an ideal spot for drinkers low on snobbery and high on, well, want for booze."
        },
          {
            "title": "Native Son Alehouse",
            "lat": 33.748232,
            "lng": -117.8652571,
            "description": "Beers from local breweries such as Bottle Logic Brewing, Noble Ale Works, Smog City Brewing, Monkish Brewing, The Bruery and more are on tap at Native Son Alehouse. Locality aside, there are also brews from Germany, Belgium, Canada, Japan, and England."
        },
          {
            "title": "Past Memories",
            "lat": 33.7734514,
            "lng": -117.9696792,
            "description": "Combine Past Memories' yogurt soju, food (especially the fried chicken), the cajoling company of friends, and the 2 a.m. closing time, and its slowly mounting effects can be easily underestimated until "The Past Memories" becomes more than just the restaurant's name."
        },
          {
            "title": "Anthill Pub",
            "lat": 33.6467505,
            "lng": -117.8454963,
            "description": "Some schools discourage drinking; others ban it. And then there's UC Irvine, whose Anthill Pub in the Student Center bans drinking crappy beer."
        },
          {
            "title": "The Goathill Tavern",
            "lat": 33.6412691,
            "lng": -117.9182082,
            "description": "The very definition of casual, Goat Hill greets its guests with a floor covered in peanut shells, a huge block of a man checking IDs and a subtle scent of . . . what the hell is that smell, anyway?"
        },
          {
            "title": "The Bruery",
            "lat": 33.8619002,
            "lng": -117.8802111,
            "description": "Whether you're at the bar sipping the fragrant Trade Winds triple, along the walls with the pitch-black Tart of Darkness sour stout or setting down a glass of the hop-tastic Loakal Red at beer barrels turned into beer tables, anybody who wants to have a great time tasting suds will be right at home here."
        },
          {
            "title": "Beach Ball",
            "lat": 33.6089575,
            "lng": -117.9290921,
            "description": "It's easy to pass by this hole-in-the-wall bar near the Newport Pier, but Beach Ball is a dive at its best—with cheap, stiff drinks and a loyal following. This is not a place to order prissy, girly martinis. Instead, go for beer or well drinks; you won't be disappointed."
        },
          {
            "title": "The Blind Donkey",
            "lat": 33.7690476,
            "lng": -118.1865789,
            "description": "Located in the basement of the Broadlind Hotel in Long Beach's East Village Arts District, The Blind Donkey has more than 100 whiskeys from around the world."
        },
        {
            "title": "Steamers",
            "lat": 33.8700253,
            "lng": -117.9258896,
            "description": "The only jazz club in downtown Fullerton, it's open to all ages and serves pizzas, panini and focaccia sandwiches along with Cajun- and Thai-inflected dishes."
        }
    ]
    var myCenter=new google.maps.LatLng(33.6700, -117.7800);
    function initialize()
    {
    var mapProp = {
    center:myCenter,
    zoom:10,
    mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);

var infowindow =  new google.maps.InfoWindow({
    content: ""
});

for (var i = 0, length = json.length; i < length; i++) {
    var data=json[i];
    var latLng = new google.maps.LatLng(data.lat, data.lng); 
    // Creating a marker and putting it on the map
    var marker = new google.maps.Marker({
        position: latLng,
        map: map,
        title: data.title
    });

    bindInfoWindow(marker, map, infowindow, data.description);
} 
}

function bindInfoWindow(marker, map, infowindow, strDescription) {
google.maps.event.addListener(marker, 'click', function() {
    infowindow.setContent(strDescription);
    infowindow.open(map, marker);
});
}
    google.maps.event.addDomListener(window, 'load', initialize);
</script>
<div id="googleMap" style="width:100%;height:100%;"></div>

</body>
//Copyright 2004 Luke Mahe

//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at

//   http://www.apache.org/licenses/LICENSE-2.0

//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
</html>

var json=[
{
“标题”:“320主要”,
“lat”:33.7432219,
“液化天然气”:-118.103218,
“描述”:“320 Main是一个特斯拉式的鸡尾酒实验实验室。老式的鸡尾酒会以冰加水的频率出现,芥末不仅仅是薯条的调味品,它还可以在饮料中出现。”
},
{
“标题”:“操场”,
“lat”:33.7477745,
“液化天然气”:-117.865719,
“描述”:“这里的厨师杰森·奎因展示了他迄今为止的自信。例如,操场上著名的汉堡是OC中最血腥的汉堡,但它也是最棒的汉堡之一。”
},
{
“标题”:“高贵的啤酒作品”,
“lat”:33.808411,
“液化天然气”:-117.882799,
“描述”:“Noble Ale Works的双IPA,舌头发痒,可能是它酿造过的最好的啤酒。另外,你可以在比赛之夜免费停车,花五美元喝一杯好啤酒,然后步行到天使体育场或池塘。”
},
{
“头衔”:“英勇酿造”,
“lat”:33.8255472,
“液化天然气”:-117.8641555,
“描述”:“Valiant Brewing Company(一个夫妻团队)的所有者对完善工艺啤酒有着明显的热情。他们的专长是啤酒,尤其是abv超过8%的啤酒。”
},
{
“标题”:“阿马尔·桑塔纳的百老汇”,
“lat”:33.5428096,
“液化天然气”:-117.7821256,
“描述”:“在阿马尔的百老汇,你会得到像他们的圣普里斯卡Swizzle一样的精致平衡的饮料。期待着被刷新,永远不会被淹没。”
},
{
“头衔”:“地窖”,
“lat”:33.4264417,
“液化天然气”:-117.6146645,
“描述”:“该县最后一个古典法式菜肴的地方之一,楼下的环境非常适合其精致的就餐氛围。”
},
{
“哈洛厨房工艺酒吧”,
“lat”:33.5083731,
“液化天然气”:-117.6587784,
“描述”:“在哈洛,你会发现农场可以提供季节性的食物,还有一个令人愉快的手工酒吧。你会想尝尝老式的,用香料糖浆腌制的樱桃。”
},
{
“头衔”:“三七公”,
“lat”:33.5425307,
“液化天然气”:-117.7820889,
“描述”:“Three 70Common是拉古纳海滩上一家舒适质朴的餐厅,有着令人难以置信的深度和美丽的美式舒适食品。你会发现美味的小口、多汁的扇贝、完美的牛排、烤麦片和奶酪、异国情调的骨髓和完美的侧面。”
},
{
“标题”:“Fiddler's Green酒吧”,
“lat”:33.7948668,
“液化天然气”:-118.0552037,
“描述”:“Fiddler's Green是洛斯阿拉米托斯的一家酒吧。它是OC中最后一家军事酒吧,位于洛斯阿尔联合部队训练基地。”
},
{
“标题”:“北左”,
“lat”:33.7480046,
“液化天然气”:-117.8697248,
“描述”:“左北方取代了克罗斯比。但不管怎么说,左北方是菲尔·尼斯科、克里斯·阿尔法罗和马克·山冈曾经开过的同一家餐厅,即使它看起来不像。”
},
{
“标题”:“朱丽叶厨房和酒吧”,
“lat”:33.657849,
“液化天然气”:-117.8665962,
“描述”:“朱丽叶厨房和酒吧是一个很好的交谈、与朋友喝酒和食物的地方。要烟熏鳟鱼沙拉。你不会有比这更尖锐、更复杂的芝麻菜食物。”
},
{
“标题”:“奥提卡披萨店”,
“lat”:33.6903721,
“液化天然气”:-117.8831607,
“描述”:“Ortica比萨店的比萨在高达900度的烧木烤箱中爆炸。结果?起泡的外壳会让你感觉自己是第一次品尝比萨。”
},
{
“标题”:“阿内帕尔科咖啡馆(艾尔斯酒店)”,
“lat”:33.7895588,
“液化天然气”:-117.8915762,
“描述”:“在查普曼(Chapman)的阿内帕尔科咖啡馆(Anepalco's Café),法式面包上有瓜吉略智利黄油。甜点来自一系列的薄饼,其中包括一道加坚果和香蕉的薄饼。不过,最好的一道菜是平底煎炸罗非鱼,在这里,戈迪内斯把便宜的鱼变成了像海鲈一样美味的东西。”
},
{
“标题”:“全球比利时美食酒吧”,
“lat”:33.7555024,
“液化天然气”:-117.9984994,
“描述”:“从一杯比利时生啤酒倒进一个弯曲的圣杯开始,或者尝试十几种特拉普派啤酒中的一种,这是一种由精选的几家修道院(主要在比利时)生产的手工啤酒。”
},
{
“标题”:“洛拉·加斯帕”,
“lat”:33.7463008,
“液化天然气”:-117.8690729,
“描述”:“Lola Gaspar与其说是一家餐厅,不如说是一家酒吧,因为它的房间太小了,不能作为当地黑人安格斯的等候区。你在这里的第一份生意应该是从一个大罐子里舀一杯桑格里亚酒,然后是一份用蓝色奶酪包裹的热培根枣。”
},
{
“标题”:“团队酒吧”,
“lat”:33.7728759,
“液化天然气”:-118.023379,
“描述”:“Posse酒吧是OC中最稀有的品种:一家完全朴素、普通、中产阶级的美国酒吧,有友好的调酒师,价格很高(特别是