Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: pmessanaPosted on 2009-09-10 at 08:52:03ID: 25301422
This example should do what you are looking for, it is straight off our my code, you would only need to reference the correct DIV and set the latitudes and longitudes.
yId("map2" ));
ml) { "click", function() { html);
","<strong>A ustin:</str ong><br>9705 Burnet Rd #102<br>Austin, TX 78758<br>(512) 719-4386<br><br>Directions: <a href='javascript:;' onclick='test()'>To here<" + "/a>")
42); n","<strong >Houston (Canoe Sport):</strong><br>5822 Bissonnet<br>Houston, TX 77081<br>(713) 660-7000<br><br>Directions: <a href='#form-directions'>To here<" + "/a>")
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementB
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(30.237555, -96.448975), 7);
var marker = new GMarker(map.getCenter());
var gmarkers = [];
// A function to create the marker and set up the event window
function createMarker(point,name,ht
var marker = new GMarker(point);
GEvent.addListener(marker,
marker.openInfoWindowHtml(
});
// save the info we need to use later for the side_bar
gmarkers.push(marker);
return marker;
}
// add the points
var point = new GLatLng(30.381047, -97.724503);
var marker = createMarker(point,"Austin
map.addOverlay(marker);
var point = new GLatLng(29.822546, -97.992098);
var marker = createMarker(point,"San Marcos","<strong>San Marcos:</strong><br>4554 South IH 35<br>San Marcos, TX 78666<br>(512) 396-2386<br><br>Directions: <a href='#form-directions'>To here<" + "/a>")
map.addOverlay(marker);
var point = new GLatLng(29.699611,-95.4840
var marker = createMarker(point,"Housto
map.addOverlay(marker);
}