GithubHelp home page GithubHelp logo

swantbo / path-planning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wangzongming/path-planning

0.0 0.0 0.0 375 KB

基于百度地图2.0 、 react 、antd-mobile 的移动端路线规划组件

Batchfile 0.34% JavaScript 80.00% CSS 19.67%

path-planning's Introduction

path-planning

基于百度地图2.0 、 react 、antd-mobile 实现的路线规划组件

功能简介

  • 开箱即用、只需简单配置
  • 高端简洁
  • 支持驾车路线、公交路线、步行路线规划
  • 传入默认起点终点后依然支持用户自定义输入地址

喜欢的话给我一颗星吧!

在线体验[codesandbox]

预览图

所需安装依赖

"dependencies": { 
    "antd-mobile": "2.3.3",   
    "react": "16.12.0", 
    "react-dom": "16.12.0", 
    "@ant-design/icons": "4.2.2",
}
yarn add path-planning | npm i path-planning

import PathPlanning from 'path-planning'

说明:

    引用组件前应在页面引入百度地图cdn
    <script src="https://api.map.baidu.com/api?v=2.0&ak=[密匙]"></script>
//需要注意使用该组件,页面必须是将组件置于单独的一个页面,页面高度需要为窗口高
//也就是说改组件必须单独占一个路由地址 组件属性可以通过路由地址从其他页面传入在传到路线规划组件...
export default ()=>{
    return <div style={{height:"100vh"}}>
        <PathPlanning 
            //属性必须设置
            city={"大连"}
            startAddress={"七贤岭"}
            endAddress={"五十二中"}
        />
    </div>
}

path-planning's People

Contributors

wangzongming avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.