| | |
| | | package com.dayu.pipirrapp.js; |
| | | |
| | | import android.content.Context; |
| | | import android.os.Handler; |
| | | import android.os.Looper; |
| | | import android.webkit.JavascriptInterface; |
| | |
| | | |
| | | /** |
| | | * 显示取水口详情 |
| | | * |
| | | * @param data |
| | | */ |
| | | @JavascriptInterface |
| | |
| | | |
| | | /** |
| | | * 隐藏取水口详情 |
| | | * |
| | | */ |
| | | @JavascriptInterface |
| | | public void closeWaterIntakeView() { |
| | |
| | | } |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public void loadMarker() { |
| | | if (myContext instanceof MapFragment) { |
| | | new Handler(Looper.getMainLooper()).post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | // 在主线程上执行UI操作 |
| | | // 更新或操作UI元素的代码 |
| | | // myContext.addMarker(); |
| | | myContext.jumpCenterPoint(); |
| | | myContext.setMapMarker(); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |