google-maps-react-markers 2.0.12 → 2.0.13
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/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/index.d.cts +0 -295
- package/dist/index.d.ts +0 -295
package/dist/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var react=require('react'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime');var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?undefined:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:false,shouldPreventLoad:false}){let[l,s]=react.useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return react.useEffect(()=>{var p,
|
|
1
|
+
'use strict';var react=require('react'),reactDom=require('react-dom'),jsxRuntime=require('react/jsx-runtime');var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?undefined:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:false,shouldPreventLoad:false}){let[l,s]=react.useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return react.useEffect(()=>{var p,o,g;if(r){s(r);return}if(!(t!=null&&t.src)||a!=null&&a.shouldPreventLoad)return;let i=S[t.src];if(i==="ready"||i==="error"){s(i);return}let u=W(t.src),e=u.node;if(e){let c=u.status??i??"loading";switch(c){case "loading":case "ready":(o=t.callbacks)!=null&&o.onLoadCallback&&t.callbacks.onLoadCallback();break;case "error":(g=t.callbacks)!=null&&g.onErrorCallback&&t.callbacks.onErrorCallback();break;}s(c);}else {e=document.createElement("script"),e.src=t.src,e.async=true,e.setAttribute("data-status","loading"),t.attributes&&Object.entries(t.attributes).length>0&&Object.entries(t.attributes).map(([m,d])=>e==null?undefined:e.setAttribute(m,d)),t.elementIdToAppend&&document.getElementById(t.elementIdToAppend)?(p=document.getElementById(t.elementIdToAppend))==null||p.appendChild(e):document.body.appendChild(e);let c=m=>{let d=m.type==="load"?"ready":"error";e==null||e.setAttribute("data-status",d);};e.addEventListener("load",c),e.addEventListener("error",c);}let n=c=>{var d,b;let m=c.type==="load"?"ready":"error";c.type==="load"?(d=t.callbacks)!=null&&d.onLoadCallback&&t.callbacks.onLoadCallback():(b=t.callbacks)!=null&&b.onErrorCallback&&t.callbacks.onErrorCallback(),s(m),S[t.src]=m;};return e.addEventListener("load",n),e.addEventListener("error",n),()=>{e&&(e.removeEventListener("load",n),e.removeEventListener("error",n)),e&&(a!=null&&a.removeOnUnmount)&&e.remove();}},[t,r,l]),l}var H=Y;var O=({apiKey:t,libraries:r=[],loadScriptExternally:a=false,status:l="idle",externalApiParams:s,callback:i})=>{var n;typeof window<"u"&&(window.googleMapsCallback=i);let u=(n=new URLSearchParams(s))==null?undefined:n.toString(),e=t?{src:`https://maps.googleapis.com/maps/api/js?key=${t}&callback=googleMapsCallback&libraries=${r==null?undefined:r.join(",")}${u?`&${u}`:""}`,attributes:{id:"googleMapsApi"}}:{src:`https://maps.googleapis.com/maps/api/js?callback=googleMapsCallback&libraries=${r==null?undefined:r.join(",")}`,attributes:{id:"googleMapsApi"}};return H(e,a?l:undefined)};var T=(t,r,a=1e-6)=>{if(t.length&&r.length){for(let l=0;l!==t.length;++l)if(Math.abs(t[l]-r[l])>a)return false;return true}return false};var _=(t,r)=>{let a=react.useRef(),l=a.current,s=r(l,t);return react.useEffect(()=>{s||(a.current=t);}),s?l:t},x=_;var k=t=>{try{return {lat:t==null?void 0:t.lat(),lng:t==null?void 0:t.lng()}}catch{return t}},K=({container:t,pane:r,position:a,maps:l,drag:s})=>{class i extends google.maps.OverlayView{onAdd=()=>{var p;let e=this;s!=null&&s.draggable&&(this.get("map").getDiv().addEventListener("mouseleave",()=>{google.maps.event.trigger(this.container,"mouseup");}),this.container.addEventListener("mousedown",o=>{var g,c;this.container.style.cursor="grabbing",(g=e.map)==null||g.set("draggable",false),e.set("origin",o),s.onDragStart(o,{latLng:k(this.position)}),e.moveHandler=(c=this.get("map"))==null?undefined:c.getDiv().addEventListener("mousemove",m=>{var M,f;let d=e.get("origin");if(!d)return;let b=d.clientX-m.clientX,y=d.clientY-m.clientY,v=(M=e.getProjection())==null?undefined:M.fromLatLngToDivPixel(e.position);if(!v)return;let E=(f=e.getProjection())==null?undefined:f.fromDivPixelToLatLng(new l.Point(v.x-b,v.y-y));e.set("position",E),e.set("origin",m),e.draw(),s.onDrag(m,{latLng:k(E)});});}),this.container.addEventListener("mouseup",o=>{var g;(g=e.map)==null||g.set("draggable",true),this.container.style.cursor="default",e.moveHandler&&(google.maps.event.removeListener(e.moveHandler),e.moveHandler=null),e.set("position",e.position),e.set("origin",undefined),e.draw(),s.onDragEnd(o,{latLng:k(e.position)});}));let n=(p=this.getPanes())==null?undefined:p[this.pane];n==null||n.classList.add("google-map-markers-overlay"),n==null||n.appendChild(this.container);};draw=()=>{if(!this.container)return;let e=this.getProjection(),n=e==null?undefined:e.fromLatLngToDivPixel(this.position),p={x:this.container.offsetWidth/2,y:this.container.offsetHeight/2};n&&(this.container.style.transform=`translate(${n.x-p.x}px, ${n.y-p.y}px)`);};onRemove=()=>{this.container.parentNode!==null&&(google.maps.event.clearInstanceListeners(this.container),this.container.parentNode.removeChild(this.container));};container;pane;position;map=this.getMap();moveHandler;constructor(e,n,p){super(),this.container=e,this.pane=n,this.position=p,this.moveHandler=null;}}return new i(t,r,a)},U=K;var ee=({pane:t="floatPane",position:r,map:a,maps:l,zIndex:s=0,children:i,drag:u})=>{let e=react.useMemo(()=>{let o=document.createElement("div");return o.style.position="absolute",o},[]),n=react.useMemo(()=>U({container:e,pane:t,position:r,maps:l,drag:u}),[e,u,l,t,r]),p=x(i==null?undefined:i.props,(o,g)=>o&&o.lat===g.lat&&o.lng===g.lng&&o.draggable===g.draggable);return react.useEffect(()=>!n.map&&a?(n==null||n.setMap(a),()=>{n==null||n.setMap(null);}):()=>{},[a,p]),react.useEffect(()=>{e.style.zIndex=`${s}`;},[s,e]),reactDom.createPortal(i,e)},R=ee;var P=()=>{},ae=({children:t,map:r,maps:a})=>{let l=react.useMemo(()=>!r||!a?[]:react.Children.map(t,s=>{if(react.isValidElement(s)){let i={lat:s.props.lat,lng:s.props.lng},{zIndex:u,draggable:e=false,onDragStart:n=P,onDrag:p=P,onDragEnd:o=P}=s.props||{};return s=react.cloneElement(s,{...s.props,onDragStart:undefined,onDrag:undefined,onDragEnd:undefined}),jsxRuntime.jsx(R,{position:new a.LatLng(i.lat,i.lng),map:r,maps:a,zIndex:u,drag:{draggable:e,onDragStart:n,onDrag:p,onDragEnd:o},children:s})}return null}),[t,r,a]);return jsxRuntime.jsx("div",{children:l})},$=ae;function le({children:t=null,style:r={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},defaultCenter:a,defaultZoom:l,onGoogleApiLoaded:s,onChange:i,options:u={},events:e=[]}){let n=react.useRef(null),p=react.useRef([]),[o,g]=react.useState(),[c,m]=react.useState(),[d,b]=react.useState(false),y=react.useCallback(()=>{var v,E;try{if(!o)return;let M=o.getZoom()??l,f=o.getBounds(),F=[(v=o.getCenter())==null?void 0:v.lng(),(E=o.getCenter())==null?void 0:E.lat()],h=f==null?void 0:f.getNorthEast(),L=f==null?void 0:f.getSouthWest();if(!h||!L||!f)return;let D=[L.lng(),L.lat(),h.lng(),h.lat()];T(D,p.current)||(i&&i({zoom:M,center:F,bounds:f}),p.current=D);}catch(M){console.error(M);}},[o,i]);return react.useEffect(()=>{n.current&&!o&&(g(new google.maps.Map(n.current,{center:a,zoom:l,...u})),m(google.maps));},[a,l,o,n,u]),react.useEffect(()=>{o&&!d&&(typeof s=="function"&&c&&s({map:o,maps:c,ref:n.current}),b(true),google.maps.event.hasListeners(o,"idle")&&google.maps.event.clearListeners(o,"idle"),google.maps.event.addListener(o,"idle",y));},[d,o,s]),react.useEffect(()=>()=>{o&&google.maps.event.clearListeners(o,"idle");},[o]),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("div",{ref:n,style:r,className:"google-map",...e==null?undefined:e.reduce((v,{name:E,handler:M})=>(v[E]=M,v),{})}),t&&o&&c&&jsxRuntime.jsx($,{map:o,maps:c,children:t})]})}var q=le;var ue=react.forwardRef(({apiKey:t="",libraries:r=["places","geometry"],children:a=null,loadingContent:l="Google Maps is loading",idleContent:s="Google Maps is on idle",errorContent:i="Google Maps is on error",mapMinHeight:u="unset",containerProps:e={},loadScriptExternally:n=false,status:p="idle",scriptCallback:o=()=>{},externalApiParams:g={},...c},m)=>{let d={ready:jsxRuntime.jsx(q,{...c,children:a}),loading:l,idle:s,error:i},b=O({apiKey:t,libraries:r,loadScriptExternally:n,status:p,externalApiParams:g,callback:o});return jsxRuntime.jsx("div",{ref:m,style:{height:"100%",width:"100%",overflow:"hidden",position:"relative",minHeight:u},...e,children:d[b]||null})}),B=ue;var qe=B;
|
|
2
2
|
module.exports=qe;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {forwardRef,useRef,useState,useCallback,useEffect,useMemo,Children,isValidElement,cloneElement}from'react';import {createPortal}from'react-dom';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?undefined:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:false,shouldPreventLoad:false}){let[l,s]=useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return useEffect(()=>{var p,
|
|
1
|
+
import {forwardRef,useRef,useState,useCallback,useEffect,useMemo,Children,isValidElement,cloneElement}from'react';import {createPortal}from'react-dom';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var S={};function W(t){let r=document.querySelector(`script[src="${t}"]`),a=r==null?undefined:r.getAttribute("data-status");return {node:r,status:a}}function Y(t={src:"",attributes:{},callbacks:{onLoadCallback:()=>{},onErrorCallback:()=>{}},elementIdToAppend:""},r,a={removeOnUnmount:false,shouldPreventLoad:false}){let[l,s]=useState(()=>!t.src||a!=null&&a.shouldPreventLoad?"idle":typeof window>"u"?"loading":S[t.src]??"loading");return useEffect(()=>{var p,o,g;if(r){s(r);return}if(!(t!=null&&t.src)||a!=null&&a.shouldPreventLoad)return;let i=S[t.src];if(i==="ready"||i==="error"){s(i);return}let u=W(t.src),e=u.node;if(e){let c=u.status??i??"loading";switch(c){case "loading":case "ready":(o=t.callbacks)!=null&&o.onLoadCallback&&t.callbacks.onLoadCallback();break;case "error":(g=t.callbacks)!=null&&g.onErrorCallback&&t.callbacks.onErrorCallback();break;}s(c);}else {e=document.createElement("script"),e.src=t.src,e.async=true,e.setAttribute("data-status","loading"),t.attributes&&Object.entries(t.attributes).length>0&&Object.entries(t.attributes).map(([m,d])=>e==null?undefined:e.setAttribute(m,d)),t.elementIdToAppend&&document.getElementById(t.elementIdToAppend)?(p=document.getElementById(t.elementIdToAppend))==null||p.appendChild(e):document.body.appendChild(e);let c=m=>{let d=m.type==="load"?"ready":"error";e==null||e.setAttribute("data-status",d);};e.addEventListener("load",c),e.addEventListener("error",c);}let n=c=>{var d,b;let m=c.type==="load"?"ready":"error";c.type==="load"?(d=t.callbacks)!=null&&d.onLoadCallback&&t.callbacks.onLoadCallback():(b=t.callbacks)!=null&&b.onErrorCallback&&t.callbacks.onErrorCallback(),s(m),S[t.src]=m;};return e.addEventListener("load",n),e.addEventListener("error",n),()=>{e&&(e.removeEventListener("load",n),e.removeEventListener("error",n)),e&&(a!=null&&a.removeOnUnmount)&&e.remove();}},[t,r,l]),l}var H=Y;var O=({apiKey:t,libraries:r=[],loadScriptExternally:a=false,status:l="idle",externalApiParams:s,callback:i})=>{var n;typeof window<"u"&&(window.googleMapsCallback=i);let u=(n=new URLSearchParams(s))==null?undefined:n.toString(),e=t?{src:`https://maps.googleapis.com/maps/api/js?key=${t}&callback=googleMapsCallback&libraries=${r==null?undefined:r.join(",")}${u?`&${u}`:""}`,attributes:{id:"googleMapsApi"}}:{src:`https://maps.googleapis.com/maps/api/js?callback=googleMapsCallback&libraries=${r==null?undefined:r.join(",")}`,attributes:{id:"googleMapsApi"}};return H(e,a?l:undefined)};var T=(t,r,a=1e-6)=>{if(t.length&&r.length){for(let l=0;l!==t.length;++l)if(Math.abs(t[l]-r[l])>a)return false;return true}return false};var _=(t,r)=>{let a=useRef(),l=a.current,s=r(l,t);return useEffect(()=>{s||(a.current=t);}),s?l:t},x=_;var k=t=>{try{return {lat:t==null?void 0:t.lat(),lng:t==null?void 0:t.lng()}}catch{return t}},K=({container:t,pane:r,position:a,maps:l,drag:s})=>{class i extends google.maps.OverlayView{onAdd=()=>{var p;let e=this;s!=null&&s.draggable&&(this.get("map").getDiv().addEventListener("mouseleave",()=>{google.maps.event.trigger(this.container,"mouseup");}),this.container.addEventListener("mousedown",o=>{var g,c;this.container.style.cursor="grabbing",(g=e.map)==null||g.set("draggable",false),e.set("origin",o),s.onDragStart(o,{latLng:k(this.position)}),e.moveHandler=(c=this.get("map"))==null?undefined:c.getDiv().addEventListener("mousemove",m=>{var M,f;let d=e.get("origin");if(!d)return;let b=d.clientX-m.clientX,y=d.clientY-m.clientY,v=(M=e.getProjection())==null?undefined:M.fromLatLngToDivPixel(e.position);if(!v)return;let E=(f=e.getProjection())==null?undefined:f.fromDivPixelToLatLng(new l.Point(v.x-b,v.y-y));e.set("position",E),e.set("origin",m),e.draw(),s.onDrag(m,{latLng:k(E)});});}),this.container.addEventListener("mouseup",o=>{var g;(g=e.map)==null||g.set("draggable",true),this.container.style.cursor="default",e.moveHandler&&(google.maps.event.removeListener(e.moveHandler),e.moveHandler=null),e.set("position",e.position),e.set("origin",undefined),e.draw(),s.onDragEnd(o,{latLng:k(e.position)});}));let n=(p=this.getPanes())==null?undefined:p[this.pane];n==null||n.classList.add("google-map-markers-overlay"),n==null||n.appendChild(this.container);};draw=()=>{if(!this.container)return;let e=this.getProjection(),n=e==null?undefined:e.fromLatLngToDivPixel(this.position),p={x:this.container.offsetWidth/2,y:this.container.offsetHeight/2};n&&(this.container.style.transform=`translate(${n.x-p.x}px, ${n.y-p.y}px)`);};onRemove=()=>{this.container.parentNode!==null&&(google.maps.event.clearInstanceListeners(this.container),this.container.parentNode.removeChild(this.container));};container;pane;position;map=this.getMap();moveHandler;constructor(e,n,p){super(),this.container=e,this.pane=n,this.position=p,this.moveHandler=null;}}return new i(t,r,a)},U=K;var ee=({pane:t="floatPane",position:r,map:a,maps:l,zIndex:s=0,children:i,drag:u})=>{let e=useMemo(()=>{let o=document.createElement("div");return o.style.position="absolute",o},[]),n=useMemo(()=>U({container:e,pane:t,position:r,maps:l,drag:u}),[e,u,l,t,r]),p=x(i==null?undefined:i.props,(o,g)=>o&&o.lat===g.lat&&o.lng===g.lng&&o.draggable===g.draggable);return useEffect(()=>!n.map&&a?(n==null||n.setMap(a),()=>{n==null||n.setMap(null);}):()=>{},[a,p]),useEffect(()=>{e.style.zIndex=`${s}`;},[s,e]),createPortal(i,e)},R=ee;var P=()=>{},ae=({children:t,map:r,maps:a})=>{let l=useMemo(()=>!r||!a?[]:Children.map(t,s=>{if(isValidElement(s)){let i={lat:s.props.lat,lng:s.props.lng},{zIndex:u,draggable:e=false,onDragStart:n=P,onDrag:p=P,onDragEnd:o=P}=s.props||{};return s=cloneElement(s,{...s.props,onDragStart:undefined,onDrag:undefined,onDragEnd:undefined}),jsx(R,{position:new a.LatLng(i.lat,i.lng),map:r,maps:a,zIndex:u,drag:{draggable:e,onDragStart:n,onDrag:p,onDragEnd:o},children:s})}return null}),[t,r,a]);return jsx("div",{children:l})},$=ae;function le({children:t=null,style:r={width:"100%",height:"100%",left:0,top:0,margin:0,padding:0,position:"absolute"},defaultCenter:a,defaultZoom:l,onGoogleApiLoaded:s,onChange:i,options:u={},events:e=[]}){let n=useRef(null),p=useRef([]),[o,g]=useState(),[c,m]=useState(),[d,b]=useState(false),y=useCallback(()=>{var v,E;try{if(!o)return;let M=o.getZoom()??l,f=o.getBounds(),F=[(v=o.getCenter())==null?void 0:v.lng(),(E=o.getCenter())==null?void 0:E.lat()],h=f==null?void 0:f.getNorthEast(),L=f==null?void 0:f.getSouthWest();if(!h||!L||!f)return;let D=[L.lng(),L.lat(),h.lng(),h.lat()];T(D,p.current)||(i&&i({zoom:M,center:F,bounds:f}),p.current=D);}catch(M){console.error(M);}},[o,i]);return useEffect(()=>{n.current&&!o&&(g(new google.maps.Map(n.current,{center:a,zoom:l,...u})),m(google.maps));},[a,l,o,n,u]),useEffect(()=>{o&&!d&&(typeof s=="function"&&c&&s({map:o,maps:c,ref:n.current}),b(true),google.maps.event.hasListeners(o,"idle")&&google.maps.event.clearListeners(o,"idle"),google.maps.event.addListener(o,"idle",y));},[d,o,s]),useEffect(()=>()=>{o&&google.maps.event.clearListeners(o,"idle");},[o]),jsxs(Fragment,{children:[jsx("div",{ref:n,style:r,className:"google-map",...e==null?undefined:e.reduce((v,{name:E,handler:M})=>(v[E]=M,v),{})}),t&&o&&c&&jsx($,{map:o,maps:c,children:t})]})}var q=le;var ue=forwardRef(({apiKey:t="",libraries:r=["places","geometry"],children:a=null,loadingContent:l="Google Maps is loading",idleContent:s="Google Maps is on idle",errorContent:i="Google Maps is on error",mapMinHeight:u="unset",containerProps:e={},loadScriptExternally:n=false,status:p="idle",scriptCallback:o=()=>{},externalApiParams:g={},...c},m)=>{let d={ready:jsx(q,{...c,children:a}),loading:l,idle:s,error:i},b=O({apiKey:t,libraries:r,loadScriptExternally:n,status:p,externalApiParams:g,callback:o});return jsx("div",{ref:m,style:{height:"100%",width:"100%",overflow:"hidden",position:"relative",minHeight:u},...e,children:d[b]||null})}),B=ue;var qe=B;
|
|
2
2
|
export{qe as default};
|
package/package.json
CHANGED
package/dist/index.d.cts
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
|
|
4
|
-
declare global {
|
|
5
|
-
interface Window {
|
|
6
|
-
google?: any;
|
|
7
|
-
googleMapsCallback?: () => void;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
type MapMouseEvent = google.maps.MapMouseEvent;
|
|
11
|
-
type Map = google.maps.Map;
|
|
12
|
-
type MapsLibrary = typeof google.maps;
|
|
13
|
-
type MapPanes = google.maps.MapPanes;
|
|
14
|
-
type MapOptions = google.maps.MapOptions;
|
|
15
|
-
type LatLng = google.maps.LatLng;
|
|
16
|
-
type LatLngLiteral = google.maps.LatLngLiteral;
|
|
17
|
-
type LatLngBounds = google.maps.LatLngBounds;
|
|
18
|
-
type LatLngBoundsLiteral = google.maps.LatLngBoundsLiteral;
|
|
19
|
-
/**
|
|
20
|
-
* The drag configuration of the overlay.
|
|
21
|
-
*/
|
|
22
|
-
type Drag = {
|
|
23
|
-
/**
|
|
24
|
-
* Whether the overlay is draggable.
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
draggable: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Callback fired repeatedly when the overlay is dragged.
|
|
30
|
-
* @param e The event.
|
|
31
|
-
* @param props The props.
|
|
32
|
-
*/
|
|
33
|
-
onDrag: (e: MouseEvent, props: {}) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Callback fired when the drag has ended.
|
|
36
|
-
* @param e The event.
|
|
37
|
-
* @param props The props.
|
|
38
|
-
*/
|
|
39
|
-
onDragEnd: (e: MouseEvent, props: {}) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Callback fired when the drag has started.
|
|
42
|
-
* @param e The event.
|
|
43
|
-
* @param props The props.
|
|
44
|
-
*/
|
|
45
|
-
onDragStart: (e: MouseEvent, props: {}) => void;
|
|
46
|
-
};
|
|
47
|
-
type UseScriptStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
48
|
-
type Pane = 'floatPane' | 'mapPane' | 'markerLayer' | 'overlayLayer' | 'overlayMouseTarget';
|
|
49
|
-
interface IUseGoogleMaps {
|
|
50
|
-
/**
|
|
51
|
-
* The Google Maps API key.
|
|
52
|
-
*/
|
|
53
|
-
apiKey?: string;
|
|
54
|
-
/**
|
|
55
|
-
* The Google Maps API callback.
|
|
56
|
-
*/
|
|
57
|
-
callback?: () => void;
|
|
58
|
-
/**
|
|
59
|
-
* The Google Maps API params to be appended to the script URL.
|
|
60
|
-
* @example
|
|
61
|
-
* {
|
|
62
|
-
* language: 'en',
|
|
63
|
-
* region: 'GB',
|
|
64
|
-
* }
|
|
65
|
-
*/
|
|
66
|
-
externalApiParams?: {
|
|
67
|
-
[key: string]: any;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* The Google Maps API libraries to be loaded.
|
|
71
|
-
* @default ['places', 'geometry']
|
|
72
|
-
*/
|
|
73
|
-
libraries?: string[];
|
|
74
|
-
/**
|
|
75
|
-
* Whether to manage the script loading externally.
|
|
76
|
-
* @default false
|
|
77
|
-
*/
|
|
78
|
-
loadScriptExternally?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* The status of the script loading.
|
|
81
|
-
* To be used only if `loadScriptExternally` is `true`.
|
|
82
|
-
*/
|
|
83
|
-
status?: UseScriptStatus;
|
|
84
|
-
}
|
|
85
|
-
interface ScriptProps {
|
|
86
|
-
/**
|
|
87
|
-
* The attributes to be passed to the script element.
|
|
88
|
-
*/
|
|
89
|
-
attributes?: {
|
|
90
|
-
[key: string]: string;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* The callback to be called when the script has loaded
|
|
94
|
-
* successfully or has failed to load.
|
|
95
|
-
*/
|
|
96
|
-
callbacks?: {
|
|
97
|
-
onErrorCallback?: () => void;
|
|
98
|
-
onLoadCallback?: () => void;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* The ID of the HTML element where the script will be appended.
|
|
102
|
-
* If not provided, the script will be appended to the `body` element.
|
|
103
|
-
*/
|
|
104
|
-
elementIdToAppend?: string;
|
|
105
|
-
/**
|
|
106
|
-
* The URL of the script to be loaded.
|
|
107
|
-
*/
|
|
108
|
-
src: string;
|
|
109
|
-
}
|
|
110
|
-
interface UseScriptOptions {
|
|
111
|
-
/**
|
|
112
|
-
* Whether to remove the script when the component unmounts.
|
|
113
|
-
*/
|
|
114
|
-
removeOnUnmount?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Whether to prevent the script from loading.
|
|
117
|
-
* @default false
|
|
118
|
-
*/
|
|
119
|
-
shouldPreventLoad?: boolean;
|
|
120
|
-
}
|
|
121
|
-
interface MapContextProps {
|
|
122
|
-
/**
|
|
123
|
-
* The Google Maps instance.
|
|
124
|
-
*/
|
|
125
|
-
map: Map;
|
|
126
|
-
/**
|
|
127
|
-
* The Google Maps API object.
|
|
128
|
-
*/
|
|
129
|
-
maps: MapsLibrary;
|
|
130
|
-
}
|
|
131
|
-
interface OverlayViewProps extends MapContextProps {
|
|
132
|
-
/**
|
|
133
|
-
* The children to be rendered within the overlay.
|
|
134
|
-
*/
|
|
135
|
-
children?: React__default.ReactElement;
|
|
136
|
-
/**
|
|
137
|
-
* The drag configuration of the overlay.
|
|
138
|
-
* @default { draggable: false }
|
|
139
|
-
*/
|
|
140
|
-
drag?: Drag;
|
|
141
|
-
/**
|
|
142
|
-
* The map pane in which to render the overlay.
|
|
143
|
-
* @default 'floatPane'
|
|
144
|
-
*/
|
|
145
|
-
pane?: Pane | undefined;
|
|
146
|
-
/**
|
|
147
|
-
* The geographical coordinates of the overlay.
|
|
148
|
-
*/
|
|
149
|
-
position: LatLng;
|
|
150
|
-
/**
|
|
151
|
-
* The z-index of the overlay.
|
|
152
|
-
* @default 0
|
|
153
|
-
*/
|
|
154
|
-
zIndex?: number | 0;
|
|
155
|
-
}
|
|
156
|
-
interface createOverlayProps {
|
|
157
|
-
/**
|
|
158
|
-
* The HTML container element in which to render the overlay.
|
|
159
|
-
*/
|
|
160
|
-
container: HTMLDivElement;
|
|
161
|
-
/**
|
|
162
|
-
* The drag configuration of the overlay.
|
|
163
|
-
* @default { draggable: false }
|
|
164
|
-
*/
|
|
165
|
-
drag?: Drag;
|
|
166
|
-
/**
|
|
167
|
-
* The Google Maps API object.
|
|
168
|
-
*/
|
|
169
|
-
maps: MapContextProps['maps'];
|
|
170
|
-
/**
|
|
171
|
-
* The map pane in which to render the overlay.
|
|
172
|
-
* @default 'floatPane'
|
|
173
|
-
*/
|
|
174
|
-
pane: Pane;
|
|
175
|
-
/**
|
|
176
|
-
* The geographical coordinates of the overlay.
|
|
177
|
-
*/
|
|
178
|
-
position: LatLng;
|
|
179
|
-
}
|
|
180
|
-
interface EventProps {
|
|
181
|
-
/**
|
|
182
|
-
* The event handler.
|
|
183
|
-
* @param e The event.
|
|
184
|
-
*/
|
|
185
|
-
handler: (e: any) => void;
|
|
186
|
-
/**
|
|
187
|
-
* The HTML Event attribute name.
|
|
188
|
-
* @reference https://www.w3schools.com/tags/ref_eventattributes.asp
|
|
189
|
-
* @example
|
|
190
|
-
* 'onClick'
|
|
191
|
-
*/
|
|
192
|
-
name: string;
|
|
193
|
-
}
|
|
194
|
-
interface onGoogleApiLoadedProps extends MapContextProps {
|
|
195
|
-
/**
|
|
196
|
-
* The ref of the Map.
|
|
197
|
-
*/
|
|
198
|
-
ref: HTMLDivElement | null;
|
|
199
|
-
}
|
|
200
|
-
interface MapMarkersProps extends MapContextProps {
|
|
201
|
-
/**
|
|
202
|
-
* The Markers to be rendered on the map.
|
|
203
|
-
*/
|
|
204
|
-
children: React__default.ReactNode;
|
|
205
|
-
}
|
|
206
|
-
interface MapProps {
|
|
207
|
-
/**
|
|
208
|
-
* The Markers to be rendered on the map
|
|
209
|
-
*/
|
|
210
|
-
children?: React__default.ReactNode;
|
|
211
|
-
/**
|
|
212
|
-
* The default center of the map.
|
|
213
|
-
*/
|
|
214
|
-
defaultCenter: LatLngLiteral;
|
|
215
|
-
/**
|
|
216
|
-
* The default zoom of the map.
|
|
217
|
-
*/
|
|
218
|
-
defaultZoom: number;
|
|
219
|
-
/**
|
|
220
|
-
* The events to pass to the Google Maps instance (`div`).
|
|
221
|
-
* @type {Array}
|
|
222
|
-
* @example
|
|
223
|
-
* [
|
|
224
|
-
* {
|
|
225
|
-
* name: 'onClick',
|
|
226
|
-
* handler: (event) => { ... }
|
|
227
|
-
* }
|
|
228
|
-
* ]
|
|
229
|
-
*/
|
|
230
|
-
events?: EventProps[];
|
|
231
|
-
/**
|
|
232
|
-
* The callback fired when the map changes (center, zoom, bounds).
|
|
233
|
-
*/
|
|
234
|
-
onChange?: (options: {
|
|
235
|
-
bounds: LatLngBounds;
|
|
236
|
-
center: (number | undefined)[];
|
|
237
|
-
zoom: number;
|
|
238
|
-
}) => void;
|
|
239
|
-
/**
|
|
240
|
-
* The callback fired when the map is loaded.
|
|
241
|
-
*/
|
|
242
|
-
onGoogleApiLoaded?: (props: onGoogleApiLoadedProps) => void;
|
|
243
|
-
/**
|
|
244
|
-
* The options to pass to the Google Maps instance.
|
|
245
|
-
* @reference https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions
|
|
246
|
-
*/
|
|
247
|
-
options?: MapOptions;
|
|
248
|
-
/**
|
|
249
|
-
* The style of the map container.
|
|
250
|
-
* @default {
|
|
251
|
-
* width: '100%',
|
|
252
|
-
* height: '100%',
|
|
253
|
-
* left: 0,
|
|
254
|
-
* top: 0,
|
|
255
|
-
* margin: 0,
|
|
256
|
-
* padding: 0,
|
|
257
|
-
* position: 'absolute'
|
|
258
|
-
* }
|
|
259
|
-
*/
|
|
260
|
-
style?: React__default.CSSProperties;
|
|
261
|
-
}
|
|
262
|
-
interface GoogleMapProps extends MapProps, IUseGoogleMaps {
|
|
263
|
-
/**
|
|
264
|
-
* The props to pass to the `div` container element.
|
|
265
|
-
*/
|
|
266
|
-
containerProps?: React__default.HTMLAttributes<HTMLDivElement>;
|
|
267
|
-
/**
|
|
268
|
-
* The content to be rendered when the script fails to load.
|
|
269
|
-
* @default 'Google Maps is on error'
|
|
270
|
-
*/
|
|
271
|
-
errorContent?: React__default.ReactNode;
|
|
272
|
-
/**
|
|
273
|
-
* The content to be rendered when the script is on idle.
|
|
274
|
-
* @default 'Google Maps is on idle'
|
|
275
|
-
*/
|
|
276
|
-
idleContent?: React__default.ReactNode;
|
|
277
|
-
/**
|
|
278
|
-
* The content to be rendered while the script is loading.
|
|
279
|
-
* @default 'Google Maps is loading'
|
|
280
|
-
*/
|
|
281
|
-
loadingContent?: React__default.ReactNode;
|
|
282
|
-
/**
|
|
283
|
-
* The minimum height of the map container.
|
|
284
|
-
* @default 'unset'
|
|
285
|
-
*/
|
|
286
|
-
mapMinHeight?: string;
|
|
287
|
-
/**
|
|
288
|
-
* The Google Maps API script callback
|
|
289
|
-
*/
|
|
290
|
-
scriptCallback?: () => void;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
declare const GoogleMap: React.ForwardRefExoticComponent<GoogleMapProps & React.RefAttributes<HTMLDivElement>>;
|
|
294
|
-
|
|
295
|
-
export { type Drag, type EventProps, type GoogleMapProps, type IUseGoogleMaps, type LatLng, type LatLngBounds, type LatLngBoundsLiteral, type LatLngLiteral, type Map, type MapContextProps, type MapMarkersProps, type MapMouseEvent, type MapOptions, type MapPanes, type MapProps, type MapsLibrary, type OverlayViewProps, type Pane, type ScriptProps, type UseScriptOptions, type UseScriptStatus, type createOverlayProps, GoogleMap as default, type onGoogleApiLoadedProps };
|
package/dist/index.d.ts
DELETED
|
@@ -1,295 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
|
|
4
|
-
declare global {
|
|
5
|
-
interface Window {
|
|
6
|
-
google?: any;
|
|
7
|
-
googleMapsCallback?: () => void;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
type MapMouseEvent = google.maps.MapMouseEvent;
|
|
11
|
-
type Map = google.maps.Map;
|
|
12
|
-
type MapsLibrary = typeof google.maps;
|
|
13
|
-
type MapPanes = google.maps.MapPanes;
|
|
14
|
-
type MapOptions = google.maps.MapOptions;
|
|
15
|
-
type LatLng = google.maps.LatLng;
|
|
16
|
-
type LatLngLiteral = google.maps.LatLngLiteral;
|
|
17
|
-
type LatLngBounds = google.maps.LatLngBounds;
|
|
18
|
-
type LatLngBoundsLiteral = google.maps.LatLngBoundsLiteral;
|
|
19
|
-
/**
|
|
20
|
-
* The drag configuration of the overlay.
|
|
21
|
-
*/
|
|
22
|
-
type Drag = {
|
|
23
|
-
/**
|
|
24
|
-
* Whether the overlay is draggable.
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
draggable: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Callback fired repeatedly when the overlay is dragged.
|
|
30
|
-
* @param e The event.
|
|
31
|
-
* @param props The props.
|
|
32
|
-
*/
|
|
33
|
-
onDrag: (e: MouseEvent, props: {}) => void;
|
|
34
|
-
/**
|
|
35
|
-
* Callback fired when the drag has ended.
|
|
36
|
-
* @param e The event.
|
|
37
|
-
* @param props The props.
|
|
38
|
-
*/
|
|
39
|
-
onDragEnd: (e: MouseEvent, props: {}) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Callback fired when the drag has started.
|
|
42
|
-
* @param e The event.
|
|
43
|
-
* @param props The props.
|
|
44
|
-
*/
|
|
45
|
-
onDragStart: (e: MouseEvent, props: {}) => void;
|
|
46
|
-
};
|
|
47
|
-
type UseScriptStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
48
|
-
type Pane = 'floatPane' | 'mapPane' | 'markerLayer' | 'overlayLayer' | 'overlayMouseTarget';
|
|
49
|
-
interface IUseGoogleMaps {
|
|
50
|
-
/**
|
|
51
|
-
* The Google Maps API key.
|
|
52
|
-
*/
|
|
53
|
-
apiKey?: string;
|
|
54
|
-
/**
|
|
55
|
-
* The Google Maps API callback.
|
|
56
|
-
*/
|
|
57
|
-
callback?: () => void;
|
|
58
|
-
/**
|
|
59
|
-
* The Google Maps API params to be appended to the script URL.
|
|
60
|
-
* @example
|
|
61
|
-
* {
|
|
62
|
-
* language: 'en',
|
|
63
|
-
* region: 'GB',
|
|
64
|
-
* }
|
|
65
|
-
*/
|
|
66
|
-
externalApiParams?: {
|
|
67
|
-
[key: string]: any;
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* The Google Maps API libraries to be loaded.
|
|
71
|
-
* @default ['places', 'geometry']
|
|
72
|
-
*/
|
|
73
|
-
libraries?: string[];
|
|
74
|
-
/**
|
|
75
|
-
* Whether to manage the script loading externally.
|
|
76
|
-
* @default false
|
|
77
|
-
*/
|
|
78
|
-
loadScriptExternally?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* The status of the script loading.
|
|
81
|
-
* To be used only if `loadScriptExternally` is `true`.
|
|
82
|
-
*/
|
|
83
|
-
status?: UseScriptStatus;
|
|
84
|
-
}
|
|
85
|
-
interface ScriptProps {
|
|
86
|
-
/**
|
|
87
|
-
* The attributes to be passed to the script element.
|
|
88
|
-
*/
|
|
89
|
-
attributes?: {
|
|
90
|
-
[key: string]: string;
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* The callback to be called when the script has loaded
|
|
94
|
-
* successfully or has failed to load.
|
|
95
|
-
*/
|
|
96
|
-
callbacks?: {
|
|
97
|
-
onErrorCallback?: () => void;
|
|
98
|
-
onLoadCallback?: () => void;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* The ID of the HTML element where the script will be appended.
|
|
102
|
-
* If not provided, the script will be appended to the `body` element.
|
|
103
|
-
*/
|
|
104
|
-
elementIdToAppend?: string;
|
|
105
|
-
/**
|
|
106
|
-
* The URL of the script to be loaded.
|
|
107
|
-
*/
|
|
108
|
-
src: string;
|
|
109
|
-
}
|
|
110
|
-
interface UseScriptOptions {
|
|
111
|
-
/**
|
|
112
|
-
* Whether to remove the script when the component unmounts.
|
|
113
|
-
*/
|
|
114
|
-
removeOnUnmount?: boolean;
|
|
115
|
-
/**
|
|
116
|
-
* Whether to prevent the script from loading.
|
|
117
|
-
* @default false
|
|
118
|
-
*/
|
|
119
|
-
shouldPreventLoad?: boolean;
|
|
120
|
-
}
|
|
121
|
-
interface MapContextProps {
|
|
122
|
-
/**
|
|
123
|
-
* The Google Maps instance.
|
|
124
|
-
*/
|
|
125
|
-
map: Map;
|
|
126
|
-
/**
|
|
127
|
-
* The Google Maps API object.
|
|
128
|
-
*/
|
|
129
|
-
maps: MapsLibrary;
|
|
130
|
-
}
|
|
131
|
-
interface OverlayViewProps extends MapContextProps {
|
|
132
|
-
/**
|
|
133
|
-
* The children to be rendered within the overlay.
|
|
134
|
-
*/
|
|
135
|
-
children?: React__default.ReactElement;
|
|
136
|
-
/**
|
|
137
|
-
* The drag configuration of the overlay.
|
|
138
|
-
* @default { draggable: false }
|
|
139
|
-
*/
|
|
140
|
-
drag?: Drag;
|
|
141
|
-
/**
|
|
142
|
-
* The map pane in which to render the overlay.
|
|
143
|
-
* @default 'floatPane'
|
|
144
|
-
*/
|
|
145
|
-
pane?: Pane | undefined;
|
|
146
|
-
/**
|
|
147
|
-
* The geographical coordinates of the overlay.
|
|
148
|
-
*/
|
|
149
|
-
position: LatLng;
|
|
150
|
-
/**
|
|
151
|
-
* The z-index of the overlay.
|
|
152
|
-
* @default 0
|
|
153
|
-
*/
|
|
154
|
-
zIndex?: number | 0;
|
|
155
|
-
}
|
|
156
|
-
interface createOverlayProps {
|
|
157
|
-
/**
|
|
158
|
-
* The HTML container element in which to render the overlay.
|
|
159
|
-
*/
|
|
160
|
-
container: HTMLDivElement;
|
|
161
|
-
/**
|
|
162
|
-
* The drag configuration of the overlay.
|
|
163
|
-
* @default { draggable: false }
|
|
164
|
-
*/
|
|
165
|
-
drag?: Drag;
|
|
166
|
-
/**
|
|
167
|
-
* The Google Maps API object.
|
|
168
|
-
*/
|
|
169
|
-
maps: MapContextProps['maps'];
|
|
170
|
-
/**
|
|
171
|
-
* The map pane in which to render the overlay.
|
|
172
|
-
* @default 'floatPane'
|
|
173
|
-
*/
|
|
174
|
-
pane: Pane;
|
|
175
|
-
/**
|
|
176
|
-
* The geographical coordinates of the overlay.
|
|
177
|
-
*/
|
|
178
|
-
position: LatLng;
|
|
179
|
-
}
|
|
180
|
-
interface EventProps {
|
|
181
|
-
/**
|
|
182
|
-
* The event handler.
|
|
183
|
-
* @param e The event.
|
|
184
|
-
*/
|
|
185
|
-
handler: (e: any) => void;
|
|
186
|
-
/**
|
|
187
|
-
* The HTML Event attribute name.
|
|
188
|
-
* @reference https://www.w3schools.com/tags/ref_eventattributes.asp
|
|
189
|
-
* @example
|
|
190
|
-
* 'onClick'
|
|
191
|
-
*/
|
|
192
|
-
name: string;
|
|
193
|
-
}
|
|
194
|
-
interface onGoogleApiLoadedProps extends MapContextProps {
|
|
195
|
-
/**
|
|
196
|
-
* The ref of the Map.
|
|
197
|
-
*/
|
|
198
|
-
ref: HTMLDivElement | null;
|
|
199
|
-
}
|
|
200
|
-
interface MapMarkersProps extends MapContextProps {
|
|
201
|
-
/**
|
|
202
|
-
* The Markers to be rendered on the map.
|
|
203
|
-
*/
|
|
204
|
-
children: React__default.ReactNode;
|
|
205
|
-
}
|
|
206
|
-
interface MapProps {
|
|
207
|
-
/**
|
|
208
|
-
* The Markers to be rendered on the map
|
|
209
|
-
*/
|
|
210
|
-
children?: React__default.ReactNode;
|
|
211
|
-
/**
|
|
212
|
-
* The default center of the map.
|
|
213
|
-
*/
|
|
214
|
-
defaultCenter: LatLngLiteral;
|
|
215
|
-
/**
|
|
216
|
-
* The default zoom of the map.
|
|
217
|
-
*/
|
|
218
|
-
defaultZoom: number;
|
|
219
|
-
/**
|
|
220
|
-
* The events to pass to the Google Maps instance (`div`).
|
|
221
|
-
* @type {Array}
|
|
222
|
-
* @example
|
|
223
|
-
* [
|
|
224
|
-
* {
|
|
225
|
-
* name: 'onClick',
|
|
226
|
-
* handler: (event) => { ... }
|
|
227
|
-
* }
|
|
228
|
-
* ]
|
|
229
|
-
*/
|
|
230
|
-
events?: EventProps[];
|
|
231
|
-
/**
|
|
232
|
-
* The callback fired when the map changes (center, zoom, bounds).
|
|
233
|
-
*/
|
|
234
|
-
onChange?: (options: {
|
|
235
|
-
bounds: LatLngBounds;
|
|
236
|
-
center: (number | undefined)[];
|
|
237
|
-
zoom: number;
|
|
238
|
-
}) => void;
|
|
239
|
-
/**
|
|
240
|
-
* The callback fired when the map is loaded.
|
|
241
|
-
*/
|
|
242
|
-
onGoogleApiLoaded?: (props: onGoogleApiLoadedProps) => void;
|
|
243
|
-
/**
|
|
244
|
-
* The options to pass to the Google Maps instance.
|
|
245
|
-
* @reference https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions
|
|
246
|
-
*/
|
|
247
|
-
options?: MapOptions;
|
|
248
|
-
/**
|
|
249
|
-
* The style of the map container.
|
|
250
|
-
* @default {
|
|
251
|
-
* width: '100%',
|
|
252
|
-
* height: '100%',
|
|
253
|
-
* left: 0,
|
|
254
|
-
* top: 0,
|
|
255
|
-
* margin: 0,
|
|
256
|
-
* padding: 0,
|
|
257
|
-
* position: 'absolute'
|
|
258
|
-
* }
|
|
259
|
-
*/
|
|
260
|
-
style?: React__default.CSSProperties;
|
|
261
|
-
}
|
|
262
|
-
interface GoogleMapProps extends MapProps, IUseGoogleMaps {
|
|
263
|
-
/**
|
|
264
|
-
* The props to pass to the `div` container element.
|
|
265
|
-
*/
|
|
266
|
-
containerProps?: React__default.HTMLAttributes<HTMLDivElement>;
|
|
267
|
-
/**
|
|
268
|
-
* The content to be rendered when the script fails to load.
|
|
269
|
-
* @default 'Google Maps is on error'
|
|
270
|
-
*/
|
|
271
|
-
errorContent?: React__default.ReactNode;
|
|
272
|
-
/**
|
|
273
|
-
* The content to be rendered when the script is on idle.
|
|
274
|
-
* @default 'Google Maps is on idle'
|
|
275
|
-
*/
|
|
276
|
-
idleContent?: React__default.ReactNode;
|
|
277
|
-
/**
|
|
278
|
-
* The content to be rendered while the script is loading.
|
|
279
|
-
* @default 'Google Maps is loading'
|
|
280
|
-
*/
|
|
281
|
-
loadingContent?: React__default.ReactNode;
|
|
282
|
-
/**
|
|
283
|
-
* The minimum height of the map container.
|
|
284
|
-
* @default 'unset'
|
|
285
|
-
*/
|
|
286
|
-
mapMinHeight?: string;
|
|
287
|
-
/**
|
|
288
|
-
* The Google Maps API script callback
|
|
289
|
-
*/
|
|
290
|
-
scriptCallback?: () => void;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
declare const GoogleMap: React.ForwardRefExoticComponent<GoogleMapProps & React.RefAttributes<HTMLDivElement>>;
|
|
294
|
-
|
|
295
|
-
export { type Drag, type EventProps, type GoogleMapProps, type IUseGoogleMaps, type LatLng, type LatLngBounds, type LatLngBoundsLiteral, type LatLngLiteral, type Map, type MapContextProps, type MapMarkersProps, type MapMouseEvent, type MapOptions, type MapPanes, type MapProps, type MapsLibrary, type OverlayViewProps, type Pane, type ScriptProps, type UseScriptOptions, type UseScriptStatus, type createOverlayProps, GoogleMap as default, type onGoogleApiLoadedProps };
|