react-fengmap
TypeScript icon, indicating that this package has built-in type declarations

2.9.8 • Public • Published

react-fengmap

NPM version

Install

npm install --save react-fengmap

完整 API 使用文档,请这边走

Usage

// 基础地图
import React, { Component } from 'react'
import fengmapSDK from 'fengmap'

import { FengmapBase } from 'react-fengmap'

class Example extends Component {
  render() {
    return (
      <FengmapBase
        fengmapSDK={fengmapSDK}
        mapId="10347"
        mapOptions={{
          key: '你的key',
          //开发者申请应用名称
          appName: '你的应用',
          defaultMapScaleLevel: 20,
          defaultTiltAngle: 45
        }}
        style={{
          width: '800px',
          height: '550px'
        }}
      />
    )
  }
}
// 带楼层控制的地图
import React, { Component } from 'react'
import fengmapSDK from 'fengmap'

import { FengmapFloors } from 'react-fengmap'

class Example extends Component {
  render() {
    const { selectedFloor } = this.props
    return (
      <FengmapFloors
        fengmapSDK={fengmapSDK}
        mapId="10347"
        mapOptions={{
          key: '你的key',
          //开发者申请应用名称
          appName: '你的应用',
          defaultMapScaleLevel: 20,
          defaultTiltAngle: 45
        }}
        value={selectedFloor}
        style={{
          width: '800px',
          height: '550px'
        }}
      />
    )
  }
}

LICENSE

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i react-fengmap

Weekly Downloads

3

Version

2.9.8

License

MIT

Unpacked Size

433 kB

Total Files

19

Last publish

Collaborators

  • howard.zuo
  • chaywu