Preface

As a GIS developer, I will change my role to a WebGIS Front-end developer when I need to build an interactive map to present some geographic data. Due to my latest work, I’m familiar with building it, using the VueJS framework, cause it’s prevalent among Chinese developers. Even though, thinking globally, the React framework holds the most significant proportion of all MVVM-driven and Front-end frameworks.

Get Started with React

If you are a Front-end Developer, and familiar with other frameworks rather than React. It would be so easy for you to build a React web application after learning React from its official tutorial. So, get your hands dirty, and here we go.

React Offical Website https://beta.reactjs.org/

Create a single-page WebApp

Create React App is an officially supported way to create single-page React applications. It offers a modern build setup with no configuration.

1
2
3
npx create-react-app map-on-react
cd map-on-react
yarn start

Prepare dependencies

Build the map component

Build the layer component

Compose our components

Result and conclusion

本文采用CC-BY-SA-3.0协议,转载请注明出处
Author: 徐奕峰 Eephone Xu