UNPKG

imobile_for_javascript

Version:

iMobile for JavaScript,是SuperMap iMobile推出的一款基于React-Native框架的移动应用开发工具。基于该开发工具,用户可以使用JavaScript开发语言,开发出在Android和IOS操作系统下运行的原生移动GIS应用,入门门槛低,一次开发,处处运行。

51 lines (46 loc) 1.12 kB
import {NativeModules} from 'react-native'; let C = NativeModules.JSCallOut; export default class CallOut { async createObj(mapView){ try{ var {callOutId} = await C.createObj(mapView.mapViewId); var callOut = new CallOut(); callOut.callOutId = callOutId; return callOut; }catch (e){ console.error(e); } } async setStyle(){ try{ await C.setStyle(this.callOutId); }catch (e){ console.error(e); } } async setCustomize(isSet){ try{ await C.setCustomize(this.callOutId,isSet); }catch (e){ console.error(e); } } /** * * @param point2D */ async setLocation(point2D){ try{ await C.setLocation(this.callOutId,point2D.point2DId); }catch (e){ console.error(e); } } async setContentView(imageViewId){ try{ await C.setContentView(this.callOutId,imageViewId); }catch (e){ console.error(e); } } }