import React , { FC } from 'react' ; import { Marker , MarkerGroup , Path , PathGroup , staticMapUrl } from 'static-google-map' ; import { EImage } from './eImage' ; export type IMapProps = { /**
     * Width for badge size
     */ width ? : number ; /**
     * Height for badge size
     */ height ? : number ; type { string } memberof size ? : string ; type { ( '1' | '2' | '4' | 1 | 2 | 4 ) } memberof default scale ? : '1' | '2' | '4' | 1 | 2 | 4 ; type { ( 'png' | 'png8' | 'png32' | 'gif' | 'jpg' | 'jpg-baseline' ) } memberof default format ? : 'png' | 'png8' | 'png32' | 'gif' | 'jpg' | 'jpg-baseline' ; type { ( 'roadmap' | 'satellite' | 'terrain' | 'hybrid' ) } memberof default mapType ? : 'roadmap' | 'satellite' | 'terrain' | 'hybrid' ; type { string } memberof default language ? : string ; /**
     * The region
     */ region ? : string ; type { string } memberof center ? : string ; type { ( string | number ) } memberof default zoom ? : string | number ; /**
     * Visible
     */ visible ? : string ; /**
     * The map style
     */ style ? : string ; type { string } memberof path ? : string ; type { string } memberof client ? : string ; type { string } memberof key ? : string ; type { string } memberof signature ? : string ; type { string } memberof channel ? : string ; /**
     * The alternative text for image
     */ alt ? : string ; /**
     * The market array
     */ markers ? : Marker ; /**
     * The markerGroups
     */ markerGroups ? : MarkerGroup ; /**
     * The paths
     */ paths ? : Path [ ] ; /**
     * The PathGroup
     */ pathGroups ? : PathGroup [ ] ; } ; const defaultProps = { key : 'AIzaSyCd5ZoMYrDuVeDkXnpztEodrQ-IyXInnek' , scale : 1 , width : 600 , height : 300 , format : 'png' , mapType : 'roadmap' , alt : 'Static Image Map' } ; export const EMap = props => { const { key , scale , format , mapType , height , width , markers , size , alt } = props ; if ( ! key ) { throw new Error ( 'You must specify a "key" attribute for map' ) ; } const src = staticMapUrl ( { key , scale , size : size || `${ width }x${ height }` , format , maptype : mapType , markers } ) ; return < EImage alt = { alt } src = { src } width = { width } height = { height } / > ; } ; EMap . defaultProps = defaultProps ; EMap . displayName = 'EMap' ;