Widget:Custom map
提供:メタファー リファンタジオ 攻略Wiki
<script> // Initialize required global objects window.GTP8 = {
initializeMap: null, map: null, drawnItems: null, drawControl: null, editMode: false, api: {}, popups: {}, icons: {}
};
// Initialize API base URL (function() {
const currentUrl = new URL(window.location.href); const baseUrl = currentUrl.origin + currentUrl.pathname.split('/').slice(0, -1).join('/'); window.API_BASE_URL = baseUrl;
})();
// Map configuration must be defined before loading other scripts window.mapConfig = {
imageUrl: , imageWidth: , imageHeight: , minZoom: , maxZoom: , geoJsonPage: , iconUrls: { icon1: , icon2: , icon3: , icon4: , icon5: , icon6: }, filters: { filter1: , filter2: , filter3: , filter4: , filter5: , filter6: }
};
// Debug verification console.log('Initial setup complete:', {
GTP8: !!window.GTP8, mapConfig: !!window.mapConfig, API_BASE_URL: !!window.API_BASE_URL
}); </script>
<script src="https://dq.h1g.jp/leaflet/gtp8-core.js"></script> <script src="https://dq.h1g.jp/leaflet/gtp8-icons.js"></script> <script src="https://dq.h1g.jp/leaflet/gtp8-popups.js"></script> <script src="https://dq.h1g.jp/leaflet/gtp8-api.js"></script> <script src="https://dq.h1g.jp/leaflet/gtp8-init.js"></script>