Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.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
Google maps 如何将多段线添加到此特定的Google地图?_Google Maps_Google Maps Markers_Google Polyline - Fatal编程技术网

Google maps 如何将多段线添加到此特定的Google地图?

Google maps 如何将多段线添加到此特定的Google地图?,google-maps,google-maps-markers,google-polyline,Google Maps,Google Maps Markers,Google Polyline,有人能帮我添加什么以及在哪里可以在我的站点上为我的旅程在标记之间创建多段线吗。提前谢谢。我试着自己去弄明白,但我没有。如果有人能告诉我,那就太好了 <!DOCTYPE> <html> <head> <title></title> <style type="text/css"> body { font-family: Arial;

有人能帮我添加什么以及在哪里可以在我的站点上为我的旅程在标记之间创建多段线吗。提前谢谢。我试着自己去弄明白,但我没有。如果有人能告诉我,那就太好了

    <!DOCTYPE>
<html>
<head>
    <title></title>
    <style type="text/css">
        body
        {
            font-family: Arial;
            font-size: 10pt;
        }
    </style>
</head>
<body>
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
    <script type="text/javascript">
        var markers = [
    {
        "title": 'Nusay Hotel, Ashgabat',
        "lat": '37.9293938',
        "lng": '58.3841203',
        "description": 'DAY 01 - DAY 03 Arrive ASHGABAT We are cordially welcomed upon arrival at Ashgabat Airport and then transferred to our hotel. Balance of the day is free at leisure. An ex Soviet state, Turkmenistan is a one party state. Ashgabat, relatively a very small city, offers very interesting sites to see. Resource rich Turkmens have invested in beautifying their capital with a lot of marble of immense size and shapes. Ashgabat was recently noted by the Guinness Book of World Records as having the highest number of white marble-clad buildings in the world - 543 new buildings lined with white marble covering a total area of 4.5 million square meters. DAY 02 ASHGABAT Our study into the heritage of Central Asia starts as we explore the Parthian Fortresses of Nisa*. The site is of one of the earliest and most important cities of the Parthian Empire, a major power from the mid-3rd century BC to the 3rd century AD.  Archaeological excavations in two parts of the site have revealed richly decorated architecture, illustrative of domestic, state and religious functions. Situated at the crossroads of important commercial and strategic axes, this powerful empire formed a barrier to Roman expansion while serving as an important communication and trading centre between east and west, north and south. We then head to theSpiritual Mosque, one of the biggest mosques in Central Asia, visit the National Museum of History and continue to Arch of Neutrality. In the afternoon we drive to GeokDepe to visit Arkadash stud farm (subject to opening) to see Akhalteke horses, the pride of Turkmen nation. Our tour concludes with visits to Presidential Square, ErtogrulGhazy Mosque, drive through some of the marble structures and the newly built Independence Park. Dinner tonight will be at the Poytagt Restaurant introducing us to food and cuisines of Central Asia. DAY 03 ASHGABAT/MARY/ASHGABAT An early morning short flight gets us to Mary to visit the State Historical and Cultural Park Ancient Merv*, which is the oldest and best-preserved of the oasis-cities along the Silk Route in Central Asia. The remains in this vast oasis span 4,000 years of human history. A number of monuments are still visible, particularly from the last two millennia, such as the Sultan Sanjar Mausoleum, the Large and Small Gyz Gala, Erk Gala, Gyaur Gala, Keshk Fortress, among others. On our way back to Mary we visit an artist’s home to see a demonstration of carpet weaving, embroidery, painting, cooking of local bread. After lunch we take our flight back to Ashgabat. Evening free.'
    },
    {
        "title": 'JipekJoli Hotel, Nukus',
        "lat": '42.465825',
        "lng": '59.607718',
        "description": 'DAY 04 After a short flight to Dashoguz we head to Kunya-Urgench*, situated in on the left bank of the Amu Daria River.  The old town contains a series of monuments mainly from the 11th to 16th centuries, including a mosque, the gates of a caravanserai, fortresses, mausoleums and a 60-m high minaret. The monuments testify to outstanding achievements in architecture and craftsmanship whose influence reached Iran and Afghanistan, and later the architecture of the Mogul Empire of 16th-century India. After our visit of KunyaUrgench we drive to the Turkmenistan-Uzbekistan border point at Khojeyli, where we go through border formalities on both checkpoints, whilst being an interesting experience they do lack modern facilities.  A short drive viewing the countryside gets us to Nukus – a place that is almost lost in the middle of the desert.'
    },
    {
        "title": 'Grand Abdi Malik Hotel, Khiva',
        "lat": '41.377115',
        "lng": '60.3580361',
        "description": 'DAY 05 Morning we visit the SavitskyKarakalpakstan Art Museum, which hosts the worlds second largest collection of Russian avant-garde art applied arts objects. It is also home to one of the largest collections of archeological objects and folk, applied and contemporary art originating from Central Asia. Drive through rural Uzbekistan to the historical city of Khiva. Here we explore the Ichan-Kala - the inner town (protected by brick walls some 10 m high) of the old Khiva oasis, which was the last resting-place of caravans before crossing the desert to Iran. Although few very old monuments still remain, it is a coherent and well-preserved example of the Muslim architecture of Central Asia. There are several outstanding structures such as the Djuma Mosque, the mausoleums and the madrasas and the two magnificent palaces built at the beginning of the 19th century by Alla-Kulli-Khan. Dinner at the popular Yassaulbashi restaurant.'
    },
    {
        "title": 'Omar Khayyam Hotel, Bukhara',
        "lat": '39.7703649',
        "lng": '64.4149347',
        "description": 'DAY 06 - DAY 07 A short drive to Urgench the capital of Khorezm province. It has a population of 150,000 inhabitants. We will have a drive through of the city before talking our flight to the historical Silk Road city of Bukhara. Upon arrival at Bukhara the most well known of the Silk Road oasis dating back to over 2,000 years. It is the most complete example of a medieval city in Central Asia, with an urban fabric that has remained largely intact. Monuments of particular interest include the famous tomb of Ismail Samani, a masterpiece of 10th-century Muslim architecture, and a large number of 17th-century madrasas. Afternoon we enjoy a walking tour of Bukhara, visiting several mosques, madrasas and the hat seller’s market. Evening we enjoy a folklore show at the Devanbegi Madrasa. End the day the Bukharan style with dinner enjoying Bukharan cuisine at the Minzifa Restaurant located in the Old Town. DAY 07 Today we continue our tour through the Historic Centre of Bukhara*, which houses over 140 architectural monuments. Bukhara had narrow streets will remind us of the Arabian Nights. After seeing the historical sites we visit Akbar’s Gallery where one can seea rich collection of old carpets and suzzane – his display center is like a museum assisted by UNESCO – his collection is well known to the Metropolitan Museum.   To culminate our Bukhara experience we visit a miniaturist house where we see the workshop of the painters and his students all trying to retain the traditional art. Miniature painting was introduced here from Persia and the same tradition continued for many years but is facing its challenges with modernity.   We join in for a home cooked meal.'
    },
    {
        "title": 'Grand Samarkand Hotel, Samarkand',
        "lat": '39.6725002',
        "lng": '66.9364854',
        "description": 'DAY 08 - DAY 09 Yet another tour of the historical city visiting the SitoraiMokhi-Khosa Palace followed by the residence of the Emir of Bukhara, the Mausoleum of the Sufi BakhoutdinNaqshbandi and the ChorBakr Necropolis. As we continue to Samarkand we stop atGijduvon to visit a famous madrassa built by Ulugh Beg the Timurid Sultan, astronomer and mathematician. We also visit the tomb and memorial of the prominent philosopher AbduholikGijduvoni, after whom the city is named.  An interesting insight to the arts of Uzbekistan as we visit the famous pottery works of Alisher well known for his unique style and color. Past famous visitors include Prince Charles, Lady Diana and Hillary Clinton.  Arrival Samarkand late afternoon. Evening, after some free time to stroll through the lanes of this historical city we are treated to dinner at the famous Old City Restaurant of Samarkand. DAY 09 This day is dedicated to explore the Historic town of Samarkand* - a crossroad and melting pot of the worlds cultures. Founded in the 7th century B.C. as ancient Afrasiab, Samarkand had its most significant development in the Timurid period from the 14th to the 15th centuries. The major monuments include the Registan Mosque and madrasas, Bibi-Khanum Mosque, the Shakhi-Zinda compound and the Gur-Emir ensemble, as well as Ulugh-Begs Observatory. Time permitting we visit a family home to learn how the most popular Uzbek meal, the pulao, is cooked. Evening is free and you may visit the local Afghan carpet makers, the local winery, the Kunhil paper makers or just back into time.'
    },
    {
        "title": 'ShakreSabz Star Hotel, Shakhrisyabz',
        "lat": '39.0400391',
        "lng": '66.8069597',
        "description": 'DAY 10 Morning we tour the Afrosiyob Museum and the tomb of Saint Daniel. Then we drive to KoniGhil village to see the traditional way of making Samarkand paper from mulberry leaves.   Continue to the Historic Centre of Shakhrisyabz*, the birthplace of Tamerlane. The city contains a collection of exceptional monuments and ancient quarters that bear witness to the citys secular development, and particularly to the period of its apogee, under the rule of Amir Temur and the Temurids, in the 15th-16th century. Dinner will be a local experience at Alisher’s House. Evening free.'
    },
    {
        "title": 'Serena Hotel, Dushanbe',
        "lat": '38.5142164',
        "lng": '68.7511861',
        "description": 'DAY 11 - DAY 12 An early morning departure as we drive to the capital city of Tajikistan. Upon arrival at the border we first complete exit border formalities of Uzbekistan and then a short walk across to the Tajik side to do the entry border formalities. Change of vehicles as we drive to Dushanbe.  We arrive at Dushanbe and are transferred to our hotel. Tajikistan is a double landlocked country, which was part of the Soviet Union and now has a Presidential form of government. It has a population of 8 million.  Evening we are treated to Turkish/Tajik local cuisine dinner at the Café Merve Turkish. DAY 12 Our day in Dushanbe is spent visiting the National Museum of Tajikistan, the Gurminj Musical Instruments Museum, Statue of Ismail Samani and Rudaki Park. Subject to permit we also visit the recently built and an architectural marvel, the IsmailiJamatkhan and Centre.  Lunch is at the Traktir Restaurant known for its speciality of Ukranian cuisine. We then visit the Botanical Gardens and culminate with an experience of the local bazaar. Evening is free to stroll the street and meet the friendly Tajiks at the teahouses.'
    },
    {
        "title": 'Lotte Hotel, Tashkent',
        "lat": '41.309827',
        "lng": '69.2665513',
        "description": 'DAY 13 We explore Uzbekistan’s capital visiting the Old City, including the Khast-Imom Complex where the world famous Quran of Caliph Uthman/Ottoman has been preserved, the Madrasah of Barak-Khan, Tilla Sheikh Mosque, the Mausoleum of the Saint Abu BakrKaffalShashi, the Islamic Institute of Imam al-Bukhari and explore Chor-Su Bazaar. An evening flight gets us to the largest and until recently the capital city of Kazakhstan. Upon arrival at Alma Aty we are welcomed and transferred to our hotel.'
    },
    {
        "title": 'Otrar Hotel, Almaty',
        "lat": '43.2608189',
        "lng": '76.9495966',
        "description": 'DAY 14 An early morning departure as we drive to the capital city of Tajikistan. Upon arrival at the border we first complete exit border formalities of Uzbekistan and then a short walk across to the Tajik side to do the entry border formalities. Change of vehicles as we drive to Dushanbe.  We arrive at Dushanbe and are transferred to our hotel. Tajikistan is a double landlocked country, which was part of the Soviet Union and now has a Presidential form of government. It has a population of 8 million.  Evening we are treated to Turkish/Tajik local cuisine dinner at the Café Merve Turkish.'
    },
    {
        "title": 'Ak-Keme Hotel, Bishkek',
        "lat": '42.8375965',
        "lng": '74.5818513',
        "description": 'DAY 15 We start early today on what is going to be a long day. Our tour begins with a visit to the Panfilov Park, followed by Zenkov Cathedral, St. Nicholas Cathedral and the Green Bazaar. From here we drive through Chang an-Tianshan Corridor*. We visit the Petroglyphs within the Archaeological Landscape of Tamgaly*. Set around the lush Tamgaly Gorge, amidst the vast, arid Chu-Ili Mountains, is a remarkable concentration of some 5,000 petroglyphs (rock carvings) dating from the second half of the second millennium BC to the beginning of the 20th century. Distributed among 48 complexes with associated settlements and burial grounds, they are testimonies to the husbandry, social organization and rituals of pastoral peoples. From here we drive to the border to Kyrgyzstan and continue to our hotel in Bishkek. Known alsos as Furunze, Bishkek is the capital city of Kyrgyzstan. Lunch will be at the Arzu Restaurant.'
    },
    {
        "title": 'Four Seasons Karven Resort, IssykKul Lake',
        "lat": '42.6035605',
        "lng": '76.936764',
        "description": 'DAY 16 - DAY 18 We enjoy our tour of Bishkek, which includes visits to Oak Park, Ala-Too Square, Statue of Manas, the Philharmonic Hall and Victory Monument. Drive to Balasagun and visit the historical Burana Tower*, which dates back to the 9th century AD. We will also visit the nearby museum. We then proceed eastwards into the mountains to Cholpon-Ata where we visit the local rock drawings of the Bronze periods, the local museum and a small local bazaar before arriving at our resort at Central Asia’s most popular will known resort. The Four Season’s Karven is known also for its impressive views of the imposing alpine ranges of the Tian Shan across the lake. For the balance of the day we have optional opportunities to walk around the valley and enjoy some of the boat rides being offered at the enchanting IssykKul Lake. Evening we enjoy dinner at a local restaurant attached to the Lake. DAY 17 Morning we visit the Preshevalsky Museum and Monument on the eastern edge of the Lake. A landmark museum, dedicated to the memory of Nikolai MichailovichPreshevalsky, who was an enthusiastic explorer accredited for his excellent works on the flora and fauna of the region. In the afternoon we visit the Annanaeva village where we get the opportunity to hike and visit local families and see their yurt accommodation and enjoy soup and tea with them. Evening for dinner we taste the cuisine of yet another of the popular restaurants at the IssykKul Lake. DAY 18 Enjoy our time at the lake. Afternoon we drive to Bishkek and enjoy a farewell dinner at Captain Nemo Restaurant.  We are then transferred to the airport and after an enjoyable trail following the Central Asian portion of the Silk Road, we bid farewell to the land of the Stans.'
    },
    ];
        window.onload = function () {
            LoadMap();
        }
        function LoadMap() {
            var mapOptions = {
                center: new google.maps.LatLng(markers[0].lat, markers[0].lng),
                // zoom: 8, //Not required.
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            var infoWindow = new google.maps.InfoWindow();
            var map = new google.maps.Map(document.getElementById("dvMap"), mapOptions);

            //Create LatLngBounds object.
            var latlngbounds = new google.maps.LatLngBounds();

            for (var i = 0; i < markers.length; i++) {
                var data = markers[i]
                var myLatlng = new google.maps.LatLng(data.lat, data.lng);
                var marker = new google.maps.Marker({
                    position: myLatlng,
                    map: map,
                    title: data.title
                });
                (function (marker, data) {
                    google.maps.event.addListener(marker, "click", function (e) {
                        infoWindow.setContent("<div style = 'width:200px;min-height:40px'>" + data.description + "</div>");
                        infoWindow.open(map, marker);
                    });
                })(marker, data);

                //Extend each marker's position in LatLngBounds object.
                latlngbounds.extend(marker.position);
            }

            //Get the boundaries of the Map.
            var bounds = new google.maps.LatLngBounds();

            //Center map and adjust Zoom based on the position of all markers.
            map.setCenter(latlngbounds.getCenter());
            map.fitBounds(latlngbounds);
        }
    </script>
    <div id="dvMap" style="width: 1000px; height: 800px">
    </div>
</body>
</html>

enter code here

身体
{
字体系列:Arial;
字号:10pt;
}
变量标记=[
{
“标题”:“阿什哈巴德努赛酒店”,
“lat”:“37.92938”,
“液化天然气”:“58.3841203”,
“说明”:“第1天-第3天抵达阿什哈巴德抵达阿什哈巴德机场后,我们受到热烈欢迎,然后被转移到我们的酒店。一天的剩余时间是免费的。土库曼斯坦是一个前苏联国家,是一个一党制国家。阿什哈巴德相对来说是一个非常小的城市,提供了非常有趣的景点。资源丰富的土库曼人投资于美化环境阿什哈巴德最近被《吉尼斯世界纪录大全》称为拥有世界上数量最多的白色大理石建筑——543座新建筑,内衬白色大理石,总面积达450万平方米。第二天阿什哈巴德我们对中亚从我们探索尼萨的帕提亚要塞开始。该遗址是帕提亚帝国最早和最重要的城市之一,公元前3世纪中期至公元3世纪是一个主要的强国。在该遗址的两个部分进行的考古发掘揭示了装饰华丽的建筑,说明了国内、国家和地区宗教功能。这个强大的帝国位于重要商业和战略轴心的十字路口,是罗马扩张的障碍,同时也是东西方、南北方之间重要的交流和贸易中心。然后我们前往中亚最大的清真寺之一的精神清真寺,参观纳特国家历史博物馆,继续前往中立拱门。下午,我们驱车前往GeokDepe参观Arkadash种马场(开放时间待定)参观土库曼斯坦民族的骄傲——阿克哈尔特克马。我们的行程以参观总统广场、埃托格鲁格哈齐清真寺、穿过一些大理石结构和新建的独立公园而结束。今晚的晚餐将在波伊塔格餐厅为我们介绍中亚的食物和烹饪。第03天阿什哈巴德/玛丽/阿什哈巴德清晨的短途飞行让我们前往玛丽,参观国家历史文化公园古梅尔夫*,这是中亚丝绸之路沿线最古老、保存最完好的绿洲城市。这片巨大绿洲的遗迹跨越了4000年的人类历史。许多纪念碑仍然可见,特别是在过去2000年在回玛丽的路上,我们参观了一位艺术家的家,观看了地毯编织、刺绣、绘画、当地面包烹饪的表演。午餐后,我们乘飞机回阿什哈巴德。晚上免费。”
},
{
“标题”:“努库斯吉佩克乔利酒店”,
“lat”:“42.465825”,
“液化天然气”:“59.607718”,
“说明”:“第04天在飞往Dashoguz的短途飞行后,我们前往位于阿姆河左岸的Kunya Urgench*。这座古城包含一系列主要建于11至16世纪的纪念碑,包括一座清真寺、一座商队的大门、堡垒、陵墓和一座60米高的宣礼塔。这些纪念碑证明了其杰出的成就在建筑和工艺方面的进步影响了伊朗和阿富汗,后来影响到了16世纪印度的莫卧儿帝国的建筑。在我们访问了KunyaUrgench之后,我们驱车前往位于Khojeyli的土库曼斯坦-乌兹别克斯坦边境点,在那里我们在两个检查站办理边境手续,同时也是一次有趣的体验他们缺乏现代化的设施。一个短距离的乡村景色使我们来到努库斯——一个几乎消失在沙漠中央的地方。
},
{
“标题”:“希瓦阿布迪马利克大酒店”,
“lat”:“41.377115”,
“液化天然气”:“60.3580361”,
“说明”:“第5天上午,我们参观了萨维茨基卡拉卡尔帕克斯坦艺术博物馆,该博物馆收藏了世界第二大的俄罗斯前卫艺术应用艺术品。它也是最大的考古藏品之一,以及源自中亚的民间、应用和当代艺术。驱车穿过乌兹别克斯坦农村,到达hi历史名城希瓦。在这里,我们探索伊坎卡拉——内城(由大约10米高的砖墙保护)古老的希瓦绿洲,是商队穿越沙漠前往伊朗之前的最后一个休息地。虽然很少有非常古老的纪念碑仍然存在,但它是中亚穆斯林建筑的一个连贯和保存完好的范例。有一些杰出的建筑,如朱玛清真寺、陵墓、宗教学校和two 19世纪初由阿拉·库利·汗修建的宏伟宫殿。在著名的雅索尔巴希餐厅用餐。”
},
{
“标题”:“布哈拉奥马尔哈亚姆酒店”,
“lat”:“39.7703649”,
“液化天然气”:“64.4149347”,
“说明”:“第06天-第07天,驱车前往霍雷兹姆省首府乌尔根奇。乌尔根奇有15万居民。我们将驱车游览该市,然后再前往历史悠久的丝绸之路城市布哈拉。抵达布哈拉后,布哈拉是2000多年来最著名的丝绸之路绿洲。这是最古老的丝绸之路这是中亚一座中世纪城市的完整范例,其城市结构基本保持完整。特别令人感兴趣的纪念碑包括著名的伊斯梅尔·萨马尼墓(Ismail Samani),这是10世纪穆斯林建筑的杰作,以及大量17世纪的宗教学校。下午我们尽情享受