@nocobase/plugin-map 2.1.0-beta.46 → 2.1.0-beta.48
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/client/components/GoogleMaps/Map.d.ts +2 -1
- package/dist/client/googleMapsDrawingManager.d.ts +34 -0
- package/dist/client/index.js +1 -1
- package/dist/client/locale/index.d.ts +1 -1
- package/dist/client-v2/641.ef67f0b66b92ff21.js +10 -0
- package/dist/client-v2/fields/circle.d.ts +26 -0
- package/dist/client-v2/fields/index.d.ts +14 -0
- package/dist/client-v2/fields/lineString.d.ts +26 -0
- package/dist/client-v2/fields/point.d.ts +26 -0
- package/dist/client-v2/fields/polygon.d.ts +26 -0
- package/dist/client-v2/fields/schema.d.ts +27 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/client-v2/models/components/GoogleMaps/Map.d.ts +40 -2
- package/dist/externalVersion.js +7 -7
- package/dist/server/collections/mapConfiguration.js +1 -0
- package/package.json +2 -2
- package/dist/client-v2/641.a19dd82baa053f9e.js +0 -10
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
/// <reference types="google.maps" />
|
|
10
10
|
import React from 'react';
|
|
11
|
+
import { GoogleMapsDrawingManager } from '../../googleMapsDrawingManager';
|
|
11
12
|
import { MapEditorType } from '../../types';
|
|
12
13
|
export type OverlayOptions = google.maps.PolygonOptions & google.maps.MarkerOptions & google.maps.PolylineOptions;
|
|
13
14
|
export declare const getDrawingMode: (type: MapEditorType) => "polygon" | "circle" | "marker" | "polyline";
|
|
@@ -34,7 +35,7 @@ export interface GoogleMapForwardedRefProps {
|
|
|
34
35
|
createDraw: (onlyCreate?: boolean, additionalOptions?: OverlayOptions) => any;
|
|
35
36
|
map: google.maps.Map;
|
|
36
37
|
overlay: google.maps.MVCObject;
|
|
37
|
-
drawingManager:
|
|
38
|
+
drawingManager: GoogleMapsDrawingManager;
|
|
38
39
|
errMessage?: string;
|
|
39
40
|
}
|
|
40
41
|
export declare const GoogleMapsComponent: React.ForwardRefExoticComponent<GoogleMapsComponentProps & React.RefAttributes<GoogleMapForwardedRefProps>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
/// <reference types="google.maps" />
|
|
10
|
+
export type GoogleMapsDrawingMode = 'marker' | 'polyline' | 'polygon' | 'circle' | null;
|
|
11
|
+
export type GoogleMapsOverlay = google.maps.Marker | google.maps.Polyline | google.maps.Polygon | google.maps.Circle;
|
|
12
|
+
export interface GoogleMapsOverlayCompleteEvent {
|
|
13
|
+
type: Exclude<GoogleMapsDrawingMode, null>;
|
|
14
|
+
overlay: GoogleMapsOverlay;
|
|
15
|
+
}
|
|
16
|
+
export interface GoogleMapsDrawingManager {
|
|
17
|
+
setDrawingMode: (mode: GoogleMapsDrawingMode) => void;
|
|
18
|
+
addListener: (eventName: 'overlaycomplete', listener: (event: GoogleMapsOverlayCompleteEvent) => void) => google.maps.MapsEventListener;
|
|
19
|
+
handleClick: (event: google.maps.MapMouseEvent) => void;
|
|
20
|
+
handleOverlayClick: (event: google.maps.MapMouseEvent, fallbackPosition?: google.maps.LatLng) => void;
|
|
21
|
+
handleDoubleClick: () => void;
|
|
22
|
+
completeDrawing: () => void;
|
|
23
|
+
unbindAll: () => void;
|
|
24
|
+
}
|
|
25
|
+
interface GoogleMapsDrawingManagerOptions {
|
|
26
|
+
drawingMode: GoogleMapsDrawingMode;
|
|
27
|
+
markerOptions: google.maps.MarkerOptions;
|
|
28
|
+
polygonOptions: google.maps.PolygonOptions;
|
|
29
|
+
polylineOptions: google.maps.PolylineOptions;
|
|
30
|
+
circleOptions: google.maps.CircleOptions;
|
|
31
|
+
map: google.maps.Map;
|
|
32
|
+
}
|
|
33
|
+
export declare const createGoogleMapsDrawingManager: (options: GoogleMapsDrawingManagerOptions) => GoogleMapsDrawingManager;
|
|
34
|
+
export {};
|