datastake-daf 0.6.285 → 0.6.286

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.
@@ -21079,14 +21079,16 @@ const SimpleGlobe = _ref => {
21079
21079
  const lat = Number(project.latitude);
21080
21080
  console.log("\uD83D\uDCCD [SIMPLE GLOBE] Marker ".concat(index, " coordinates:"), {
21081
21081
  lng,
21082
- lat
21082
+ lat,
21083
+ project: project.name
21083
21084
  });
21084
21085
 
21085
21086
  // Validate coordinates
21086
21087
  if (isNaN(lng) || isNaN(lat) || lng < -180 || lng > 180 || lat < -90 || lat > 90) {
21087
21088
  console.error("\u274C [SIMPLE GLOBE] Invalid coordinates for project ".concat(index, ":"), {
21088
21089
  lng,
21089
- lat
21090
+ lat,
21091
+ project: project.name
21090
21092
  });
21091
21093
  return;
21092
21094
  }
@@ -21095,14 +21097,28 @@ const SimpleGlobe = _ref => {
21095
21097
  bounds.extend([lng, lat]);
21096
21098
  hasValidCoordinates = true;
21097
21099
 
21098
- // Add marker to map with proper coordinate order [lng, lat]
21099
- new mapboxgl.Marker(el).setLngLat([lng, lat]).setPopup(popup).addTo(map.current);
21100
+ // Create marker with explicit positioning and anchor
21101
+ const marker = new mapboxgl.Marker({
21102
+ element: el,
21103
+ anchor: 'center'
21104
+ }).setLngLat([lng, lat]).setPopup(popup).addTo(map.current);
21100
21105
 
21101
21106
  // Add click handler
21102
21107
  el.addEventListener('click', () => {
21103
21108
  console.log('📍 [SIMPLE GLOBE] Marker clicked:', project);
21104
21109
  onProjectClick(project);
21105
21110
  });
21111
+
21112
+ // Verify marker position after a short delay (like other Globe components)
21113
+ setTimeout(() => {
21114
+ const markerLngLat = marker.getLngLat();
21115
+ console.log("\uD83D\uDD0D [SIMPLE GLOBE] Marker ".concat(index, " position verification:"), {
21116
+ expected: [lng, lat],
21117
+ actual: [markerLngLat.lng, markerLngLat.lat],
21118
+ project: project.name,
21119
+ match: Math.abs(markerLngLat.lng - lng) < 0.0001 && Math.abs(markerLngLat.lat - lat) < 0.0001
21120
+ });
21121
+ }, 100);
21106
21122
  console.log("\u2705 [SIMPLE GLOBE] Marker ".concat(index, " added at:"), [lng, lat]);
21107
21123
  });
21108
21124
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.285",
3
+ "version": "0.6.286",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -221,11 +221,19 @@ const SimpleGlobe = ({
221
221
  const lng = Number(project.longitude);
222
222
  const lat = Number(project.latitude);
223
223
 
224
- console.log(`📍 [SIMPLE GLOBE] Marker ${index} coordinates:`, { lng, lat });
224
+ console.log(`📍 [SIMPLE GLOBE] Marker ${index} coordinates:`, {
225
+ lng,
226
+ lat,
227
+ project: project.name
228
+ });
225
229
 
226
230
  // Validate coordinates
227
231
  if (isNaN(lng) || isNaN(lat) || lng < -180 || lng > 180 || lat < -90 || lat > 90) {
228
- console.error(`❌ [SIMPLE GLOBE] Invalid coordinates for project ${index}:`, { lng, lat });
232
+ console.error(`❌ [SIMPLE GLOBE] Invalid coordinates for project ${index}:`, {
233
+ lng,
234
+ lat,
235
+ project: project.name
236
+ });
229
237
  return;
230
238
  }
231
239
 
@@ -233,8 +241,11 @@ const SimpleGlobe = ({
233
241
  bounds.extend([lng, lat]);
234
242
  hasValidCoordinates = true;
235
243
 
236
- // Add marker to map with proper coordinate order [lng, lat]
237
- const marker = new mapboxgl.Marker(el)
244
+ // Create marker with explicit positioning and anchor
245
+ const marker = new mapboxgl.Marker({
246
+ element: el,
247
+ anchor: 'center'
248
+ })
238
249
  .setLngLat([lng, lat])
239
250
  .setPopup(popup)
240
251
  .addTo(map.current);
@@ -244,6 +255,17 @@ const SimpleGlobe = ({
244
255
  console.log('📍 [SIMPLE GLOBE] Marker clicked:', project);
245
256
  onProjectClick(project);
246
257
  });
258
+
259
+ // Verify marker position after a short delay (like other Globe components)
260
+ setTimeout(() => {
261
+ const markerLngLat = marker.getLngLat();
262
+ console.log(`🔍 [SIMPLE GLOBE] Marker ${index} position verification:`, {
263
+ expected: [lng, lat],
264
+ actual: [markerLngLat.lng, markerLngLat.lat],
265
+ project: project.name,
266
+ match: Math.abs(markerLngLat.lng - lng) < 0.0001 && Math.abs(markerLngLat.lat - lat) < 0.0001
267
+ });
268
+ }, 100);
247
269
 
248
270
  console.log(`✅ [SIMPLE GLOBE] Marker ${index} added at:`, [lng, lat]);
249
271
  });