Maps JavaScript API 僅適用於標準 ECMAScript 和 W3C DOM 環境。這表示修改或覆寫瀏覽器所提供內建類別和物件的行為,可能會導致 Maps JavaScript API 無法運作。其他程式庫有時可能會變更瀏覽器行為,與 Maps JavaScript API 發生衝突,導致瀏覽器不再是標準 ECMAScript 環境。Maps JavaScript API 與這些程式庫不相容。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-05-08 (世界標準時間)。"],[[["Avoid using JavaScript libraries like Prototype, MooTools (older versions), and DateJS (older versions) as they can conflict with the Maps JavaScript API due to their non-standard overrides of built-in browser functionalities."],["Prevent CSS conflicts by following specificity rules and avoiding direct references to Maps JavaScript API class names or internal DOM elements; instead, use custom CSS classes as containers for your map."],["If using CSS frameworks or components that cause conflicts, consider a box-sizing override: set the `\u003chtml\u003e` element to `border-box`, use `box-sizing: inherit` for other elements, and reset `box-sizing` to `initial` for your custom map container."],["Common CSS elements like `img`, `button`, and `a` can be overwritten by page styles, potentially causing distorted or hidden map components; adjust styles accordingly, for example, setting `max-width: none` for map images to avoid issues."]]],["The Maps JavaScript API may conflict with other libraries that modify browser behavior, notably Prototype, older MooTools, and older DateJS versions. CSS conflicts arise when page styles, frameworks, or JavaScript components override map styles. To prevent issues, use CSS specificity rules, avoid referencing internal API class names, and update elements like `img` to `max-width: none`. A workaround for `box-sizing` conflicts is to set `\u003chtml\u003e` to `border-box`, other elements to `inherit`, and map containers to `initial`.\n"]]