0.0.2 • Published 8 months ago

@licuido-ui/ui_map v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Map

Map - which is related to googlemap ,we can customize the routes, direction and places but google api key is must !

Author

Link

Story Book Link Map

PlayGround

Try it have a fun codeBox

Installation

npm i @licuido-ui/ui_map

Import component

import { Map } from '@licuido-ui/ui_map';

Usage

You can pass the location (Latitude and Longitude) for finding the places

<Map
  googleMapApiKey=''
  location={[
    {
      name: 'Adayar',
      location: {
        lat: 13.003387,
        lng: 80.255043,
      },
      address: 'Adyar is a large neighbourhood in south Chennai, Tamil Nadu, India',
      image: './assets/adayar.jpg',
      pinnedIcon: './assets/pinned.svg',
    },
  ]}
  locations={locations}
  center={{
    lat: 12.956786921292327,
    lng: 80.25718652012615,
  }}
 
/>

Image

alt text

Map width Route

googleMapApiKey - googleMapApiKey is must for Routes!

You can pass the origin (start) and destination (end) to find the Route Direction

<Map
   start={ lat: 13.003387, lng: 80.255043 }
   end= { lat: 12.95790649960084, lng: 80.26010930368109 }/>

Samplecode

<Map
   googleMapApiKey=''
  location={[
    {
      name: 'Adayar',
      location: {
        lat: 13.003387,
        lng: 80.255043,
      },
      address: 'Adyar is a large neighbourhood in sout Chennai, Tamil Nadu, India',
      image: './assets/adayar.jpg',
      pinnedIcon: './assets/pinned.svg',
    },
  ]}
  locations={locations}
  center={{
    lat: 12.956786921292327,
    lng: 80.25718652012615,
  }}
  start= { lat: 13.003387, lng: 80.255043 }
  end= { lat: 12.95790649960084, lng: 80.26010930368109 }
  mapStyles= {
      height: '100%',
      width: '100%',
    }
  RadiusStyle={{}}
  markerLabelStyle= {{}}
  calculatebtnStyle={{}}
  mapRadiusIcon=''
  radiusDistance={1200000000}
  zoom={13}
  isSearchRequired={false}
  setDefaultRoute={false}
  fullscreenControl
  mapTypeControl={false}
  onMarkerClick={()=>onMarkerClick()}
  onMarkerMouseOver={()=>onMarkerMouseOver()}
  onClearRoute={()=>onClearRoute()}
  onCalculateRoutes={()=>onCalculateRoutes()}
  onMarkerClustererClick={()=>onMarkerClustererClick()}
  onMarkerMouseOut= {()=>onMarkerMouseOut()}
/>

Props

NameDescriptionDefaultControl
mapStylesobject{ height: '100%', width: '100%' }mapStyles : {height : "100%"width : "100%"}
RadiusStyleobject{ }RadiusStyle : {}
markerLabelStyleobject{ }markerLabelStyle : {}
calculatebtnStyleSxProps<{}>-calculatebtnStyle : {}
googleMapApiKeystring""
zoomnumber13
mapRadiusIconstring"./assets/mapCircle.png"./assets/mapCircle.png
radiusDistancenumber1200000000
isSearchRequiredbooleantrueFalseTrue
deatilsCardCustomizeReactNode-"Customize Card"
locationslocationsData[][]locations : [0 : {...} 5 keys]
centerany-center : {lat : ""lng : ""}
originlatLAng{ lat: 0, lng: 0 }origin : {lat : 13.003387lng : 80.255043}
destinationlatLAng{ lat: 0, lng: 0 }destination : {lat : 12.95790649960084lng : 80.26010930368109}
setDefaultRoutebooleantrueFalseTrue
fullscreenControlbooleantrueFalseTrue
searchBoxRootsxSxProps<{}>-searchBoxRootsx : {}
zoomControlbooleantrueFalseTrue
streetViewControlbooleantrueFalseTrue
mapTypeControlbooleantrueFalseTrue
onClearRoute() => void() => false()=>onClearRoute()
onCalculateRoutes(data: any) => void() => false()=>onCalculateRoutes()
onMarkerMouseOver(marker: any) => void() => false()=>onMarkerMouseOver()
onMarkerClustererClick(e: unknown) => void() => false()=>onMarkerClustererClick()
onMarkerClick(data: any) => void() => false()=>onMarkerClick()
onMarkerMouseOut() => void() => false()=>onMarkerMouseOut()
classNamestring-Set string
sxSxProps<Theme>-Set object
responsiveDetailsCustomizeReactNode-Set object
deatilsCardCustomizesboolean-Set boolean
customCardLocationany-Set object