Bug: event-click-latlng
@wangela がすでに取り組んでいます。
2022年8月26日 から。
評価
この issue はまだ評価されていません。
説明
Operating system
ubuntu 22.04
Browser Version
Chrome 104.0.5112.101 (oficial) 64 bits
How severe is the bug?
moderate
Bug description
function initMap() {
const myLatlng = { lat: -25.363, lng: 131.044 };
const map = new google.maps.Map(document.getElementById("map")!, {
zoom: 4,
center: myLatlng,
});
// Create the initial InfoWindow.
let infoWindow = new google.maps.InfoWindow({
content: "Click the map to get Lat/Lng!",
position: myLatlng,
});
infoWindow.open(map);
// Configure the click listener.
map.addListener("click", (mapsMouseEvent) => {
// Close the current InfoWindow.
infoWindow.close();
// Create a new InfoWindow.
infoWindow = new google.maps.InfoWindow({
position: mapsMouseEvent.latLng,
});
infoWindow.setContent(
JSON.stringify(mapsMouseEvent.latLng.toJSON(), null, 2)
);
infoWindow.open(map);
});
}
declare global {
interface Window {
initMap: () => void;
}
}
window.initMap = initMap;
export {};
Steps to reproduce
Just run.
Console log output
I fixed it by commenting some parts below
<script>
function initMap() {
const myLatlng = { lat: -25.363, lng: 131.044 };
const map = new google.maps.Map(document.getElementById('map'), {
zoom: 4,
center: myLatlng,
});
// Create the initial InfoWindow.
let infoWindow = new google.maps.InfoWindow({
content: "Click the map to get Lat/Lng!",
position: myLatlng,
});
infoWindow.open(map);
// Configure the click listener.
map.addListener("click", (mapsMouseEvent) => {
// Close the current InfoWindow.
infoWindow.close();
// Create a new InfoWindow.
infoWindow = new google.maps.InfoWindow({
position: mapsMouseEvent.latLng,
});
infoWindow.setContent(
JSON.stringify(mapsMouseEvent.latLng.toJSON(), null, 2)
);
infoWindow.open(map);
});
}
/*
declare global {
interface Window {
initMap: () => void;
}
}*/
window.initMap = initMap;
//export {};
</script>
- 主要言語
- TypeScript
- スター
- 804
- フォーク
- 826
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
googlemaps/js-samples のほかの issue
-
Advanced Markers Animation Unused Variable対応中かも @treckstar が 832 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
googlemaps/js-samples#1794 ·
-
Driverオープン
難易度 5/5 1週間以上 初心者へのやさしさ 5/100
googlemaps/js-samples#1940 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
googlemaps/js-samples#1932 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 32/100
googlemaps/js-samples#1914 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
googlemaps/js-samples#1827 · コメント 1 件 ·
googlemaps/js-samples の issue をすべて見る
似ている issue
-
pending close triaging
難易度 1/5 1〜3時間 初心者へのやさしさ 74/100
anomalyco/opencode#63090 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude Cosmetic
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
ai-driven-qa bug claude Minor
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
linagora/twake-mail-admin#609 ·
メンテナーはふだん 1 日以内に返信