第一:
对不起我的英语不好.
第二:
我正在使用openlayers,我不知道我是否选择了最佳选择.我想使用最佳选项,并使用react native和使用react native的移动应用程序开发Web应用程序.所以,如果有人对openlayers和传单有更多的经验,我希望可以帮助我选择最佳选择.
我看过这个信息:https://stackshare.io/stackups/leaflet-vs-mapbox-vs-openlayers
第三:
我正在开发一个使用openlayers做出反应的Web应用程序.我必须使用本机反应在移动设备上制作相同的应用程序,但我不知道如何使其工作.
以下是使用React + Openlayers的Web应用程序代码:
import React, { Component } from 'react';
import './App.css';
// openlayers
import View from 'ol/view';
import Projection from 'ol/proj/projection';
import Map from 'ol/map';
import Zoom from 'ol/control/zoom';
import Tile from 'ol/layer/tile';
import OSM from 'ol/source/osm';
class App extends Component {
constructor(props) {
super(props);
this.view = new View({
center: [-41925.302985762304, 4789880.268977703],
zoom: 12,
minZoom: 2,
maxZoom: 28,
projection: new Projection({
code: 'EPSG:3857',
units: 'm'
})
}); …Run Code Online (Sandbox Code Playgroud)