@overmap-ai/core 1.0.65-form-submission-load-fix.0 → 1.0.65-mapbox.1

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.
@@ -409,70 +409,21 @@ const { setTokens, clearTokens, setLoggedIn } = authSlice.actions;
409
409
  const selectAccessToken = (state) => state.authReducer.accessToken;
410
410
  const selectIsLoggedIn = (state) => state.authReducer.isLoggedIn;
411
411
  const authReducer = authSlice.reducer;
412
- const coordinatesToLiteral = (coordinates) => {
413
- return { lng: coordinates[0], lat: coordinates[1] };
414
- };
415
- const literalToCoordinates = (literal) => {
416
- return [literal.lng, literal.lat];
417
- };
418
- const flipCoordinates = (coordinates) => {
419
- return [coordinates[1], coordinates[0]];
420
- };
421
- const flipBounds = (bounds) => {
422
- return [flipCoordinates(bounds[0]), flipCoordinates(bounds[1])];
423
- };
424
- function offsetPositionByMeters(originalPosition, latMeters, lngMeters) {
425
- const { lat, lng } = originalPosition;
426
- const earthRadius = 6378137;
427
- const metersPerDegree = 2 * Math.PI * earthRadius / 360;
428
- const newLng = lng + lngMeters / metersPerDegree / Math.cos(lat * Math.PI / 180);
429
- const newLat = lat - latMeters / metersPerDegree;
430
- return { lat: newLat, lng: newLng };
431
- }
432
- const createPointGeometry = (coordinates) => {
412
+ const createPointGeometry = (position) => {
433
413
  return {
434
414
  type: "Point",
435
- coordinates
415
+ coordinates: position
436
416
  };
437
417
  };
438
- const coordinatesAreEqual = (a, b) => {
439
- return a[0] === b[0] && a[1] === b[1];
440
- };
441
- const coordinatesToText = (coordinates, decimalPlaces) => {
442
- if (!coordinates)
443
- return "(No Location)";
444
- const { lat, lng } = coordinatesToLiteral(coordinates);
445
- if (decimalPlaces)
446
- return `${lat.toFixed(decimalPlaces)}, ${lng.toFixed(decimalPlaces)}`;
447
- return `${lat}, ${lng}`;
448
- };
449
- const coordinatesToUrlText = (coordinates) => {
450
- const { lat, lng } = coordinatesToLiteral(coordinates);
451
- return `${lat}%2C${lng}`;
452
- };
453
- const openCoordsInGoogleMaps = (coordinates) => {
454
- const url = `https://www.google.com/maps/search/?api=1&query=${coordinatesToUrlText(coordinates)}`;
455
- window.open(url);
456
- };
457
- const openDirectionsInGoogleMaps = (startingPoint, destination) => {
458
- const startingPointUrl = coordinatesToUrlText(startingPoint);
459
- const destinationUrl = coordinatesToUrlText(destination);
460
- const url = `https://www.google.com/maps/dir/?api=1&origin=${startingPointUrl}&destination=${destinationUrl}`;
461
- window.open(url);
462
- };
463
- const worldBounds = {
464
- type: "MultiPoint",
465
- coordinates: [
466
- [90, -180],
467
- [-90, 180]
468
- ]
469
- };
470
418
  const createMultiPointGeometry = (coordinates) => {
471
419
  return {
472
420
  type: "MultiPoint",
473
421
  coordinates
474
422
  };
475
423
  };
424
+ const coordinatesAreEqual = (a, b) => {
425
+ return a[0] === b[0] && a[1] === b[1];
426
+ };
476
427
  function classNames(...args) {
477
428
  const classes = [];
478
429
  for (const arg of args) {
@@ -650,9 +601,6 @@ function onlyUniqueHashes(value, index, self) {
650
601
  return v.file_sha1 === value.file_sha1;
651
602
  }) === index;
652
603
  }
653
- function boundsContainPoint(bounds, coordinates) {
654
- return bounds[0][0] > coordinates[0] && bounds[1][0] < coordinates[0] && bounds[0][1] > coordinates[1] && bounds[1][1] < coordinates[1];
655
- }
656
604
  const emailRegex = /^.+@.+\..+$/;
657
605
  const fullAssetMarkerSize = 45;
658
606
  const DEFAULT_ISSUE_STATUS = IssueStatus.BACKLOG;
@@ -7689,7 +7637,6 @@ export {
7689
7637
  authReducer,
7690
7638
  authSlice,
7691
7639
  blobToBase64,
7692
- boundsContainPoint,
7693
7640
  categoryReducer,
7694
7641
  categorySlice,
7695
7642
  classNames,
@@ -7697,9 +7644,6 @@ export {
7697
7644
  clearTokens,
7698
7645
  constructUploadedFilePayloads,
7699
7646
  coordinatesAreEqual,
7700
- coordinatesToLiteral,
7701
- coordinatesToText,
7702
- coordinatesToUrlText,
7703
7647
  createMultiPointGeometry,
7704
7648
  createOfflineAction,
7705
7649
  createPointGeometry,
@@ -7762,8 +7706,6 @@ export {
7762
7706
  fileReducer,
7763
7707
  fileSlice,
7764
7708
  fileToBlob,
7765
- flipBounds,
7766
- flipCoordinates,
7767
7709
  formReducer,
7768
7710
  formRevisionAttachmentReducer,
7769
7711
  formRevisionAttachmentSlice,
@@ -7830,18 +7772,14 @@ export {
7830
7772
  issueUpdateSlice,
7831
7773
  licenseReducer,
7832
7774
  licenseSlice,
7833
- literalToCoordinates,
7834
7775
  logOnlyOnce,
7835
7776
  markAsDeleted,
7836
7777
  markForDeletion,
7837
7778
  memoize,
7838
7779
  moveDocument,
7839
7780
  offline,
7840
- offsetPositionByMeters,
7841
7781
  onlyUniqueHashes,
7842
7782
  onlyUniqueOfflineIds,
7843
- openCoordsInGoogleMaps,
7844
- openDirectionsInGoogleMaps,
7845
7783
  organizationAccessReducer,
7846
7784
  organizationAccessSlice,
7847
7785
  organizationReducer,
@@ -8156,7 +8094,6 @@ export {
8156
8094
  versioningSlice,
8157
8095
  warningColor,
8158
8096
  workspaceReducer,
8159
- workspaceSlice,
8160
- worldBounds
8097
+ workspaceSlice
8161
8098
  };
8162
8099
  //# sourceMappingURL=overmap-core.js.map