| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <template>
- <view>
- <view class="contentInRowC" style="margin-top: 80rpx;">
- <text>Navigation</text>
- <image style="height: 60rpx;width: 60rpx;" src="/static/imags/loading2.gif" mode="scaleToFill"></image>
- </view>
- </view>
- </template>
- <script>
- const mapBoxNavigation = uni.requireNativePlugin("Insdoor-mapBoxPlugin");
- export default {
- data() {
- return {
- navdata:''
- }
- },
- onLoad(option) {
- this.navdata=JSON.parse(option.navdata);
- },
- mounted() {
- console.log('2-------------------');
- this.startNav();
- },
- methods: {
- kaishidao(){
- this.startNav();
- },
- startNav(){
- mapBoxNavigation.navigationToDestination(
- {//108.390558,22.818876
- "latitude":JSON.stringify(this.navdata.latitude),
- "longitude":JSON.stringify(this.navdata.longitude),
- "destination": this.navdata.address
- },
- (ret) => {
- if(ret.typeName=='closenVC'){
- uni.navigateBack();
- }
- }
- );
- },
- }
- }
- </script>
- <style>
- </style>
|