1

パンとズームの色をカスタマイズできるかどうか疑問に思っていました。デフォルトの白色から別のものにするか、グラデーションを追加します。私はGoogleマップが初めてで、これまでに思いついたものです。

     function initialize() {
        var mapOptions = {
          center: new google.maps.LatLng(10.341908, 123.910602),
          zoom: 16,
          panControl: true,
          panControlOptions: {
          position: google.maps.ControlPosition.TOP_RIGHT
},


      zoomControl: true,
              zoomControlOptions: {
              style: google.maps.ZoomControlStyle.LARGE,
              position: google.maps.ControlPosition.TOP_RIGHT
    },
              mapTypeId: google.maps.MapTypeId.ROADMAP

        };
        var map = new google.maps.Map(document.getElementById("map"),
            mapOptions);

       // Creating a marker and positioning it on the map    
        var marker = new google.maps.Marker({    
            position: new google.maps.LatLng(10.341908, 123.910602),    
            map: map    
    });
      }
4

2 に答える 2

1

map.gm-style > .gmnoprint > .gmnoprint { put your css here}

#map .gm-style > .gmnoprint > .gmnoprint > div > img { display: none !important;}

#map .gm-style > .gmnoprint > .gmnoprint div[title="Pan up"] { put your css here}

#map .gm-style > .gmnoprint > .gmnoprint div[title="Pan down"] { put your css here }

#map .gm-style > .gmnoprint > .gmnoprint div[title="Pan right"] { put your css here}

    #map .gm-style > .gmnoprint > .gmnoprint div[title="Pan left"] {background:url(images/positionbutton_left.png) no-repeat center center !important; put your css here}

#map .gm-style > .gmnoprint > .gmnoprint div[title="Zoom in"] {background:url(images/zoom_in.png) no-repeat center center !important; put your css here }

#map .gm-style > .gmnoprint > .gmnoprint div[title="Zoom out"] {  put your css here }

        #map .gm-style > .gmnoprint > .gmnoprint div[title="Drag to zoom"] { put your css here}
        
#map .gm-style > .gmnoprint > .gmnoprint div[title="Click to zoom"] { put your css here}
于 2015-02-26T21:27:10.153 に答える
0

そのようなオプションは実装されていません。srcただし、コントロールは最終的には画像(スプライト)のみであり、マップの読み込みが完了すると、別の色のカスタム画像に変更できるようになります。

于 2013-01-30T22:16:01.577 に答える