我有一个奇怪的使用飞镖谷歌地图的行为!在这里 ,正如您所见,负责制作地图的链接是“地理定位”,直到现在我没有问题!但是当我重新单击,或者当我访问另一个链接然后返回到“Géo..”时,它给了我这个 ,我真的不知道该怎么做!这是我第一次尝试 GMap,所以我需要一点帮助。我必须提到当我点击链接时页面不会刷新它只是从容器 div 中删除旧内容然后添加新元素我还必须提到我正在使用 bootstrap3,这是页面 géo 的代码
import 'package:google_maps/google_maps.dart';
import '../view.dart';
import 'dart:html';
//view Map
class viewMap extends View{
panelCoreBuilder(){
//creating the container layout and it is a div row
DivElement layout = new DivElement()..className="row";
//adding a style element for the map element inside the container
layout.children.add(new StyleElement()..text="#mapblock{margin: 0;padding: 0; height: 500px; width: 100%;");
DivElement cellone = new DivElement()..className="col-md-3";
//naming the block that contains the map
DivElement celltow = new DivElement()..className="col-md-9"..id="mapblock";
//adding the cells to the layout
layout.children.addAll([cellone,celltow]);
//creating the map
visualRefresh = true;
final mapOptions = new MapOptions()
..zoom = 8
..center = new LatLng(34.034453, -5.885925)
..mapTypeId = MapTypeId.ROADMAP;
final map = new GMap(celltow, mapOptions);
//returning the layout to the MainContainer...
return layout;
}
}
就是这样,我希望你能给我任何解决方案,假设,甚至是一个提示,如果我首先喜欢这个解决方案,我会在这里发布!