@neshan-maps-platform/react-openlayers 2.0.10 → 2.0.12
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/README.md +214 -173
- package/dist/React-Openlayers.js +212 -211
- package/dist/React-Openlayers.umd.cjs +9 -9
- package/dist/style.css +1 -1
- package/dist/types/App.d.ts +3 -3
- package/dist/types/App.model.d.ts +3 -3
- package/dist/types/assets/ol.model.d.ts +131 -0
- package/dist/types/components/Map.d.ts +5 -5
- package/dist/types/components/Map.model.d.ts +55 -89
- package/dist/types/components/index.d.ts +3 -2
- package/dist/types/main.d.ts +1 -1
- package/dist/types/parameters/index.d.ts +47 -47
- package/dist/types/store/ContextProvider.d.ts +3 -3
- package/dist/types/store/ContextProvider.model.d.ts +11 -11
- package/dist/types/store/context.d.ts +11 -11
- package/dist/types/utils/features.util.d.ts +2 -2
- package/dist/types/utils/index.d.ts +7 -7
- package/dist/types/utils/location.util.d.ts +30 -30
- package/package.json +48 -51
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(D,
|
|
1
|
+
(function(D,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],m):(D=typeof globalThis<"u"?globalThis:D||self,m(D.ReactOpenlayers={},D.React))})(this,function(D,m){"use strict";var $={},Ve={get exports(){return $},set exports(s){$=s}},W={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var de;function Be(){if(de)return
|
|
9
|
+
*/var de;function Be(){if(de)return W;de=1;var s=m,f=Symbol.for("react.element"),S=Symbol.for("react.fragment"),R=Object.prototype.hasOwnProperty,v=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,I={key:!0,ref:!0,__self:!0,__source:!0};function F(x,y,j){var E,C={},k=null,P=null;j!==void 0&&(k=""+j),y.key!==void 0&&(k=""+y.key),y.ref!==void 0&&(P=y.ref);for(E in y)R.call(y,E)&&!I.hasOwnProperty(E)&&(C[E]=y[E]);if(x&&x.defaultProps)for(E in y=x.defaultProps,y)C[E]===void 0&&(C[E]=y[E]);return{$$typeof:f,type:x,key:k,ref:P,props:C,_owner:v.current}}return W.Fragment=S,W.jsx=F,W.jsxs=F,W}var Y={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var pe;function Ue(){return pe||(pe=1,process.env.NODE_ENV!=="production"&&function(){var
|
|
18
|
-
`+oe+e}}var ie=!1,
|
|
17
|
+
*/var pe;function Ue(){return pe||(pe=1,process.env.NODE_ENV!=="production"&&function(){var s=m,f=Symbol.for("react.element"),S=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),F=Symbol.for("react.provider"),x=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),w=Symbol.iterator,U="@@iterator";function q(e){if(e===null||typeof e!="object")return null;var r=w&&e[w]||e[U];return typeof r=="function"?r:null}var O=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];ge("error",e,t)}}function ge(e,r,t){{var n=O.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var c=t.map(function(o){return String(o)});c.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,c)}}var ee=!1,z=!1,re=!1,te=!1,ne=!1,J;J=Symbol.for("react.module.reference");function G(e){return!!(typeof e=="string"||typeof e=="function"||e===R||e===I||ne||e===v||e===j||e===E||te||e===P||ee||z||re||typeof e=="object"&&e!==null&&(e.$$typeof===k||e.$$typeof===C||e.$$typeof===F||e.$$typeof===x||e.$$typeof===y||e.$$typeof===J||e.getModuleId!==void 0))}function u(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function _(e){return e.displayName||"Context"}function l(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case S:return"Portal";case I:return"Profiler";case v:return"StrictMode";case j:return"Suspense";case E:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case x:var r=e;return _(r)+".Consumer";case F:var t=e;return _(t._context)+".Provider";case y:return u(e,e.render,"ForwardRef");case C:var n=e.displayName||null;return n!==null?n:l(e.type)||"Memo";case k:{var i=e,c=i._payload,o=i._init;try{return l(o(c))}catch{return null}}}return null}var g=Object.assign,M=0,_e,Ee,be,Re,Te,Ce,Pe;function Se(){}Se.__reactDisabledLog=!0;function Qe(){{if(M===0){_e=console.log,Ee=console.info,be=console.warn,Re=console.error,Te=console.group,Ce=console.groupCollapsed,Pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Se,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}}function $e(){{if(M--,M===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},e,{value:_e}),info:g({},e,{value:Ee}),warn:g({},e,{value:be}),error:g({},e,{value:Re}),group:g({},e,{value:Te}),groupCollapsed:g({},e,{value:Ce}),groupEnd:g({},e,{value:Pe})})}M<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ae=O.ReactCurrentDispatcher,oe;function K(e,r,t){{if(oe===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);oe=n&&n[1]||""}return`
|
|
18
|
+
`+oe+e}}var ie=!1,H;{var qe=typeof WeakMap=="function"?WeakMap:Map;H=new qe}function we(e,r){if(!e||ie)return"";{var t=H.get(e);if(t!==void 0)return t}var n;ie=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var c;c=ae.current,ae.current=null,Qe();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(A){n=A}Reflect.construct(e,[],o)}else{try{o.call()}catch(A){n=A}e.call(o.prototype)}}else{try{throw Error()}catch(A){n=A}e()}}catch(A){if(A&&n&&typeof A.stack=="string"){for(var a=A.stack.split(`
|
|
19
19
|
`),b=n.stack.split(`
|
|
20
|
-
`),
|
|
21
|
-
`+a[
|
|
20
|
+
`),d=a.length-1,p=b.length-1;d>=1&&p>=0&&a[d]!==b[p];)p--;for(;d>=1&&p>=0;d--,p--)if(a[d]!==b[p]){if(d!==1||p!==1)do if(d--,p--,p<0||a[d]!==b[p]){var T=`
|
|
21
|
+
`+a[d].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&H.set(e,T),T}while(d>=1&&p>=0);break}}}finally{ie=!1,ae.current=c,$e(),Error.prepareStackTrace=i}var L=e?e.displayName||e.name:"",Ye=L?K(L):"";return typeof e=="function"&&H.set(e,Ye),Ye}function er(e,r,t){return we(e,!1)}function rr(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function X(e,r,t){if(e==null)return"";if(typeof e=="function")return we(e,rr(e));if(typeof e=="string")return K(e);switch(e){case j:return K("Suspense");case E:return K("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case y:return er(e.render);case C:return X(e.type,r,t);case k:{var n=e,i=n._payload,c=n._init;try{return X(c(i),r,t)}catch{}}}return""}var Z=Object.prototype.hasOwnProperty,Oe={},xe=O.ReactDebugCurrentFrame;function Q(e){if(e){var r=e._owner,t=X(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}function tr(e,r,t,n,i){{var c=Function.call.bind(Z);for(var o in e)if(c(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var b=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(d){a=d}a&&!(a instanceof Error)&&(Q(i),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),Q(null)),a instanceof Error&&!(a.message in Oe)&&(Oe[a.message]=!0,Q(i),h("Failed %s type: %s",t,a.message),Q(null))}}}var nr=Array.isArray;function se(e){return nr(e)}function ar(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function or(e){try{return je(e),!1}catch{return!0}}function je(e){return""+e}function ke(e){if(or(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(e)),je(e)}var V=O.ReactCurrentOwner,ir={key:!0,ref:!0,__self:!0,__source:!0},Ae,De,ue;ue={};function sr(e){if(Z.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function ur(e){if(Z.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function cr(e,r){if(typeof e.ref=="string"&&V.current&&r&&V.current.stateNode!==r){var t=l(V.current.type);ue[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',l(V.current.type),e.ref),ue[t]=!0)}}function lr(e,r){{var t=function(){Ae||(Ae=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function fr(e,r){{var t=function(){De||(De=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var dr=function(e,r,t,n,i,c,o){var a={$$typeof:f,type:e,key:r,ref:t,props:o,_owner:c};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function pr(e,r,t,n,i){{var c,o={},a=null,b=null;t!==void 0&&(ke(t),a=""+t),ur(r)&&(ke(r.key),a=""+r.key),sr(r)&&(b=r.ref,cr(r,i));for(c in r)Z.call(r,c)&&!ir.hasOwnProperty(c)&&(o[c]=r[c]);if(e&&e.defaultProps){var d=e.defaultProps;for(c in d)o[c]===void 0&&(o[c]=d[c])}if(a||b){var p=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&lr(o,p),b&&fr(o,p)}return dr(e,a,b,i,n,V.current,o)}}var ce=O.ReactCurrentOwner,Fe=O.ReactDebugCurrentFrame;function N(e){if(e){var r=e._owner,t=X(e.type,e._source,r?r.type:null);Fe.setExtraStackFrame(t)}else Fe.setExtraStackFrame(null)}var le;le=!1;function fe(e){return typeof e=="object"&&e!==null&&e.$$typeof===f}function Me(){{if(ce.current){var e=l(ce.current.type);if(e)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function
|
|
23
|
+
Check the render method of \``+e+"`."}return""}}function vr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return`
|
|
24
24
|
|
|
25
|
-
Check your code at `+r+":"+t+"."}return""}}var Ie={};function
|
|
25
|
+
Check your code at `+r+":"+t+"."}return""}}var Ie={};function mr(e){{var r=Me();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
26
26
|
|
|
27
|
-
Check the top-level render call using <`+t+">.")}return r}}function
|
|
27
|
+
Check the top-level render call using <`+t+">.")}return r}}function Ne(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=mr(r);if(Ie[t])return;Ie[t]=!0;var n="";e&&e._owner&&e._owner!==ce.current&&(n=" It was passed a child from "+l(e._owner.type)+"."),N(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),N(null)}}function Le(e,r){{if(typeof e!="object")return;if(se(e))for(var t=0;t<e.length;t++){var n=e[t];fe(n)&&Ne(n,r)}else if(fe(e))e._store&&(e._store.validated=!0);else if(e){var i=q(e);if(typeof i=="function"&&i!==e.entries)for(var c=i.call(e),o;!(o=c.next()).done;)fe(o.value)&&Ne(o.value,r)}}}function yr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===y||r.$$typeof===C))t=r.propTypes;else return;if(t){var n=l(r);tr(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!le){le=!0;var i=l(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function hr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){N(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),N(null);break}}e.ref!==null&&(N(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),N(null))}}function We(e,r,t,n,i,c){{var o=G(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var b=vr(i);b?a+=b:a+=Me();var d;e===null?d="null":se(e)?d="array":e!==void 0&&e.$$typeof===f?(d="<"+(l(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):d=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",d,a)}var p=pr(e,r,t,i,c);if(p==null)return p;if(o){var T=r.children;if(T!==void 0)if(n)if(se(T)){for(var L=0;L<T.length;L++)Le(T[L],e);Object.freeze&&Object.freeze(T)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Le(T,e)}return e===R?hr(p):yr(p),p}}function gr(e,r,t){return We(e,r,t,!0)}function _r(e,r,t){return We(e,r,t,!1)}var Er=_r,br=gr;Y.Fragment=R,Y.jsx=Er,Y.jsxs=br}()),Y}(function(s){process.env.NODE_ENV==="production"?s.exports=Be():s.exports=Ue()})(Ve);const B=$.jsx,Rr="",ze={map:"_map_1yxt5_2","map-popup-container":"_map-popup-container_1yxt5_7",touch:"_touch_1yxt5_26","mobile-layers-button":"_mobile-layers-button_1yxt5_30",floaten:"_floaten_1yxt5_45",float:"_float_1yxt5_45"},ve=s=>s?s instanceof Object?[s.longitude,s.latitude]:s:void 0,Je=async()=>{try{const f=await new Promise((S,R)=>{navigator.geolocation.getCurrentPosition(v=>{S(v)},v=>R(v))});return f&&ve(f.coords)||Object.values(me())}catch(s){console.error(s);const f=me();return[f.longitude,f.latitude]}},me=()=>({longitude:51.36281969540723,latitude:35.69672648316882}),Ge={reverse:"https://api.neshan.org/v4/reverse",search:"https://api.neshan.org/v1/search",map:"https://static.neshan.org/sdk/openlayers/5.3.0/ol.js"},ye=m.createContext({map:null,mapType:"neshan",mapContainer:null,setMap:s=>{},setMapType:s=>{},setMapContainer:s=>{}}),he={map:null,mapType:"neshan",mapContainer:null},Ke=(s,f)=>{switch(f.type){case"SET_MAP":return{...s,map:f.payload};case"SET_MAP_TYPE":return{...s,title:f.payload};default:return he}},He=s=>{const[f,S]=m.useReducer(Ke,he),R={...f,setMap:v=>{S({type:"SET_MAP",payload:v})},setMapType:v=>{S({type:"SET_MAP_TYPE",payload:v})},setMapContainer:v=>{S({type:"SET_MAP_CONTAINER",payload:v})}};return B(ye.Provider,{value:R,children:s.children})},Xe=m.forwardRef(({options:s,mapKey:f,serviceKey:S="",zoom:R=12,defaultType:v="neshan",scale:I,center:F,poi:x=!0,traffic:y=!0,onInit:j,className:E,style:C},k)=>{const P=m.useContext(ye),w=m.useRef(null),[U,q]=m.useState(!1),[O,h]=m.useState(null),[ge,ee]=m.useState();m.useImperativeHandle(k,()=>({get mapContainer(){return w},get ol(){return typeof ol<"u"?ol:void 0},get map(){return P.map},get isInitiated(){return U}}),[U,P.map]);const z=()=>{var _,l;if(O)return O;const u=(l=(_=w.current)==null?void 0:_.querySelector(".ol-viewport"))==null?void 0:l.querySelectorAll("div:last-child");if(u)return h(Array.from(u)[u.length-1]),O},re=()=>{const u=z();u==null||u.style.setProperty("scale",""+I)},te=()=>{const u=z();u==null||u.style.setProperty("bottom","0.2em"),u==null||u.style.setProperty("left","0.4em")},ne=(u,_="my-openlayer")=>{const l=document.getElementById(_);if(l)return l;const g=document.createElement("script");return g.src=u,g.id=_,document.getElementsByTagName("head")[0].appendChild(g),g},J=async()=>{var g;if(!w.current)return;const u=ve(F);ee(u);const _=u||await Je(),l=new ol.Map({target:w.current,key:f||"",mapType:v,poi:x,traffic:y,view:new ol.View({center:ol.proj.fromLonLat(_),zoom:R,smoothExtentConstraint:!0}),controls:[],...s});l.setMapType(v),P.setMap(l),(g=P.map)==null||g.setMapType(v),P.setMapType(v),q(!0),j&&j(ol,l)},G=()=>{let u,_,l;return u=new Promise((g,M)=>{l=M,_=g,J().then(()=>{re(),te(),_()}).catch(()=>{l()})}),{promise:u,cancelPromise:()=>l()}};return m.useEffect(()=>{if(w.current&&P.setMapContainer(w.current),typeof ol<"u"){const u=G();return()=>u.cancelPromise()}else{const u=ne(Ge.map),_=()=>{G()};return u.addEventListener("load",_),()=>u.removeEventListener("load",_)}},[]),B("div",{ref:w,className:E||ze.map,style:C})}),Ze=m.forwardRef((s,f)=>B(He,{children:B(Xe,{ref:f,...s})}));D.NeshanMap=Ze,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://static.neshan.org/sdk/openlayers/
|
|
1
|
+
@import"https://static.neshan.org/sdk/openlayers/5.3.0/ol.css";:root{--sm: .25em;--md: .5em;--lg: 1em;--text-xl: 1.3em;--text-lg: 1.05em;--text-nm: 1em;--text-sm: .85em;--text-xs: .8em;--text-xxs: .75em;--primary: #03a9f4}.pos-relative{position:relative}.pos-absolute{position:absolute}.pos-sticky{position:sticky}.d-block{display:block}.d-flex{display:flex}.flex-column{flex-flow:column}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-around{justify-content:space-around}.align-center{align-items:center}.text-center{text-align:center}.text-xl{font-size:var(--text-xl)}.text-lg{font-size:var(--text-lg)}.text-nm{font-size:var(--text-nm)}.text-sm{font-size:var(--text-sm)}.text-xs{font-size:var(--text-xs)}.text-xxs{font-size:var(--text-xxs)}.text-caption{font-size:var(--text-sm);color:gray}.mx-auto{margin-left:auto;margin-right:auto}.px-1{padding-left:var(--md);padding-right:var(--md)}.px-2{padding-left:var(--lg);padding-right:var(--lg)}.mt-1{margin-top:var(--sm)}.mt-2{margin-top:var(--md)}.mx-1{margin-left:var(--md);margin-right:var(--md)}.mx-2{margin-left:var(--lg);margin-right:var(--lg)}.my-2{margin-top:var(--md);margin-bottom:var(--md)}.box-shadow{box-shadow:0 2px 4px 1px #a8a8a8}.o-auto{overflow:auto}.o-hidden{overflow:hidden}.pointer{cursor:pointer}.select-none{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mamad .asghar{position:relative}._map_1yxt5_2{height:100%;direction:rtl}._map-popup-container_1yxt5_7{background-color:#fff;-webkit-box-shadow:0px 0px 4px 2px rgba(0,0,0,.5529411765);box-shadow:0 0 4px 2px #00000046;border-radius:5px;padding:2px 5px;font-size:var(--text-sm)}._map-popup-container_1yxt5_7:after{content:" ";position:absolute;top:100%;left:50%;margin-left:-10px;border-width:10px;border-style:solid;border-color:rgb(255,255,255) transparent transparent transparent}._touch_1yxt5_26 ._map-popup-container_1yxt5_7{font-size:var(--text-xs)}._mobile-layers-button_1yxt5_30{top:20%;right:10%;z-index:2;background:rgba(255,255,255,.701);border:none;border-radius:50%;height:2.3em;width:2.3em;padding:.25em;box-shadow:0 3px 10px #0003}._mobile-layers-button_1yxt5_30 img{width:100%}._mobile-layers-button_1yxt5_30._floaten_1yxt5_45{animation-name:_float_1yxt5_45;animation-duration:.35s;animation-iteration-count:1}@keyframes _float_1yxt5_45{0%,to{transform:translateY(0)}50%{transform:translateY(5px)}}
|
package/dist/types/App.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare function App(): JSX.Element;
|
|
3
|
-
export default App;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare function App(): JSX.Element;
|
|
3
|
+
export default App;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare interface Props {
|
|
2
|
-
children: any;
|
|
3
|
-
}
|
|
1
|
+
export declare interface Props {
|
|
2
|
+
children: any;
|
|
3
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import mainOl from "ol";
|
|
2
|
+
import { OlMap } from "@/components";
|
|
3
|
+
import * as array from "ol/array.js";
|
|
4
|
+
import * as asserts from "ol/asserts.js";
|
|
5
|
+
import * as CenterConstraint from "ol/centerconstraint.js";
|
|
6
|
+
import CollectionEventType from "ol/CollectionEventType.js";
|
|
7
|
+
import * as color from "ol/color.js";
|
|
8
|
+
import * as colorlike from "ol/colorlike.js";
|
|
9
|
+
import * as control from "ol/control.js";
|
|
10
|
+
import * as coordinate from "ol/coordinate.js";
|
|
11
|
+
import * as css from "ol/css.js";
|
|
12
|
+
import * as dom from "ol/dom.js";
|
|
13
|
+
import * as easing from "ol/easing.js";
|
|
14
|
+
import * as events from "ol/events.js";
|
|
15
|
+
import * as extent from "ol/extent.js";
|
|
16
|
+
import * as featureloader from "ol/featureloader.js";
|
|
17
|
+
import * as format from "ol/format.js";
|
|
18
|
+
import * as functions from "ol/functions.js";
|
|
19
|
+
import * as geom from "ol/geom.js";
|
|
20
|
+
import * as has from "ol/has.js";
|
|
21
|
+
import ImageState from "ol/ImageState.js";
|
|
22
|
+
import * as interaction from "ol/interaction.js";
|
|
23
|
+
import * as layer from "ol/layer.js";
|
|
24
|
+
import * as loadingstrategy from "ol/loadingstrategy.js";
|
|
25
|
+
import MapBrowserEventType from "ol/MapBrowserEventType.js";
|
|
26
|
+
import MapEventType from "ol/MapEventType.js";
|
|
27
|
+
import MapProperty from "ol/MapProperty.js";
|
|
28
|
+
import * as math from "ol/math.js";
|
|
29
|
+
import * as net from "ol/net.js";
|
|
30
|
+
import * as obj from "ol/obj.js";
|
|
31
|
+
import ObjectEventType from "ol/ObjectEventType.js";
|
|
32
|
+
import * as pixel from "ol/pixel.js";
|
|
33
|
+
import * as proj from "ol/proj.js";
|
|
34
|
+
import * as render from "ol/render.js";
|
|
35
|
+
import * as reproj from "ol/reproj.js";
|
|
36
|
+
import * as resolutionconstraint from "ol/resolutionconstraint.js";
|
|
37
|
+
import * as rotationconstraint from "ol/rotationconstraint.js";
|
|
38
|
+
import * as size from "ol/size.js";
|
|
39
|
+
import * as source from "ol/source.js";
|
|
40
|
+
import * as sphere from "ol/sphere.js";
|
|
41
|
+
import * as string from "ol/string.js";
|
|
42
|
+
import * as style from "ol/style.js";
|
|
43
|
+
import * as tilecoord from "ol/tilecoord.js";
|
|
44
|
+
import * as tilegrid from "ol/tilegrid.js";
|
|
45
|
+
import TileState from "ol/TileState.js";
|
|
46
|
+
import * as TileUrlFunction from "ol/tileurlfunction.js";
|
|
47
|
+
import * as transform from "ol/transform.js";
|
|
48
|
+
import * as uri from "ol/uri.js";
|
|
49
|
+
import ViewHint from "ol/ViewHint.js";
|
|
50
|
+
import ViewProperty from "ol/ViewProperty.js";
|
|
51
|
+
import * as webgl from "ol/webgl.js";
|
|
52
|
+
import * as xml from "ol/xml.js";
|
|
53
|
+
export declare type Ol = {
|
|
54
|
+
Map: typeof OlMap;
|
|
55
|
+
array: typeof array;
|
|
56
|
+
asserts: typeof asserts;
|
|
57
|
+
CenterConstraint: typeof CenterConstraint;
|
|
58
|
+
CollectionEventType: typeof CollectionEventType;
|
|
59
|
+
color: typeof color;
|
|
60
|
+
colorlike: typeof colorlike;
|
|
61
|
+
control: typeof control;
|
|
62
|
+
coordinate: typeof coordinate;
|
|
63
|
+
css: typeof css;
|
|
64
|
+
dom: typeof dom;
|
|
65
|
+
easing: typeof easing;
|
|
66
|
+
events: typeof events;
|
|
67
|
+
extent: typeof extent;
|
|
68
|
+
featureloader: typeof featureloader;
|
|
69
|
+
format: typeof format;
|
|
70
|
+
functions: typeof functions;
|
|
71
|
+
geom: typeof geom;
|
|
72
|
+
has: typeof has;
|
|
73
|
+
ImageState: typeof ImageState;
|
|
74
|
+
interaction: typeof interaction;
|
|
75
|
+
layer: typeof layer;
|
|
76
|
+
loadingstrategy: typeof loadingstrategy;
|
|
77
|
+
MapBrowserEventType: typeof MapBrowserEventType;
|
|
78
|
+
MapEventType: typeof MapEventType;
|
|
79
|
+
MapProperty: typeof MapProperty;
|
|
80
|
+
math: typeof math;
|
|
81
|
+
net: typeof net;
|
|
82
|
+
obj: typeof obj;
|
|
83
|
+
ObjectEventType: typeof ObjectEventType;
|
|
84
|
+
pixel: typeof pixel;
|
|
85
|
+
proj: typeof proj;
|
|
86
|
+
render: typeof render;
|
|
87
|
+
reproj: typeof reproj;
|
|
88
|
+
resolutionconstraint: typeof resolutionconstraint;
|
|
89
|
+
rotationconstraint: typeof rotationconstraint;
|
|
90
|
+
size: typeof size;
|
|
91
|
+
source: typeof source;
|
|
92
|
+
sphere: typeof sphere;
|
|
93
|
+
string: typeof string;
|
|
94
|
+
style: typeof style;
|
|
95
|
+
tilecoord: typeof tilecoord;
|
|
96
|
+
tilegrid: typeof tilegrid;
|
|
97
|
+
TileState: typeof TileState;
|
|
98
|
+
TileUrlFunction: typeof TileUrlFunction;
|
|
99
|
+
transform: typeof transform;
|
|
100
|
+
uri: typeof uri;
|
|
101
|
+
ViewHint: typeof ViewHint;
|
|
102
|
+
ViewProperty: typeof ViewProperty;
|
|
103
|
+
webgl: typeof webgl;
|
|
104
|
+
xml: typeof xml;
|
|
105
|
+
AssertionError: typeof mainOl.AssertionError;
|
|
106
|
+
Collection: typeof mainOl.Collection;
|
|
107
|
+
Disposable: typeof mainOl.Disposable;
|
|
108
|
+
Feature: typeof mainOl.Feature;
|
|
109
|
+
Geolocation: typeof mainOl.Geolocation;
|
|
110
|
+
Graticule: typeof mainOl.Graticule;
|
|
111
|
+
Image: typeof mainOl.Image;
|
|
112
|
+
ImageBase: typeof mainOl.ImageBase;
|
|
113
|
+
ImageCanvas: typeof mainOl.ImageCanvas;
|
|
114
|
+
ImageTile: typeof mainOl.ImageTile;
|
|
115
|
+
Kinetic: typeof mainOl.Kinetic;
|
|
116
|
+
MapBrowserEvent: typeof mainOl.MapBrowserEvent;
|
|
117
|
+
MapBrowserEventHandler: typeof mainOl.MapBrowserEventHandler;
|
|
118
|
+
MapEvent: typeof mainOl.MapEvent;
|
|
119
|
+
Object: typeof mainOl.Object;
|
|
120
|
+
Observable: typeof mainOl.Observable;
|
|
121
|
+
Overlay: typeof mainOl.Overlay;
|
|
122
|
+
Tile: typeof mainOl.Tile;
|
|
123
|
+
TileCache: typeof mainOl.TileCache;
|
|
124
|
+
TileQueue: typeof mainOl.TileQueue;
|
|
125
|
+
TileRange: typeof mainOl.TileRange;
|
|
126
|
+
VectorRenderTile: typeof mainOl.VectorRenderTile;
|
|
127
|
+
VectorTile: typeof mainOl.VectorTile;
|
|
128
|
+
View: typeof mainOl.View;
|
|
129
|
+
getUid: typeof mainOl.getUid;
|
|
130
|
+
VERSION: string;
|
|
131
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import "../assets/main.scss";
|
|
3
|
-
import { MapProps, NeshanMapRef } from "./Map.model";
|
|
4
|
-
export
|
|
5
|
-
export declare const
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "../assets/main.scss";
|
|
3
|
+
import { MapProps, NeshanMapRef } from "./Map.model";
|
|
4
|
+
export declare const NeshanMap: import("react").ForwardRefExoticComponent<MapProps & import("react").RefAttributes<NeshanMapRef>>;
|
|
5
|
+
export declare const NeshanMapWrappedInContext: import("react").ForwardRefExoticComponent<MapProps & import("react").RefAttributes<NeshanMapRef>>;
|
|
@@ -1,89 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MapOptions as MainMapOptions } from "ol/PluggableMap";
|
|
3
|
-
import React from "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Image: typeof mainOl.Image;
|
|
57
|
-
ImageBase: typeof mainOl.ImageBase;
|
|
58
|
-
ImageCanvas: typeof mainOl.ImageCanvas;
|
|
59
|
-
ImageTile: typeof mainOl.ImageTile;
|
|
60
|
-
Kinetic: typeof mainOl.Kinetic;
|
|
61
|
-
MapBrowserEvent: typeof mainOl.MapBrowserEvent;
|
|
62
|
-
MapBrowserEventHandler: typeof mainOl.MapBrowserEventHandler;
|
|
63
|
-
MapEvent: typeof mainOl.MapEvent;
|
|
64
|
-
Object: typeof mainOl.Object;
|
|
65
|
-
Observable: typeof mainOl.Observable;
|
|
66
|
-
Overlay: typeof mainOl.Overlay;
|
|
67
|
-
PluggableMap: typeof mainOl.PluggableMap;
|
|
68
|
-
Tile: typeof mainOl.Tile;
|
|
69
|
-
TileCache: typeof mainOl.TileCache;
|
|
70
|
-
TileQueue: typeof mainOl.TileQueue;
|
|
71
|
-
TileRange: typeof mainOl.TileRange;
|
|
72
|
-
VectorRenderTile: typeof mainOl.VectorRenderTile;
|
|
73
|
-
VectorTile: typeof mainOl.VectorTile;
|
|
74
|
-
View: typeof mainOl.View;
|
|
75
|
-
getUid: typeof mainOl.getUid;
|
|
76
|
-
VERSION: string;
|
|
77
|
-
};
|
|
78
|
-
export declare type Ol = typeof customizedOl;
|
|
79
|
-
export declare type MapType = "neshan" | "dreamy" | "dreamy-gold" | "standard-night" | "standard-day" | "osm-bright";
|
|
80
|
-
export declare type ViewType = undefined | "desktop" | "mobile";
|
|
81
|
-
export declare interface Tile {
|
|
82
|
-
title: MapType;
|
|
83
|
-
url: string;
|
|
84
|
-
}
|
|
85
|
-
export declare interface ScriptLoad {
|
|
86
|
-
promise: Promise<void>;
|
|
87
|
-
cancelPromise: () => void;
|
|
88
|
-
}
|
|
89
|
-
export {};
|
|
1
|
+
import { Map } from "ol";
|
|
2
|
+
import { MapOptions as MainMapOptions } from "ol/PluggableMap";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { Ol } from "@/assets/ol.model";
|
|
5
|
+
export interface BaseMapOptions extends MainMapOptions {
|
|
6
|
+
mapType?: MapType;
|
|
7
|
+
poi?: boolean;
|
|
8
|
+
traffic?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface MapOptionsWithKey extends BaseMapOptions {
|
|
11
|
+
key: string;
|
|
12
|
+
}
|
|
13
|
+
type MapOptionsUnion = {
|
|
14
|
+
options?: BaseMapOptions;
|
|
15
|
+
mapKey: string;
|
|
16
|
+
} | {
|
|
17
|
+
options: MapOptionsWithKey;
|
|
18
|
+
mapKey?: undefined;
|
|
19
|
+
};
|
|
20
|
+
export interface BaseMapProps {
|
|
21
|
+
serviceKey?: string;
|
|
22
|
+
zoom?: number;
|
|
23
|
+
center?: CoordsObj;
|
|
24
|
+
scale?: number;
|
|
25
|
+
defaultType?: MapType;
|
|
26
|
+
poi?: boolean;
|
|
27
|
+
traffic?: boolean;
|
|
28
|
+
onInit?: (ol: Ol, map: OlMap) => void;
|
|
29
|
+
className?: React.HTMLAttributes<HTMLDivElement>["className"];
|
|
30
|
+
style?: React.HtmlHTMLAttributes<HTMLDivElement>["style"];
|
|
31
|
+
}
|
|
32
|
+
export type MapProps = BaseMapProps & MapOptionsUnion;
|
|
33
|
+
export interface NeshanMapRef {
|
|
34
|
+
mapContainer: React.RefObject<HTMLDivElement>;
|
|
35
|
+
ol?: Ol;
|
|
36
|
+
map: OlMap | null;
|
|
37
|
+
isInitiated: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare interface CoordsObj {
|
|
40
|
+
latitude: number;
|
|
41
|
+
longitude: number;
|
|
42
|
+
}
|
|
43
|
+
export declare class OlMap extends Map {
|
|
44
|
+
constructor(options: MapOptionsWithKey);
|
|
45
|
+
setMapType(value: MapType): void;
|
|
46
|
+
switchPoiLayer(value: boolean): void;
|
|
47
|
+
switchTrafficLayer(value: boolean): void;
|
|
48
|
+
}
|
|
49
|
+
export declare type MapType = "neshan" | "dreamy" | "dreamy-gold" | "standard-night" | "standard-day" | "osm-bright";
|
|
50
|
+
export declare type ViewType = undefined | "desktop" | "mobile";
|
|
51
|
+
export declare interface Tile {
|
|
52
|
+
title: MapType;
|
|
53
|
+
url: string;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export { NeshanMap } from "./Map";
|
|
2
|
-
export type { NeshanMapRef } from "./Map.model";
|
|
1
|
+
export { NeshanMapWrappedInContext as NeshanMap } from "./Map";
|
|
2
|
+
export type { NeshanMapRef, OlMap } from "./Map.model";
|
|
3
|
+
export type { Ol } from "@/assets/ol.model";
|
package/dist/types/main.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import "./index.css";
|
|
1
|
+
import "./index.css";
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { Tile } from "../components/Map.model";
|
|
2
|
-
export declare const urls: {
|
|
3
|
-
reverse: string;
|
|
4
|
-
search: string;
|
|
5
|
-
map: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const markerUrls: {
|
|
8
|
-
main: string;
|
|
9
|
-
search: string;
|
|
10
|
-
colorSvg: string;
|
|
11
|
-
greySvg: string;
|
|
12
|
-
preview256: string;
|
|
13
|
-
searchPrev: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const tiles: Tile[];
|
|
16
|
-
export declare const breakpointsSegments: {
|
|
17
|
-
xs: boolean;
|
|
18
|
-
sm: boolean;
|
|
19
|
-
md: boolean;
|
|
20
|
-
lg: boolean;
|
|
21
|
-
xl: boolean;
|
|
22
|
-
};
|
|
23
|
-
export declare const breakpointsSegmentsPixels: {
|
|
24
|
-
xs: number;
|
|
25
|
-
sm: number;
|
|
26
|
-
md: number;
|
|
27
|
-
lg: number;
|
|
28
|
-
xl: number;
|
|
29
|
-
};
|
|
30
|
-
export declare const drawerConstants: {
|
|
31
|
-
width: string;
|
|
32
|
-
bottomSheetNormalHeight: string;
|
|
33
|
-
bottomSheetloadingHeight: string;
|
|
34
|
-
bottomSheetBorderRadius: string;
|
|
35
|
-
};
|
|
36
|
-
export declare const unsetMapDimnensions: {
|
|
37
|
-
width: string;
|
|
38
|
-
height: string;
|
|
39
|
-
};
|
|
40
|
-
export declare const zoomConstants: {
|
|
41
|
-
initialZoom: number;
|
|
42
|
-
maxZoom: number;
|
|
43
|
-
};
|
|
44
|
-
export declare const markersOffset: {
|
|
45
|
-
high: number[];
|
|
46
|
-
short: number[];
|
|
47
|
-
};
|
|
1
|
+
import { Tile } from "../components/Map.model";
|
|
2
|
+
export declare const urls: {
|
|
3
|
+
reverse: string;
|
|
4
|
+
search: string;
|
|
5
|
+
map: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const markerUrls: {
|
|
8
|
+
main: string;
|
|
9
|
+
search: string;
|
|
10
|
+
colorSvg: string;
|
|
11
|
+
greySvg: string;
|
|
12
|
+
preview256: string;
|
|
13
|
+
searchPrev: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const tiles: Tile[];
|
|
16
|
+
export declare const breakpointsSegments: {
|
|
17
|
+
xs: boolean;
|
|
18
|
+
sm: boolean;
|
|
19
|
+
md: boolean;
|
|
20
|
+
lg: boolean;
|
|
21
|
+
xl: boolean;
|
|
22
|
+
};
|
|
23
|
+
export declare const breakpointsSegmentsPixels: {
|
|
24
|
+
xs: number;
|
|
25
|
+
sm: number;
|
|
26
|
+
md: number;
|
|
27
|
+
lg: number;
|
|
28
|
+
xl: number;
|
|
29
|
+
};
|
|
30
|
+
export declare const drawerConstants: {
|
|
31
|
+
width: string;
|
|
32
|
+
bottomSheetNormalHeight: string;
|
|
33
|
+
bottomSheetloadingHeight: string;
|
|
34
|
+
bottomSheetBorderRadius: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const unsetMapDimnensions: {
|
|
37
|
+
width: string;
|
|
38
|
+
height: string;
|
|
39
|
+
};
|
|
40
|
+
export declare const zoomConstants: {
|
|
41
|
+
initialZoom: number;
|
|
42
|
+
maxZoom: number;
|
|
43
|
+
};
|
|
44
|
+
export declare const markersOffset: {
|
|
45
|
+
high: number[];
|
|
46
|
+
short: number[];
|
|
47
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Props } from "../App.model";
|
|
3
|
-
export declare const ContextProvider: (props: Props) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Props } from "../App.model";
|
|
3
|
+
export declare const ContextProvider: (props: Props) => JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MapType, OlMap } from "../components/Map.model";
|
|
2
|
-
export declare type Actions = {
|
|
3
|
-
type: "SET_MAP";
|
|
4
|
-
payload: OlMap;
|
|
5
|
-
} | {
|
|
6
|
-
type: "SET_MAP_TYPE";
|
|
7
|
-
payload: MapType;
|
|
8
|
-
} | {
|
|
9
|
-
type: "SET_MAP_CONTAINER";
|
|
10
|
-
payload: HTMLDivElement;
|
|
11
|
-
};
|
|
1
|
+
import { MapType, OlMap } from "../components/Map.model";
|
|
2
|
+
export declare type Actions = {
|
|
3
|
+
type: "SET_MAP";
|
|
4
|
+
payload: OlMap;
|
|
5
|
+
} | {
|
|
6
|
+
type: "SET_MAP_TYPE";
|
|
7
|
+
payload: MapType;
|
|
8
|
+
} | {
|
|
9
|
+
type: "SET_MAP_CONTAINER";
|
|
10
|
+
payload: HTMLDivElement;
|
|
11
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MapType, OlMap } from "../components/Map.model";
|
|
3
|
-
declare const Context: import("react").Context<{
|
|
4
|
-
map: OlMap | null;
|
|
5
|
-
mapType: MapType;
|
|
6
|
-
mapContainer: HTMLDivElement | null;
|
|
7
|
-
setMap: (map: OlMap) => void;
|
|
8
|
-
setMapType: (mapType: MapType) => void;
|
|
9
|
-
setMapContainer: (el: HTMLDivElement) => void;
|
|
10
|
-
}>;
|
|
11
|
-
export default Context;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MapType, OlMap } from "../components/Map.model";
|
|
3
|
+
declare const Context: import("react").Context<{
|
|
4
|
+
map: OlMap | null;
|
|
5
|
+
mapType: MapType;
|
|
6
|
+
mapContainer: HTMLDivElement | null;
|
|
7
|
+
setMap: (map: OlMap) => void;
|
|
8
|
+
setMapType: (mapType: MapType) => void;
|
|
9
|
+
setMapContainer: (el: HTMLDivElement) => void;
|
|
10
|
+
}>;
|
|
11
|
+
export default Context;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: {};
|
|
2
|
-
export default _default;
|
|
1
|
+
declare const _default: {};
|
|
2
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./location.util";
|
|
2
|
-
export * from "./features.util";
|
|
3
|
-
/**
|
|
4
|
-
* Tells if current platform is mobile/tablet or a desktop/non-touchable device
|
|
5
|
-
* @returns
|
|
6
|
-
*/
|
|
7
|
-
export declare function isTouchPlatform(): boolean;
|
|
1
|
+
export * from "./location.util";
|
|
2
|
+
export * from "./features.util";
|
|
3
|
+
/**
|
|
4
|
+
* Tells if current platform is mobile/tablet or a desktop/non-touchable device
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function isTouchPlatform(): boolean;
|