1.0.1 • Published 7 months ago

@mint-ui/map v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@mint-ui/map

  • React map library
  • Control various map with one interface
  • Google, Naver, Kakao map supported now
  • Typescript supported
  • Canvas marker supported

Installation

yarn add @mint-ui/map

npm install @mint-ui/map

Examples

...
...

import { MapMarkerWrapper, MintMap, Position } from '@mint-ui/map'

const root = ReactDOM.createRoot(
  document.getElementById('root')
)

function MyMapComponent(){

  return <MintMap 
    mapType={'google'} 
    mapKey={'YOUR_GOOGLE_MAP_KEY'}
    mapId='YOUR_GOOGLE_MAP_ID' //Use advanced markers in Google maps
    base={{center:new Position(-25.344, 131.031), zoomLevel:12}}
  >
    {/* Your marker */}
    <MapMarkerWrapper position={new Position(-25.344, 131.031)}>
    
      {/* Your marker elements */}
      <div style={{width:'10px', height:'10px', background:'red', borderRadius:'10px'}}></div>
      
    </MapMarkerWrapper>

    {/* Canvas marker */}
    <CanvasMarker

      /* Canvas renderer */
      renderer={({ context, offset, payload }) => {
        context.beginPath();

        // rect
        context.rect(offset[0].x, offset[0].y, 20, 20);
        context.fillStyle = 'orange';
        context.fill();

        // rect outline
        context.strokeStyle = 'red';
        context.strokeRect(offset[0].x, offset[0].y, 20, 20);

        // font
        context.fillStyle = 'white';
        context.font = '10px caption';
        context.fillText(String(payload?.no), offset[0].x + 2, offset[0].y + 14);
        context.closePath();
      }}
      zIndex={2}
      data={markers}
    />
      
  </MintMap>

}

root.render((<MyMapComponent/>))

Document / Reference Site

https://dev-rsquare.github.io/mint-ui-map-guide

1.0.1

7 months ago

1.0.0

11 months ago

0.10.0-beta

1 year ago

0.9.2-beta

1 year ago

0.9.0-beta

1 year ago

0.9.1-beta

1 year ago

0.8.1-beta

1 year ago

0.6.1-beta

1 year ago

0.7.5-beta

1 year ago

0.5.12-beta

1 year ago

0.7.0-beta

1 year ago

0.7.4-beta

1 year ago

0.7.1-beta

1 year ago

0.8.0-beta

1 year ago

0.6.0-beta

1 year ago

0.7.3-beta

1 year ago

0.7.2-beta

1 year ago

0.5.8-beta

2 years ago

0.5.5-beta

2 years ago

0.5.4-beta

2 years ago

0.5.10-beta

2 years ago

0.5.1-beta

2 years ago

0.4.6-beta

2 years ago

0.5.6-beta

2 years ago

0.5.9-beta

2 years ago

0.5.3-beta

2 years ago

0.5.0-beta

2 years ago

0.5.11-beta

2 years ago

0.5.7-beta

2 years ago

0.5.2-beta

2 years ago

0.4.5-beta

2 years ago

0.3.8-beta

2 years ago

0.4.1-beta

2 years ago

0.4.4-beta

2 years ago

0.3.9-beta

2 years ago

0.4.3-beta

2 years ago

0.3.6-beta

2 years ago

0.4.0-beta

2 years ago

0.3.7-beta

2 years ago

0.3.5-beta

2 years ago

0.4.2-beta

2 years ago

0.1.3-beta

2 years ago

0.2.0-beta

2 years ago

0.3.0-beta

2 years ago

0.3.3-beta

2 years ago

0.2.1-beta

2 years ago

0.1.6-beta

2 years ago

0.3.1-beta

2 years ago

0.1.0-beta

2 years ago

0.3.4-beta

2 years ago

0.1.7-beta

2 years ago

0.1.9-beta

2 years ago

0.1.4-beta

2 years ago

0.1.1-beta

2 years ago

0.1.2-beta

2 years ago

0.3.2-beta

2 years ago

0.1.5-beta

2 years ago

0.1.8-beta

2 years ago

2.1.1-alpha2

3 years ago

2.1.1-alpha1

3 years ago