ダーツを使ったGoogleマップの挙動がおかしい!! ここで 、マップの作成を担当するリンクが「Géolocalisation」であることがわかりますが、今まで問題はありませんでした。しかし、再クリックしたり、別のリンクにアクセスしてから「Géo..」に戻ったりすると、これが表示 され、どうすればよいかわかりません! これは GMap での私の最初の試みなので、少し助けてください。リンクをクリックしてもページが更新されないことを言及する必要があります。コンテナ div から古いコンテンツを削除し、新しい要素を追加するだけです。また、bootstrap3 を使用していることも言及する必要があります。これはページ ジオのコードです
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;
}
}
それで、解決策、仮説、またはヒントを教えていただければ幸いです。最初に解決策が気に入ったら、ここに投稿します。