rn_supermap
Version:
rn_supermap 一款基于React-Native框架的移动应用开发工具。基于该开发工具,用户可以使用JavaScript开发语言,开发出在Android和IOS操作系统下运行的原生移动GIS应用,入门门槛低,一次开发,处处运行。
43 lines (37 loc) • 862 B
JavaScript
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from "react";
import { StyleSheet, View, Platform } from "react-native";
import { SMWorkspaceManagerView } from "rn_supermap";
export default class App extends Component<{}> {
constructor(props) {
super(props);
this.state = {
mapCtrId: false,
path:
Platform.OS === "ios"
? "/Documents/China400.smwu"
: "/SampleData/China400/China400.smwu",
};
}
_onGetInstance = (mapView) => {
this.mapView = mapView;
this._addMap();
};
render() {
return (
<View style={styles.container}>
<SMWorkspaceManagerView path={this.state.path} />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#F5FCFF",
},
});