Google maps open info window by default?

If you want to show the info window opened by default without click, just add a new code like bellow: Your code: google.maps.event.addListener(marker, ‘click’, function() { infowindow.open(map,marker); }); So we have a new code like this: google.maps.event.addListener(marker, ‘click’, function() { infowindow.open(map,marker); }); infowindow.open(map,marker); As you can see, we just add a little line code with … Read more

Using Icon Fonts as Markers in Google Maps V3

I just had the same problem – decided to do a quick and dirty conversion and host on github. https://github.com/nathan-muir/fontawesome-markers You can manually include the JS file, or use npm install fontawesome-markers or bower install fontawesome-markers. Just include the javascript file fontawesome-markers.min.js and you can use them like so: new google.maps.Marker({ map: map, icon: { … Read more

Google Maps API: open url by clicking on marker

You can add a specific url to each point, e.g.: var points = [ [‘name1’, 59.9362384705039, 30.19232525792222, 12, ‘www.google.com’], [‘name2’, 59.941412822085645, 30.263564729357767, 11, ‘www.amazon.com’], [‘name3’, 59.939177197629455, 30.273554411974955, 10, ‘www.stackoverflow.com’] ]; Add the url to the marker values in the for-loop: var marker = new google.maps.Marker({ … zIndex: place[3], url: place[4] }); Then you can add … Read more

Google maps v3 draggable marker

Finally I found the answer: marker = new google.maps.Marker( { map:map, draggable:true, animation: google.maps.Animation.DROP, position: results[0].geometry.location }); google.maps.event.addListener(marker, ‘dragend’, function() { geocodePosition(marker.getPosition()); }); function geocodePosition(pos) { geocoder = new google.maps.Geocoder(); geocoder.geocode ({ latLng: pos }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { $(“#mapSearchInput”).val(results[0].formatted_address); $(“#mapErrorMsg”).hide(100); } else { $(“#mapErrorMsg”).html(‘Cannot determine address at this location.’+status).show(100); } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)