Kann die eigentliche Karte nicht sehen, wenn die Google Maps-API verwendet wird
-
14-11-2019 - |
Frage
generasacodicetagpre.
generasacodicetagpre.
Ich verwende Karten-API mit Markercluster, um viele Orte anzuzeigen Ich kann die Zoomleiste sehen, und auch das von Markercluster erzeugte Cluster, aber nicht das eigentliche Kartenbild Warum?
Lösung
Try adding the following CSS:
html { height: 100%; }
body { height: 100%; }
Andere Tipps
You could try making your map like this:
//The options for the google map
var mapOptions = {
zoom: 3,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP //Or whatever you want
};
var map = new google.maps.Map(document.getElementById('#map'), mapOptions);
This is nitpicky but it makes it alot easier to work with the map if you have to add a lot of information to it later (markers/listeners/zooms after load)
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow