<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          jMapsjQuery的地圖插件

          聯(lián)合創(chuàng)作 · 2023-09-28 00:48

          jMaps 是一個(gè) jQuery 的插件,提供了簡(jiǎn)單的 API 來(lái)訪問 Google 地圖,主要的功能有:

          * Geocode and reverse any valid address in the world via Google's geocoding API
          * Search for directions to and from any location
          * Add and remove Markers
          * Add and remove polygons and polylines
          * Add and remove graphic layers on the map
          * Add and remove Google adsense layers
          * Add and remove Traffic layers
          * Get information back such as map center, map size, map type, etc

          示例代碼:

          jQuery(document).ready(function(){
             
              jQuery
          ('#map1').jmap('init', {'mapType':'hybrid','mapCenter':[37.4419, -122.1419]});
             
              jQuery
          ('#address-submit-1').click(function(){
                  jQuery
          ('#map1').jmap('SearchAddress', {
                     
          'query': jQuery('#address').val(),
                     
          'returnType': 'getLocations'
                 
          }, function(result, options) {
                     
                     
          var valid = Mapifies.SearchCode(result.Status.code);
                     
          if (valid.success) {
                      jQuery
          .each(result.Placemark, function(i, point){
                          jQuery
          ('#map1').jmap('AddMarker',{
                                 
          'pointLatLng':[point.Point.coordinates[1], point.Point.coordinates[]],
                                 
          'pointHTML':point.address
                             
          });
                         
          });
                     
          } else {
                          jQuery
          ('#address').val(valid.message);
                     
          }
                 
          });
                 
          return false;  
             
          });
          });
          瀏覽 28
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  看免费黄色录像 | 成人91无码在线18 | 午夜网亚洲无码 | 91av影音先锋 | 男人的天堂在线 |