は、私は(アイコンのURLをコードしている)画像マーカーのカスタムアイコンを設定、管理が、私はそのサイズをカスタマイズする方法は考えています。私はオンラインでヘルプを探しましたが、私の非常に限られたコーディングの知識のために、それを動作させるために必要なコードを追加できませんでした。誰かが市場アイコンの幅/高さをカスタマイズするために必要な変更を加えて、完成したコードを私に送ってもらえますか?変更カスタムマーカーのサイズGoogleマップ
ありがとうございました!
<script src='https://maps.googleapis.com/maps/api/js?v=3.exp&key=AIzaSyDL51DzuRotMkfR09g540u2dZHlKPMpR54'></script>
<div style='overflow:hidden;height:450px;width:100%;'>
<div id='gmap_canvas' style='height:450px;width:100%;'></div>
<style>
#gmap_canvas img {
max-width:none!important;
background:none!important
}
</style>
</div>
<script type='text/javascript'>
function init_map(){
var myOptions = {
scrollwheel: false,
draggable: false,
zoom:16,
center:new google.maps.LatLng(25.841211,-80.308539),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('gmap_canvas'), myOptions);
marker = new google.maps.Marker({
map: map,
position: new google.maps.LatLng(25.841211,-80.308539),
icon: 'http://www.ssglobalsupply.com/images/location-contact.png'
});
infowindow = new google.maps.InfoWindow({
content:'6891 NW 74th St Medley, FL 33166<br>'
});
google.maps.event.addListener(marker, 'click', function(){
infowindow.open(map,marker);
});
infowindow.open(map,marker);
}
google.maps.event.addDomListener(window, 'load', init_map);
google.maps.event.addDomListener(window, "resize", function() {
var center = map.getCenter();
google.maps.event.trigger(map, "resize");
map.setCenter(center);
});
</script>
どの程度のサイズにしたいですか? [iconサイジング](https://developers.google.com/maps/documentation/javascript/3.exp/reference#Icon)のドキュメントを見ましたか?また、次の例を参照してください。https://developers.google.com/maps/documentation/javascript/examples/icon-complex – geocodezip
多くのことを見てきましたが、コードを間違って実装しています。サイジング用の追加で完全な終了コードを送信することが可能な場合。私はそれが50pxで50pxになるのが好きです。 – miksham
あなたはそれがうまくいかない投稿、好ましくは[mcve]を投稿してください。 – geocodezip