commit
ecf3a8aea5
4 changed files with 17 additions and 2 deletions
|
@ -1259,6 +1259,7 @@
|
|||
<string name="announce_gpx_waypoints">Озвучивание маршрутных точек GPX</string>
|
||||
<string name="osmodroid_mode_on">Остановить OsMoDroid</string>
|
||||
<string name="osmodroid_mode_off">Запустить OsMoDroid</string>
|
||||
<string name="osmodroid_refresh">Обновить каналы</string>
|
||||
<string name="osb_author_or_password_not_specified">Пожалуйста, укажите в настройках пароль и имя пользователя OSM</string>
|
||||
<string name="route_descr_map_location">Карта: </string>
|
||||
<string name="osb_author_dialog_password">Пароль OSM (опционально)</string>
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
<string name="driving_region_uk">UK, India, Australia & Others</string>
|
||||
<string name="osmodroid_mode_on">Stop OsMoDroid</string>
|
||||
<string name="osmodroid_mode_off">Start OsMoDroid</string>
|
||||
<string name="osmodroid_refresh">Refresh channels</string>
|
||||
<string name="announce_gpx_waypoints">Announce GPX waypoints</string>
|
||||
<string name="speak_title">Announce…</string>
|
||||
<string name="speak_descr">Configure to announce street names, traffic warnings (forced stops, speed bumps), speed camera warnings, speed limits</string>
|
||||
|
|
|
@ -42,5 +42,5 @@ String getObjectDescription(int layerId, int objectId);
|
|||
|
||||
String getObjectColor(int layerId, int objectId);
|
||||
|
||||
|
||||
void refreshChannels();
|
||||
}
|
|
@ -42,7 +42,7 @@ public class OsMoDroidPlugin extends OsmandPlugin implements MonitoringInfoContr
|
|||
@Override
|
||||
public void channelsListUpdated() throws RemoteException {
|
||||
if (activity != null && connected) {
|
||||
|
||||
log.debug("update channels");
|
||||
for (OsMoDroidLayer myOsMoDroidLayer : osmoDroidLayerList) {
|
||||
activity.getMapView().removeLayer(myOsMoDroidLayer);
|
||||
}
|
||||
|
@ -263,5 +263,18 @@ public class OsMoDroidPlugin extends OsmandPlugin implements MonitoringInfoContr
|
|||
}
|
||||
}
|
||||
}).reg();
|
||||
qa.item(R.string.osmodroid_refresh).icons(R.drawable.ic_action_grefresh_dark, R.drawable.ic_action_grefresh_light).listen(new OnContextMenuClick() {
|
||||
|
||||
@Override
|
||||
public void onContextMenuClick(int itemId, int pos, boolean isChecked,
|
||||
DialogInterface dialog) {
|
||||
try {
|
||||
mIRemoteService.refreshChannels();
|
||||
} catch (RemoteException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
}
|
||||
}).reg();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue