How can i have a google map with custom marker icon with html infowindow.
My clients need to have a custom marker with infowindow having their company logo and company postal address; with multiple lines and icons along with font formating (bold, italic etc).
I have check Google Map API V3, but i dont need the controls like zoom, map type on the map.
{
var infowindow = new google.maps.InfoWindow();
var imageOn = new google.maps.MarkerImage('./Images/house.png');
var point = new google.maps.LatLng(parseFloat(22.559496), parseFloat(-87.325951));
var marker1 = new google.maps.Marker({ position: point, map: map, title: "Our Headquarter in Orlando, Florida", icon: imageOn });
Member
9 Points
169 Posts
Google Map with Custom Icon and Infowindow HTML
Mar 28, 2011 07:19 AM|wrathyimp|LINK
Hi,
How can i have a google map with custom marker icon with html infowindow.
My clients need to have a custom marker with infowindow having their company logo and company postal address; with multiple lines and icons along with font formating (bold, italic etc).
I have check Google Map API V3, but i dont need the controls like zoom, map type on the map.
Please guide me on setting it up.
Thanks
Member
142 Points
166 Posts
Re: Google Map with Custom Icon and Infowindow HTML
Apr 08, 2011 04:07 PM|sinedyip|LINK
using javascript
//add a marker for the YOUR PLACE
function yourmethod()
{
var infowindow = new google.maps.InfoWindow();
var imageOn = new google.maps.MarkerImage('./Images/house.png');
var point = new google.maps.LatLng(parseFloat(22.559496), parseFloat(-87.325951));
var marker1 = new google.maps.Marker({ position: point, map: map, title: "Our Headquarter in Orlando, Florida", icon: imageOn });
infowindow.setContent("YourPlace" + "<br/>" + "City: YourCity" + "<br/>" + "State: YourState" + "<br/>" + "Country: USA");
google.maps.event.addListener(marker1, 'click', function () { infowindow.open(map, marker1);});
}