久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <tfoot id='96x8x'></tfoot>

      • <bdo id='96x8x'></bdo><ul id='96x8x'></ul>
    1. <i id='96x8x'><tr id='96x8x'><dt id='96x8x'><q id='96x8x'><span id='96x8x'><b id='96x8x'><form id='96x8x'><ins id='96x8x'></ins><ul id='96x8x'></ul><sub id='96x8x'></sub></form><legend id='96x8x'></legend><bdo id='96x8x'><pre id='96x8x'><center id='96x8x'></center></pre></bdo></b><th id='96x8x'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='96x8x'><tfoot id='96x8x'></tfoot><dl id='96x8x'><fieldset id='96x8x'></fieldset></dl></div>

        <small id='96x8x'></small><noframes id='96x8x'>

        <legend id='96x8x'><style id='96x8x'><dir id='96x8x'><q id='96x8x'></q></dir></style></legend>

        在谷歌地圖 api v3 上旋轉(zhuǎn) .gif 圖像?

        rotate a .gif image on google maps api v3?(在谷歌地圖 api v3 上旋轉(zhuǎn) .gif 圖像?)
      1. <small id='3lyQH'></small><noframes id='3lyQH'>

            <tbody id='3lyQH'></tbody>
          <tfoot id='3lyQH'></tfoot>
            <legend id='3lyQH'><style id='3lyQH'><dir id='3lyQH'><q id='3lyQH'></q></dir></style></legend>
              • <bdo id='3lyQH'></bdo><ul id='3lyQH'></ul>

                  <i id='3lyQH'><tr id='3lyQH'><dt id='3lyQH'><q id='3lyQH'><span id='3lyQH'><b id='3lyQH'><form id='3lyQH'><ins id='3lyQH'></ins><ul id='3lyQH'></ul><sub id='3lyQH'></sub></form><legend id='3lyQH'></legend><bdo id='3lyQH'><pre id='3lyQH'><center id='3lyQH'></center></pre></bdo></b><th id='3lyQH'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='3lyQH'><tfoot id='3lyQH'></tfoot><dl id='3lyQH'><fieldset id='3lyQH'></fieldset></dl></div>
                  本文介紹了在谷歌地圖 api v3 上旋轉(zhuǎn) .gif 圖像?的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                  問(wèn)題描述

                  我在這個(gè)問(wèn)題上找到了很多答案,但沒(méi)有一個(gè)在使用 .gif 圖像而不是標(biāo)記時(shí)有效.要使用 .gif 圖像(以及動(dòng)畫(huà) gif),我使用代碼(有效)

                  I find lots of answers on this question but not one that works when using .gif images and not markers. To use .gif images (and also animated gifs) I use code (which works)

                  var image = {
                    url: 'img/RedFlashYacht.gif',
                    size: new google.maps.Size(75, 75),
                    origin: new google.maps.Point(0, 0),
                    anchor: new google.maps.Point(0, 32),
                    scaledSize: new google.maps.Size(50, 50)
                  };
                  marker = new google.maps.Marker({
                      position: pos , 
                      map: map,
                      icon: image,
                      store_id: mkrID,
                      optimized: false
                  }); 
                  

                  //對(duì)于沒(méi)有使用過(guò).gif的人來(lái)說(shuō),'optimized: false'這一行很關(guān)鍵

                  //for anyone who has not used .gif, the line 'optimized: false' is critical

                  我現(xiàn)在要做的是旋轉(zhuǎn) gif 圖像(到指定的角度,而不是恒定的旋轉(zhuǎn) [我可以做 gif 動(dòng)畫(huà)]).盡管使用 'store_id: mkrID' 為圖像設(shè)置 ID,之前創(chuàng)建了 var mkrID,但我可以使用代碼 marker.get('store_id') 將其讀回,所以我知道它已被設(shè)置.我無(wú)法使用 document.getElementById 訪問(wèn)圖像.我也不能讓任何谷歌地圖 API 旋轉(zhuǎn)示例代碼工作.我發(fā)現(xiàn)的示例似乎適用于 v2 或與谷歌地圖自己的標(biāo)記有關(guān),而不是使用 gif 的自定義圖像.

                  What I want to do now is rotate the gif image (to a specified angle, not a constant rotate [that I can do as animated gif]). Dispite setting the ID for the image with 'store_id: mkrID,' var mkrID being previously created, and I can read it back with code marker.get('store_id') so I know it's been set. I cannot access the image with document.getElementById. nor can I get any of the google maps API rotate eample code to work either. Examples I find seem to be for v2 or relate to google maps own markers, not custom images using a gif.

                  有人可以在谷歌地圖中旋轉(zhuǎn) gif 圖像嗎?

                  Has anyone been able to rotate a gif image in a google map?

                  推薦答案

                  store_id"標(biāo)記的屬性不允許您訪問(wèn)包含圖像的 DOM 元素.如果每個(gè)標(biāo)記都有一個(gè)唯一的圖標(biāo),則可以使用 JQuery 的 URL 獲取它,然后對(duì)其應(yīng)用 CSS 轉(zhuǎn)換:

                  The "store_id" property of the marker doesn't give you access to the DOM element which contains the image. If you have a unique icon for each marker, you can grab it using its URL with JQuery, then apply a CSS transform to it:

                  $('img[src="http://www.geocodezip.com/mapIcons/boat-10-64.gif"]').css({
                    'transform': 'rotate(45deg)'
                  });
                  

                  注意:這僅適用于帶有 optimized: false

                  • 概念證明小提琴
                  • 概念證明小提琴旋轉(zhuǎn) .png 圖像

                  代碼片段:

                  function initialize() {
                    var map = new google.maps.Map(
                      document.getElementById("map_canvas"), {
                        center: new google.maps.LatLng(37.47949, -122.083168),
                        zoom: 13,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                      });
                    var image = {
                      url: 'http://www.geocodezip.com/mapIcons/boat-10-64.gif',
                      size: new google.maps.Size(75, 75),
                      origin: new google.maps.Point(0, 0),
                      anchor: new google.maps.Point(0, 32),
                      scaledSize: new google.maps.Size(50, 50)
                    };
                    var marker = new google.maps.Marker({
                      position: map.getCenter(),
                      map: map,
                      icon: image,
                      store_id: "mkrID",
                      optimized: false
                    });
                    var rotationAngle = 10;
                    google.maps.event.addListenerOnce(map, 'idle', function() {
                      setInterval(function() {
                        $('img[src="http://www.geocodezip.com/mapIcons/boat-10-64.gif"]').css({
                          'transform': 'rotate(' + rotationAngle + 'deg)'
                        });
                        rotationAngle += 10;
                      }, 1000);
                    });
                  }
                  google.maps.event.addDomListener(window, "load", initialize);

                  html,
                  body,
                  #map_canvas {
                    height: 100%;
                    width: 100%;
                    margin: 0px;
                    padding: 0px
                  }

                  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
                  <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk"></script>
                  <div id="map_canvas"></div>

                  這篇關(guān)于在谷歌地圖 api v3 上旋轉(zhuǎn) .gif 圖像?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會(huì)等待 ajax 調(diào)用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無(wú)法加載,請(qǐng)求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開(kāi)發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請(qǐng)求是否有可能不遵循重定向 (301 302))
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                  Restrictions of XMLHttpRequest#39;s getResponseHeader()?(XMLHttpRequest 的 getResponseHeader() 的限制?)

                    <bdo id='v1S72'></bdo><ul id='v1S72'></ul>
                    <legend id='v1S72'><style id='v1S72'><dir id='v1S72'><q id='v1S72'></q></dir></style></legend>
                      <tbody id='v1S72'></tbody>
                  • <tfoot id='v1S72'></tfoot>

                        <small id='v1S72'></small><noframes id='v1S72'>

                        <i id='v1S72'><tr id='v1S72'><dt id='v1S72'><q id='v1S72'><span id='v1S72'><b id='v1S72'><form id='v1S72'><ins id='v1S72'></ins><ul id='v1S72'></ul><sub id='v1S72'></sub></form><legend id='v1S72'></legend><bdo id='v1S72'><pre id='v1S72'><center id='v1S72'></center></pre></bdo></b><th id='v1S72'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='v1S72'><tfoot id='v1S72'></tfoot><dl id='v1S72'><fieldset id='v1S72'></fieldset></dl></div>

                            主站蜘蛛池模板: av男人的天堂av | 国产中文区二幕区2012 | 97精品一区二区 | 天天操夜夜操 | 福利视频二区 | 欧美一区二区在线 | 久久艹免费视频 | 91色在线 | 欧美激情精品久久久久久变态 | 极品国产视频 | 不卡欧美 | 中文字幕av一区二区三区 | 国产高清免费在线 | 日本成人中文字幕在线观看 | 一区二区三区在线播放 | 最新中文字幕久久 | 国产精品国产三级国产aⅴ中文 | 在线资源视频 | 国产三级日本三级 | 亚洲福利电影网 | 成人福利网站 | 激情伊人网 | 91久久北条麻妃一区二区三区 | 91爱爱·com | av网站推荐| 亚洲一区二区三区在线播放 | 日本精品久久 | 中文字幕亚洲一区二区三区 | 亚洲日产精品 | 久久国产精品72免费观看 | 天天爽天天干 | 宅男噜噜噜66一区二区 | 午夜欧美a级理论片915影院 | 久久99精品国产麻豆婷婷 | 国产午夜视频 | 久久久久国产精品一区二区 | 精品一区二区在线观看 | 中文字幕在线中文 | 欧美日韩在线国产 | 国产精品美女久久久久久免费 | 大象视频一区二区 |