├── NooTous
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── values
│ │ │ ├── dimens.xml
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── themes.xml
│ │ ├── drawable
│ │ │ ├── pancarte.png
│ │ │ ├── map_button.png
│ │ │ └── trends_button.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-mdpi
│ │ │ ├── marker_friend.png
│ │ │ ├── marker_myself.png
│ │ │ └── marker_friend_off.png
│ │ ├── menu
│ │ │ └── menu_group.xml
│ │ ├── layout
│ │ │ ├── map.xml
│ │ │ ├── content_group.xml
│ │ │ ├── settings_activity.xml
│ │ │ ├── trend_row.xml
│ │ │ ├── activity_group.xml
│ │ │ └── countdown.xml
│ │ ├── values-night
│ │ │ └── themes.xml
│ │ ├── values-es
│ │ │ └── strings.xml
│ │ ├── values-fr
│ │ │ └── strings.xml
│ │ ├── navigation
│ │ │ └── nav_graph.xml
│ │ └── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── nootous
│ │ ├── SettingsActivity.java
│ │ ├── Trend.java
│ │ └── MainActivity.java
├── proguard-rules.pro
└── build.gradle
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── OSMNavigator
├── src
│ └── main
│ │ ├── res
│ │ ├── drawable-mdpi
│ │ │ ├── icon.png
│ │ │ ├── delete.png
│ │ │ ├── btn_menu.png
│ │ │ ├── btn_route.png
│ │ │ ├── ic_empty.png
│ │ │ ├── ic_u_turn.png
│ │ │ ├── btn_sharing.png
│ │ │ ├── ic_arrived.png
│ │ │ ├── ic_continue.png
│ │ │ ├── ic_menu_poi.png
│ │ │ ├── marker_node.png
│ │ │ ├── marker_poi.png
│ │ │ ├── marker_via.png
│ │ │ ├── delete_pressed.png
│ │ │ ├── ic_roundabout.png
│ │ │ ├── ic_sharp_left.png
│ │ │ ├── ic_sharp_right.png
│ │ │ ├── ic_slight_left.png
│ │ │ ├── ic_turn_left.png
│ │ │ ├── ic_turn_right.png
│ │ │ ├── marker_car_on.png
│ │ │ ├── marker_cluster.png
│ │ │ ├── btn_tracking_off.png
│ │ │ ├── btn_tracking_on.png
│ │ │ ├── ic_menu_sharing.png
│ │ │ ├── ic_slight_right.png
│ │ │ ├── kml_icon_gxtrack.png
│ │ │ ├── kml_icon_polygon.png
│ │ │ ├── marker_departure.png
│ │ │ ├── marker_friend_on.png
│ │ │ ├── marker_kml_point.png
│ │ │ ├── ic_menu_itinerary.png
│ │ │ ├── kml_icon_linestring.png
│ │ │ ├── marker_destination.png
│ │ │ ├── marker_friend_off.png
│ │ │ ├── marker_poi_cluster.png
│ │ │ ├── marker_poi_default.png
│ │ │ ├── marker_poi_flickr.png
│ │ │ ├── marker_poi_picasa_24.png
│ │ │ ├── bonuspack_bubble_black.9.png
│ │ │ ├── kml_icon_groundoverlay.png
│ │ │ ├── kml_icon_multigeometry.png
│ │ │ ├── marker_poi_wikipedia_16.png
│ │ │ └── marker_poi_wikipedia_32.png
│ │ ├── drawable
│ │ │ ├── expander_bgrnd.9.png
│ │ │ └── btn_delete.xml
│ │ ├── menu
│ │ │ ├── style_option_menu.xml
│ │ │ ├── kml_option_menu.xml
│ │ │ ├── style_item_menu.xml
│ │ │ ├── map_menu.xml
│ │ │ ├── kml_item_menu.xml
│ │ │ └── option_menu.xml
│ │ ├── values
│ │ │ ├── styles.xml
│ │ │ ├── direction_icons.xml
│ │ │ ├── poi_tags.xml
│ │ │ ├── osm_poi_tags.xml
│ │ │ └── strings.xml
│ │ ├── layout
│ │ │ ├── kml_styles.xml
│ │ │ ├── kml_list_item.xml
│ │ │ ├── item_layout.xml
│ │ │ ├── items_list.xml
│ │ │ ├── kml_main.xml
│ │ │ ├── itinerary_bubble.xml
│ │ │ ├── bonuspack_bubble_black.xml
│ │ │ ├── kml_style.xml
│ │ │ ├── start_sharing.xml
│ │ │ └── main.xml
│ │ └── values-fr
│ │ │ └── poi_tags.xml
│ │ └── java
│ │ └── com
│ │ └── osmnavigator
│ │ ├── ViaPointInfoWindow.java
│ │ ├── KmlStyleListAdapter.java
│ │ ├── POIInfoWindow.java
│ │ ├── StartSharingActivity.java
│ │ ├── POIActivity.java
│ │ ├── KmlListAdapter.java
│ │ ├── KmlStyleActivity.java
│ │ ├── RouteActivity.java
│ │ ├── FriendsActivity.java
│ │ ├── AutoCompleteOnPreferences.java
│ │ └── KmlStylesActivity.java
├── proguard-rules.pro
└── build.gradle
├── OSMBonusPack
├── src
│ └── main
│ │ ├── res
│ │ ├── drawable-mdpi
│ │ │ └── marker_cluster.png
│ │ ├── values-pl
│ │ │ └── strings.xml
│ │ ├── values-de
│ │ │ └── strings.xml
│ │ ├── values-fr
│ │ │ └── strings.xml
│ │ ├── values-ru
│ │ │ └── strings.xml
│ │ └── values
│ │ │ └── strings.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── org
│ │ └── osmdroid
│ │ └── bonuspack
│ │ ├── sharing
│ │ ├── Partner.java
│ │ └── Friend.java
│ │ ├── kml
│ │ ├── StyleSelector.java
│ │ ├── LineStyle.java
│ │ ├── StyleMap.java
│ │ ├── Style.java
│ │ ├── HotSpot.java
│ │ ├── ColorStyle.java
│ │ └── KmlPoint.java
│ │ ├── utils
│ │ ├── WebImageCache.java
│ │ ├── HttpConnection.java
│ │ └── PolylineEncoder.java
│ │ ├── clustering
│ │ └── StaticCluster.java
│ │ └── routing
│ │ ├── RoadLeg.java
│ │ ├── RoadNode.java
│ │ └── RoadManager.java
├── proguard-rules.pro
└── build.gradle
├── OSMBonusPackTuto
├── src
│ └── main
│ │ ├── res
│ │ ├── drawable-mdpi
│ │ │ ├── ic_continue.png
│ │ │ ├── ic_launcher.png
│ │ │ ├── marker_node.png
│ │ │ ├── marker_kml_point.png
│ │ │ ├── marker_poi_cluster.png
│ │ │ ├── marker_poi_default.png
│ │ │ └── bonuspack_bubble_black.9.png
│ │ ├── values
│ │ │ └── strings.xml
│ │ ├── layout
│ │ │ ├── main.xml
│ │ │ └── bonuspack_bubble_black.xml
│ │ └── menu
│ │ │ └── map_menu.xml
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── .github
├── workflows
│ ├── gradle-wrapper-validation.yml
│ └── Android-CI.yml
└── stale.yml
├── .gitignore
├── gradle.properties
├── maven.gradle
├── gradlew.bat
└── README.md
/NooTous/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':OSMBonusPack', ':OSMBonusPackTuto', ':OSMNavigator'
2 | include ':NooTous'
3 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 | 16dp
3 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/NooTous/src/main/res/drawable/pancarte.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/NooTous/src/main/res/drawable/pancarte.png
--------------------------------------------------------------------------------
/NooTous/src/main/res/drawable/map_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/NooTous/src/main/res/drawable/map_button.png
--------------------------------------------------------------------------------
/NooTous/src/main/res/drawable/trends_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/NooTous/src/main/res/drawable/trends_button.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/NooTous/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/NooTous/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/delete.png
--------------------------------------------------------------------------------
/NooTous/src/main/res/drawable-mdpi/marker_friend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/NooTous/src/main/res/drawable-mdpi/marker_friend.png
--------------------------------------------------------------------------------
/NooTous/src/main/res/drawable-mdpi/marker_myself.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/NooTous/src/main/res/drawable-mdpi/marker_myself.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/btn_menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/btn_menu.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/btn_route.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/btn_route.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_empty.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_u_turn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_u_turn.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/btn_sharing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/btn_sharing.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_arrived.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_arrived.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_continue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_continue.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_menu_poi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_menu_poi.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_node.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_node.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_poi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_poi.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_via.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_via.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable/expander_bgrnd.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable/expander_bgrnd.9.png
--------------------------------------------------------------------------------
/NooTous/src/main/res/drawable-mdpi/marker_friend_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/NooTous/src/main/res/drawable-mdpi/marker_friend_off.png
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/res/drawable-mdpi/marker_cluster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPack/src/main/res/drawable-mdpi/marker_cluster.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/delete_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/delete_pressed.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_roundabout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_roundabout.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_sharp_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_sharp_left.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_sharp_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_sharp_right.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_slight_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_slight_left.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_turn_left.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_turn_left.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_turn_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_turn_right.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_car_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_car_on.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_cluster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_cluster.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/drawable-mdpi/ic_continue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPackTuto/src/main/res/drawable-mdpi/ic_continue.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPackTuto/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_node.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_node.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/btn_tracking_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/btn_tracking_off.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/btn_tracking_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/btn_tracking_on.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_menu_sharing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_menu_sharing.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_slight_right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_slight_right.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_gxtrack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_gxtrack.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_polygon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_polygon.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_departure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_departure.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_friend_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_friend_on.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_kml_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_kml_point.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | OSMBonusPackTuto
4 |
5 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/ic_menu_itinerary.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/ic_menu_itinerary.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_linestring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_linestring.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_destination.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_destination.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_friend_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_friend_off.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_cluster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_cluster.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_default.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_flickr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_flickr.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_kml_point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_kml_point.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_picasa_24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_picasa_24.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_poi_cluster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_poi_cluster.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_poi_default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPackTuto/src/main/res/drawable-mdpi/marker_poi_default.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/bonuspack_bubble_black.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/bonuspack_bubble_black.9.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_groundoverlay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_groundoverlay.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_multigeometry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/kml_icon_multigeometry.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_wikipedia_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_wikipedia_16.png
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_wikipedia_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMNavigator/src/main/res/drawable-mdpi/marker_poi_wikipedia_32.png
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/drawable-mdpi/bonuspack_bubble_black.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MKergall/osmbonuspack/HEAD/OSMBonusPackTuto/src/main/res/drawable-mdpi/bonuspack_bubble_black.9.png
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/menu/style_option_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/menu/kml_option_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/.github/workflows/gradle-wrapper-validation.yml:
--------------------------------------------------------------------------------
1 | name: "Validate Gradle Wrapper"
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | pull_request:
8 | branches:
9 | - master
10 |
11 | jobs:
12 | validation:
13 | name: "Validation"
14 | runs-on: ubuntu-latest
15 | steps:
16 | - uses: actions/checkout@v2
17 | - uses: gradle/wrapper-validation-action@v1
18 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/menu/style_item_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/drawable/btn_delete.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/sharing/Partner.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.sharing;
2 |
3 | import com.google.gson.JsonObject;
4 |
5 | public class Partner {
6 | public String name, url, kmlUrl;
7 |
8 | public Partner(JsonObject jPO) {
9 | name = jPO.get("name").getAsString();
10 | url = jPO.get("url").getAsString();
11 | kmlUrl = jPO.get("kml_url").getAsString();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/kml/StyleSelector.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.kml;
2 |
3 | import android.os.Parcelable;
4 |
5 | import java.io.Writer;
6 |
7 | /**
8 | * Handling of a KML StyleSelector (abstract class).
9 | * @author M.Kergall
10 | */
11 | public abstract class StyleSelector implements Parcelable {
12 |
13 | /** default constructor */
14 | public StyleSelector(){
15 | }
16 |
17 | abstract public void writeAsKML(Writer writer, String styleId);
18 |
19 | //TODO: need to implement Parcelable?
20 | }
21 |
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/menu/map_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/menu/menu_group.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/menu/map_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #built application files
2 | *.apk
3 | *.ap_
4 |
5 | # files for the dex VM
6 | *.dex
7 |
8 | # Java class files
9 | *.class
10 |
11 | # generated files
12 | bin/
13 | gen/
14 |
15 | # Local configuration file (sdk path, etc)
16 | local.properties
17 |
18 | # Windows thumbnail db
19 | .DS_Store
20 |
21 | # Eclipse project files
22 | .classpath
23 | .project
24 |
25 | # Android Studio
26 | .idea
27 | #.idea/workspace.xml - uncomment this and comment/delete .idea if it better suit your needs
28 | .gradle
29 | /*/local.properties
30 | /*/out
31 | /*/*/build
32 | /*/*/production
33 | *.iml
34 | *.iws
35 | *.ipr
36 | *~
37 | *.swp
38 |
39 | /*/build
40 | /build
41 |
42 | /build
43 | com_crashlytics_export_strings.xml
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/kml_styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
15 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/OSMBonusPack/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/Ziem/Development/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/OSMNavigator/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/Ziem/Development/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/OSMBonusPackTuto/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/Ziem/Development/android-sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/layout/map.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/.github/workflows/Android-CI.yml:
--------------------------------------------------------------------------------
1 | name: CI
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | pull_request:
8 | branches:
9 | - master
10 |
11 | jobs:
12 | BuildAndTest:
13 | name: Build and Test on JDK ${{ matrix.java_version }}
14 | runs-on: ubuntu-latest
15 | strategy:
16 | matrix:
17 | java_version: [1.8]
18 | steps:
19 | - name: Checkout
20 | uses: actions/checkout@v2
21 | - name: Install JDK ${{ matrix.java_version }}
22 | uses: actions/setup-java@v1
23 | with:
24 | java-version: ${{ matrix.java_version }}
25 | - name: Install Android SDK
26 | uses: malinskiy/action-android/install-sdk@release/0.1.2
27 | - name: Build project
28 | run: ./gradlew clean build --stacktrace
29 |
--------------------------------------------------------------------------------
/OSMBonusPack/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 31
5 |
6 | defaultConfig {
7 | minSdkVersion 16
8 | targetSdkVersion 31
9 | }
10 | buildTypes {
11 | release {
12 | minifyEnabled false
13 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
14 | }
15 | }
16 |
17 | lintOptions {
18 | disable 'MissingTranslation'
19 | }
20 |
21 | }
22 |
23 | dependencies {
24 | api 'org.osmdroid:osmdroid-android:6.1.13'
25 | implementation 'org.apache.commons:commons-lang3:3.8.1'
26 | api 'com.google.code.gson:gson:2.8.6'
27 | implementation 'com.squareup.okhttp3:okhttp:4.7.2'
28 | implementation 'androidx.core:core:1.5.0'
29 | }
30 |
--------------------------------------------------------------------------------
/NooTous/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
--------------------------------------------------------------------------------
/NooTous/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | NooTous
3 | Event management
4 | Settings
5 | Event Name
6 | Countdown
7 | Map
8 | Next
9 | Event Name:
10 | Event Name
11 | Nickname:
12 | Message:
13 | (visible to all participants)
14 | Settings
15 | Blur my position by:
16 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/menu/kml_item_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/values-es/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | NooTous
3 | Gestión del evento
4 | Configurationes
5 | Nombre del evento
6 | Cuenta
7 | Mapa
8 | Próximo
9 | Nombre del evento :
10 | Nombre del evento
11 | Seudó:
12 | Mensaje:
13 | (visible para todos los participantes)
14 | Configurationes
15 | Difuminar mi posición:
16 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | NooTous
3 | Gestion d\'événement
4 | Paramètres
5 | Nom de l\'événement
6 | Décompte
7 | Carte
8 | Suivant
9 | Nom de l\'événement :
10 | Nom de l\'événement
11 | Pseudo :
12 | Message :
13 | (visible de tous les participants)
14 | Paramètres
15 | Flouter ma position de :
16 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/layout/content_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
19 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 | android.enableJetifier=true
15 | android.useAndroidX=true
16 | org.gradle.jvmargs=-Xmx2048M
17 |
18 | # When configured, Gradle will run in incubating parallel mode.
19 | # This option should only be used with decoupled projects. More details, visit
20 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
21 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/kml_list_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
15 |
23 |
24 |
31 |
32 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/layout/settings_activity.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
13 |
14 |
21 |
22 |
28 |
29 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/item_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
12 |
16 |
22 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/layout/trend_row.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
17 |
28 |
--------------------------------------------------------------------------------
/OSMNavigator/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 31
5 |
6 | compileOptions {
7 | sourceCompatibility JavaVersion.VERSION_1_8
8 | targetCompatibility JavaVersion.VERSION_1_8
9 | }
10 |
11 | defaultConfig {
12 | applicationId "com.osmnavigator"
13 | minSdkVersion 16
14 | targetSdkVersion 31
15 | versionCode 29
16 | versionName "2.9"
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | lintOptions {
25 | disable 'MissingTranslation'
26 | }
27 | }
28 |
29 | dependencies {
30 | implementation project(":OSMBonusPack")
31 |
32 | //including using JitPack:
33 | //implementation 'com.github.MKergall:osmbonuspack:6.9.0'
34 |
35 | implementation 'org.osmdroid:osmdroid-mapsforge:6.1.6@aar'
36 | implementation 'org.mapsforge:mapsforge-map-android:0.13.0'
37 | implementation 'org.mapsforge:mapsforge-map:0.13.0'
38 | implementation 'org.mapsforge:mapsforge-themes:0.13.0'
39 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
40 | }
41 |
--------------------------------------------------------------------------------
/NooTous/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
15 |
20 |
21 |
22 |
23 |
24 |
25 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
17 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/items_list.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
19 |
20 |
26 |
27 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
17 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/OSMBonusPackTuto/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 31
5 |
6 | compileOptions {
7 | sourceCompatibility JavaVersion.VERSION_1_8
8 | targetCompatibility JavaVersion.VERSION_1_8
9 | }
10 |
11 | defaultConfig {
12 | applicationId "com.example.osmbonuspacktuto"
13 | minSdkVersion 16
14 | targetSdkVersion 31
15 | versionCode 1
16 | versionName "1.0"
17 | }
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 | }
25 |
26 | repositories {
27 | mavenCentral()
28 | flatDir {
29 | dirs 'libs'
30 | }
31 | }
32 |
33 | dependencies {
34 | implementation project(":OSMBonusPack")
35 | implementation 'androidx.legacy:legacy-support-v4:1.0.0'
36 |
37 | //including using JitPack:
38 | //implementation 'com.github.MKergall:osmbonuspack:6.9.0'
39 |
40 | // including as local lib
41 | /*
42 | compile(name: 'osmbonuspack_6.9.0', ext: 'aar')
43 | implementation 'org.osmdroid:osmdroid-android:6.1.13'
44 | implementation 'org.apache.commons:commons-lang3:3.8.1'
45 | implementation 'com.google.code.gson:gson:2.8.6'
46 | implementation 'com.squareup.okhttp3:okhttp:4.7.2'
47 | */
48 | }
49 |
--------------------------------------------------------------------------------
/NooTous/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.android.application'
3 | }
4 |
5 | android {
6 | compileSdkVersion 31
7 |
8 | defaultConfig {
9 | applicationId "com.nootous"
10 | minSdkVersion 16
11 | targetSdkVersion 31
12 | multiDexEnabled true
13 | versionCode 20
14 | versionName "2.0"
15 |
16 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 | compileOptions {
26 | sourceCompatibility JavaVersion.VERSION_1_8
27 | targetCompatibility JavaVersion.VERSION_1_8
28 | }
29 | buildFeatures {
30 | viewBinding true
31 | }
32 | }
33 |
34 | dependencies {
35 |
36 | implementation 'com.android.support:multidex:1.0.3'
37 | implementation 'androidx.appcompat:appcompat:1.4.1'
38 | implementation 'com.google.android.material:material:1.6.0'
39 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
40 | implementation 'androidx.navigation:navigation-fragment:2.4.2'
41 | implementation 'androidx.navigation:navigation-ui:2.4.2'
42 | implementation project(path: ':OSMBonusPack')
43 | implementation 'androidx.preference:preference:1.2.0'
44 | }
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/sharing/Friend.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.sharing;
2 |
3 | import com.google.gson.JsonObject;
4 |
5 | import org.osmdroid.util.GeoPoint;
6 |
7 | /**
8 | * @author M.Kergall
9 | */
10 | public class Friend {
11 | public String mId;
12 | public boolean mMyself;
13 | public String mNickName;
14 | public boolean mHasLocation;
15 | public GeoPoint mPosition;
16 | /**
17 | * azimuth in degrees
18 | */
19 | public float mBearing;
20 | public boolean mOnline;
21 | public String mMessage;
22 |
23 | public Friend(JsonObject joUser) {
24 | mId = joUser.get("id").getAsString();
25 | mMyself = joUser.get("myself").getAsBoolean();
26 | mNickName = joUser.get("nickname").getAsString();
27 | mHasLocation = (joUser.get("has_location").getAsInt() == 1);
28 | if (mHasLocation) {
29 | double lat = joUser.get("lat").getAsDouble();
30 | double lon = joUser.get("lon").getAsDouble();
31 | mPosition = new GeoPoint(lat, lon);
32 | } else
33 | mPosition = new GeoPoint(0.0, 0.0);
34 | mBearing = joUser.get("bearing").getAsFloat();
35 | mOnline = (joUser.get("online").getAsInt() == 1);
36 | if (joUser.has("message"))
37 | mMessage = joUser.get("message").getAsString();
38 | else
39 | mMessage = "";
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/java/com/osmnavigator/ViaPointInfoWindow.java:
--------------------------------------------------------------------------------
1 | package com.osmnavigator;
2 |
3 | import android.view.View;
4 | import android.widget.Button;
5 |
6 | import org.osmdroid.views.MapView;
7 | import org.osmdroid.views.overlay.Marker;
8 | import org.osmdroid.views.overlay.infowindow.MarkerInfoWindow;
9 |
10 | /**
11 | * A customized InfoWindow handling "itinerary" points (start, destination and via-points).
12 | * We inherit from MarkerInfoWindow as it already provides most of what we want.
13 | * And we just add support for a "remove" button.
14 | *
15 | * @author M.Kergall
16 | */
17 | public class ViaPointInfoWindow extends MarkerInfoWindow {
18 |
19 | int mSelectedPoint;
20 |
21 | public ViaPointInfoWindow(int layoutResId, MapView mapView) {
22 | super(layoutResId, mapView);
23 | Button btnDelete = (Button)(mView.findViewById(R.id.bubble_delete));
24 | btnDelete.setOnClickListener(new View.OnClickListener() {
25 | public void onClick(View view) {
26 | //Call the removePoint method on MapActivity.
27 | //TODO: find a cleaner way to do that!
28 | MapActivity mapActivity = (MapActivity)view.getContext();
29 | mapActivity.removePoint(mSelectedPoint);
30 | close();
31 | }
32 | });
33 | }
34 |
35 | @Override public void onOpen(Object item) {
36 | Marker eItem = (Marker)item;
37 | mSelectedPoint = (Integer)eItem.getRelatedObject();
38 | super.onOpen(item);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/navigation/nav_graph.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
16 |
17 |
22 |
25 |
26 |
31 |
34 |
35 |
--------------------------------------------------------------------------------
/maven.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.github.dcendents.android-maven'
2 |
3 | android.libraryVariants.all { variant ->
4 |
5 | if (variant.name.contains("release")) {
6 | task("sources${variant.name.capitalize()}Jar", type: Jar) {
7 | from variant.javaCompile.source
8 | classifier = 'sources'
9 | }
10 |
11 | task("javadoc${variant.name.capitalize()}", type: Javadoc) {
12 | description "Generates Javadoc for $variant.name."
13 | source = variant.javaCompile.source
14 | ext.androidJar = "${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
15 | classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
16 | options.links("http://docs.oracle.com/javase/7/docs/api/");
17 | options.links("http://developer.android.com/reference/");
18 | options.addStringOption('Xdoclint:none', '-quiet')
19 | failOnError false
20 | }
21 |
22 | task("javadoc${variant.name.capitalize()}Jar", type: Jar, dependsOn: "javadoc${variant.name.capitalize()}") {
23 | description "Generates Javadoc Jar for $variant.name."
24 | classifier = 'javadoc'
25 | from tasks.findByPath("javadoc${variant.name.capitalize()}").destinationDir
26 | }
27 |
28 | artifacts {
29 | archives tasks.findByPath("javadoc${variant.name.capitalize()}Jar")
30 | archives tasks.findByPath("sources${variant.name.capitalize()}Jar")
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/NooTous/src/main/res/layout/activity_group.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
13 |
14 |
20 |
21 |
22 |
23 |
24 |
25 |
33 |
34 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/res/values-pl/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Kontynuuj jazdę[na %s]
4 | Skręć lekko w prawo[w %s]
5 | Skręć w prawo[w %s]
6 | Skręć ostro w prawo[w %s]
7 | Zawróć[na %s]
8 | Skręć ostro w lewo[w %s]
9 | Skręć w lewo[w %s]
10 | Skręć lekko w lewo[w %s]
11 | Dotarłeś do punktu pośredniego
12 | [Jedź %s]
13 | Wjedź na rondo i opuść je pierwszym zjazdem[w %s]
14 | Wjedź na rondo i opuść je drugim zjazdem[w %s]
15 | Wjedź na rondo i opuść je trzecim zjazdem[w %s]
16 | Wjedź na rondo i opuść je czwartym zjazdem[w %s]
17 | Wjedź na rondo i opuść je piątym zjazdem[w %s]
18 | Wjedź na rondo i opuść je szóstym zjazdem[w %s]
19 | Wjedź na rondo i opuść je siódmym zjazdem[w %s]
20 | Wjedź na rondo i opuść je ósmym zjazdem[w %s]
21 |
22 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/kml_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
22 |
23 |
29 |
30 |
36 |
37 |
41 |
42 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/NooTous/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
15 |
18 |
21 |
22 |
23 |
24 |
30 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/utils/WebImageCache.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.utils;
2 |
3 | import android.graphics.Bitmap;
4 | import android.util.Log;
5 |
6 | import java.util.LinkedHashMap;
7 |
8 | /**
9 | * Simple memory cache for handling images loaded from the web.
10 | * The url is the key.
11 | * @author M.Kergall
12 | */
13 | public class WebImageCache {
14 | LinkedHashMap mCacheMap;
15 | int mCapacity;
16 |
17 | public WebImageCache(int maxItems) {
18 | mCapacity = maxItems;
19 | mCacheMap = new LinkedHashMap(maxItems+1, 1.1f, true){
20 | private static final long serialVersionUID = -4831331496601290979L;
21 | protected boolean removeEldestEntry(Entry eldest) {
22 | return size() > mCapacity;
23 | }
24 | };
25 | }
26 |
27 | private void putInCache(String url, Bitmap image){
28 | synchronized(mCacheMap){
29 | mCacheMap.put(url, image);
30 | }
31 | //Log.d(BonusPackHelper.LOG_TAG, "WebImageCache:updateCache size="+mCacheMap.size());
32 | }
33 |
34 | /**
35 | * get the image, either from the cache, or from the web if not in the cache.
36 | * Can be called by multiple threads.
37 | * If 2 threads ask for the same url simultaneously, this could put the image twice in the cache.
38 | * => TODO, have a "queue" of current requests.
39 | * @param url of the image
40 | * @return the image, or null if any failure.
41 | */
42 | public Bitmap get(String url){
43 | Bitmap image;
44 | synchronized(mCacheMap) {
45 | image = mCacheMap.get(url);
46 | }
47 | if (image == null){
48 | Log.d(BonusPackHelper.LOG_TAG, "WebImageCache:load :"+url);
49 | image = BonusPackHelper.loadBitmap(url);
50 | if (image != null){
51 | putInCache(url, image);
52 | }
53 | }
54 | return image;
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/itinerary_bubble.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
20 |
26 |
27 |
34 |
42 |
43 |
49 |
50 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/kml/LineStyle.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.kml;
2 |
3 | import android.graphics.Paint;
4 | import android.os.Parcel;
5 | import android.os.Parcelable;
6 |
7 | import java.io.IOException;
8 | import java.io.Writer;
9 |
10 | /** Handling of KML LineStyle */
11 | public class LineStyle extends ColorStyle implements Parcelable {
12 | public float mWidth;
13 |
14 | public LineStyle(){
15 | this(0, 1.0f);
16 | }
17 |
18 | public LineStyle(int color, float width){
19 | super(color);
20 | mWidth = width;
21 | }
22 |
23 | /**
24 | * @return a Paint corresponding to the LineStyle (for a line or a polygon outline)
25 | */
26 | public Paint getOutlinePaint(){
27 | Paint outlinePaint = new Paint();
28 | outlinePaint.setColor(getFinalColor());
29 | outlinePaint.setStrokeWidth(mWidth);
30 | outlinePaint.setStyle(Paint.Style.STROKE);
31 | return outlinePaint;
32 | }
33 |
34 | public void writeAsKML(Writer writer){
35 | try {
36 | writer.write("\n");
37 | super.writeAsKML(writer);
38 | //write the specifics:
39 | writer.write(""+mWidth+"\n");
40 | writer.write("\n");
41 | } catch (IOException e) {
42 | e.printStackTrace();
43 | }
44 | }
45 |
46 | //Parcelable implementation ------------
47 |
48 | @Override public int describeContents() {
49 | return 0;
50 | }
51 |
52 | @Override public void writeToParcel(Parcel out, int flags) {
53 | super.writeToParcel(out, flags);
54 | out.writeFloat(mWidth);
55 | }
56 |
57 | public static final Creator CREATOR = new Creator() {
58 | @Override public LineStyle createFromParcel(Parcel source) {
59 | return new LineStyle(source);
60 | }
61 | @Override public LineStyle[] newArray(int size) {
62 | return new LineStyle[size];
63 | }
64 | };
65 |
66 | public LineStyle(Parcel in){
67 | super(in);
68 | mWidth = in.readFloat();
69 | }
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/clustering/StaticCluster.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.clustering;
2 |
3 | import org.osmdroid.util.BoundingBox;
4 | import org.osmdroid.util.GeoPoint;
5 | import org.osmdroid.views.overlay.Marker;
6 |
7 | import java.util.ArrayList;
8 |
9 | /**
10 | * Cluster of Markers.
11 | * @author M.Kergall
12 | */
13 | public class StaticCluster {
14 | protected final ArrayList mItems = new ArrayList();
15 | protected GeoPoint mCenter;
16 | protected Marker mMarker;
17 |
18 | public StaticCluster(GeoPoint center) {
19 | mCenter = center;
20 | }
21 |
22 | public void setPosition(GeoPoint center){
23 | mCenter = center;
24 | }
25 |
26 | public GeoPoint getPosition() {
27 | return mCenter;
28 | }
29 |
30 | public int getSize() {
31 | return mItems.size();
32 | }
33 |
34 | public Marker getItem(int index) {
35 | return mItems.get(index);
36 | }
37 |
38 | public boolean add(Marker t) {
39 | return mItems.add(t);
40 | }
41 |
42 | /** set the Marker to be displayed for this cluster */
43 | public void setMarker(Marker marker){
44 | mMarker = marker;
45 | }
46 |
47 | /** @return the Marker to be displayed for this cluster */
48 | public Marker getMarker(){
49 | return mMarker;
50 | }
51 |
52 | public BoundingBox getBoundingBox(){
53 | if (getSize()==0)
54 | return null;
55 | GeoPoint p = getItem(0).getPosition();
56 | BoundingBox bb = new BoundingBox(p.getLatitude(), p.getLongitude(), p.getLatitude(), p.getLongitude());
57 | for (int i=1; i
2 |
3 | Bleiben Sie[ auf %s]
4 | Biegen Sie leicht rechts ab[ auf %s]
5 | Biegen Sie rechts ab[ auf %s]
6 | Biegen Sie scharf rechts ab[ auf %s]
7 | Bitte wenden[ auf %s]
8 | Biegen Sie scharf links ab[ auf %s]
9 | Biegen Sie links ab[ auf %s]
10 | Biegen Sie leicht links ab[ auf %s]
11 | Sie haben einen Wegpunkt ihrer Reise erreicht
12 | [Begeben Sie sich auf %s]
13 | Begeben Sie sich in den Kreisverkehr und nehmen die erste Ausfahrt[ auf %s]
14 | Begeben Sie sich in den Kreisverkehr und nehmen die zweite Ausfahrt[ auf %s]
15 | Begeben Sie sich in den Kreisverkehr und nehmen die dritte Ausfahrt[ auf %s]
16 | Begeben Sie sich in den Kreisverkehr und nehmen die vierte Ausfahrt[ auf %s]
17 | Begeben Sie sich in den Kreisverkehr und nehmen die fünfte Ausfahrt[ auf %s]
18 | Begeben Sie sich in den Kreisverkehr und nehmen die sechste Ausfahrt[ auf %s]
19 | Begeben Sie sich in den Kreisverkehr und nehmen die siebente Ausfahrt[ auf %s]
20 | Begeben Sie sich in den Kreisverkehr und nehmen die achte Ausfahrt[ auf %s]
21 |
22 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/java/com/osmnavigator/KmlStyleListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.osmnavigator;
2 |
3 | import java.util.ArrayList;
4 | import java.util.HashMap;
5 |
6 | import org.osmdroid.bonuspack.kml.Style;
7 | import org.osmdroid.bonuspack.kml.StyleSelector;
8 |
9 | import android.content.Context;
10 | import android.view.LayoutInflater;
11 | import android.view.View;
12 | import android.view.ViewGroup;
13 | import android.widget.BaseAdapter;
14 | import android.widget.ImageView;
15 | import android.widget.TextView;
16 |
17 | public class KmlStyleListAdapter extends BaseAdapter {
18 |
19 | protected ArrayList mStyleList;
20 |
21 | public KmlStyleListAdapter(Context context, ArrayList styleList) {
22 | mStyleList = styleList;
23 | }
24 |
25 | @Override public Object getItem(int itemId) {
26 | return mStyleList.get(itemId);
27 | }
28 |
29 | @Override public int getCount() {
30 | return mStyleList.size();
31 | }
32 |
33 | @Override public long getItemId(int itemId) {
34 | return itemId;
35 | }
36 |
37 | @Override public View getView(int position, View convertView, ViewGroup viewGroup) {
38 | String item = (String)getItem(position);
39 | if (convertView == null) {
40 | LayoutInflater inflater = (LayoutInflater) viewGroup.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
41 | convertView = inflater.inflate(R.layout.kml_list_item, null);
42 | }
43 | TextView itemText = (TextView) convertView.findViewById(R.id.listItemTxt);
44 | itemText.setText(item);
45 |
46 | ImageView img = (ImageView)convertView.findViewById(R.id.listItemImg);
47 | Style style = MapActivity.mKmlDocument.getStyle(item);
48 | if (style != null && style.mIconStyle != null && style.mIconStyle.mIcon != null)
49 | img.setImageDrawable(style.mIconStyle.getFinalIcon(convertView.getContext()));
50 | else
51 | img.setImageDrawable(null);
52 |
53 | return convertView;
54 | }
55 |
56 | @Override public boolean hasStableIds() {
57 | return false;
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/java/com/osmnavigator/POIInfoWindow.java:
--------------------------------------------------------------------------------
1 | package com.osmnavigator;
2 |
3 | import android.content.Intent;
4 | import android.net.Uri;
5 | import android.view.View;
6 | import android.widget.Button;
7 | import android.widget.ImageView;
8 |
9 | import org.osmdroid.bonuspack.location.POI;
10 | import org.osmdroid.views.MapView;
11 | import org.osmdroid.views.overlay.Marker;
12 | import org.osmdroid.views.overlay.infowindow.MarkerInfoWindow;
13 |
14 | /**
15 | * A customized InfoWindow handling POIs.
16 | * We inherit from MarkerInfoWindow as it already provides most of what we want.
17 | * And we just add support for a "more info" button.
18 | *
19 | * @author M.Kergall
20 | */
21 | public class POIInfoWindow extends MarkerInfoWindow {
22 |
23 | private POI mSelectedPOI;
24 |
25 | public POIInfoWindow(MapView mapView) {
26 | super(org.osmdroid.bonuspack.R.layout.bonuspack_bubble, mapView);
27 |
28 | Button btn = (Button)(mView.findViewById(org.osmdroid.bonuspack.R.id.bubble_moreinfo));
29 | btn.setOnClickListener(new View.OnClickListener() {
30 | public void onClick(View view) {
31 | if (mSelectedPOI.mUrl != null){
32 | Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(mSelectedPOI.mUrl));
33 | view.getContext().startActivity(myIntent);
34 | }
35 | }
36 | });
37 | }
38 |
39 | @Override public void onOpen(Object item){
40 | Marker marker = (Marker)item;
41 | mSelectedPOI = (POI)marker.getRelatedObject();
42 | super.onOpen(item);
43 |
44 | //Fetch the thumbnail in background
45 | if (mSelectedPOI.mThumbnailPath != null){
46 | ImageView imageView = (ImageView)mView.findViewById(org.osmdroid.bonuspack.R.id.bubble_image);
47 | mSelectedPOI.fetchThumbnailOnThread(imageView);
48 | }
49 |
50 | //Show or hide "more info" button:
51 | if (mSelectedPOI.mUrl != null)
52 | mView.findViewById(org.osmdroid.bonuspack.R.id.bubble_moreinfo).setVisibility(View.VISIBLE);
53 | else
54 | mView.findViewById(org.osmdroid.bonuspack.R.id.bubble_moreinfo).setVisibility(View.GONE);
55 |
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/bonuspack_bubble_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
20 |
28 |
35 |
36 |
43 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/res/values-fr/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Continuez[ sur %s]
4 | Tournez légèrement à droite[ sur %s]
5 | Tournez à droite[ sur %s]
6 | Tournez fortement à droite[ sur %s]
7 | Faites demi-tour[ sur %s]
8 | Tournez fortement à gauche[ sur %s]
9 | Tournez à gauche[ sur %s]
10 | Tournez légèrement à gauche[ sur %s]
11 | Vous êtes arrivé à une étape de votre voyage
12 | [Prenez %s]
13 | Au rond-point, prenez la première sortie[ sur %s]
14 | Au rond-point, prenez la deuxième sortie[ sur %s]
15 | Au rond-point, prenez la troisième sortie[ sur %s]
16 | Au rond-point, prenez la quatrième sortie[ sur %s]
17 | Au rond-point, prenez la cinquième sortie[ sur %s]
18 | Au rond-point, prenez la sixième sortie[ sur %s]
19 | Au rond-point, prenez la septième sortie[ sur %s]
20 | Au rond-point, prenez la huitième sortie[ sur %s]
21 | Prenez la rampe sur la gauche[ sur %s]
22 | Prenez la rampe sur la droite[ sur %s]
23 | Prenez la rampe droit devant[ sur %s]
24 |
25 |
--------------------------------------------------------------------------------
/OSMBonusPackTuto/src/main/res/layout/bonuspack_bubble_black.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
16 |
20 |
28 |
35 |
36 |
43 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/values/direction_icons.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 | - @drawable/ic_empty
7 | - @drawable/ic_continue
8 | - @drawable/ic_continue
9 | - @drawable/ic_slight_left
10 | - @drawable/ic_turn_left
11 | - @drawable/ic_sharp_left
12 | - @drawable/ic_slight_right
13 | - @drawable/ic_turn_right
14 | - @drawable/ic_sharp_right
15 | - @drawable/ic_empty
16 | - @drawable/ic_empty
17 | - @drawable/ic_continue
18 | - @drawable/ic_u_turn
19 | - @drawable/ic_u_turn
20 | - @drawable/ic_u_turn
21 | - @drawable/ic_slight_left
22 | - @drawable/ic_slight_right
23 | - @drawable/ic_slight_left
24 | - @drawable/ic_slight_right
25 | - @drawable/ic_continue
26 | - @drawable/ic_empty
27 | - @drawable/ic_empty
28 | - @drawable/ic_empty
29 | - @drawable/ic_empty
30 | - @drawable/ic_arrived
31 | - @drawable/ic_arrived
32 | - @drawable/ic_arrived
33 | - @drawable/ic_roundabout
34 | - @drawable/ic_roundabout
35 | - @drawable/ic_roundabout
36 | - @drawable/ic_roundabout
37 | - @drawable/ic_roundabout
38 | - @drawable/ic_roundabout
39 | - @drawable/ic_roundabout
40 | - @drawable/ic_roundabout
41 | - @drawable/ic_empty
42 | - @drawable/ic_empty
43 | - @drawable/ic_empty
44 | - @drawable/ic_empty
45 | - @drawable/ic_empty
46 |
47 |
48 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/res/values-ru/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Продолжайте[ по %s]
4 | Поверните немного направо[ на %s]
5 | Поверните направо[ на %s]
6 | Поверните резко направо[ на %s]
7 | Развернитесь[ на %s]
8 | Поверните резко налево[ на %s]
9 | Поверните налево[ на %s]
10 | Поверните немного налево[ на %s]
11 | Вы добрались до места назначения
12 | [Продолжайте %s]
13 | На кольцевой развилке поверните на первом съезде[ на %s]
14 | На кольцевой развилке поверните на втором съезде[ на %s]
15 | На кольцевой развилке поверните на третьем съезде[ на %s]
16 | На кольцевой развилке поверните на четвертом съезде[ на %s]
17 | На кольцевой развилке поверните на пятом съезде[ на %s]
18 | На кольцевой развилке поверните на шестом съезде[ на %s]
19 | На кольцевой развилке поверните на седьмом съезде[ на %s]
20 | На кольцевой развилке поверните на восьмом съезде[ на %s]
21 |
22 | %s км
23 | %s м
24 | %s ч
25 | %s мин
26 | %s сек
27 |
28 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/java/com/osmnavigator/StartSharingActivity.java:
--------------------------------------------------------------------------------
1 | package com.osmnavigator;
2 |
3 | import android.app.Activity;
4 | import android.content.Intent;
5 | import android.content.SharedPreferences;
6 | import android.os.Bundle;
7 | import android.preference.PreferenceManager;
8 | import android.view.View;
9 | import android.widget.Button;
10 | import android.widget.EditText;
11 |
12 | public class StartSharingActivity extends Activity {
13 |
14 | EditText eNickName, eGroup, eMessage;
15 |
16 | @Override
17 | protected void onCreate(Bundle savedInstanceState) {
18 | super.onCreate(savedInstanceState);
19 | setContentView(R.layout.start_sharing);
20 |
21 | SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
22 |
23 | eNickName = (EditText) findViewById(R.id.nickname);
24 | eNickName.setText(SP.getString("NICKNAME", ""));
25 |
26 | eGroup = (EditText) findViewById(R.id.group);
27 | eGroup.setText(SP.getString("GROUP", ""));
28 |
29 | eMessage = (EditText) findViewById(R.id.message);
30 |
31 | Button btnOk = (Button) findViewById(R.id.btnOK);
32 | btnOk.setOnClickListener(new View.OnClickListener() {
33 | public void onClick(View view) {
34 | saveAndFinish();
35 | }
36 | });
37 | }
38 |
39 | protected void saveAndFinish() {
40 | String nickname = eNickName.getText().toString();
41 | String group = eGroup.getText().toString();
42 | String message = eMessage.getText().toString();
43 |
44 | //Keep in prefs
45 | SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
46 | SharedPreferences.Editor editor = SP.edit();
47 | editor.putString("NICKNAME", nickname);
48 | editor.putString("GROUP", group);
49 | editor.commit();
50 |
51 | Intent intent = new Intent();
52 | intent.putExtra("NICKNAME", nickname);
53 | intent.putExtra("GROUP", group);
54 | intent.putExtra("MESSAGE", message);
55 | setResult(RESULT_OK, intent);
56 | finish();
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/NooTous/src/main/java/com/nootous/SettingsActivity.java:
--------------------------------------------------------------------------------
1 | package com.nootous;
2 |
3 | import android.app.Activity;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import android.content.SharedPreferences;
7 | import android.os.Bundle;
8 | import android.view.View;
9 | import android.widget.Button;
10 |
11 | import androidx.annotation.NonNull;
12 | import androidx.appcompat.app.ActionBar;
13 | import androidx.appcompat.app.AppCompatActivity;
14 | import com.google.android.material.slider.LabelFormatter;
15 | import com.google.android.material.slider.Slider;
16 |
17 | public class SettingsActivity extends AppCompatActivity {
18 |
19 | @Override protected void onCreate(Bundle savedInstanceState) {
20 | super.onCreate(savedInstanceState);
21 | setContentView(R.layout.settings_activity);
22 | ActionBar actionBar = getSupportActionBar();
23 | if (actionBar != null) {
24 | actionBar.setDisplayHomeAsUpEnabled(false);
25 | }
26 |
27 | Slider slider = (Slider)findViewById(R.id.slider_position);
28 | float value = getSharedPreferences("NOOTOUS", Context.MODE_PRIVATE).getFloat("BLURRING", 100.0f);
29 | slider.setValue(value);
30 | slider.setLabelFormatter(new MyLabelFormatter());
31 |
32 | Button okButton = (Button)findViewById(R.id.button_ok);
33 | okButton.setOnClickListener(new View.OnClickListener() {
34 | @Override public void onClick(View view) {
35 | saveAndQuit();
36 | }
37 | });
38 | }
39 |
40 | void saveAndQuit(){
41 | Slider slider = (Slider)findViewById(R.id.slider_position);
42 | float value = slider.getValue();
43 | SharedPreferences prefs = getSharedPreferences("NOOTOUS", Activity.MODE_PRIVATE);
44 | SharedPreferences.Editor ed = prefs.edit();
45 | ed.putFloat("BLURRING", value);
46 | ed.apply();
47 | setResult(100, new Intent());
48 | finish();
49 | }
50 |
51 | class MyLabelFormatter implements LabelFormatter {
52 | @NonNull
53 | @Override
54 | public String getFormattedValue(float value) {
55 | return ""+(int)value+"m";
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Configuration for probot-stale - https://github.com/probot/stale
2 |
3 | # Number of days of inactivity before an Issue or Pull Request becomes stale
4 | daysUntilStale: 360
5 |
6 | # Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7 | # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8 | daysUntilClose: 90
9 |
10 | # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11 | onlyLabels: []
12 |
13 | # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14 | exemptLabels:
15 | - pinned
16 |
17 | # Set to true to ignore issues in a project (defaults to false)
18 | exemptProjects: false
19 |
20 | # Set to true to ignore issues in a milestone (defaults to false)
21 | exemptMilestones: false
22 |
23 | # Set to true to ignore issues with an assignee (defaults to false)
24 | exemptAssignees: false
25 |
26 | # Label to use when marking as stale
27 | staleLabel: "stale"
28 |
29 | # Comment to post when marking as stale. Set to `false` to disable
30 | markComment: >
31 | This issue has been automatically marked as stale because it has not had
32 | recent activity. Please comment here if it is still valid so that we can
33 | reprioritize. Thank you!
34 |
35 | # Comment to post when removing the stale label.
36 | # unmarkComment: >
37 | # Your comment here.
38 |
39 | # Comment to post when closing a stale Issue or Pull Request.
40 | closeComment: >
41 | Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.
42 |
43 | # Limit the number of actions per hour, from 1-30. Default is 30
44 | limitPerRun: 20
45 |
46 | # Limit to only `issues` or `pulls`
47 | # only: issues
48 |
49 | # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
50 | # pulls:
51 | # daysUntilStale: 30
52 | # markComment: >
53 | # This pull request has been automatically marked as stale because it has not had
54 | # recent activity. It will be closed if no further activity occurs. Thank you
55 | # for your contributions.
56 |
57 | # issues:
58 | # exemptLabels:
59 | # - confirmed
60 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/routing/RoadLeg.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.routing;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 | import android.util.Log;
6 |
7 | import org.osmdroid.bonuspack.utils.BonusPackHelper;
8 |
9 | import java.util.ArrayList;
10 |
11 | /** Road Leg is the portion of the road between 2 waypoints (intermediate points requested)
12 | *
13 | * @author M.Kergall
14 | *
15 | */
16 | public class RoadLeg implements Parcelable {
17 | /** in km */
18 | public double mLength;
19 | /** in sec */
20 | public double mDuration;
21 | /** starting node of the leg, as index in nodes array */
22 | public int mStartNodeIndex;
23 | /** and ending node */
24 | public int mEndNodeIndex;
25 |
26 | public RoadLeg(){
27 | mLength = mDuration = 0.0;
28 | mStartNodeIndex = mEndNodeIndex = 0;
29 | }
30 |
31 | public RoadLeg(int startNodeIndex, int endNodeIndex,
32 | ArrayList nodes){
33 | mStartNodeIndex = startNodeIndex;
34 | mEndNodeIndex = endNodeIndex;
35 | mLength = mDuration = 0.0;
36 | for (int i=startNodeIndex; i<=endNodeIndex; i++){ //TODO: <= or < ??? To check.
37 | RoadNode node = nodes.get(i);
38 | mLength += node.mLength;
39 | mDuration += node.mDuration;
40 | }
41 | Log.d(BonusPackHelper.LOG_TAG, "Leg: " + startNodeIndex + "-" + endNodeIndex
42 | + ", length=" + mLength + "km, duration="+mDuration+"s");
43 | }
44 |
45 | //--- Parcelable implementation
46 |
47 | @Override public int describeContents() {
48 | return 0;
49 | }
50 |
51 | @Override public void writeToParcel(Parcel out, int flags) {
52 | out.writeDouble(mLength);
53 | out.writeDouble(mDuration);
54 | out.writeInt(mStartNodeIndex);
55 | out.writeInt(mEndNodeIndex);
56 | }
57 |
58 | public static final Creator CREATOR = new Creator() {
59 | @Override public RoadLeg createFromParcel(Parcel source) {
60 | return new RoadLeg(source);
61 | }
62 | @Override public RoadLeg[] newArray(int size) {
63 | return new RoadLeg[size];
64 | }
65 | };
66 |
67 | private RoadLeg(Parcel in){
68 | mLength = in.readDouble();
69 | mDuration = in.readDouble();
70 | mStartNodeIndex = in.readInt();
71 | mEndNodeIndex = in.readInt();
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/NooTous/src/main/java/com/nootous/Trend.java:
--------------------------------------------------------------------------------
1 | package com.nootous;
2 |
3 | import android.util.Log;
4 | import com.google.gson.JsonArray;
5 | import com.google.gson.JsonElement;
6 | import com.google.gson.JsonObject;
7 | import com.google.gson.JsonParser;
8 | import com.google.gson.JsonSyntaxException;
9 | import org.osmdroid.bonuspack.sharing.Friends;
10 | import org.osmdroid.bonuspack.utils.BonusPackHelper;
11 | import java.util.List;
12 |
13 | public class Trend {
14 | public String name;
15 | public int count;
16 | public Trend(JsonObject jPO) {
17 | name = jPO.get("group_id").getAsString();
18 | count = jPO.get("group_count").getAsInt();
19 | }
20 | public String displayedCount(){
21 | if (count < 10)
22 | return String.valueOf(count);
23 | else if (count < 100)
24 | return ">10";
25 | else if (count < 1000)
26 | return ">100";
27 | else if (count < 100000)
28 | return String.valueOf(count/1000)+"K";
29 | else
30 | return String.valueOf(count/1000000)+"M";
31 | }
32 |
33 | public static String getTrends(List trends) {
34 | String url = Friends.NAV_SERVER_URL + "jtrends.php";
35 | String result = BonusPackHelper.requestStringFromUrl(url);
36 | if (result == null) {
37 | return "Technical error with the server";
38 | }
39 | Log.d(BonusPackHelper.LOG_TAG, "getTrends:" + url);
40 | try {
41 | JsonElement json = JsonParser.parseString(result);
42 | JsonObject jResult = json.getAsJsonObject();
43 | String answer = jResult.get("answer").getAsString();
44 | if (!"ok".equals(answer)) {
45 | return jResult.get("error").getAsString();
46 | }
47 | JsonArray jTrends = jResult.get("trends").getAsJsonArray();
48 | trends.clear();
49 | for (JsonElement jPartner:jTrends){
50 | JsonObject jPO = jPartner.getAsJsonObject();
51 | Trend trend = new Trend(jPO);
52 | trends.add(trend);
53 | }
54 | } catch (JsonSyntaxException e) {
55 | return "Technical error with the server";
56 | }
57 | return null;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/routing/RoadNode.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.routing;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 |
6 | import org.osmdroid.util.GeoPoint;
7 |
8 | /** Road intersection, with instructions about what to do at this intersection.
9 | *
10 | * @author M.Kergall
11 | */
12 | public class RoadNode implements Parcelable {
13 | /** A common reference has been chosen for maneuver types.
14 | * The MapQuest Open Maneuver Types list has been selected, as it was the most precise and seems stable.
15 | * All road managers convert the service-specific values to this common reference.
16 | * @see MapQuest Maneuver Types
17 | * */
18 | public int mManeuverType;
19 | /** textual information on what to do at this intersection */
20 | public String mInstructions;
21 | /** index in road links array - internal use only, for MapQuest directions */
22 | public int mNextRoadLink;
23 | /** in km to the next node */
24 | public double mLength;
25 | /** in seconds to the next node */
26 | public double mDuration;
27 | /** position of the node */
28 | public GeoPoint mLocation;
29 |
30 | public RoadNode(){
31 | mManeuverType = 0;
32 | mNextRoadLink = -1;
33 | mLength = mDuration = 0.0;
34 | }
35 |
36 | //--- Parcelable implementation
37 |
38 | @Override public int describeContents() {
39 | return 0;
40 | }
41 |
42 | @Override public void writeToParcel(Parcel out, int flags) {
43 | out.writeInt(mManeuverType);
44 | out.writeString(mInstructions);
45 | out.writeDouble(mLength);
46 | out.writeDouble(mDuration);
47 | out.writeParcelable(mLocation, 0);
48 | }
49 |
50 | public static final Creator CREATOR = new Creator() {
51 | @Override public RoadNode createFromParcel(Parcel source) {
52 | return new RoadNode(source);
53 | }
54 | @Override public RoadNode[] newArray(int size) {
55 | return new RoadNode[size];
56 | }
57 | };
58 |
59 | private RoadNode(Parcel in){
60 | mManeuverType = in.readInt();
61 | mInstructions = in.readString();
62 | mLength = in.readDouble();
63 | mDuration = in.readDouble();
64 | mLocation = in.readParcelable(GeoPoint.class.getClassLoader());
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Continue[ on %s]
4 | Turn slight right[ on %s]
5 | Turn right[ on %s]
6 | Turn sharp right[ on %s]
7 | U-Turn[ on %s]
8 | Turn sharp left[ on %s]
9 | Turn left[ on %s]
10 | Turn slight left[ on %s]
11 | You have reached a waypoint of your trip
12 | [Go on %s]
13 | Enter roundabout and leave at first exit[ on %s]
14 | Enter roundabout and leave at second exit[ on %s]
15 | Enter roundabout and leave at third exit[ on %s]
16 | Enter roundabout and leave at fourth exit[ on %s]
17 | Enter roundabout and leave at fifth exit[ on %s]
18 | Enter roundabout and leave at sixth exit[ on %s]
19 | Enter roundabout and leave at seventh exit[ on %s]
20 | Enter roundabout and leave at eighth exit[ on %s]
21 | Take the ramp on the left[ on %s]
22 | Take the ramp on the right[ on %s]
23 | Take the ramp straight ahead[ on %s]
24 |
25 | %skm
26 | %sm
27 |
28 | %sh
29 | %smin
30 | %ssec
31 |
32 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/kml/StyleMap.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.kml;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 |
6 | import java.io.IOException;
7 | import java.io.Writer;
8 | import java.util.HashMap;
9 | import java.util.Map;
10 |
11 | /**
12 | * Handling of a KML StyleMap.
13 | * @author M.Kergall
14 | */
15 | public class StyleMap extends StyleSelector implements Parcelable {
16 |
17 | protected HashMap mPairs;
18 |
19 | /** default constructor */
20 | public StyleMap(){
21 | super();
22 | mPairs = new HashMap();
23 | }
24 |
25 | public void setPair(String key, String styleUrl){
26 | mPairs.put(key, styleUrl);
27 | }
28 |
29 | public String getStyleUrl(String key){
30 | return mPairs.get(key);
31 | }
32 |
33 | /** @return the "normal" Style referenced, if any - null if none */
34 | public Style getNormalStyle(KmlDocument doc){
35 | return doc.getStyle(getStyleUrl("normal"));
36 | }
37 |
38 | @Override public void writeAsKML(Writer writer, String styleId){
39 | try {
40 | writer.write("\n");
41 | for (Map.Entry entry : mPairs.entrySet()) {
42 | String key = entry.getKey();
43 | String styleUrl = entry.getValue();
44 | writer.write(""+key+""+styleUrl+"\n");
45 | }
46 | writer.write("\n");
47 | } catch (IOException e) {
48 | e.printStackTrace();
49 | }
50 | }
51 |
52 | //Parcelable implementation ------------
53 |
54 | @Override public int describeContents() {
55 | return 0;
56 | }
57 |
58 | @Override public void writeToParcel(Parcel out, int flags) {
59 | //out.writeMap(mPairs); - not recommended in the Google JavaDoc, for mysterious reasons, so:
60 | out.writeInt(mPairs.size());
61 | for(String key : mPairs.keySet()){
62 | out.writeString(key);
63 | out.writeString(mPairs.get(key));
64 | }
65 | }
66 |
67 | public static final Creator CREATOR = new Creator() {
68 | @Override public StyleMap createFromParcel(Parcel source) {
69 | return new StyleMap(source);
70 | }
71 | @Override public StyleMap[] newArray(int size) {
72 | return new StyleMap[size];
73 | }
74 | };
75 |
76 | public StyleMap(Parcel in){
77 | int size = in.readInt();
78 | mPairs = new HashMap(size);
79 | for(int i=0; i waypoints);
30 |
31 | /**
32 | * @param waypoints
33 | * @return the list of roads found.
34 | * Road at index 0 is the shortest (in time).
35 | * The array may contain more entries, for alternate routes - assuming the routing service used supports alternate routes.
36 | * In case of error, return 1 road with its status set to error, and its shape with just straight lines between waypoints.
37 | */
38 | public abstract Road[] getRoads(ArrayList waypoints);
39 |
40 | public RoadManager() {
41 | mOptions = "";
42 | }
43 |
44 | /**
45 | * Add an option that will be used in the route request.
46 | * Note that some options are set in the request in all cases.
47 | * @param requestOption see provider documentation.
48 | * Just one example: "routeType=bicycle" for MapQuest; "mode=bicycling" for Google.
49 | */
50 | public void addRequestOption(String requestOption){
51 | mOptions += "&" + requestOption;
52 | }
53 |
54 | /**
55 | * @return the GeoPoint as a string, properly formatted: lat,lon
56 | */
57 | protected String geoPointAsString(GeoPoint p){
58 | Locale l = null;
59 | return String.format(l, "%.10f,%.10f", p.getLatitude(), p.getLongitude());
60 | }
61 |
62 | /**
63 | * @return the GeoPoint as a string, properly formatted: lon,lat
64 | */
65 | protected String geoPointAsLonLatString(GeoPoint p){
66 | Locale l = null;
67 | return String.format(l, "%.10f,%.10f", p.getLongitude(), p.getLatitude());
68 | }
69 |
70 | /**
71 | * Using the road high definition shape, builds and returns a Polyline.
72 | * @param road
73 | * @param color Android Color. Setting some transparency is highly recommended.
74 | * @param width in pixels.
75 | */
76 | public static Polyline buildRoadOverlay(Road road, int color, float width){
77 | Polyline roadOverlay = new Polyline();
78 | roadOverlay.setColor(color);
79 | roadOverlay.setWidth(width);
80 | if (road != null) {
81 | ArrayList polyline = road.mRouteHigh;
82 | roadOverlay.setPoints(polyline);
83 | }
84 | return roadOverlay;
85 | }
86 |
87 | /**
88 | * Builds an overlay for the road shape with a default (and nice!) style.
89 | * @return route shape overlay
90 | */
91 | public static Polyline buildRoadOverlay(Road road){
92 | return buildRoadOverlay(road, 0x800000FF, 5.0f);
93 | }
94 |
95 | }
96 |
--------------------------------------------------------------------------------
/OSMNavigator/src/main/res/layout/kml_style.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
13 |
14 |
19 |
20 |
24 |
31 |
38 |
39 |
40 |
44 |
52 |
59 |
60 |
61 |
65 |
66 |
70 |
77 |
84 |
85 |
86 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem https://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34 |
35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37 |
38 | @rem Find java.exe
39 | if defined JAVA_HOME goto findJavaFromJavaHome
40 |
41 | set JAVA_EXE=java.exe
42 | %JAVA_EXE% -version >NUL 2>&1
43 | if "%ERRORLEVEL%" == "0" goto init
44 |
45 | echo.
46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47 | echo.
48 | echo Please set the JAVA_HOME variable in your environment to match the
49 | echo location of your Java installation.
50 |
51 | goto fail
52 |
53 | :findJavaFromJavaHome
54 | set JAVA_HOME=%JAVA_HOME:"=%
55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56 |
57 | if exist "%JAVA_EXE%" goto init
58 |
59 | echo.
60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61 | echo.
62 | echo Please set the JAVA_HOME variable in your environment to match the
63 | echo location of your Java installation.
64 |
65 | goto fail
66 |
67 | :init
68 | @rem Get command-line arguments, handling Windows variants
69 |
70 | if not "%OS%" == "Windows_NT" goto win9xME_args
71 |
72 | :win9xME_args
73 | @rem Slurp the command line arguments.
74 | set CMD_LINE_ARGS=
75 | set _SKIP=2
76 |
77 | :win9xME_args_slurp
78 | if "x%~1" == "x" goto execute
79 |
80 | set CMD_LINE_ARGS=%*
81 |
82 | :execute
83 | @rem Setup the command line
84 |
85 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
86 |
87 |
88 | @rem Execute Gradle
89 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
90 |
91 | :end
92 | @rem End local scope for the variables with windows NT shell
93 | if "%ERRORLEVEL%"=="0" goto mainEnd
94 |
95 | :fail
96 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
97 | rem the _cmd.exe /c_ return code!
98 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
99 | exit /b 1
100 |
101 | :mainEnd
102 | if "%OS%"=="Windows_NT" endlocal
103 |
104 | :omega
105 |
--------------------------------------------------------------------------------
/OSMBonusPack/src/main/java/org/osmdroid/bonuspack/kml/Style.java:
--------------------------------------------------------------------------------
1 | package org.osmdroid.bonuspack.kml;
2 |
3 | import android.content.Context;
4 | import android.graphics.Bitmap;
5 | import android.graphics.Paint;
6 | import android.graphics.drawable.BitmapDrawable;
7 | import android.os.Parcel;
8 | import android.os.Parcelable;
9 |
10 | import java.io.File;
11 | import java.io.IOException;
12 | import java.io.Writer;
13 | import java.util.zip.ZipFile;
14 |
15 | /**
16 | * Handling of a KML Style, which may contain one PolyStyle, one LineStyle, and one IconStyle.
17 | * @author M.Kergall
18 | */
19 | public class Style extends StyleSelector implements Parcelable {
20 |
21 | public ColorStyle mPolyStyle;
22 | public LineStyle mLineStyle;
23 | public IconStyle mIconStyle;
24 |
25 | /** default constructor */
26 | public Style(){
27 | super();
28 | }
29 |
30 | /** simple constructor */
31 | public Style(Bitmap icon, int lineColor, float lineWidth, int fillColor){
32 | this();
33 | mIconStyle = new IconStyle();
34 | mIconStyle.mIcon = icon;
35 | mLineStyle = new LineStyle(lineColor, lineWidth);
36 | mPolyStyle = new ColorStyle(fillColor);
37 | }
38 |
39 | public void setIcon(String iconHref, File containerFile, ZipFile kmzContainer){
40 | if (mIconStyle == null)
41 | mIconStyle = new IconStyle();
42 | mIconStyle.setIcon(iconHref, containerFile, kmzContainer);
43 | }
44 |
45 | public BitmapDrawable getFinalIcon(Context context){
46 | if (mIconStyle != null)
47 | return mIconStyle.getFinalIcon(context);
48 | else
49 | return null;
50 | }
51 |
52 | public Paint getOutlinePaint(){
53 | if (mLineStyle != null)
54 | return mLineStyle.getOutlinePaint();
55 | else {
56 | Paint outlinePaint = new Paint();
57 | outlinePaint.setStyle(Paint.Style.STROKE);
58 | return outlinePaint;
59 | }
60 | }
61 |
62 | protected void writePolyStyle(Writer writer, ColorStyle colorStyle){
63 | try {
64 | writer.write("\n");
65 | colorStyle.writeAsKML(writer);
66 | writer.write("\n");
67 | } catch (IOException e) {
68 | e.printStackTrace();
69 | }
70 | }
71 |
72 | @Override public void writeAsKML(Writer writer, String styleId){
73 | try {
74 | writer.write("\n");
82 | } catch (IOException e) {
83 | e.printStackTrace();
84 | }
85 | }
86 |
87 | //Parcelable implementation ------------
88 |
89 | @Override public int describeContents() {
90 | return 0;
91 | }
92 |
93 | @Override public void writeToParcel(Parcel out, int flags) {
94 | out.writeParcelable(mLineStyle, flags);
95 | out.writeParcelable(mPolyStyle, flags);
96 | out.writeParcelable(mIconStyle, flags);
97 | }
98 |
99 | public static final Creator