different markers on google maps v3

How can I add different markers to google map v3?

Here is example for my marker:

var latlng = new google.maps.LatLng(lat,lng); 
var image = "../img/hotel_icon.png";
var locationDescription = this.locationDescription;
var marker = new google.maps.Marker({
  map: map,
  position: latlng,
  title:'pk:'+name,
  icon: image
});

bounds.extend(latlng);
setMarkes(map, marker, name, locationDescription);

});//close each
map.fitBounds(bounds);
});//close getjson

}//close initialize
function setMarkes(map, marker, name, locationDescription){
  google.maps.event.addListener(marker, 'mouseover', function() {
      infowindow.close();
      infowindow.setContent('<h3>'+name+'</h3><em>'+locationDescription+'</em>');
      infowindow.open(map, marker);
  });

}

Answers


Here is one example that may help: http://www.geocodezip.com/v3_markers_normal_colored_infowindows.html


i have resolved a problem was easy just i have put this

var currentplace = $("#currentplace").text();
  if(name == currentplace ){image = "../img/hotel_icon.png";}else{ image = "../img/home_icon.png";}

Need Your Help

Android Maven : LifecycleExecutionException

android exception maven

This is the stack trace of the error which Is thrown when I do mvn install :

Using Bubble Sort with JOptionPanes

java arrays sorting joptionpane bubble-sort

I want to bubble sort an array that could be any number with values from the user. But the first method is not working. I really want to use JOptionPanes, but I don't even know if that is the probl...