27
rated 0 times
[
28]
[
1]
/ answers: 1 / hits: 17308
/ 14 Years ago, tue, december 7, 2010, 12:00:00
I have created a Google Map API and I would like to open it in a new tab(Window). May I know what's wrong with my code? I can open a new tab, but I can't display the Google Map.
Below are my code. Thanks!
function newWindow()
{
var myLatlng = new google.maps.LatLng(0.7,40);
var myOptions =
{
zoom: 2,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.HYBRID
};
map = new google.maps.Map(document.getElementById(map_canvas),
myOptions);
}
<A HREF= onclick=window.open('javascript:newWindow()') >New Map(In new window)</A>
More From » html