On Feb 6, 12:08 am, Jason Andreoni <[email protected]> wrote:
>
> Here's the code that Andrew suggested to get the marker on the map in
> the first place, followed by my createMarker function that you
> suggested modifying:
>
> map.addOverlay(createMarker(center,
> document.getElementById('addressInput').value));
>                 bounds.extend(center);
>                 map.setCenter(bounds.getCenter(), 
> map.getBoundsZoomLevel(bounds));
>      });
>    }
>
>     function createMarker(point, name, address, phone, moreinfo) {

Note how many arguments the function needs (five) and how many you are
supplying (two). Each of the missing arguments, address phone
moreinfo, ends up as "undefined" within the function, because there is
no value passed in. Perhaps I should have thought of that.

You could change the addOverlay line to pass three additional empty
strings into the function
document.getElementById('addressInput').value,"","",""));
or you could define and use a createCentreMarker() function which was
almost the same as createMarker but only needed two arguments. That
function could create a marker with a different icon, too.

Andrew

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to