switch package org.mapsforge -> org.oscim

This commit is contained in:
Hannes Janetzek 2012-09-12 00:33:39 +02:00
parent 489f07dd5d
commit e2da87d8e0
155 changed files with 548 additions and 535 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mapsforge.app"
package="org.oscim.app"
android:installLocation="auto"
android:versionCode="10"
android:versionName="0.1" >
@ -19,7 +19,7 @@
android:label="@string/application_name"
android:theme="@style/Theme.TileMap" >
<activity
android:name="org.mapsforge.app.TileMap"
android:name="org.oscim.app.TileMap"
android:configChanges="orientation|screenSize" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -29,7 +29,7 @@
</activity>
<activity android:name=".preferences.EditPreferences" />
<activity android:name=".filepicker.FilePicker" />
<activity android:name=".InfoView" android:theme="@android:style/Theme.NoTitleBar" />
<activity android:name=".InfoView" />
</application>
</manifest>

View File

@ -1,6 +1,6 @@
package org.mapsforge.database.pbmap;
package org.oscim.database.pbmap;
option java_package = "org.mapsforge.database.pbmap";
option java_package = "org.oscim.database.pbmap";
option optimize_for = LITE_RUNTIME;
message Data {

BIN
assets/globe2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,6 +0,0 @@
/** Automatically generated file. DO NOT MODIFY */
package org.mapsforge.app;
public final class BuildConfig {
public final static boolean DEBUG = true;
}

View File

@ -5,7 +5,7 @@
android:layout_height="fill_parent"
android:windowActionBarOverlay="true" >
<org.mapsforge.android.MapView
<org.oscim.view.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />

View File

@ -13,9 +13,9 @@
<item
android:id="@+id/menu_position_my_location_disable"
android:title="@string/menu_position_my_location_disable"/>
<item
<!-- <item
android:id="@+id/menu_position_last_known"
android:title="@string/menu_position_last_known"/>
android:title="@string/menu_position_last_known"/> -->
<item
android:id="@+id/menu_position_enter_coordinates"
android:title="@string/menu_position_enter_coordinates"/>

View File

@ -13,19 +13,27 @@
<item
android:id="@+id/menu_position_my_location_disable"
android:title="@string/menu_position_my_location_disable"/>
<item
<!-- <item
android:id="@+id/menu_position_last_known"
android:title="@string/menu_position_last_known"/>
android:title="@string/menu_position_last_known"/> -->
<item
android:id="@+id/menu_position_enter_coordinates"
android:title="@string/menu_position_enter_coordinates"/>
<item
android:id="@+id/menu_position_map_center"
android:title="@string/menu_position_map_file_center"/>
<item
<item
android:id="@+id/menu_rotation_enable"
android:title="@string/menu_rotation_enable"/>
<item
android:id="@+id/menu_rotation_disable"
android:title="@string/menu_rotation_disable"/>
<item
android:id="@+id/menu_compass_enable"
android:title="@string/menu_compass_enable"/>
<item
android:id="@+id/menu_compass_disable"
android:title="@string/menu_compass_disable"/>
</menu>
</item>
<item

View File

@ -1,31 +0,0 @@
/*
* Copyright 2010, 2011, 2012 mapsforge.org
*
* 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
* Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* The mapsforge-map library allows applications to render and display a map without Internet connection. It can
* be used on all Android devices running version 1.5 or higher. An application needs to extend the
* {@link org.mapsforge.android.MapActivity} class in order to use a
* {@link org.mapsforge.android.MapView}. More than one MapView instance may be used simultaneously.
* <p>
* The most important classes and methods from the <a href="http://code.google.com/android/add-ons/google-apis/"
* target="_top">Google APIs Add-On</a> are implemented. However, no API key is required and no abstract methods
* must be overridden.
* <p>
* This software is a part of the <a href="http://mapsforge.org/" target="_top">mapsforge</a> project and
* distributed under the <a href="http://www.gnu.org/licenses/lgpl.html" target="_top">LGPL3 license</a>. All
* map data (c) <a href="http://www.openstreetmap.org/" target="_top">OpenStreetMap</a> contributors, <a
* href="http://creativecommons.org/licenses/by-sa/2.0/" target="_top">CC-BY-SA license</a>.
*/
package org.mapsforge.android;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app;
package org.oscim.app;
import java.text.DecimalFormat;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app;
package org.oscim.app;
import android.app.Activity;
import android.os.Bundle;

View File

@ -12,9 +12,10 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app;
package org.oscim.app;
import org.mapsforge.core.GeoPoint;
import org.oscim.core.GeoPoint;
import org.oscim.core.MapPosition;
import android.content.Context;
import android.location.Criteria;
@ -43,7 +44,7 @@ public class LocationHandler {
mTileMap = tileMap;
mLocationManager = (LocationManager) tileMap
.getSystemService(Context.LOCATION_SERVICE);
mLocationListener = new MyLocationListener(tileMap);
mLocationListener = new MyLocationListener();
mSnapToLocationView = (ToggleButton) tileMap
.findViewById(R.id.snapToLocationView);
@ -63,6 +64,8 @@ public class LocationHandler {
boolean enableShowMyLocation(boolean centerAtFirstFix) {
Log.d("TileMap", "enableShowMyLocation " + mShowMyLocation);
gotoLastKnownPosition();
if (!mShowMyLocation) {
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_FINE);
@ -77,7 +80,7 @@ public class LocationHandler {
Log.d("TileMap", "enableShowMyLocation " + mShowMyLocation);
mLocationListener.setCenterAtFirstFix(centerAtFirstFix);
mLocationListener.setFirstCenter(centerAtFirstFix);
mLocationManager.requestLocationUpdates(bestProvider, 1000, 0,
mLocationListener);
@ -92,6 +95,7 @@ public class LocationHandler {
void gotoLastKnownPosition() {
Location currentLocation;
Location bestLocation = null;
for (String provider : mLocationManager.getProviders(true)) {
currentLocation = mLocationManager.getLastKnownLocation(provider);
if (currentLocation == null)
@ -103,10 +107,14 @@ public class LocationHandler {
}
if (bestLocation != null) {
GeoPoint point = new GeoPoint(bestLocation.getLatitude(),
bestLocation.getLongitude());
byte zoom = mTileMap.mMapView.getMapPosition().getZoomLevel();
if (zoom < 12)
zoom = (byte) 12;
mTileMap.mMapView.setCenter(point);
MapPosition mapPosition = new MapPosition(bestLocation.getLatitude(),
bestLocation.getLongitude(), zoom, 1, 0);
mTileMap.mMapView.setMapCenter(mapPosition);
} else {
mTileMap.showToastOnUiThread(mTileMap
@ -197,12 +205,8 @@ public class LocationHandler {
}
class MyLocationListener implements LocationListener {
private final TileMap tileMap;
private boolean centerAtFirstFix;
MyLocationListener(TileMap tileMap) {
this.tileMap = tileMap;
}
private boolean mSetCenter;
@Override
public void onLocationChanged(Location location) {
@ -222,9 +226,9 @@ public class LocationHandler {
// this.advancedMapViewer.circleOverlay.requestRedraw();
// this.advancedMapViewer.itemizedOverlay.requestRedraw();
if (this.centerAtFirstFix || isSnapToLocationEnabled()) {
this.centerAtFirstFix = false;
this.tileMap.mMapView.setCenter(point);
if (mSetCenter || isSnapToLocationEnabled()) {
mSetCenter = false;
mTileMap.mMapView.setCenter(point);
}
}
@ -243,12 +247,12 @@ public class LocationHandler {
// do nothing
}
boolean isCenterAtFirstFix() {
return this.centerAtFirstFix;
boolean isFirstCenter() {
return mSetCenter;
}
void setCenterAtFirstFix(boolean centerAtFirstFix) {
this.centerAtFirstFix = centerAtFirstFix;
void setFirstCenter(boolean center) {
mSetCenter = center;
}
}
}

View File

@ -1,21 +1,21 @@
package org.mapsforge.app;
package org.oscim.app;
import java.io.FileFilter;
import java.io.FileNotFoundException;
import org.mapsforge.android.DebugSettings;
import org.mapsforge.android.MapActivity;
import org.mapsforge.android.MapView;
import org.mapsforge.android.mapgenerator.MapDatabases;
import org.mapsforge.android.rendertheme.InternalRenderTheme;
import org.mapsforge.android.utils.AndroidUtils;
import org.mapsforge.app.filefilter.FilterByFileExtension;
import org.mapsforge.app.filefilter.ValidMapFile;
import org.mapsforge.app.filefilter.ValidRenderTheme;
import org.mapsforge.app.filepicker.FilePicker;
import org.mapsforge.app.preferences.EditPreferences;
import org.mapsforge.core.GeoPoint;
import org.mapsforge.core.MapPosition;
import org.oscim.app.filefilter.FilterByFileExtension;
import org.oscim.app.filefilter.ValidMapFile;
import org.oscim.app.filefilter.ValidRenderTheme;
import org.oscim.app.filepicker.FilePicker;
import org.oscim.app.preferences.EditPreferences;
import org.oscim.core.GeoPoint;
import org.oscim.core.MapPosition;
import org.oscim.database.MapDatabases;
import org.oscim.theme.InternalRenderTheme;
import org.oscim.view.DebugSettings;
import org.oscim.view.MapActivity;
import org.oscim.view.MapView;
import org.oscim.view.utils.AndroidUtils;
import android.annotation.TargetApi;
import android.app.ActionBar;
@ -140,9 +140,9 @@ public class TileMap extends MapActivity {
mLocation.disableShowMyLocation());
return true;
case R.id.menu_position_last_known:
mLocation.gotoLastKnownPosition();
return true;
// case R.id.menu_position_last_known:
// mLocation.gotoLastKnownPosition();
// return true;
case R.id.menu_position_enter_coordinates:
showDialog(DIALOG_ENTER_COORDINATES);

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.filefilter;
package org.oscim.app.filefilter;
import java.io.File;
import java.io.FileFilter;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.filefilter;
package org.oscim.app.filefilter;
import java.io.FileFilter;
import org.mapsforge.database.OpenResult;
import org.oscim.database.OpenResult;
/**
* An extension of the {@link FileFilter} interface.

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.filefilter;
package org.oscim.app.filefilter;
import java.io.File;
import java.util.HashMap;
import org.mapsforge.database.IMapDatabase;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.mapfile.MapDatabase;
import org.oscim.database.IMapDatabase;
import org.oscim.database.OpenResult;
import org.oscim.database.mapfile.MapDatabase;
/**
* Accepts all valid map files.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.filefilter;
package org.oscim.app.filefilter;
import java.io.File;
import java.io.FileInputStream;
@ -22,8 +22,8 @@ import java.io.InputStream;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.database.OpenResult;
import org.oscim.database.OpenResult;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;

View File

@ -12,15 +12,15 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.filepicker;
package org.oscim.app.filepicker;
import java.io.File;
import java.io.FileFilter;
import java.util.Arrays;
import java.util.Comparator;
import org.mapsforge.app.R;
import org.mapsforge.app.filefilter.ValidFileFilter;
import org.oscim.app.R;
import org.oscim.app.filefilter.ValidFileFilter;
import android.annotation.TargetApi;
import android.app.Activity;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.filepicker;
package org.oscim.app.filepicker;
import java.io.File;
import org.mapsforge.app.R;
import org.oscim.app.R;
import android.content.Context;
import android.view.Gravity;

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.preferences;
package org.oscim.app.preferences;
import org.mapsforge.app.R;
import org.oscim.app.R;
import android.annotation.TargetApi;
import android.os.Build;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.app.preferences;
package org.oscim.app.preferences;
import android.content.Context;
import android.content.DialogInterface;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
import java.io.IOException;
import java.io.ObjectInputStream;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
/**

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
import java.util.LinkedHashMap;
import java.util.Map;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
/**
* A MapPosition represents an immutable pair of {@link GeoPoint} and zoom level.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
/**
* An implementation of the spherical Mercator projection.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
/**
* A tag represents an immutable key-value pair.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
/**
* A tile represents a rectangular part of the world map. All tiles can be identified by their X and Y number together

View File

@ -13,7 +13,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.core;
package org.oscim.core;
/**
*

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database;
package org.oscim.database;
import java.util.Map;
import org.mapsforge.android.mapgenerator.JobTile;
import org.oscim.view.mapgenerator.JobTile;
/**
*

View File

@ -12,10 +12,10 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database;
package org.oscim.database;
import org.mapsforge.core.Tag;
import org.mapsforge.database.mapfile.MapDatabase;
import org.oscim.core.Tag;
import org.oscim.database.mapfile.MapDatabase;
/**
* Callback methods which can be triggered from the {@link MapDatabase}.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database;
package org.oscim.database;
public interface IMapTileData {

View File

@ -12,9 +12,8 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.mapgenerator;
package org.oscim.database;
import org.mapsforge.database.IMapDatabase;
import android.util.AttributeSet;
@ -34,7 +33,7 @@ public final class MapDatabaseFactory {
String mapDatabaseName = attributeSet.getAttributeValue(null,
MAP_DATABASE_ATTRIBUTE_NAME);
if (mapDatabaseName == null) {
return new org.mapsforge.database.postgis.MapDatabase();
return new org.oscim.database.postgis.MapDatabase();
}
MapDatabases mapDatabaseInternal = MapDatabases.valueOf(mapDatabaseName);
@ -60,13 +59,13 @@ public final class MapDatabaseFactory {
public static IMapDatabase createMapDatabase(MapDatabases mapDatabase) {
switch (mapDatabase) {
case MAP_READER:
return new org.mapsforge.database.mapfile.MapDatabase();
return new org.oscim.database.mapfile.MapDatabase();
case TEST_READER:
return new org.mapsforge.database.test.MapDatabase();
return new org.oscim.database.test.MapDatabase();
case POSTGIS_READER:
return new org.mapsforge.database.postgis.MapDatabase();
return new org.oscim.database.postgis.MapDatabase();
case PBMAP_READER:
return new org.mapsforge.database.pbmap.MapDatabase();
return new org.oscim.database.pbmap.MapDatabase();
}

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.mapgenerator;
package org.oscim.database;
/**
* MapDatabase Implementations

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database;
package org.oscim.database;
import org.mapsforge.core.BoundingBox;
import org.mapsforge.core.GeoPoint;
import org.mapsforge.database.mapfile.MapDatabase;
import org.oscim.core.BoundingBox;
import org.oscim.core.GeoPoint;
import org.oscim.database.mapfile.MapDatabase;
/**
* Contains the immutable metadata of a map file.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database;
package org.oscim.database;
/**

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database;
package org.oscim.database;
public enum QueryResult {
SUCCESS,

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile;
package org.oscim.database.mapfile;
/**
* This utility class contains methods to convert byte arrays to numbers.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile;
package org.oscim.database.mapfile;
import java.io.IOException;
import java.io.RandomAccessFile;
@ -20,8 +20,8 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.mapsforge.core.LRUCache;
import org.mapsforge.database.mapfile.header.SubFileParameter;
import org.oscim.core.LRUCache;
import org.oscim.database.mapfile.header.SubFileParameter;
/**
* A cache for database index blocks with a fixed size and LRU policy.

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile;
package org.oscim.database.mapfile;
import org.mapsforge.database.mapfile.header.SubFileParameter;
import org.oscim.database.mapfile.header.SubFileParameter;
/**
* An immutable container class which is the key for the index cache.

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile;
package org.oscim.database.mapfile;
import java.io.File;
import java.io.IOException;
@ -21,16 +21,16 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.mapsforge.android.mapgenerator.JobTile;
import org.mapsforge.core.MercatorProjection;
import org.mapsforge.core.Tag;
import org.mapsforge.database.IMapDatabase;
import org.mapsforge.database.IMapDatabaseCallback;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.QueryResult;
import org.mapsforge.database.mapfile.header.MapFileHeader;
import org.mapsforge.database.mapfile.header.MapFileInfo;
import org.mapsforge.database.mapfile.header.SubFileParameter;
import org.oscim.core.MercatorProjection;
import org.oscim.core.Tag;
import org.oscim.database.IMapDatabase;
import org.oscim.database.IMapDatabaseCallback;
import org.oscim.database.OpenResult;
import org.oscim.database.QueryResult;
import org.oscim.database.mapfile.header.MapFileHeader;
import org.oscim.database.mapfile.header.MapFileInfo;
import org.oscim.database.mapfile.header.SubFileParameter;
import org.oscim.view.mapgenerator.JobTile;
/**
* A class for reading binary map files.
@ -201,8 +201,8 @@ public class MapDatabase implements IMapDatabase {
/*
* (non-Javadoc)
* @see org.mapsforge.map.reader.IMapDatabase#executeQuery(org.mapsforge.core.Tile,
* org.mapsforge.map.reader.MapDatabaseCallback)
* @see org.oscim.map.reader.IMapDatabase#executeQuery(org.oscim.core.Tile,
* org.oscim.map.reader.MapDatabaseCallback)
*/
@Override
public QueryResult executeQuery(JobTile tile, IMapDatabaseCallback mapDatabaseCallback) {
@ -240,7 +240,7 @@ public class MapDatabase implements IMapDatabase {
/*
* (non-Javadoc)
* @see org.mapsforge.map.reader.IMapDatabase#getMapFileInfo()
* @see org.oscim.map.reader.IMapDatabase#getMapFileInfo()
*/
@Override
public MapFileInfo getMapInfo() {
@ -257,7 +257,7 @@ public class MapDatabase implements IMapDatabase {
/*
* (non-Javadoc)
* @see org.mapsforge.map.reader.IMapDatabase#hasOpenFile()
* @see org.oscim.map.reader.IMapDatabase#hasOpenFile()
*/
@Override
public boolean isOpen() {
@ -266,7 +266,7 @@ public class MapDatabase implements IMapDatabase {
/*
* (non-Javadoc)
* @see org.mapsforge.map.reader.IMapDatabase#openFile(java.io.File)
* @see org.oscim.map.reader.IMapDatabase#openFile(java.io.File)
*/
@Override
public OpenResult open(Map<String, String> options) {
@ -324,7 +324,7 @@ public class MapDatabase implements IMapDatabase {
/*
* (non-Javadoc)
* @see org.mapsforge.map.reader.IMapDatabase#closeFile()
* @see org.oscim.map.reader.IMapDatabase#closeFile()
*/
@Override
public void close() {

View File

@ -12,10 +12,10 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile;
package org.oscim.database.mapfile;
import org.mapsforge.core.Tile;
import org.mapsforge.database.mapfile.header.SubFileParameter;
import org.oscim.core.Tile;
import org.oscim.database.mapfile.header.SubFileParameter;
final class QueryCalculations {
private static int getFirstLevelTileBitmask(Tile tile) {

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile;
package org.oscim.database.mapfile;
class QueryParameters {
long fromBaseTileX;

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile;
package org.oscim.database.mapfile;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.io.UnsupportedEncodingException;
import java.util.logging.Logger;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
/**
* Reads from a {@link RandomAccessFile} into a buffer and decodes the data.

View File

@ -12,12 +12,12 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile.header;
package org.oscim.database.mapfile.header;
import java.io.IOException;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.mapfile.ReadBuffer;
import org.oscim.database.OpenResult;
import org.oscim.database.mapfile.ReadBuffer;
/**
* Reads and validates the header data from a binary map file.

View File

@ -12,17 +12,17 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile.header;
package org.oscim.database.mapfile.header;
import org.mapsforge.core.Tag;
import org.mapsforge.database.mapfile.MapDatabase;
import org.oscim.core.Tag;
import org.oscim.database.mapfile.MapDatabase;
/**
* Contains the immutable metadata of a map file.
*
* @see MapDatabase#getMapInfo()
*/
public class MapFileInfo extends org.mapsforge.database.MapInfo {
public class MapFileInfo extends org.oscim.database.MapInfo {
/**
* True if the map file includes debug information, false otherwise.

View File

@ -12,10 +12,10 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile.header;
package org.oscim.database.mapfile.header;
import org.mapsforge.core.BoundingBox;
import org.mapsforge.core.Tag;
import org.oscim.core.BoundingBox;
import org.oscim.core.Tag;
class MapFileInfoBuilder {
BoundingBox boundingBox;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile.header;
package org.oscim.database.mapfile.header;
import org.mapsforge.core.GeoPoint;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.mapfile.ReadBuffer;
import org.oscim.core.GeoPoint;
import org.oscim.database.OpenResult;
import org.oscim.database.mapfile.ReadBuffer;
final class OptionalFields {
/**

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile.header;
package org.oscim.database.mapfile.header;
import java.io.IOException;
import org.mapsforge.core.BoundingBox;
import org.mapsforge.core.Tag;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.mapfile.ReadBuffer;
import org.oscim.core.BoundingBox;
import org.oscim.core.Tag;
import org.oscim.database.OpenResult;
import org.oscim.database.mapfile.ReadBuffer;
final class RequiredFields {
/**

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile.header;
package org.oscim.database.mapfile.header;
import org.mapsforge.core.MercatorProjection;
import org.oscim.core.MercatorProjection;
/**
* Holds all parameters of a sub-file.

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.mapfile.header;
package org.oscim.database.mapfile.header;
import org.mapsforge.core.BoundingBox;
import org.oscim.core.BoundingBox;
class SubFileParameterBuilder {
byte baseZoomLevel;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.pbmap;
package org.oscim.database.pbmap;
import java.io.BufferedOutputStream;
import java.io.File;
@ -53,16 +53,16 @@ import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.RequestExpectContinue;
import org.apache.http.protocol.RequestUserAgent;
import org.mapsforge.android.mapgenerator.JobTile;
import org.mapsforge.core.BoundingBox;
import org.mapsforge.core.GeoPoint;
import org.mapsforge.core.Tag;
import org.mapsforge.core.Tile;
import org.mapsforge.database.IMapDatabase;
import org.mapsforge.database.IMapDatabaseCallback;
import org.mapsforge.database.MapInfo;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.QueryResult;
import org.oscim.core.BoundingBox;
import org.oscim.core.GeoPoint;
import org.oscim.core.Tag;
import org.oscim.core.Tile;
import org.oscim.database.IMapDatabase;
import org.oscim.database.IMapDatabaseCallback;
import org.oscim.database.MapInfo;
import org.oscim.database.OpenResult;
import org.oscim.database.QueryResult;
import org.oscim.view.mapgenerator.JobTile;
import android.os.Environment;
import android.os.SystemClock;
@ -87,7 +87,7 @@ public class MapDatabase implements IMapDatabase {
private static final boolean USE_APACHE_HTTP = false;
private static final boolean USE_LW_HTTP = true;
private static final String CACHE_DIRECTORY = "/Android/data/org.mapsforge.app/cache/";
private static final String CACHE_DIRECTORY = "/Android/data/org.oscim.app/cache/";
private static final String CACHE_FILE = "%d-%d-%d.tile";
private static final String SERVER_ADDR = "city.informatik.uni-bremen.de";
@ -310,19 +310,15 @@ public class MapDatabase implements IMapDatabase {
if (USE_CACHE) {
if (cacheDir == null) {
// cacheDir = mapFile;
String externalStorageDirectory = Environment
.getExternalStorageDirectory()
.getAbsolutePath();
String cacheDirectoryPath = externalStorageDirectory + CACHE_DIRECTORY;
cacheDir = createDirectory(cacheDirectoryPath);
Log.d(TAG, "----------- cache dir: " + cacheDir);
}
}
return new OpenResult();
return OpenResult.SUCCESS;
}
@Override

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.pbmap;
package org.oscim.database.pbmap;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
public class Tags {
public final static int MAX = 654;

View File

@ -24,7 +24,7 @@
* $Id: Geometry.java 9324 2012-02-27 22:08:12Z pramsey $
*/
package org.mapsforge.database.postgis;
package org.oscim.database.postgis;
import java.io.Serializable;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.postgis;
package org.oscim.database.postgis;
import java.sql.Connection;
import java.sql.DriverManager;
@ -24,16 +24,16 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import org.mapsforge.android.mapgenerator.JobTile;
import org.mapsforge.core.BoundingBox;
import org.mapsforge.core.GeoPoint;
import org.mapsforge.core.Tag;
import org.mapsforge.core.WebMercator;
import org.mapsforge.database.IMapDatabase;
import org.mapsforge.database.IMapDatabaseCallback;
import org.mapsforge.database.MapInfo;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.QueryResult;
import org.oscim.core.BoundingBox;
import org.oscim.core.GeoPoint;
import org.oscim.core.Tag;
import org.oscim.core.WebMercator;
import org.oscim.database.IMapDatabase;
import org.oscim.database.IMapDatabaseCallback;
import org.oscim.database.MapInfo;
import org.oscim.database.OpenResult;
import org.oscim.database.QueryResult;
import org.oscim.view.mapgenerator.JobTile;
import org.postgresql.PGConnection;
import android.util.Log;
@ -216,7 +216,7 @@ public class MapDatabase implements IMapDatabase {
mCoords = new float[100000];
mIndex = new short[100000];
}
return new OpenResult();
return OpenResult.SUCCESS;
}
@Override

View File

@ -19,7 +19,7 @@
*
*-------------------------------------------------------------------------
*/
package org.mapsforge.database.postgis;
package org.oscim.database.postgis;
import java.sql.SQLException;
import java.util.ArrayList;

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.postgis;
package org.oscim.database.postgis;
import org.mapsforge.database.IMapTileData;
import org.oscim.database.IMapTileData;
public class TileData implements IMapTileData {

View File

@ -22,7 +22,7 @@
* $Id: ValueGetter.java 9324 2012-02-27 22:08:12Z pramsey $
*/
package org.mapsforge.database.postgis;
package org.oscim.database.postgis;
abstract class ValueGetter {
byte[] data;

View File

@ -12,20 +12,20 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.database.test;
package org.oscim.database.test;
import java.util.Map;
import org.mapsforge.android.mapgenerator.JobTile;
import org.mapsforge.core.BoundingBox;
import org.mapsforge.core.MercatorProjection;
import org.mapsforge.core.Tag;
import org.mapsforge.core.Tile;
import org.mapsforge.database.IMapDatabase;
import org.mapsforge.database.IMapDatabaseCallback;
import org.mapsforge.database.MapInfo;
import org.mapsforge.database.OpenResult;
import org.mapsforge.database.QueryResult;
import org.oscim.core.BoundingBox;
import org.oscim.core.MercatorProjection;
import org.oscim.core.Tag;
import org.oscim.core.Tile;
import org.oscim.database.IMapDatabase;
import org.oscim.database.IMapDatabaseCallback;
import org.oscim.database.MapInfo;
import org.oscim.database.OpenResult;
import org.oscim.database.QueryResult;
import org.oscim.view.mapgenerator.JobTile;
/**
*
@ -175,7 +175,7 @@ public class MapDatabase implements IMapDatabase {
@Override
public OpenResult open(Map<String, String> options) {
mOpenFile = true;
return new OpenResult();
return OpenResult.SUCCESS;
}
@Override

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
final class AnyMatcher implements AttributeMatcher {
private static final AnyMatcher INSTANCE = new AnyMatcher();

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
interface AttributeMatcher {
boolean isCoveredBy(AttributeMatcher attributeMatcher);

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
final class Closed {
public static final int ANY = 0;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
final class Element {
public static final int ANY = 0;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.io.File;
import java.io.FileInputStream;
@ -21,7 +21,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import org.mapsforge.android.mapgenerator.Theme;
/**
* An ExternalRenderTheme allows for customizing the rendering style of the map via an XML file.

View File

@ -12,12 +12,12 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.android.rendertheme.renderinstruction.Area;
import org.mapsforge.android.rendertheme.renderinstruction.Caption;
import org.mapsforge.android.rendertheme.renderinstruction.Line;
import org.mapsforge.android.rendertheme.renderinstruction.PathText;
import org.oscim.theme.renderinstruction.Area;
import org.oscim.theme.renderinstruction.Caption;
import org.oscim.theme.renderinstruction.Line;
import org.oscim.theme.renderinstruction.PathText;
import android.graphics.Bitmap;
import android.graphics.Paint;

View File

@ -12,11 +12,10 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.io.InputStream;
import org.mapsforge.android.mapgenerator.Theme;
/**
* Enumeration of all internal rendering themes.
@ -27,9 +26,9 @@ public enum InternalRenderTheme implements Theme {
*
* @see <a href="http://wiki.openstreetmap.org/wiki/Osmarender">Osmarender</a>
*/
OSMARENDER("/org/mapsforge/android/rendertheme/osmarender/osmarender.xml"),
OSMARENDER("/org/oscim/theme/osmarender/osmarender.xml"),
TRONRENDER("/org/mapsforge/android/rendertheme/osmarender/tronrender.xml");
TRONRENDER("/org/oscim/theme/osmarender/tronrender.xml");
private final String mPath;
@ -39,9 +38,6 @@ public enum InternalRenderTheme implements Theme {
@Override
public InputStream getRenderThemeAsStream() {
// getResourceAsStream(mPath);
return InternalRenderTheme.class.getResourceAsStream(mPath);
// return Thread.currentThread().getClass().getResourceAsStream(mPath);
}
}

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class MatchingCacheKey {
int mHashCodeValue;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.util.List;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class MultiKeyMatcher implements AttributeMatcher {
private final String[] mKeys;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.util.List;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class MultiValueMatcher implements AttributeMatcher {
private final String[] mValues;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.util.List;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class NegativeMatcher implements AttributeMatcher {
private final String[] mKeyList;

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class NegativeRule extends Rule {
final AttributeMatcher mAttributeMatcher;

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class PositiveRule extends Rule {
final AttributeMatcher mKeyMatcher;

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.util.ArrayList;
import java.util.List;
import org.mapsforge.android.rendertheme.renderinstruction.RenderInstruction;
import org.mapsforge.core.LRUCache;
import org.mapsforge.core.Tag;
import org.oscim.core.LRUCache;
import org.oscim.core.Tag;
import org.oscim.theme.renderinstruction.RenderInstruction;
import org.xml.sax.Attributes;
import android.graphics.Color;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.io.IOException;
import java.io.InputStream;
@ -24,15 +24,15 @@ import java.util.logging.Logger;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory;
import org.mapsforge.android.rendertheme.renderinstruction.Area;
import org.mapsforge.android.rendertheme.renderinstruction.AreaLevel;
import org.mapsforge.android.rendertheme.renderinstruction.Caption;
import org.mapsforge.android.rendertheme.renderinstruction.Circle;
import org.mapsforge.android.rendertheme.renderinstruction.Line;
import org.mapsforge.android.rendertheme.renderinstruction.LineSymbol;
import org.mapsforge.android.rendertheme.renderinstruction.PathText;
import org.mapsforge.android.rendertheme.renderinstruction.RenderInstruction;
import org.mapsforge.android.rendertheme.renderinstruction.Symbol;
import org.oscim.theme.renderinstruction.Area;
import org.oscim.theme.renderinstruction.AreaLevel;
import org.oscim.theme.renderinstruction.Caption;
import org.oscim.theme.renderinstruction.Circle;
import org.oscim.theme.renderinstruction.Line;
import org.oscim.theme.renderinstruction.LineSymbol;
import org.oscim.theme.renderinstruction.PathText;
import org.oscim.theme.renderinstruction.RenderInstruction;
import org.oscim.theme.renderinstruction.Symbol;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.util.ArrayList;
import java.util.Arrays;
@ -23,8 +23,8 @@ import java.util.Map;
import java.util.Stack;
import java.util.regex.Pattern;
import org.mapsforge.android.rendertheme.renderinstruction.RenderInstruction;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.renderinstruction.RenderInstruction;
import org.xml.sax.Attributes;
abstract class Rule {

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import java.util.Stack;

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class SingleKeyMatcher implements AttributeMatcher {
private final String mKey;

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme;
package org.oscim.theme;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
class SingleValueMatcher implements AttributeMatcher {
private final String mValue;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.mapgenerator;
package org.oscim.theme;
import java.io.FileNotFoundException;
import java.io.InputStream;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
import android.graphics.Color;

View File

@ -12,10 +12,10 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
public class AreaLevel extends RenderInstruction {
private final Area area;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import java.io.File;
import java.io.FileInputStream;

View File

@ -12,13 +12,13 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import java.util.Locale;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
import android.graphics.Color;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
import android.graphics.Color;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import android.graphics.Typeface;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
enum FontStyle {
BOLD, BOLD_ITALIC, ITALIC, NORMAL;

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import java.util.Locale;
import java.util.regex.Pattern;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
import android.graphics.Color;

View File

@ -12,13 +12,13 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import java.io.IOException;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
import android.graphics.Bitmap;

View File

@ -12,13 +12,13 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import java.util.Locale;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
import android.graphics.Color;

View File

@ -12,10 +12,10 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
/**
* A RenderInstruction is a basic graphical primitive to draw a map.

View File

@ -12,13 +12,13 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import java.io.IOException;
import org.mapsforge.android.rendertheme.IRenderCallback;
import org.mapsforge.android.rendertheme.RenderThemeHandler;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
import org.oscim.theme.IRenderCallback;
import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes;
import android.graphics.Bitmap;

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.rendertheme.renderinstruction;
package org.oscim.theme.renderinstruction;
import org.mapsforge.core.Tag;
import org.oscim.core.Tag;
final class TextKey {
static String getInstance(String key) {

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android;
package org.oscim.view;
import android.content.Context;
import android.hardware.Sensor;

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android;
package org.oscim.view;
/**
* A simple DTO to stores flags for debugging rendered map tiles.

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android;
package org.oscim.view;
import org.mapsforge.android.mapgenerator.IMapGenerator;
import org.mapsforge.android.mapgenerator.JobTile;
import org.mapsforge.android.rendertheme.RenderTheme;
import org.oscim.theme.RenderTheme;
import org.oscim.view.mapgenerator.IMapGenerator;
import org.oscim.view.mapgenerator.JobTile;
import android.opengl.GLSurfaceView;

View File

@ -12,13 +12,13 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android;
package org.oscim.view;
import java.io.FileNotFoundException;
import org.mapsforge.android.rendertheme.InternalRenderTheme;
import org.mapsforge.core.GeoPoint;
import org.mapsforge.core.MapPosition;
import org.oscim.core.GeoPoint;
import org.oscim.core.MapPosition;
import org.oscim.theme.InternalRenderTheme;
import android.app.Activity;
import android.content.SharedPreferences;

View File

@ -12,65 +12,62 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.mapgenerator;
import org.mapsforge.android.IMapRenderer;
import org.mapsforge.android.MapView;
package org.oscim.view;
import android.util.AttributeSet;
/**
* A factory for the internal MapGenerator implementations.
* A factory for the internal MapRenderer implementations.
*/
public final class MapRendererFactory {
private static final String MAP_GENERATOR_ATTRIBUTE_NAME = "mapGenerator";
private static final String MAP_RENDERER_ATTRIBUTE_NAME = "mapRenderer";
/**
* @param mapView
* ...
* @param attributeSet
* A collection of attributes which includes the desired MapGenerator.
* @return a new MapGenerator instance.
* A collection of attributes which includes the desired MapRenderer.
* @return a new MapRenderer instance.
*/
public static IMapRenderer createMapRenderer(MapView mapView,
AttributeSet attributeSet) {
String mapGeneratorName = attributeSet.getAttributeValue(null,
MAP_GENERATOR_ATTRIBUTE_NAME);
if (mapGeneratorName == null) {
return new org.mapsforge.android.glrenderer.MapRenderer(mapView);
String mapRendererName = attributeSet.getAttributeValue(null,
MAP_RENDERER_ATTRIBUTE_NAME);
if (mapRendererName == null) {
return new org.oscim.view.glrenderer.MapRenderer(mapView);
}
MapRenderers mapGeneratorInternal = MapRenderers.valueOf(mapGeneratorName);
return MapRendererFactory.createMapRenderer(mapView, mapGeneratorInternal);
MapRenderers mapRendererInternal = MapRenderers.valueOf(mapRendererName);
return MapRendererFactory.createMapRenderer(mapView, mapRendererInternal);
}
public static MapRenderers getMapGenerator(AttributeSet attributeSet) {
String mapGeneratorName = attributeSet.getAttributeValue(null,
MAP_GENERATOR_ATTRIBUTE_NAME);
if (mapGeneratorName == null) {
public static MapRenderers getMapRenderer(AttributeSet attributeSet) {
String mapRendererName = attributeSet.getAttributeValue(null,
MAP_RENDERER_ATTRIBUTE_NAME);
if (mapRendererName == null) {
return MapRenderers.GL_RENDERER;
}
return MapRenderers.valueOf(mapGeneratorName);
return MapRenderers.valueOf(mapRendererName);
}
/**
* @param mapView
* ...
* @param mapGeneratorInternal
* the internal MapGenerator implementation.
* @return a new MapGenerator instance.
* @param mapRendererInternal
* the internal MapRenderer implementation.
* @return a new MapRenderer instance.
*/
public static IMapRenderer createMapRenderer(MapView mapView,
MapRenderers mapGeneratorInternal) {
switch (mapGeneratorInternal) {
MapRenderers mapRendererInternal) {
switch (mapRendererInternal) {
case SW_RENDERER:
return new org.mapsforge.android.swrenderer.MapRenderer(mapView);
return new org.oscim.view.swrenderer.MapRenderer(mapView);
case GL_RENDERER:
return new org.mapsforge.android.glrenderer.MapRenderer(mapView);
return new org.oscim.view.glrenderer.MapRenderer(mapView);
}
throw new IllegalArgumentException("unknown enum value: " + mapGeneratorInternal);
throw new IllegalArgumentException("unknown enum value: " + mapRendererInternal);
}
private MapRendererFactory() {

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapsforge.android.mapgenerator;
package org.oscim.view;
/**
* Enumeration of all internal MapGenerator implementations.

Some files were not shown because too many files have changed in this diff Show More