Closed vasner closed 6 years ago
I cannot reproduce your issue. The following code works and I see 2 maps.
<!DOCTYPE html>
<html>
<head>
<title>Simple Map</title>
<meta name="viewport"
content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html,
body {
height: 100%;
margin: 0px;
padding: 0px
}
#map-canvas1,
#map-canvas2 {
height: 50%;
margin: 0px;
padding: 0px
}
</style>
</head>
<body>
<div id="map-canvas1"></div>
<div id="map-canvas2"></div>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script type="application/dart"
src="page.dart"></script>
<script src="packages/browser/dart.js"></script>
</body>
</html>
import 'dart:html';
import 'package:google_maps/google_maps.dart';
void main() {
final mapOptions = new MapOptions()
..zoom = 8
..center = new LatLng(-34.397, 150.644);
new GMap(document.getElementById("map-canvas1"), mapOptions);
new GMap(document.getElementById("map-canvas2"), mapOptions);
}
Please re-open with a simple reproduction code if the issue is not in your code.
I have an issue with opening second instance on map.
Second instance loss position and controls. All other instance have the same issue. If make it FullScreen buttons are back.
Code is following:
One more thing if I include the Maps API JavaScript using a script tag in div with each instance it fixes focus, but controls are still missed.