Skip to content

Commit

Permalink
Samples improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Feb 26, 2019
1 parent 13ea7f9 commit 117f5b3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
3 changes: 1 addition & 2 deletions docs/Getting-Started-Developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ Code before latest release is not supported anymore (we do not have the resource
- The Samples app in mapsforge-samples-android is meant as a template and test case for building apps based on this version.
- There is now a MapViewerTemplate class for building Android apps, that gives simple hooks to implement an Android based application. For its use refer to the Samples app.
- After a successful build, you will find the Samples apk in mapsforge-samples-android/build/outputs/apk
- To run the Samples app, you will need to install any map called 'germany.map' onto the sdcard of a device or emulator.
- It is probably best if the map contains the area of central Berlin.
- To run the Samples app, you will need to install any map called 'berlin.map' onto the sdcard of a device or emulator.

### mapsforge-samples-awt

Expand Down
4 changes: 2 additions & 2 deletions mapsforge-samples-android/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@
<string name="dialog_reverse_geocoding_title">Reverse Geocoding</string>

<string name="startup_dontshowagain">Don\'t show again</string>
<string name="startup_message">To run this samples app, you need any map with filename germany.map installed on storage.\n\nadb push file.map /sdcard/germany.map</string>
<string name="startup_message">To run this samples app, you need any map with filename berlin.map installed on storage.\n\nadb push file.map /sdcard/berlin.map</string>
<string name="startup_message_tilestore">To run this sample activity, you need a TMS tile store at /sdcard/tilestore. Sample data in the app data directory.</string>
<string name="startup_message_multimap">To run this sample activity, you need to download a low-resolution world map first.</string>
<string name="startup_message_twomaps">To run this sample activity, you need also a map with filename second.map installed on storage.</string>
<string name="startup_message_poi">To run this sample activity, you need any poi with filename germany.poi installed on storage.\n\nadb push file.poi /sdcard/germany.poi</string>
<string name="startup_message_poi">To run this sample activity, you need any poi with filename berlin.poi installed on storage.\n\nadb push file.poi /sdcard/berlin.poi</string>

</resources>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018 devemux86
* Copyright 2018-2019 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
Expand Down Expand Up @@ -33,13 +33,12 @@
/**
* A very basic Android app example.
* <p>
* You'll need a map with filename germany.map from download.mapsforge.org in device storage.
* Can be berlin.map renamed as germany.map because of smaller size.
* You'll need a map with filename berlin.map from download.mapsforge.org in device storage.
*/
public class GettingStarted extends Activity {

// Name of the map file in device storage
private static final String MAP_FILE = "germany.map";
private static final String MAP_FILE = "berlin.map";

private MapView mapView;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Copyright 2010, 2011, 2012, 2013 mapsforge.org
* Copyright 2013-2015 Ludwig M Brinckmann
* Copyright 2016-2017 devemux86
* Copyright 2016-2019 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
Expand Down Expand Up @@ -122,6 +122,6 @@ protected File getMapFileDirectory() {
}

protected String getMapFileName() {
return "germany.map";
return "berlin.map";
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2015-2018 devemux86
* Copyright 2015-2019 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
Expand Down Expand Up @@ -46,7 +46,7 @@
*/
public class PoiSearchViewer extends DefaultTheme {

private static final String POI_FILE = Environment.getExternalStorageDirectory() + "/germany.poi";
private static final String POI_FILE = Environment.getExternalStorageDirectory() + "/berlin.poi";
private static final String POI_CATEGORY = "Restaurants";

private GroupLayer groupLayer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2014-2015 Ludwig M Brinckmann
* Copyright 2015-2018 devemux86
* Copyright 2015-2019 devemux86
* Copyright 2015 Andreas Schildbach
* Copyright 2017 usrusr
*
Expand Down Expand Up @@ -130,7 +130,7 @@ protected String getMapFileName() {
if (mapfile != null) {
return mapfile;
}
return "germany.map";
return "berlin.map";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2014 Ludwig M Brinckmann
* Copyright 2015-2018 devemux86
* Copyright 2015-2019 devemux86
*
* This program is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
Expand Down Expand Up @@ -67,7 +67,7 @@ protected int getMapViewId() {
*/
@Override
protected String getMapFileName() {
return "germany.map";
return "berlin.map";
}

/**
Expand Down

0 comments on commit 117f5b3

Please sign in to comment.