I've used the Google maps API v3 to display a map of the Rice Eccles Stadium floor plan at the University of Utah (where we hold our district science fair called Salt Lake Valley Science & Engineering Fair), I'd like to show a marker for a given table number so judges can find the project they are judging. For the life of me, I can't get a single marker to show up. I've tried adding the zIndex parameter, changing the style, etc. Can someone please give me a ticket to the Clue Train? Thank you.
Here's the page showing m开发者_C百科y floor plan: http://slvsef.org/map.html
You do not match brackets {...}
correctly in your function initialize()
. See REMOVE/ADD lines below:
function initialize() {
var myLatlng = new google.maps.LatLng(0, 0);
var myOptions = {
center: myLatlng,
zoom: 2,
streetViewControl: false,
mapTypeControl: false,
panControl: false
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
map.mapTypes.set('slvsef', MapType);
map.setMapTypeId('slvsef');
// } <===== REMOVE
var marker = new google.maps.Marker({
position: new google.maps.LatLng(0,0),
map: map,
title:"Hello World!"
});
} // <===== ADD
精彩评论