| | |
| | | import com.dayu.pipirrapp.utils.SharedPreferencesHelper; |
| | | import com.dayu.pipirrapp.utils.ToastUtil; |
| | | import com.dayu.pipirrapp.utils.WebViewUtils; |
| | | import com.dayu.pipirrapp.view.ConfirmDialog; |
| | | import com.jeremyliao.liveeventbus.LiveEventBus; |
| | | |
| | | import java.io.File; |
| | |
| | | @Override |
| | | public void onChanged(Object o) { |
| | | LatLonBean latLonBean = (LatLonBean) o; |
| | | mWebView.evaluateJavascript("javascript:locationOverLay(\"" + latLonBean.getLongitude() + "\",\"" + latLonBean.getLatitude() + "\")", value -> { |
| | | mWebView.evaluateJavascript("javascript:updateLocation(\"" + latLonBean.getLatitude()+ "\",\"" + latLonBean.getLongitude()+ "\")", value -> { |
| | | }); |
| | | } |
| | | }); |
| | |
| | | }); |
| | | //巡检按钮 |
| | | binding.inspectButton.setOnClickListener(v -> { |
| | | isStartInspec = !isStartInspec; |
| | | chageInspecState(); |
| | | if (isStartInspec){ |
| | | ConfirmDialog confirmDialog=new ConfirmDialog(MapFragment.this.getActivity(), "提示", "确认关闭巡检吗?", new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | isStartInspec = !isStartInspec; |
| | | chageInspecState(); |
| | | } |
| | | }); |
| | | }else { |
| | | isStartInspec = !isStartInspec; |
| | | chageInspecState(); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |