change net.osmand
git-svn-id: https://osmand.googlecode.com/svn/trunk@456 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
50249440e2
commit
e8841d413d
69 changed files with 497 additions and 533 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry excluding="**/MapPanel*|com/osmand/LogUtil.java|com/osmand/osm/io/OSMStorageWriter.java|com/osmand/DataExtraction.java|com/osmand/swing/|com/osmand/data/preparation/DataExtraction.java|com/osmand/data/preparation/DataIndexBuilder.java|com/osmand/osm/io/OsmStorageWriter.java|test/|com/osmand/ExceptionHandler.java|com/osmand/osm/util/|com/osmand/data/index/IndexBatchCreator.java|com/osmand/data/preparation/IndexCreator.java" kind="src" path="use"/>
|
||||
<classpathentry excluding="net/osmand/ExceptionHandler.java|net/osmand/LogUtil.java|net/osmand/osm/io/OsmStorageWriter.java|net/osmand/osm/util/|net/osmand/swing/|net/osmand/data/index/IndexBatchCreator.java|net/osmand/data/preparation/DataExtraction.java|net/osmand/data/preparation/IndexCreator.java" kind="src" path="use"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="lib" path="lib/bzip2-20090327.jar"/>
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<com.osmand.views.OsmandMapTileView android:id="@+id/MapView" android:layout_width="fill_parent" android:layout_height="fill_parent"></com.osmand.views.OsmandMapTileView>
|
||||
<com.osmand.views.OsmZoomControls android:id="@+id/ZoomControls"
|
||||
<net.osmand.views.OsmandMapTileView android:id="@+id/MapView" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
|
||||
<net.osmand.views.OsmZoomControls android:id="@+id/ZoomControls"
|
||||
android:layout_marginRight="8dp" android:layout_marginBottom="6dp"
|
||||
android:layout_width="120dp" android:layout_height="wrap_content" android:layout_gravity="bottom|right"/>
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<com.osmand.views.OsmandMapTileView android:id="@+id/MapView" android:layout_width="fill_parent" android:layout_height="fill_parent"></com.osmand.views.OsmandMapTileView>
|
||||
<com.osmand.views.OsmZoomControls android:id="@+id/ZoomControls"
|
||||
<net.osmand.views.OsmandMapTileView android:id="@+id/MapView" android:layout_width="fill_parent" android:layout_height="fill_parent"/>
|
||||
<net.osmand.views.OsmZoomControls android:id="@+id/ZoomControls"
|
||||
android:layout_marginRight="3dp" android:layout_marginBottom="2dp"
|
||||
android:layout_width="100dp" android:layout_height="wrap_content" android:layout_gravity="bottom|right"/>
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
<string name="downloading_list_indexes">Downloading list of available indexes</string>
|
||||
<string name="list_index_files_was_not_loaded">The index files are not loaded from osmand.googlecode.com.</string>
|
||||
<string name="select_index_file_to_download">If you can\'t find your region, you can make it by yourself.
|
||||
See osmand.googlecode.com.</string>
|
||||
See osmand.net.</string>
|
||||
<string name="show_poi_on_map">Auf Karte zeigen</string>
|
||||
<string name="fav_points_edited">Favorite point was edited</string>
|
||||
<string name="fav_points_not_exist">Keine favorisierten POI</string>
|
||||
|
|
|
@ -145,7 +145,7 @@
|
|||
<string name="downloading_list_indexes">Descargando lista de índices disponibles</string>
|
||||
<string name="list_index_files_was_not_loaded">Los archivos índices no son descargados de osmand.googlecode.com.</string>
|
||||
<string name="select_index_file_to_download">Si no puede encontrar su región, puede descargarla usted mismo.
|
||||
Ver osmand.googlecode.com.</string>
|
||||
Ver osmand.googlecode.net.</string>
|
||||
<string name="show_poi_on_map">Ver en mapa</string>
|
||||
<string name="fav_points_edited">Se editó el punto favorito</string>
|
||||
<string name="fav_points_not_exist">No hay puntos favoritos</string>
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
<string name="downloading_list_indexes">Downloading list of available indexes</string>
|
||||
<string name="list_index_files_was_not_loaded">The index files are not loaded from osmand.googlecode.com.</string>
|
||||
<string name="select_index_file_to_download">If you can\'t find your region, you can make it by yourself.
|
||||
See osmand.googlecode.com.</string>
|
||||
See osmand.net</string>
|
||||
<string name="show_poi_on_map">Show on map</string>
|
||||
<string name="fav_points_edited">Favorite point was edited</string>
|
||||
<string name="fav_points_not_exist">None of favorite points exist</string>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -7,22 +7,22 @@ import java.net.URL;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.data.index.IndexConstants;
|
||||
import net.osmand.data.index.IndexConstants.IndexPoiTable;
|
||||
import net.osmand.osm.Entity;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.Node;
|
||||
import net.osmand.osm.io.IOsmStorageFilter;
|
||||
import net.osmand.osm.io.OsmBaseStorage;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteStatement;
|
||||
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.data.AmenityType;
|
||||
import com.osmand.data.index.IndexConstants;
|
||||
import com.osmand.data.index.IndexConstants.IndexPoiTable;
|
||||
import com.osmand.osm.Entity;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.Node;
|
||||
import com.osmand.osm.io.IOsmStorageFilter;
|
||||
import com.osmand.osm.io.OsmBaseStorage;
|
||||
|
||||
public class AmenityIndexRepository extends BaseLocationIndexRepository<Amenity> {
|
||||
private static final Log log = LogUtil.getLog(AmenityIndexRepository.class);
|
||||
public final static int LIMIT_AMENITIES = 500;
|
|
@ -1,18 +1,18 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.data.MapObject;
|
||||
import net.osmand.osm.LatLon;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteStatement;
|
||||
|
||||
import com.osmand.data.MapObject;
|
||||
import com.osmand.osm.LatLon;
|
||||
|
||||
public class BaseLocationIndexRepository<T extends MapObject> {
|
||||
private static final Log log = LogUtil.getLog(BaseLocationIndexRepository.class);
|
||||
protected SQLiteDatabase db;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -9,14 +9,14 @@ import org.apache.commons.logging.Log;
|
|||
* 1. It is impossible to replace standard LogFactory (that is hidden in android.jar)
|
||||
* 2. Implementation of LogFactory always creates Logger.getLogger(String name)
|
||||
* 3. + It is possible to enable logger level by calling
|
||||
* Logger.getLogger("com.osmand").setLevel(Level.ALL);
|
||||
* Logger.getLogger("net.osmand").setLevel(Level.ALL);
|
||||
* 4. Logger goes to low level android.util.Log where android.util.Log#isLoggable(String, int) is checked
|
||||
* String tag -> is string of length 23 (stripped full class name)
|
||||
* 5. It is impossible to set for all tags debug level (info is default) - android.util.Log#isLoggable(String, int).
|
||||
*
|
||||
*/
|
||||
public class LogUtil {
|
||||
public static String TAG = "com.osmand"; //$NON-NLS-1$
|
||||
public static String TAG = "net.osmand"; //$NON-NLS-1$
|
||||
private static class OsmandLogImplementation implements Log {
|
||||
|
||||
private final String fullName;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
@ -7,16 +7,16 @@ import java.net.URLEncoder;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.osm.MapUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import android.util.Xml;
|
||||
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.data.AmenityType;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class NameFinderPoiFilter extends PoiFilter {
|
||||
|
||||
public static final String FILTER_ID = "name_finder"; //$NON-NLS-1$
|
|
@ -1,6 +1,8 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
|
||||
import net.osmand.activities.RoutingHelper;
|
||||
import net.osmand.activities.SavingTrackHelper;
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
|
@ -18,9 +20,6 @@ import android.os.Handler;
|
|||
import android.os.IBinder;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.activities.RoutingHelper;
|
||||
import com.osmand.activities.SavingTrackHelper;
|
||||
|
||||
public class NavigationService extends Service implements LocationListener {
|
||||
|
||||
public static class NavigationServiceBinder extends Binder {
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
|
@ -8,6 +8,12 @@ import java.io.InputStreamReader;
|
|||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.osmand.activities.RouteProvider.RouteService;
|
||||
import net.osmand.activities.search.SearchHistoryHelper;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.map.TileSourceManager;
|
||||
import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
import net.osmand.osm.LatLon;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
|
@ -16,13 +22,6 @@ import android.location.LocationManager;
|
|||
import android.os.Environment;
|
||||
import android.util.Log;
|
||||
|
||||
import com.osmand.activities.RouteProvider.RouteService;
|
||||
import com.osmand.activities.search.SearchHistoryHelper;
|
||||
import com.osmand.map.ITileSource;
|
||||
import com.osmand.map.TileSourceManager;
|
||||
import com.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
import com.osmand.osm.LatLon;
|
||||
|
||||
public class OsmandSettings {
|
||||
|
||||
public enum ApplicationMode {
|
||||
|
@ -47,7 +46,7 @@ public class OsmandSettings {
|
|||
}
|
||||
|
||||
// These settings are stored in SharedPreferences
|
||||
public static final String SHARED_PREFERENCES_NAME = "com.osmand.settings"; //$NON-NLS-1$
|
||||
public static final String SHARED_PREFERENCES_NAME = "net.osmand.settings"; //$NON-NLS-1$
|
||||
|
||||
public static final int CENTER_CONSTANT = 0;
|
||||
public static final int BOTTOM_CONSTANT = 1;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -6,10 +6,10 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.data.AmenityType;
|
||||
import com.osmand.data.index.IndexConstants.IndexPoiTable;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.data.index.IndexConstants.IndexPoiTable;
|
||||
import net.osmand.osm.MapUtils;
|
||||
|
||||
public class PoiFilter {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -6,14 +6,13 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.data.AmenityType;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.database.sqlite.SQLiteStatement;
|
||||
|
||||
import com.osmand.data.AmenityType;
|
||||
|
||||
public class PoiFiltersHelper {
|
||||
|
||||
public static PoiFilter getFilterById(Context ctx, String filterId){
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.Collator;
|
||||
|
@ -15,28 +15,28 @@ import java.util.Set;
|
|||
import java.util.TreeMap;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.osmand.data.Building;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.MapObject;
|
||||
import net.osmand.data.PostCode;
|
||||
import net.osmand.data.Region;
|
||||
import net.osmand.data.Street;
|
||||
import net.osmand.data.City.CityType;
|
||||
import net.osmand.data.index.IndexConstants;
|
||||
import net.osmand.data.index.IndexConstants.IndexBuildingTable;
|
||||
import net.osmand.data.index.IndexConstants.IndexCityTable;
|
||||
import net.osmand.data.index.IndexConstants.IndexStreetNodeTable;
|
||||
import net.osmand.data.index.IndexConstants.IndexStreetTable;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.osm.Node;
|
||||
import net.osmand.osm.Way;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
|
||||
import com.osmand.data.Building;
|
||||
import com.osmand.data.City;
|
||||
import com.osmand.data.MapObject;
|
||||
import com.osmand.data.PostCode;
|
||||
import com.osmand.data.Region;
|
||||
import com.osmand.data.Street;
|
||||
import com.osmand.data.City.CityType;
|
||||
import com.osmand.data.index.IndexConstants;
|
||||
import com.osmand.data.index.IndexConstants.IndexBuildingTable;
|
||||
import com.osmand.data.index.IndexConstants.IndexCityTable;
|
||||
import com.osmand.data.index.IndexConstants.IndexStreetNodeTable;
|
||||
import com.osmand.data.index.IndexConstants.IndexStreetTable;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.osm.Node;
|
||||
import com.osmand.osm.Way;
|
||||
|
||||
|
||||
public class RegionAddressRepository {
|
||||
private static final Log log = LogUtil.getLog(RegionAddressRepository.class);
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -12,24 +12,24 @@ import java.util.Map;
|
|||
import java.util.Stack;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.TransportStop;
|
||||
import net.osmand.data.index.IndexConstants;
|
||||
import net.osmand.data.preparation.MapTileDownloader;
|
||||
import net.osmand.data.preparation.MapTileDownloader.DownloadRequest;
|
||||
import net.osmand.data.preparation.MapTileDownloader.IMapDownloaderCallback;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.render.RenderMapsRepositories;
|
||||
import net.osmand.views.POIMapLayer;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.os.Environment;
|
||||
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.data.TransportStop;
|
||||
import com.osmand.data.index.IndexConstants;
|
||||
import com.osmand.data.preparation.MapTileDownloader;
|
||||
import com.osmand.data.preparation.MapTileDownloader.DownloadRequest;
|
||||
import com.osmand.data.preparation.MapTileDownloader.IMapDownloaderCallback;
|
||||
import com.osmand.map.ITileSource;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.render.RenderMapsRepositories;
|
||||
import com.osmand.views.POIMapLayer;
|
||||
|
||||
/**
|
||||
* Resource manager is responsible to work with all resources
|
||||
* that could consume memory (especially with file resources).
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -6,6 +6,10 @@ import java.io.IOException;
|
|||
import java.nio.ByteBuffer;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.map.TileSourceManager;
|
||||
import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.database.Cursor;
|
||||
|
@ -14,10 +18,6 @@ import android.database.sqlite.SQLiteStatement;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
|
||||
import com.osmand.map.ITileSource;
|
||||
import com.osmand.map.TileSourceManager;
|
||||
import com.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
|
||||
public class SQLiteTileSource implements ITileSource {
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand;
|
||||
package net.osmand;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.MessageFormat;
|
||||
|
@ -9,19 +9,19 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.data.TransportRoute;
|
||||
import net.osmand.data.TransportStop;
|
||||
import net.osmand.data.index.IndexConstants;
|
||||
import net.osmand.data.index.IndexConstants.IndexTransportRoute;
|
||||
import net.osmand.data.index.IndexConstants.IndexTransportRouteStop;
|
||||
import net.osmand.data.index.IndexConstants.IndexTransportStop;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.database.Cursor;
|
||||
|
||||
import com.osmand.data.TransportRoute;
|
||||
import com.osmand.data.TransportStop;
|
||||
import com.osmand.data.index.IndexConstants;
|
||||
import com.osmand.data.index.IndexConstants.IndexTransportRoute;
|
||||
import com.osmand.data.index.IndexConstants.IndexTransportRouteStop;
|
||||
import com.osmand.data.index.IndexConstants.IndexTransportStop;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class TransportIndexRepository extends BaseLocationIndexRepository<TransportStop> {
|
||||
private static final Log log = LogUtil.getLog(TransportIndexRepository.class);
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -17,6 +17,13 @@ import java.util.Map.Entry;
|
|||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.ProgressDialogImplementation;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.data.index.DownloaderIndexFromGoogleCode;
|
||||
import net.osmand.data.index.IndexConstants;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
|
@ -34,13 +41,6 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.ProgressDialogImplementation;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.data.index.DownloaderIndexFromGoogleCode;
|
||||
import com.osmand.data.index.IndexConstants;
|
||||
|
||||
public class DownloadIndexActivity extends ListActivity {
|
||||
|
||||
private final static Log log = LogUtil.getLog(DownloadIndexActivity.class);
|
||||
|
@ -275,7 +275,7 @@ public class DownloadIndexActivity extends ListActivity {
|
|||
private class DownloadIndexAdapter extends ArrayAdapter<Entry<String, String>> {
|
||||
|
||||
public DownloadIndexAdapter(List<Entry<String, String>> array) {
|
||||
super(DownloadIndexActivity.this, com.osmand.R.layout.download_index_list_item, array);
|
||||
super(DownloadIndexActivity.this, net.osmand.R.layout.download_index_list_item, array);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -283,7 +283,7 @@ public class DownloadIndexActivity extends ListActivity {
|
|||
View row = convertView;
|
||||
if (row == null) {
|
||||
LayoutInflater inflater = getLayoutInflater();
|
||||
row = inflater.inflate(com.osmand.R.layout.download_index_list_item, parent, false);
|
||||
row = inflater.inflate(net.osmand.R.layout.download_index_list_item, parent, false);
|
||||
}
|
||||
TextView item = (TextView) row.findViewById(R.id.download_item);
|
||||
TextView description = (TextView) row.findViewById(R.id.download_descr);
|
|
@ -1,13 +1,19 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.PoiFilter;
|
||||
import net.osmand.PoiFiltersHelper;
|
||||
import net.osmand.R;
|
||||
import net.osmand.PoiFiltersHelper.PoiFilterDbHelper;
|
||||
import net.osmand.activities.search.SearchPOIActivity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.AlertDialog.Builder;
|
||||
|
@ -30,19 +36,12 @@ import android.widget.ScrollView;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.PoiFilter;
|
||||
import com.osmand.PoiFiltersHelper;
|
||||
import com.osmand.R;
|
||||
import com.osmand.PoiFiltersHelper.PoiFilterDbHelper;
|
||||
import com.osmand.activities.search.SearchPOIActivity;
|
||||
import com.osmand.data.AmenityType;
|
||||
|
||||
/**
|
||||
* @author Frolov
|
||||
*
|
||||
*/
|
||||
public class EditPOIFilterActivity extends ListActivity {
|
||||
public static final String AMENITY_FILTER = "com.osmand.amenity_filter"; //$NON-NLS-1$
|
||||
public static final String AMENITY_FILTER = "net.osmand.amenity_filter"; //$NON-NLS-1$
|
||||
private Button filterLevel;
|
||||
private PoiFilter filter;
|
||||
private PoiFilterDbHelper helper;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
|
@ -18,6 +18,28 @@ import java.util.LinkedHashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.AmenityIndexRepository;
|
||||
import net.osmand.Base64;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.Version;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.osm.Entity;
|
||||
import net.osmand.osm.EntityInfo;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.osm.Node;
|
||||
import net.osmand.osm.OpeningHoursParser;
|
||||
import net.osmand.osm.Entity.EntityId;
|
||||
import net.osmand.osm.Entity.EntityType;
|
||||
import net.osmand.osm.OSMSettings.OSMTagKey;
|
||||
import net.osmand.osm.OpeningHoursParser.BasicDayOpeningHourRule;
|
||||
import net.osmand.osm.OpeningHoursParser.OpeningHoursRule;
|
||||
import net.osmand.osm.io.OsmBaseStorage;
|
||||
import net.osmand.views.OsmandMapTileView;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.auth.AuthScope;
|
||||
|
@ -51,28 +73,6 @@ import android.widget.Button;
|
|||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.AmenityIndexRepository;
|
||||
import com.osmand.Base64;
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.Version;
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.data.AmenityType;
|
||||
import com.osmand.osm.Entity;
|
||||
import com.osmand.osm.EntityInfo;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.osm.Node;
|
||||
import com.osmand.osm.OpeningHoursParser;
|
||||
import com.osmand.osm.Entity.EntityId;
|
||||
import com.osmand.osm.Entity.EntityType;
|
||||
import com.osmand.osm.OSMSettings.OSMTagKey;
|
||||
import com.osmand.osm.OpeningHoursParser.BasicDayOpeningHourRule;
|
||||
import com.osmand.osm.OpeningHoursParser.OpeningHoursRule;
|
||||
import com.osmand.osm.io.OsmBaseStorage;
|
||||
import com.osmand.views.OsmandMapTileView;
|
||||
|
||||
public class EditingPOIActivity {
|
||||
|
||||
// private final static String SITE_API = "http://api06.dev.openstreetmap.org/";
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.MessageFormat;
|
||||
|
@ -10,6 +10,12 @@ import java.util.LinkedHashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.activities.SavingTrackHelper.WptPt;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.AlertDialog.Builder;
|
||||
|
@ -37,13 +43,6 @@ import android.widget.TextView;
|
|||
import android.widget.Toast;
|
||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.activities.SavingTrackHelper.WptPt;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
@ -9,6 +9,13 @@ import java.lang.Thread.UncaughtExceptionHandler;
|
|||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.ProgressDialogImplementation;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.Version;
|
||||
import net.osmand.activities.search.SearchActivity;
|
||||
import net.osmand.voice.CommandPlayer;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
|
@ -31,14 +38,6 @@ import android.view.View.OnClickListener;
|
|||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.ProgressDialogImplementation;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.Version;
|
||||
import com.osmand.activities.search.SearchActivity;
|
||||
import com.osmand.voice.CommandPlayer;
|
||||
|
||||
public class MainMenuActivity extends Activity {
|
||||
|
||||
private static final String FIRST_TIME_APP_RUN = "FIRST_TIME_APP_RUN"; //$NON-NLS-1$
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
|
@ -6,6 +6,45 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.AmenityIndexRepository;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.PoiFilter;
|
||||
import net.osmand.PoiFiltersHelper;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.SQLiteTileSource;
|
||||
import net.osmand.Version;
|
||||
import net.osmand.OsmandSettings.ApplicationMode;
|
||||
import net.osmand.activities.FavouritesActivity.FavouritePoint;
|
||||
import net.osmand.activities.FavouritesActivity.FavouritesDbHelper;
|
||||
import net.osmand.activities.search.SearchActivity;
|
||||
import net.osmand.activities.search.SearchPoiFilterActivity;
|
||||
import net.osmand.activities.search.SearchTransportActivity;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.data.AmenityType;
|
||||
import net.osmand.data.preparation.MapTileDownloader;
|
||||
import net.osmand.data.preparation.MapTileDownloader.DownloadRequest;
|
||||
import net.osmand.data.preparation.MapTileDownloader.IMapDownloaderCallback;
|
||||
import net.osmand.map.IMapLocationListener;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.views.AnimateDraggingMapThread;
|
||||
import net.osmand.views.ContextMenuLayer;
|
||||
import net.osmand.views.FavoritesLayer;
|
||||
import net.osmand.views.MapInfoLayer;
|
||||
import net.osmand.views.OsmBugsLayer;
|
||||
import net.osmand.views.OsmandMapTileView;
|
||||
import net.osmand.views.POIMapLayer;
|
||||
import net.osmand.views.PointLocationLayer;
|
||||
import net.osmand.views.PointNavigationLayer;
|
||||
import net.osmand.views.RouteInfoLayer;
|
||||
import net.osmand.views.RouteLayer;
|
||||
import net.osmand.views.TransportInfoLayer;
|
||||
import net.osmand.views.TransportStopsLayer;
|
||||
import net.osmand.views.YandexTrafficLayer;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
@ -58,46 +97,6 @@ import android.widget.Toast;
|
|||
import android.widget.ToggleButton;
|
||||
import android.widget.ZoomControls;
|
||||
|
||||
import com.osmand.Algoritms;
|
||||
import com.osmand.AmenityIndexRepository;
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.PoiFilter;
|
||||
import com.osmand.PoiFiltersHelper;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.SQLiteTileSource;
|
||||
import com.osmand.Version;
|
||||
import com.osmand.OsmandSettings.ApplicationMode;
|
||||
import com.osmand.activities.FavouritesActivity.FavouritePoint;
|
||||
import com.osmand.activities.FavouritesActivity.FavouritesDbHelper;
|
||||
import com.osmand.activities.search.SearchActivity;
|
||||
import com.osmand.activities.search.SearchPoiFilterActivity;
|
||||
import com.osmand.activities.search.SearchTransportActivity;
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.data.AmenityType;
|
||||
import com.osmand.data.preparation.MapTileDownloader;
|
||||
import com.osmand.data.preparation.MapTileDownloader.DownloadRequest;
|
||||
import com.osmand.data.preparation.MapTileDownloader.IMapDownloaderCallback;
|
||||
import com.osmand.map.IMapLocationListener;
|
||||
import com.osmand.map.ITileSource;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.views.AnimateDraggingMapThread;
|
||||
import com.osmand.views.ContextMenuLayer;
|
||||
import com.osmand.views.FavoritesLayer;
|
||||
import com.osmand.views.MapInfoLayer;
|
||||
import com.osmand.views.OsmBugsLayer;
|
||||
import com.osmand.views.OsmandMapTileView;
|
||||
import com.osmand.views.POIMapLayer;
|
||||
import com.osmand.views.PointLocationLayer;
|
||||
import com.osmand.views.PointNavigationLayer;
|
||||
import com.osmand.views.RouteInfoLayer;
|
||||
import com.osmand.views.RouteLayer;
|
||||
import com.osmand.views.TransportInfoLayer;
|
||||
import com.osmand.views.TransportStopsLayer;
|
||||
import com.osmand.views.YandexTrafficLayer;
|
||||
|
||||
public class MapActivity extends Activity implements IMapLocationListener, SensorEventListener {
|
||||
|
||||
private static final String GPS_STATUS_ACTIVITY = "com.eclipsim.gpsstatus2.GPSStatus"; //$NON-NLS-1$
|
||||
|
@ -746,7 +745,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
|
||||
if (wakeLock == null) {
|
||||
PowerManager powerManager = (PowerManager) getSystemService(POWER_SERVICE);
|
||||
wakeLock = powerManager.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "com.osmand.map"); //$NON-NLS-1$
|
||||
wakeLock = powerManager.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, "net.osmand.map"); //$NON-NLS-1$
|
||||
wakeLock.acquire();
|
||||
}
|
||||
SharedPreferences prefs = getSharedPreferences(OsmandSettings.SHARED_PREFERENCES_NAME, MODE_WORLD_READABLE);
|
|
@ -1,10 +1,15 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.views.OsmandMapTileView;
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.Intent;
|
||||
|
@ -17,12 +22,6 @@ import android.widget.RadioButton;
|
|||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.views.OsmandMapTileView;
|
||||
|
||||
public class NavigatePointActivity extends Activity {
|
||||
Dialog dlg;
|
||||
MapActivity activity;
|
|
@ -1,10 +1,13 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.R;
|
||||
import net.osmand.osm.OpeningHoursParser.BasicDayOpeningHourRule;
|
||||
import net.osmand.osm.OpeningHoursParser.OpeningHoursRule;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.Context;
|
||||
|
@ -22,10 +25,6 @@ import android.widget.TextView;
|
|||
import android.widget.TimePicker;
|
||||
import android.widget.TimePicker.OnTimeChangedListener;
|
||||
|
||||
import com.osmand.R;
|
||||
import com.osmand.osm.OpeningHoursParser.BasicDayOpeningHourRule;
|
||||
import com.osmand.osm.OpeningHoursParser.OpeningHoursRule;
|
||||
|
||||
public class OpeningHoursView {
|
||||
|
||||
private final Context ctx;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import android.app.Application;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
@ -14,6 +14,14 @@ import javax.xml.parsers.DocumentBuilderFactory;
|
|||
import javax.xml.parsers.FactoryConfigurationError;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.R;
|
||||
import net.osmand.OsmandSettings.ApplicationMode;
|
||||
import net.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import net.osmand.activities.RoutingHelper.TurnType;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
|
@ -24,14 +32,6 @@ import org.xml.sax.SAXException;
|
|||
import android.content.Context;
|
||||
import android.location.Location;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.R;
|
||||
import com.osmand.OsmandSettings.ApplicationMode;
|
||||
import com.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import com.osmand.activities.RoutingHelper.TurnType;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class RouteProvider {
|
||||
private static final org.apache.commons.logging.Log log = LogUtil.getLog(RouteProvider.class);
|
||||
|
|
@ -1,24 +1,23 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.OsmandSettings.ApplicationMode;
|
||||
import net.osmand.activities.RouteProvider.RouteCalculationResult;
|
||||
import net.osmand.activities.RouteProvider.RouteService;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.location.Location;
|
||||
import android.util.FloatMath;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.OsmandSettings.ApplicationMode;
|
||||
import com.osmand.activities.RouteProvider.RouteCalculationResult;
|
||||
import com.osmand.activities.RouteProvider.RouteService;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class RoutingHelper {
|
||||
|
||||
private static final org.apache.commons.logging.Log log = LogUtil.getLog(RoutingHelper.class);
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
|
@ -11,6 +11,11 @@ import java.util.LinkedHashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.Version;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
@ -25,11 +30,6 @@ import android.text.format.DateFormat;
|
|||
import android.util.Xml;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.Version;
|
||||
|
||||
public class SavingTrackHelper extends SQLiteOpenHelper {
|
||||
public final static String TRACKS_PATH = "tracks"; //$NON-NLS-1$
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -7,6 +7,18 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.NavigationService;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.PoiFiltersHelper;
|
||||
import net.osmand.ProgressDialogImplementation;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.SQLiteTileSource;
|
||||
import net.osmand.OsmandSettings.ApplicationMode;
|
||||
import net.osmand.activities.RouteProvider.RouteService;
|
||||
import net.osmand.map.TileSourceManager;
|
||||
import net.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
import net.osmand.voice.CommandPlayer;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
|
@ -30,19 +42,6 @@ import android.preference.Preference.OnPreferenceChangeListener;
|
|||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.NavigationService;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.PoiFiltersHelper;
|
||||
import com.osmand.ProgressDialogImplementation;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.SQLiteTileSource;
|
||||
import com.osmand.OsmandSettings.ApplicationMode;
|
||||
import com.osmand.activities.RouteProvider.RouteService;
|
||||
import com.osmand.map.TileSourceManager;
|
||||
import com.osmand.map.TileSourceManager.TileSourceTemplate;
|
||||
import com.osmand.voice.CommandPlayer;
|
||||
|
||||
public class SettingsActivity extends PreferenceActivity implements OnPreferenceChangeListener, OnPreferenceClickListener {
|
||||
|
||||
private class BooleanPreference {
|
|
@ -1,11 +1,17 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import net.osmand.activities.RoutingHelper.TurnType;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.views.MapInfoLayer;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Canvas;
|
||||
|
@ -28,13 +34,6 @@ import android.widget.ImageView;
|
|||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import com.osmand.activities.RoutingHelper.TurnType;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.views.MapInfoLayer;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
|
@ -1,9 +1,10 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.osmand.TransportIndexRepository.RouteInfoLocation;
|
||||
import net.osmand.TransportIndexRepository.RouteInfoLocation;
|
||||
|
||||
|
||||
public class TransportRouteHelper {
|
||||
private static TransportRouteHelper inst = new TransportRouteHelper();
|
|
@ -1,12 +1,12 @@
|
|||
package com.osmand.activities;
|
||||
package net.osmand.activities;
|
||||
|
||||
import net.osmand.OsmandSettings.ApplicationMode;
|
||||
import net.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import net.osmand.activities.RoutingHelper.TurnType;
|
||||
import net.osmand.voice.CommandPlayer;
|
||||
import net.osmand.voice.CommandPlayer.CommandBuilder;
|
||||
import android.content.Context;
|
||||
|
||||
import com.osmand.OsmandSettings.ApplicationMode;
|
||||
import com.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import com.osmand.activities.RoutingHelper.TurnType;
|
||||
import com.osmand.voice.CommandPlayer;
|
||||
import com.osmand.voice.CommandPlayer.CommandBuilder;
|
||||
|
||||
public class VoiceRouter {
|
||||
// 0 - unknown, 1 - notify prepare, 2 - notify to turn after , 3 - notify to turn
|
|
@ -1,8 +1,10 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.NavigatePointActivity;
|
||||
import android.app.TabActivity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -10,8 +12,6 @@ import android.widget.Button;
|
|||
import android.widget.TabHost;
|
||||
import android.widget.TabHost.TabSpec;
|
||||
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.NavigatePointActivity;
|
||||
|
||||
/**
|
||||
* @author Maxim Frolov
|
|
@ -1,8 +1,21 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.RegionAddressRepository;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.activities.MapActivity;
|
||||
import net.osmand.data.Building;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.MapObject;
|
||||
import net.osmand.data.PostCode;
|
||||
import net.osmand.data.Street;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.Node;
|
||||
import net.osmand.osm.Way;
|
||||
import android.app.Activity;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
|
@ -14,20 +27,6 @@ import android.widget.RadioButton;
|
|||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.RegionAddressRepository;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.activities.MapActivity;
|
||||
import com.osmand.data.Building;
|
||||
import com.osmand.data.City;
|
||||
import com.osmand.data.MapObject;
|
||||
import com.osmand.data.PostCode;
|
||||
import com.osmand.data.Street;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.Node;
|
||||
import com.osmand.osm.Way;
|
||||
|
||||
public class SearchAddressActivity extends Activity {
|
||||
|
||||
private Button showOnMap;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
@ -8,6 +8,15 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.Version;
|
||||
import net.osmand.activities.MapActivity;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
|
@ -26,15 +35,6 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.Algoritms;
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.Version;
|
||||
import com.osmand.activities.MapActivity;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class SearchAddressOnlineActivity extends ListActivity {
|
||||
|
||||
private LatLon location;
|
|
@ -1,20 +1,19 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.RegionAddressRepository;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.data.Building;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.PostCode;
|
||||
import net.osmand.data.Street;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.RegionAddressRepository;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.data.Building;
|
||||
import com.osmand.data.City;
|
||||
import com.osmand.data.PostCode;
|
||||
import com.osmand.data.Street;
|
||||
|
||||
public class SearchBuildingByNameActivity extends SearchByNameAbstractActivity<Building> {
|
||||
private RegionAddressRepository region;
|
||||
private City city;
|
|
@ -1,7 +1,8 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.R;
|
||||
import android.app.ListActivity;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
@ -19,7 +20,6 @@ import android.widget.ListView;
|
|||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.R;
|
||||
|
||||
public abstract class SearchByNameAbstractActivity<T> extends ListActivity {
|
||||
|
|
@ -1,21 +1,20 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.RegionAddressRepository;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.MapObject;
|
||||
import net.osmand.data.PostCode;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.RegionAddressRepository;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.data.City;
|
||||
import com.osmand.data.MapObject;
|
||||
import com.osmand.data.PostCode;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class SearchCityByNameActivity extends SearchByNameAbstractActivity<MapObject> {
|
||||
private RegionAddressRepository region;
|
||||
private LatLon location;
|
|
@ -1,7 +1,13 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.MapActivity;
|
||||
import net.osmand.activities.search.SearchHistoryHelper.HistoryEntry;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -14,13 +20,6 @@ import android.widget.ImageButton;
|
|||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.MapActivity;
|
||||
import com.osmand.activities.search.SearchHistoryHelper.HistoryEntry;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class SearchHistoryActivity extends ListActivity {
|
||||
private LatLon location;
|
||||
private SearchHistoryHelper helper;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,12 +1,25 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.NameFinderPoiFilter;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.PoiFilter;
|
||||
import net.osmand.PoiFiltersHelper;
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.MapActivity;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.osm.OpeningHoursParser;
|
||||
import net.osmand.osm.OpeningHoursParser.OpeningHoursRule;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ActivityInfo;
|
||||
|
@ -47,29 +60,15 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.Algoritms;
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.NameFinderPoiFilter;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.PoiFilter;
|
||||
import com.osmand.PoiFiltersHelper;
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.MapActivity;
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.osm.OpeningHoursParser;
|
||||
import com.osmand.osm.OpeningHoursParser.OpeningHoursRule;
|
||||
|
||||
/**
|
||||
* @author Maxim Frolov
|
||||
*
|
||||
*/
|
||||
public class SearchPOIActivity extends ListActivity implements SensorEventListener {
|
||||
|
||||
public static final String AMENITY_FILTER = "com.osmand.amenity_filter"; //$NON-NLS-1$
|
||||
public static final String SEARCH_LAT = "com.osmand.am_search_lat"; //$NON-NLS-1$
|
||||
public static final String SEARCH_LON = "com.osmand.am_search_lon"; //$NON-NLS-1$
|
||||
public static final String AMENITY_FILTER = "net.osmand.amenity_filter"; //$NON-NLS-1$
|
||||
public static final String SEARCH_LAT = "net.osmand.am_search_lat"; //$NON-NLS-1$
|
||||
public static final String SEARCH_LON = "net.osmand.am_search_lon"; //$NON-NLS-1$
|
||||
private static final int GPS_TIMEOUT_REQUEST = 1000;
|
||||
private static final int GPS_DIST_REQUEST = 5;
|
||||
private static final int MIN_DISTANCE_TO_RESEARCH = 70;
|
|
@ -1,11 +1,16 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.NameFinderPoiFilter;
|
||||
import net.osmand.PoiFilter;
|
||||
import net.osmand.PoiFiltersHelper;
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.EditPOIFilterActivity;
|
||||
import android.app.ListActivity;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Typeface;
|
||||
|
@ -19,11 +24,6 @@ import android.widget.ImageView;
|
|||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.NameFinderPoiFilter;
|
||||
import com.osmand.PoiFilter;
|
||||
import com.osmand.PoiFiltersHelper;
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.EditPOIFilterActivity;
|
||||
|
||||
/**
|
||||
* @author Maxim Frolov
|
|
@ -1,16 +1,16 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.RegionAddressRepository;
|
||||
import net.osmand.ResourceManager;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.RegionAddressRepository;
|
||||
import com.osmand.ResourceManager;
|
||||
|
||||
public class SearchRegionByNameActivity extends SearchByNameAbstractActivity<RegionAddressRepository> {
|
||||
|
|
@ -1,20 +1,19 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.RegionAddressRepository;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.PostCode;
|
||||
import net.osmand.data.Street;
|
||||
import android.app.ProgressDialog;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.RegionAddressRepository;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.data.City;
|
||||
import com.osmand.data.PostCode;
|
||||
import com.osmand.data.Street;
|
||||
|
||||
public class SearchStreet2ByNameActivity extends SearchByNameAbstractActivity<Street> {
|
||||
private RegionAddressRepository region;
|
||||
private City city;
|
|
@ -1,19 +1,18 @@
|
|||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.RegionAddressRepository;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.data.City;
|
||||
import net.osmand.data.PostCode;
|
||||
import net.osmand.data.Street;
|
||||
import android.os.Bundle;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.RegionAddressRepository;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.data.City;
|
||||
import com.osmand.data.PostCode;
|
||||
import com.osmand.data.Street;
|
||||
|
||||
public class SearchStreetByNameActivity extends SearchByNameAbstractActivity<Street> {
|
||||
private RegionAddressRepository region;
|
||||
private City city;
|
|
@ -1,12 +1,24 @@
|
|||
/**
|
||||
*
|
||||
*/
|
||||
package com.osmand.activities.search;
|
||||
package net.osmand.activities.search;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.Messages;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.TransportIndexRepository;
|
||||
import net.osmand.TransportIndexRepository.RouteInfoLocation;
|
||||
import net.osmand.activities.TransportRouteHelper;
|
||||
import net.osmand.data.TransportRoute;
|
||||
import net.osmand.data.TransportStop;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ListActivity;
|
||||
import android.app.AlertDialog.Builder;
|
||||
|
@ -25,19 +37,6 @@ import android.widget.ListView;
|
|||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.osmand.Algoritms;
|
||||
import com.osmand.Messages;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.TransportIndexRepository;
|
||||
import com.osmand.TransportIndexRepository.RouteInfoLocation;
|
||||
import com.osmand.activities.TransportRouteHelper;
|
||||
import com.osmand.data.TransportRoute;
|
||||
import com.osmand.data.TransportStop;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
/**
|
||||
* @author Maxim Frolov
|
||||
*
|
|
@ -1,20 +1,19 @@
|
|||
package com.osmand.render;
|
||||
package net.osmand.render;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.IProgress;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.data.index.IndexConstants;
|
||||
import net.osmand.osm.Node;
|
||||
import net.osmand.osm.Way;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteStatement;
|
||||
|
||||
import com.osmand.IProgress;
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.data.index.IndexConstants;
|
||||
import com.osmand.osm.Node;
|
||||
import com.osmand.osm.Way;
|
||||
|
||||
public class RenderMapsRepositories {
|
||||
|
||||
|
@ -80,13 +79,13 @@ public class RenderMapsRepositories {
|
|||
cRightLongitude = rightLongitude + (rightLongitude - leftLongitude);
|
||||
cZoom = zoom;
|
||||
|
||||
String query = "SELECT ways.id way, node.id node, node.latitude, node.longitude FROM (" +
|
||||
"SELECT DISTINCT ways.id id FROM ways JOIN " +
|
||||
"(SELECT id, latitude, longitude FROM node WHERE ?< latitude AND latitude < ? AND ? < longitude AND longitude < ?) A "+
|
||||
"ON A.id = ways.node) B "+
|
||||
"JOIN ways ON B.id=ways.id JOIN node ON ways.node = node.id";
|
||||
String query = "SELECT ways.id way, node.id node, node.latitude, node.longitude FROM (" + //$NON-NLS-1$
|
||||
"SELECT DISTINCT ways.id id FROM ways JOIN " + //$NON-NLS-1$
|
||||
"(SELECT id, latitude, longitude FROM node WHERE ?< latitude AND latitude < ? AND ? < longitude AND longitude < ?) A "+ //$NON-NLS-1$
|
||||
"ON A.id = ways.node) B "+ //$NON-NLS-1$
|
||||
"JOIN ways ON B.id=ways.id JOIN node ON ways.node = node.id"; //$NON-NLS-1$
|
||||
|
||||
log.info(String.format("BLat=%s, TLat=%s, LLong=%s, RLong=%s, zoom=%s", cBottomLatitude, cTopLatitude, cLeftLongitude, cRightLongitude, zoom));
|
||||
log.info(String.format("BLat=%s, TLat=%s, LLong=%s, RLong=%s, zoom=%s", cBottomLatitude, cTopLatitude, cLeftLongitude, cRightLongitude, zoom)); //$NON-NLS-1$
|
||||
|
||||
long now = System.currentTimeMillis();
|
||||
|
||||
|
@ -116,7 +115,7 @@ public class RenderMapsRepositories {
|
|||
|
||||
cWays = local;
|
||||
}
|
||||
log.info(String.format("Search has been done in %s ms. %s results were found.", System.currentTimeMillis()-now, count));
|
||||
log.info(String.format("Search has been done in %s ms. %s results were found.", System.currentTimeMillis()-now, count)); //$NON-NLS-1$
|
||||
} finally {
|
||||
result.close();
|
||||
}
|
||||
|
@ -124,11 +123,6 @@ public class RenderMapsRepositories {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private void addToCache(Way way) {
|
||||
cWays.add(way);
|
||||
}
|
||||
|
||||
public void clearCache() {
|
||||
cWays.clear();
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
package com.osmand.render;
|
||||
|
||||
import java.util.List;
|
||||
package net.osmand.render;
|
||||
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.osm.Node;
|
||||
import net.osmand.osm.Way;
|
||||
import net.osmand.views.OsmandMapLayer;
|
||||
import net.osmand.views.OsmandMapTileView;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
|
@ -11,13 +15,6 @@ import android.graphics.Rect;
|
|||
import android.graphics.RectF;
|
||||
import android.graphics.Paint.Style;
|
||||
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.osm.Node;
|
||||
import com.osmand.osm.Way;
|
||||
import com.osmand.views.OsmandMapLayer;
|
||||
import com.osmand.views.OsmandMapTileView;
|
||||
|
||||
public class RendererLayer implements OsmandMapLayer {
|
||||
|
||||
private OsmandMapTileView view;
|
|
@ -1,9 +1,8 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.util.FloatMath;
|
||||
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
/**
|
||||
* Thread for animated dragging.
|
||||
* Defines accelerator to stop dragging screen.
|
|
@ -1,9 +1,12 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.MapActivity;
|
||||
import net.osmand.osm.LatLon;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
|
@ -19,10 +22,6 @@ import android.view.WindowManager;
|
|||
import android.widget.TextView;
|
||||
import android.widget.FrameLayout.LayoutParams;
|
||||
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.MapActivity;
|
||||
import com.osmand.osm.LatLon;
|
||||
|
||||
public class ContextMenuLayer implements OsmandMapLayer {
|
||||
|
||||
public interface IContextMenuProvider {
|
|
@ -1,7 +1,13 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.FavouritesActivity;
|
||||
import net.osmand.activities.FavouritesActivity.FavouritePoint;
|
||||
import net.osmand.activities.FavouritesActivity.FavouritesDbHelper;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.graphics.Canvas;
|
||||
|
@ -17,13 +23,6 @@ import android.util.FloatMath;
|
|||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.FavouritesActivity;
|
||||
import com.osmand.activities.FavouritesActivity.FavouritePoint;
|
||||
import com.osmand.activities.FavouritesActivity.FavouritesDbHelper;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class FavoritesLayer implements OsmandMapLayer, ContextMenuLayer.IContextMenuProvider {
|
||||
|
||||
private static final int startZoom = 6;
|
|
@ -1,5 +1,14 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.Messages;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.MapActivity;
|
||||
import net.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import net.osmand.activities.RoutingHelper.TurnType;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
|
@ -18,16 +27,6 @@ import android.util.FloatMath;
|
|||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.osmand.Algoritms;
|
||||
import com.osmand.Messages;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.activities.MapActivity;
|
||||
import com.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import com.osmand.activities.RoutingHelper.TurnType;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class MapInfoLayer implements OsmandMapLayer {
|
||||
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.content.Context;
|
||||
|
@ -9,7 +11,6 @@ import android.graphics.PointF;
|
|||
import android.util.FloatMath;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
|
||||
public class MultiTouchSupport {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
|
@ -11,6 +11,12 @@ import java.util.List;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.app.Activity;
|
||||
|
@ -35,12 +41,6 @@ import android.view.WindowManager;
|
|||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class OsmBugsLayer implements OsmandMapLayer, ContextMenuLayer.IContextMenuProvider {
|
||||
|
||||
private static final Log log = LogUtil.getLog(OsmBugsLayer.class);
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.PointF;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -6,6 +6,19 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.data.preparation.MapTileDownloader;
|
||||
import net.osmand.data.preparation.MapTileDownloader.DownloadRequest;
|
||||
import net.osmand.data.preparation.MapTileDownloader.IMapDownloaderCallback;
|
||||
import net.osmand.map.IMapLocationListener;
|
||||
import net.osmand.map.ITileSource;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import net.osmand.views.AnimateDraggingMapThread.AnimateDraggingCallback;
|
||||
import net.osmand.views.MultiTouchSupport.MultiTouchZoomListener;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.content.Context;
|
||||
|
@ -32,19 +45,6 @@ import android.view.GestureDetector.OnDoubleTapListener;
|
|||
import android.view.GestureDetector.OnGestureListener;
|
||||
import android.view.SurfaceHolder.Callback;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.data.preparation.MapTileDownloader;
|
||||
import com.osmand.data.preparation.MapTileDownloader.DownloadRequest;
|
||||
import com.osmand.data.preparation.MapTileDownloader.IMapDownloaderCallback;
|
||||
import com.osmand.map.IMapLocationListener;
|
||||
import com.osmand.map.ITileSource;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
import com.osmand.views.AnimateDraggingMapThread.AnimateDraggingCallback;
|
||||
import com.osmand.views.MultiTouchSupport.MultiTouchZoomListener;
|
||||
|
||||
public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCallback,
|
||||
Callback, AnimateDraggingCallback, OnGestureListener, OnDoubleTapListener, MultiTouchZoomListener {
|
||||
|
|
@ -1,8 +1,16 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.PoiFilter;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.activities.EditingPOIActivity;
|
||||
import net.osmand.data.Amenity;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
|
@ -16,15 +24,6 @@ import android.util.DisplayMetrics;
|
|||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.PoiFilter;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.activities.EditingPOIActivity;
|
||||
import com.osmand.data.Amenity;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class POIMapLayer implements OsmandMapLayer, ContextMenuLayer.IContextMenuProvider {
|
||||
// it is very slow to use with 15 level
|
||||
private static final int startZoom = 10;
|
|
@ -1,5 +1,7 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import net.osmand.OsmandSettings.ApplicationMode;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
|
@ -13,9 +15,6 @@ import android.location.Location;
|
|||
import android.util.DisplayMetrics;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.osmand.OsmandSettings.ApplicationMode;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class PointLocationLayer implements OsmandMapLayer {
|
||||
protected final static int RADIUS = 7;
|
||||
protected final static int HEADING_RADIUS = 60;
|
|
@ -1,5 +1,6 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import net.osmand.osm.LatLon;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
|
@ -12,8 +13,6 @@ import android.location.Location;
|
|||
import android.util.DisplayMetrics;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.osmand.osm.LatLon;
|
||||
|
||||
public class PointNavigationLayer implements OsmandMapLayer {
|
||||
protected final static int RADIUS = 10;
|
||||
protected final static int DIST_TO_SHOW = 120;
|
|
@ -1,7 +1,12 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.R;
|
||||
import net.osmand.activities.RoutingHelper;
|
||||
import net.osmand.activities.ShowRouteInfoActivity;
|
||||
import net.osmand.activities.RoutingHelper.IRouteInformationListener;
|
||||
import net.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Canvas;
|
||||
|
@ -21,10 +26,6 @@ import android.widget.LinearLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.FrameLayout.LayoutParams;
|
||||
|
||||
import com.osmand.activities.RoutingHelper;
|
||||
import com.osmand.activities.ShowRouteInfoActivity;
|
||||
import com.osmand.activities.RoutingHelper.IRouteInformationListener;
|
||||
import com.osmand.activities.RoutingHelper.RouteDirectionInfo;
|
||||
|
||||
public class RouteInfoLayer implements OsmandMapLayer, IRouteInformationListener {
|
||||
|
||||
|
@ -53,9 +54,9 @@ public class RouteInfoLayer implements OsmandMapLayer, IRouteInformationListener
|
|||
public RouteInfoLayer(RoutingHelper routingHelper, LinearLayout layout){
|
||||
this.routingHelper = routingHelper;
|
||||
this.layout = layout;
|
||||
prev = (Button) layout.findViewById(com.osmand.R.id.PreviousButton);
|
||||
next = (Button) layout.findViewById(com.osmand.R.id.NextButton);
|
||||
info = (Button) layout.findViewById(com.osmand.R.id.InfoButton);
|
||||
prev = (Button) layout.findViewById(R.id.PreviousButton);
|
||||
next = (Button) layout.findViewById(R.id.NextButton);
|
||||
info = (Button) layout.findViewById(R.id.InfoButton);
|
||||
routingHelper.addListener(this);
|
||||
attachListeners();
|
||||
updateVisibility();
|
|
@ -1,8 +1,11 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.activities.RoutingHelper;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
|
@ -16,10 +19,6 @@ import android.graphics.Paint.Style;
|
|||
import android.location.Location;
|
||||
import android.util.Log;
|
||||
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.activities.RoutingHelper;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class RouteLayer implements OsmandMapLayer {
|
||||
|
||||
private OsmandMapTileView view;
|
|
@ -1,7 +1,14 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.TransportIndexRepository.RouteInfoLocation;
|
||||
import net.osmand.activities.TransportRouteHelper;
|
||||
import net.osmand.data.TransportRoute;
|
||||
import net.osmand.data.TransportStop;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
|
@ -13,14 +20,6 @@ import android.util.DisplayMetrics;
|
|||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.TransportIndexRepository.RouteInfoLocation;
|
||||
import com.osmand.activities.TransportRouteHelper;
|
||||
import com.osmand.data.TransportRoute;
|
||||
import com.osmand.data.TransportStop;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class TransportInfoLayer implements OsmandMapLayer {
|
||||
|
||||
private final TransportRouteHelper routeHelper;
|
|
@ -1,8 +1,16 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
import net.osmand.TransportIndexRepository;
|
||||
import net.osmand.activities.search.SearchTransportActivity;
|
||||
import net.osmand.data.TransportStop;
|
||||
import net.osmand.osm.LatLon;
|
||||
import net.osmand.osm.MapUtils;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
@ -17,15 +25,6 @@ import android.util.DisplayMetrics;
|
|||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
import com.osmand.TransportIndexRepository;
|
||||
import com.osmand.activities.search.SearchTransportActivity;
|
||||
import com.osmand.data.TransportStop;
|
||||
import com.osmand.osm.LatLon;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class TransportStopsLayer implements OsmandMapLayer, ContextMenuLayer.IContextMenuProvider {
|
||||
private static final int startZoom = 12;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.views;
|
||||
package net.osmand.views;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
|
@ -12,6 +12,11 @@ import java.util.LinkedHashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.R;
|
||||
import net.osmand.osm.MapUtils;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
|
@ -28,11 +33,6 @@ import android.os.Message;
|
|||
import android.util.FloatMath;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.osmand.Algoritms;
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.R;
|
||||
import com.osmand.osm.MapUtils;
|
||||
|
||||
public class YandexTrafficLayer implements OsmandMapLayer {
|
||||
|
||||
private static final long DELTA = 60000;
|
|
@ -1,4 +1,4 @@
|
|||
package com.osmand.voice;
|
||||
package net.osmand.voice;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
|
@ -11,6 +11,12 @@ import java.util.Collections;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import net.osmand.Algoritms;
|
||||
import net.osmand.LogUtil;
|
||||
import net.osmand.OsmandSettings;
|
||||
import net.osmand.R;
|
||||
import net.osmand.ResourceManager;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
import alice.tuprolog.InvalidLibraryException;
|
||||
|
@ -27,12 +33,6 @@ import android.content.Context;
|
|||
import android.media.MediaPlayer;
|
||||
import android.os.Environment;
|
||||
|
||||
import com.osmand.Algoritms;
|
||||
import com.osmand.LogUtil;
|
||||
import com.osmand.OsmandSettings;
|
||||
import com.osmand.R;
|
||||
import com.osmand.ResourceManager;
|
||||
|
||||
public class CommandPlayer {
|
||||
|
||||
public static final String VOICE_DIR = ResourceManager.APP_DIR + "/voice"; //$NON-NLS-1$
|
Loading…
Reference in a new issue