datastake-daf 0.6.283 โ 0.6.284
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +144 -129
- package/dist/style/datastake/mapbox-gl.css +330 -0
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Globe/CSSInJSGlobe.jsx +415 -0
- package/src/@daf/core/components/Dashboard/Globe/IsolatedGlobe.jsx +345 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.jsx +17 -111
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.stories.js +14 -13
- package/src/index.js +1 -1
- package/src/styles/datastake/mapbox-gl.css +330 -0
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeStraatosDebug.jsx +0 -322
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeStraatosDebug.standalone.jsx +0 -349
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeTestDebug.jsx +0 -150
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeTestDebug.standalone.jsx +0 -183
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
/* Isolated Mapbox GL CSS - Scoped to prevent Leaflet conflicts */
|
|
2
|
+
|
|
3
|
+
/* Mapbox GL Core Styles - Scoped with .mapbox-gl-scope */
|
|
4
|
+
.mapbox-gl-scope .mapboxgl-map {
|
|
5
|
+
font: 12px/20px Helvetica Neue, Arial, Helvetica, sans-serif;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
position: relative;
|
|
8
|
+
-webkit-tap-highlight-color: rgb(0 0 0/0);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mapbox-gl-scope .mapboxgl-canvas {
|
|
12
|
+
left: 0;
|
|
13
|
+
position: absolute;
|
|
14
|
+
top: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mapbox-gl-scope .mapboxgl-map:-webkit-full-screen {
|
|
18
|
+
height: 100%;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.mapbox-gl-scope .mapboxgl-canary {
|
|
23
|
+
background-color: salmon;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive,
|
|
27
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button.mapboxgl-ctrl-compass {
|
|
28
|
+
cursor: grab;
|
|
29
|
+
-webkit-user-select: none;
|
|
30
|
+
user-select: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive.mapboxgl-track-pointer {
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-interactive:active,
|
|
38
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button.mapboxgl-ctrl-compass:active {
|
|
39
|
+
cursor: grabbing;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,
|
|
43
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas {
|
|
44
|
+
touch-action: pan-x pan-y;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-drag-pan,
|
|
48
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas {
|
|
49
|
+
touch-action: pinch-zoom;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,
|
|
53
|
+
.mapbox-gl-scope .mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas {
|
|
54
|
+
touch-action: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Control positioning */
|
|
58
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom,
|
|
59
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left,
|
|
60
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right,
|
|
61
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left,
|
|
62
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right,
|
|
63
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top,
|
|
64
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left,
|
|
65
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right {
|
|
66
|
+
pointer-events: none;
|
|
67
|
+
position: absolute;
|
|
68
|
+
z-index: 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left {
|
|
72
|
+
left: 0;
|
|
73
|
+
top: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top {
|
|
77
|
+
left: 50%;
|
|
78
|
+
top: 0;
|
|
79
|
+
transform: translateX(-50%);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right {
|
|
83
|
+
right: 0;
|
|
84
|
+
top: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right {
|
|
88
|
+
right: 0;
|
|
89
|
+
top: 50%;
|
|
90
|
+
transform: translateY(-50%);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right {
|
|
94
|
+
bottom: 0;
|
|
95
|
+
right: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom {
|
|
99
|
+
bottom: 0;
|
|
100
|
+
left: 50%;
|
|
101
|
+
transform: translateX(-50%);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left {
|
|
105
|
+
bottom: 0;
|
|
106
|
+
left: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left {
|
|
110
|
+
left: 0;
|
|
111
|
+
top: 50%;
|
|
112
|
+
transform: translateY(-50%);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.mapbox-gl-scope .mapboxgl-ctrl {
|
|
116
|
+
clear: both;
|
|
117
|
+
pointer-events: auto;
|
|
118
|
+
transform: translate(0);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-left .mapboxgl-ctrl {
|
|
122
|
+
float: left;
|
|
123
|
+
margin: 10px 0 0 10px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top .mapboxgl-ctrl {
|
|
127
|
+
float: left;
|
|
128
|
+
margin: 10px 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mapbox-gl-scope .mapboxgl-ctrl-top-right .mapboxgl-ctrl {
|
|
132
|
+
float: right;
|
|
133
|
+
margin: 10px 10px 0 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-right .mapboxgl-ctrl,
|
|
137
|
+
.mapbox-gl-scope .mapboxgl-ctrl-right .mapboxgl-ctrl {
|
|
138
|
+
float: right;
|
|
139
|
+
margin: 0 10px 10px 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom .mapboxgl-ctrl {
|
|
143
|
+
float: left;
|
|
144
|
+
margin: 10px 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mapbox-gl-scope .mapboxgl-ctrl-bottom-left .mapboxgl-ctrl,
|
|
148
|
+
.mapbox-gl-scope .mapboxgl-ctrl-left .mapboxgl-ctrl {
|
|
149
|
+
float: left;
|
|
150
|
+
margin: 0 0 10px 10px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Control group styling */
|
|
154
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group {
|
|
155
|
+
background: #fff;
|
|
156
|
+
border-radius: 4px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group:not(:empty) {
|
|
160
|
+
box-shadow: 0 0 0 2px #0000001a;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button {
|
|
164
|
+
background-color: initial;
|
|
165
|
+
border: 0;
|
|
166
|
+
box-sizing: border-box;
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
display: block;
|
|
169
|
+
height: 29px;
|
|
170
|
+
outline: none;
|
|
171
|
+
overflow: hidden;
|
|
172
|
+
padding: 0;
|
|
173
|
+
width: 29px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button+button {
|
|
177
|
+
border-top: 1px solid #ddd;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.mapbox-gl-scope .mapboxgl-ctrl button .mapboxgl-ctrl-icon {
|
|
181
|
+
background-position: 50%;
|
|
182
|
+
background-repeat: no-repeat;
|
|
183
|
+
display: block;
|
|
184
|
+
height: 100%;
|
|
185
|
+
width: 100%;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attrib-button:focus,
|
|
189
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:focus {
|
|
190
|
+
box-shadow: 0 0 2px 2px #0096ff;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:disabled {
|
|
194
|
+
cursor: not-allowed;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:disabled .mapboxgl-ctrl-icon {
|
|
198
|
+
opacity: .25;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:first-child {
|
|
202
|
+
border-radius: 4px 4px 0 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:last-child {
|
|
206
|
+
border-radius: 0 0 4px 4px;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.mapbox-gl-scope .mapboxgl-ctrl-group button:only-child {
|
|
210
|
+
border-radius: inherit;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.mapbox-gl-scope .mapboxgl-ctrl button:not(:disabled):hover {
|
|
214
|
+
background-color: #0000000d;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Marker styles */
|
|
218
|
+
.mapbox-gl-scope .mapboxgl-marker {
|
|
219
|
+
position: absolute;
|
|
220
|
+
z-index: 1;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.mapbox-gl-scope .mapboxgl-marker svg {
|
|
224
|
+
display: block;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/* Popup styles */
|
|
228
|
+
.mapbox-gl-scope .mapboxgl-popup {
|
|
229
|
+
position: absolute;
|
|
230
|
+
text-align: center;
|
|
231
|
+
margin-bottom: 20px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mapbox-gl-scope .mapboxgl-popup-content-wrapper {
|
|
235
|
+
padding: 1px;
|
|
236
|
+
text-align: left;
|
|
237
|
+
border-radius: 12px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.mapbox-gl-scope .mapboxgl-popup-content {
|
|
241
|
+
margin: 13px 24px 13px 20px;
|
|
242
|
+
line-height: 1.3;
|
|
243
|
+
font-size: 13px;
|
|
244
|
+
min-height: 1px;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.mapbox-gl-scope .mapboxgl-popup-content p {
|
|
248
|
+
margin: 17px 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.mapbox-gl-scope .mapboxgl-popup-tip-container {
|
|
252
|
+
width: 40px;
|
|
253
|
+
height: 20px;
|
|
254
|
+
position: absolute;
|
|
255
|
+
left: 50%;
|
|
256
|
+
margin-top: -1px;
|
|
257
|
+
margin-left: -20px;
|
|
258
|
+
overflow: hidden;
|
|
259
|
+
pointer-events: none;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.mapbox-gl-scope .mapboxgl-popup-tip {
|
|
263
|
+
width: 17px;
|
|
264
|
+
height: 17px;
|
|
265
|
+
padding: 1px;
|
|
266
|
+
margin: -10px auto 0;
|
|
267
|
+
pointer-events: auto;
|
|
268
|
+
-webkit-transform: rotate(45deg);
|
|
269
|
+
-moz-transform: rotate(45deg);
|
|
270
|
+
-ms-transform: rotate(45deg);
|
|
271
|
+
transform: rotate(45deg);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.mapbox-gl-scope .mapboxgl-popup-content-wrapper,
|
|
275
|
+
.mapbox-gl-scope .mapboxgl-popup-tip {
|
|
276
|
+
background: white;
|
|
277
|
+
color: #333;
|
|
278
|
+
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button {
|
|
282
|
+
position: absolute;
|
|
283
|
+
top: 0;
|
|
284
|
+
right: 0;
|
|
285
|
+
border: none;
|
|
286
|
+
text-align: center;
|
|
287
|
+
width: 24px;
|
|
288
|
+
height: 24px;
|
|
289
|
+
font: 16px/24px Tahoma, Verdana, sans-serif;
|
|
290
|
+
color: #757575;
|
|
291
|
+
text-decoration: none;
|
|
292
|
+
background: transparent;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button:hover,
|
|
296
|
+
.mapbox-gl-scope .mapboxgl-popup-close-button:focus {
|
|
297
|
+
color: #585858;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Attribution */
|
|
301
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution {
|
|
302
|
+
background: #fff;
|
|
303
|
+
background: rgba(255, 255, 255, 0.8);
|
|
304
|
+
margin: 0;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution,
|
|
308
|
+
.mapbox-gl-scope .mapboxgl-ctrl-scale-line {
|
|
309
|
+
padding: 0 5px;
|
|
310
|
+
color: #333;
|
|
311
|
+
line-height: 1.4;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a {
|
|
315
|
+
text-decoration: none;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a:hover,
|
|
319
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution a:focus {
|
|
320
|
+
text-decoration: underline;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* Hide attribution by default */
|
|
324
|
+
.mapbox-gl-scope .mapboxgl-ctrl-attribution {
|
|
325
|
+
display: none !important;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.mapbox-gl-scope .mapboxgl-ctrl-logo {
|
|
329
|
+
display: none !important;
|
|
330
|
+
}
|
|
@@ -1,322 +0,0 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import mapboxgl from 'mapbox-gl';
|
|
3
|
-
import 'mapbox-gl/dist/mapbox-gl.css';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* SimpleGlobeStraatosDebug - Aggressive CSS isolation for straatos environment
|
|
7
|
-
* This component is specifically designed to work in straatos where Leaflet CSS
|
|
8
|
-
* is globally loaded and interferes with Mapbox markers.
|
|
9
|
-
*
|
|
10
|
-
* @param {Array} projects - Array of project objects with location data
|
|
11
|
-
* @param {string} projects[].name - Project name
|
|
12
|
-
* @param {number} projects[].latitude - Latitude coordinate
|
|
13
|
-
* @param {number} projects[].longitude - Longitude coordinate
|
|
14
|
-
* @param {string} projects[].projectDescription - Project description (optional)
|
|
15
|
-
*/
|
|
16
|
-
const SimpleGlobeStraatosDebug = ({ projects = [] }) => {
|
|
17
|
-
const mapContainer = useRef(null);
|
|
18
|
-
const map = useRef(null);
|
|
19
|
-
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
if (map.current) return;
|
|
22
|
-
|
|
23
|
-
console.log('๐งช [STRAATOS DEBUG] Creating map with aggressive CSS isolation...');
|
|
24
|
-
|
|
25
|
-
// Set Mapbox access token
|
|
26
|
-
mapboxgl.accessToken = 'pk.eyJ1IjoicmVkaXM5OTkiLCJhIjoiY2x4YWV5MzA5MmtuZzJpcXM5Y201Z2E2YiJ9.m5bwPg-Tj4Akesl1yQUa3w';
|
|
27
|
-
|
|
28
|
-
// Create minimal map
|
|
29
|
-
map.current = new mapboxgl.Map({
|
|
30
|
-
container: mapContainer.current,
|
|
31
|
-
style: 'mapbox://styles/mapbox/satellite-v9',
|
|
32
|
-
center: [0, 0],
|
|
33
|
-
zoom: 2,
|
|
34
|
-
projection: 'globe'
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
// Add markers when map loads
|
|
38
|
-
map.current.on('load', () => {
|
|
39
|
-
console.log('๐งช [STRAATOS DEBUG] Map loaded, adding test markers...');
|
|
40
|
-
|
|
41
|
-
// AGGRESSIVE CSS ISOLATION - Override ALL Leaflet CSS
|
|
42
|
-
const aggressiveStyle = document.createElement('style');
|
|
43
|
-
aggressiveStyle.textContent = `
|
|
44
|
-
/* AGGRESSIVE ISOLATION: Override ALL Leaflet CSS that affects Mapbox */
|
|
45
|
-
.straatos-globe-debug-container {
|
|
46
|
-
position: relative !important;
|
|
47
|
-
width: 100% !important;
|
|
48
|
-
height: 100% !important;
|
|
49
|
-
overflow: hidden !important;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.straatos-globe-debug-container .mapboxgl-canvas-container {
|
|
53
|
-
position: relative !important;
|
|
54
|
-
left: 0 !important;
|
|
55
|
-
top: 0 !important;
|
|
56
|
-
transform: none !important;
|
|
57
|
-
width: 100% !important;
|
|
58
|
-
height: 100% !important;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.straatos-globe-debug-container .mapboxgl-canvas-container canvas {
|
|
62
|
-
position: relative !important;
|
|
63
|
-
left: 0 !important;
|
|
64
|
-
top: 0 !important;
|
|
65
|
-
transform: none !important;
|
|
66
|
-
width: 100% !important;
|
|
67
|
-
height: 100% !important;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/* Override Leaflet marker positioning */
|
|
71
|
-
.straatos-globe-debug-container .mapboxgl-marker {
|
|
72
|
-
position: absolute !important;
|
|
73
|
-
left: auto !important;
|
|
74
|
-
top: auto !important;
|
|
75
|
-
transform: none !important;
|
|
76
|
-
pointer-events: auto !important;
|
|
77
|
-
z-index: 1000 !important;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Override Leaflet div icon styles */
|
|
81
|
-
.straatos-globe-debug-container .mapboxgl-marker .straatos-debug-marker {
|
|
82
|
-
position: relative !important;
|
|
83
|
-
left: auto !important;
|
|
84
|
-
top: auto !important;
|
|
85
|
-
transform: none !important;
|
|
86
|
-
width: 20px !important;
|
|
87
|
-
height: 20px !important;
|
|
88
|
-
background: #FF0000 !important;
|
|
89
|
-
border: 2px solid white !important;
|
|
90
|
-
border-radius: 50% !important;
|
|
91
|
-
pointer-events: auto !important;
|
|
92
|
-
cursor: pointer !important;
|
|
93
|
-
box-shadow: 0px 3px 6px rgba(0,0,0,0.3) !important;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* Override Leaflet pane positioning */
|
|
97
|
-
.straatos-globe-debug-container .mapboxgl-marker-pane {
|
|
98
|
-
position: absolute !important;
|
|
99
|
-
left: 0 !important;
|
|
100
|
-
top: 0 !important;
|
|
101
|
-
transform: none !important;
|
|
102
|
-
z-index: 600 !important;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/* Override Leaflet tile container */
|
|
106
|
-
.straatos-globe-debug-container .mapboxgl-tile-container {
|
|
107
|
-
position: absolute !important;
|
|
108
|
-
left: 0 !important;
|
|
109
|
-
top: 0 !important;
|
|
110
|
-
transform: none !important;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* Override Leaflet zoom animations */
|
|
114
|
-
.straatos-globe-debug-container .mapboxgl-zoom-animated {
|
|
115
|
-
transform-origin: 0 0 !important;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* Override Leaflet interactive styles */
|
|
119
|
-
.straatos-globe-debug-container .mapboxgl-marker.leaflet-interactive {
|
|
120
|
-
cursor: pointer !important;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Override Leaflet popup positioning */
|
|
124
|
-
.straatos-globe-debug-container .mapboxgl-popup {
|
|
125
|
-
position: absolute !important;
|
|
126
|
-
left: auto !important;
|
|
127
|
-
top: auto !important;
|
|
128
|
-
transform: none !important;
|
|
129
|
-
z-index: 700 !important;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/* Override any Leaflet control positioning */
|
|
133
|
-
.straatos-globe-debug-container .mapboxgl-ctrl-group {
|
|
134
|
-
position: absolute !important;
|
|
135
|
-
z-index: 1000 !important;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/* Override Leaflet attribution */
|
|
139
|
-
.straatos-globe-debug-container .mapboxgl-ctrl-attrib {
|
|
140
|
-
position: absolute !important;
|
|
141
|
-
bottom: 0 !important;
|
|
142
|
-
right: 0 !important;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* Override any Leaflet tooltip positioning */
|
|
146
|
-
.straatos-globe-debug-container .mapboxgl-popup-content {
|
|
147
|
-
position: relative !important;
|
|
148
|
-
left: auto !important;
|
|
149
|
-
top: auto !important;
|
|
150
|
-
transform: none !important;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
/* Override Leaflet marker shadow */
|
|
154
|
-
.straatos-globe-debug-container .mapboxgl-marker .mapboxgl-marker-shadow {
|
|
155
|
-
display: none !important;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/* Override any Leaflet image layer positioning */
|
|
159
|
-
.straatos-globe-debug-container .mapboxgl-image-layer {
|
|
160
|
-
position: absolute !important;
|
|
161
|
-
left: 0 !important;
|
|
162
|
-
top: 0 !important;
|
|
163
|
-
transform: none !important;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/* Override Leaflet overlay pane */
|
|
167
|
-
.straatos-globe-debug-container .mapboxgl-overlay-pane {
|
|
168
|
-
position: absolute !important;
|
|
169
|
-
left: 0 !important;
|
|
170
|
-
top: 0 !important;
|
|
171
|
-
transform: none !important;
|
|
172
|
-
z-index: 400 !important;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Override Leaflet shadow pane */
|
|
176
|
-
.straatos-globe-debug-container .mapboxgl-shadow-pane {
|
|
177
|
-
position: absolute !important;
|
|
178
|
-
left: 0 !important;
|
|
179
|
-
top: 0 !important;
|
|
180
|
-
transform: none !important;
|
|
181
|
-
z-index: 500 !important;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/* Override Leaflet tooltip pane */
|
|
185
|
-
.straatos-globe-debug-container .mapboxgl-tooltip-pane {
|
|
186
|
-
position: absolute !important;
|
|
187
|
-
left: 0 !important;
|
|
188
|
-
top: 0 !important;
|
|
189
|
-
transform: none !important;
|
|
190
|
-
z-index: 650 !important;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/* Override Leaflet popup pane */
|
|
194
|
-
.straatos-globe-debug-container .mapboxgl-popup-pane {
|
|
195
|
-
position: absolute !important;
|
|
196
|
-
left: 0 !important;
|
|
197
|
-
top: 0 !important;
|
|
198
|
-
transform: none !important;
|
|
199
|
-
z-index: 700 !important;
|
|
200
|
-
}
|
|
201
|
-
`;
|
|
202
|
-
document.head.appendChild(aggressiveStyle);
|
|
203
|
-
|
|
204
|
-
projects.forEach((project, index) => {
|
|
205
|
-
console.log(`๐งช [STRAATOS DEBUG] Processing project ${index}:`, project);
|
|
206
|
-
|
|
207
|
-
// Create simple marker with unique class
|
|
208
|
-
const el = document.createElement('div');
|
|
209
|
-
el.className = 'straatos-debug-marker';
|
|
210
|
-
el.style.width = '20px';
|
|
211
|
-
el.style.height = '20px';
|
|
212
|
-
el.style.backgroundColor = '#FF0000';
|
|
213
|
-
el.style.borderRadius = '50%';
|
|
214
|
-
el.style.border = '2px solid white';
|
|
215
|
-
el.style.cursor = 'pointer';
|
|
216
|
-
el.style.boxShadow = '0px 3px 6px rgba(0,0,0,0.3)';
|
|
217
|
-
|
|
218
|
-
// Get coordinates
|
|
219
|
-
const lng = Number(project.longitude);
|
|
220
|
-
const lat = Number(project.latitude);
|
|
221
|
-
|
|
222
|
-
console.log(`๐งช [STRAATOS DEBUG] Coordinates for ${project.name}:`, {
|
|
223
|
-
original: { longitude: project.longitude, latitude: project.latitude },
|
|
224
|
-
processed: { lng, lat },
|
|
225
|
-
valid: !isNaN(lng) && !isNaN(lat) && lng >= -180 && lng <= 180 && lat >= -90 && lat <= 90
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
if (isNaN(lng) || isNaN(lat) || lng < -180 || lng > 180 || lat < -90 || lat > 90) {
|
|
229
|
-
console.error(`โ [STRAATOS DEBUG] Invalid coordinates for ${project.name}:`, { lng, lat });
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
// Create popup
|
|
234
|
-
const popup = new mapboxgl.Popup({ offset: 25 })
|
|
235
|
-
.setHTML(`
|
|
236
|
-
<div style="padding: 8px;">
|
|
237
|
-
<h3 style="margin: 0 0 8px 0; font-size: 14px;">${project.name}</h3>
|
|
238
|
-
<p style="margin: 0; font-size: 12px; color: #666;">
|
|
239
|
-
Lat: ${lat.toFixed(4)}, Lng: ${lng.toFixed(4)}
|
|
240
|
-
</p>
|
|
241
|
-
<p style="margin: 4px 0 0 0; font-size: 12px;">
|
|
242
|
-
${project.projectDescription || 'No description'}
|
|
243
|
-
</p>
|
|
244
|
-
</div>
|
|
245
|
-
`);
|
|
246
|
-
|
|
247
|
-
// Add marker with explicit positioning
|
|
248
|
-
const marker = new mapboxgl.Marker({
|
|
249
|
-
element: el,
|
|
250
|
-
anchor: 'center'
|
|
251
|
-
})
|
|
252
|
-
.setLngLat([lng, lat])
|
|
253
|
-
.setPopup(popup)
|
|
254
|
-
.addTo(map.current);
|
|
255
|
-
|
|
256
|
-
// Verify position after a delay
|
|
257
|
-
setTimeout(() => {
|
|
258
|
-
const markerLngLat = marker.getLngLat();
|
|
259
|
-
const positionMatch = Math.abs(markerLngLat.lng - lng) < 0.0001 && Math.abs(markerLngLat.lat - lat) < 0.0001;
|
|
260
|
-
|
|
261
|
-
console.log(`๐ [STRAATOS DEBUG] Position verification for ${project.name}:`, {
|
|
262
|
-
expected: [lng, lat],
|
|
263
|
-
actual: [markerLngLat.lng, markerLngLat.lat],
|
|
264
|
-
match: positionMatch,
|
|
265
|
-
difference: {
|
|
266
|
-
lng: Math.abs(markerLngLat.lng - lng),
|
|
267
|
-
lat: Math.abs(markerLngLat.lat - lat)
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
if (!positionMatch) {
|
|
272
|
-
console.error(`โ [STRAATOS DEBUG] Position mismatch for ${project.name}!`);
|
|
273
|
-
}
|
|
274
|
-
}, 200);
|
|
275
|
-
|
|
276
|
-
console.log(`โ
[STRAATOS DEBUG] Marker added for ${project.name} at:`, [lng, lat]);
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
return () => {
|
|
281
|
-
if (map.current) {
|
|
282
|
-
map.current.remove();
|
|
283
|
-
map.current = null;
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
}, [projects]);
|
|
287
|
-
|
|
288
|
-
return (
|
|
289
|
-
<div className="straatos-globe-debug-container" style={{
|
|
290
|
-
width: '100%',
|
|
291
|
-
height: '600px',
|
|
292
|
-
border: '2px solid #ccc',
|
|
293
|
-
position: 'relative'
|
|
294
|
-
}}>
|
|
295
|
-
<div
|
|
296
|
-
ref={mapContainer}
|
|
297
|
-
style={{
|
|
298
|
-
width: '100%',
|
|
299
|
-
height: '100%',
|
|
300
|
-
position: 'relative'
|
|
301
|
-
}}
|
|
302
|
-
/>
|
|
303
|
-
<div style={{
|
|
304
|
-
position: 'absolute',
|
|
305
|
-
top: '10px',
|
|
306
|
-
left: '10px',
|
|
307
|
-
background: 'rgba(255,255,255,0.9)',
|
|
308
|
-
padding: '8px',
|
|
309
|
-
borderRadius: '4px',
|
|
310
|
-
fontSize: '12px',
|
|
311
|
-
zIndex: 1000
|
|
312
|
-
}}>
|
|
313
|
-
<strong>Straatos Debug Map</strong><br/>
|
|
314
|
-
Projects: {projects.length}<br/>
|
|
315
|
-
Aggressive CSS isolation applied<br/>
|
|
316
|
-
Check console for position verification
|
|
317
|
-
</div>
|
|
318
|
-
</div>
|
|
319
|
-
);
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
export default SimpleGlobeStraatosDebug;
|