Jinicus
Jinicus

Reputation: 3

Marker is not being displayed on map

http://pastebin.com/hGGGUL3a

Is there any idea why this code doesn't show the marker? Reason i have the marker code in a separate function is due to future changes where the button will obtain new data from a database thus update.

Many Thanks in Advance!

Upvotes: 0

Views: 44

Answers (1)

Mano Marks
Mano Marks

Reputation: 8819

Well, it doesn't work at all, doesn't show the map. Reason is line 23:

        });

Once you get there, the line:

            marker = new google.maps.Marker({position: google.maps.LatLng(52.907135, -1.093140),
            map: map
        });

should be:

            marker = new google.maps.Marker({position: new google.maps.LatLng(52.907135, -1.093140),
            map: map
        });

Upvotes: 1

Related Questions