• 13-10-2020, 10:24:35
    #1
    Kullandığım JS kodları
    <script type="text/javascript">
          var locations = [
        ['İstanbul Şube', 'Ümraniye, İstanbul', 'Location 1 URL'],
        ['Genel Şube', 'Dulkadiroğulları, Kahramanmaraş', 'Location 2 URL'],
        ['Gaziantep Şube', 'Şehitkamil, Gaziantep', 'Location 3 URL']
    ];
    
    var geocoder;
    var map;
    var bounds = new google.maps.LatLngBounds();
    
    function initialize() {
        map = new google.maps.Map(
        document.getElementById("map_canvas"), {
            center: new google.maps.LatLng(41.0044911,29.1794592),
            zoom: 13,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        });
        geocoder = new google.maps.Geocoder();
    
        for (i = 0; i < locations.length; i++) {
    
    
            geocodeAddress(locations, i);
        }
    }
    google.maps.event.addDomListener(window, "load", initialize);
    
    function geocodeAddress(locations, i) {
        var title = locations[i][0];
        var address = locations[i][1];
        var url = locations[i][2];
        geocoder.geocode({
            'address': locations[i][1]
            
        },
    
        function (results, status) {
            if (status == google.maps.GeocoderStatus.OK) {
                var marker = new google.maps.Marker({
                
                  
                    icon:   "https://twitteraraclari.xyz/assets/img/favicon.png",                              
                    map: map,
                    position: results[0].geometry.location,
                    title: title,
                    animation: google.maps.Animation.DROP,
                    address: address,
                    url: url
                })
                infoWindow(marker, map, title, address, url);
                bounds.extend(marker.getPosition());
                map.fitBounds(bounds);
            } else {
                alert("geocode of " + address + " failed:" + status);
            }
        });
    }
    
    function infoWindow(marker, map, title, address, url) {
        google.maps.event.addListener(marker, 'click', function () {
            var html = "<div><h3>" + title + "</h3><p>" + address + "<br></div><a href='" + url + "'>View location</a></p></div>";
            iw = new google.maps.InfoWindow({
                content: html,
                maxWidth: 350
            });
            iw.open(map, marker);
        });
    }
    
    
    
    
            </script>

    icon'u image kullanmak yerine html kullanmak istiyorum nasıl yapabilirim?
  • 13-10-2020, 11:31:42
    #2
    Benim düzenlediğim tema = https://twitteraraclari.xyz/index.html

    Orjinali = https://live.hasthemes.com/html/3/me...gan/index.html

    haritadaki yer imleci