Invalid value for property <map>

1,863 views
Skip to first unread message

DaveGivesPHPaShot

unread,
Nov 2, 2010, 10:49:44 PM11/2/10
to Google Maps JavaScript API v3
Hello,
Here is my page.
http://www.thebigmap.com/test/search_by_tagnov02e.html
The error occurs if you enter something in the text box at top right
and try to call the script.

Here is the error I'm getting
Uncaught Error: Invalid value for property <map>: [object
HTMLDivElement]

Any ideas ?
Thanks !

geoco...@gmail.com

unread,
Nov 2, 2010, 11:00:34 PM11/2/10
to Google Maps JavaScript API v3
On Nov 2, 7:49 pm, DaveGivesPHPaShot <tolman.da...@gmail.com> wrote:
> Hello,
> Here is my page.http://www.thebigmap.com/test/search_by_tagnov02e.html
The mysql_map variable is local to your "generic_load" function, so is
not available (is undefined) in the global context in which the html
click handlers run:

function generic_load() {
var mysql_map = new google.maps.Map(

To make it global:
var mysql_map = null;
function generic_load() {
mysql_map = new google.maps.Map(

-- Larry

> Thanks !

DaveGivesPHPaShot

unread,
Nov 3, 2010, 3:38:43 AM11/3/10
to Google Maps JavaScript API v3
Great Larry !
That makes sense. When I broke the onload function into a separate map
load and marker load function, I created this problem.
By the way, did you see the reference to you in the comments ?
Thanks a lot,
David

Reply all
Reply to author
Forward
0 new messages