Last night I added a Google Map to my client’s website. Unfortunately, Google’s tutorials weren’t very helpful, and I have more questions than when I started!
1.) What do end users want/expect?
Do they just want to see my client’s location in the center of the map with one of those balloon things?
Do they want a way to get directions?
2.) I enter the Latitude and Longitude for my client’s shop, but there is no balloon showing where the shop is.
3.) Google Maps seems to ignore the Height I set in CSS, and there is no right border.
You may have the lat and long the wrong way around - zoom way out and see if it is elsewhere. From memory the first time I did it my marker was in Africa somewhere!
I found it quite simple I just pasted the code into the page and set the position but I know like everything else these days it is getting more complicated! I would see if your css is interfering with the Google one by embedding the code into a html page with just the basic code and see what happens.
var location_array = [
['name', ##.#######, -##.#######]
];
Then you set the pins like so
var map_image = '../images/MapLocationPins/PNG/pin-green-solid-10.png';
function setMapMarkers(map, location_array) {
for (var i = 0; i < location_array.length; i++) {
var map_pins = location_array[i];
var myLatLng = new google.maps.LatLng(map_pins[1], map_pins[2]);
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
icon: map_image,
title: map_pins[0]
});
}
}