Answer the question
In order to leave comments, you need to log in
Reinitializing Google maps V3
There is a page with a map, facebox should also appear on top of it with a map.
But facebox doesn't show map.
And if there is no map on the page, it is displayed.
That is, only one card is shown at a time.
Has anyone encountered a similar problem?
Functions for calling cards:
function gmap_5() {
var latlng_5 = new google.maps.LatLng(55.7558, 37.6176);
var myOptions_5 = {
zoom: 8,
center: latlng_5,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map_5 = new google.maps.Map(document.getElementById("map_5"), myOptions_5);
}
gmap_5();
Answer the question
In order to leave comments, you need to log in
You store maps in the same map_5 variable, create a separate variable for the second map, or if you need many maps, make an array.
For example, I wrote one function. Of course the numbers are different.
So the second function looks like this:
function gmap_6() {
var latlng_6 = new google.maps.LatLng(55.7558, 37.6176);
var myOptions_6 = {
zoom: 8,
center: latlng_6,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map_5 = new google.maps.Map(document.getElementById("map_6"), myOptions_6);
}
gmap_6();
Something is wrong in the conservatory.
Here everything works for me as written above: http://wott.info/examples/2ndgmap.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question