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"?> <?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mapsforge.app" package="org.oscim.app"
android:installLocation="auto" android:installLocation="auto"
android:versionCode="10" android:versionCode="10"
android:versionName="0.1" > android:versionName="0.1" >
@ -19,7 +19,7 @@
android:label="@string/application_name" android:label="@string/application_name"
android:theme="@style/Theme.TileMap" > android:theme="@style/Theme.TileMap" >
<activity <activity
android:name="org.mapsforge.app.TileMap" android:name="org.oscim.app.TileMap"
android:configChanges="orientation|screenSize" > android:configChanges="orientation|screenSize" >
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -29,7 +29,7 @@
</activity> </activity>
<activity android:name=".preferences.EditPreferences" /> <activity android:name=".preferences.EditPreferences" />
<activity android:name=".filepicker.FilePicker" /> <activity android:name=".filepicker.FilePicker" />
<activity android:name=".InfoView" android:theme="@android:style/Theme.NoTitleBar" /> <activity android:name=".InfoView" />
</application> </application>
</manifest> </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; option optimize_for = LITE_RUNTIME;
message Data { 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:layout_height="fill_parent"
android:windowActionBarOverlay="true" > android:windowActionBarOverlay="true" >
<org.mapsforge.android.MapView <org.oscim.view.MapView
android:id="@+id/mapView" android:id="@+id/mapView"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="fill_parent" /> android:layout_height="fill_parent" />

View File

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

View File

@ -13,19 +13,27 @@
<item <item
android:id="@+id/menu_position_my_location_disable" android:id="@+id/menu_position_my_location_disable"
android:title="@string/menu_position_my_location_disable"/> android:title="@string/menu_position_my_location_disable"/>
<item <!-- <item
android:id="@+id/menu_position_last_known" android:id="@+id/menu_position_last_known"
android:title="@string/menu_position_last_known"/> android:title="@string/menu_position_last_known"/> -->
<item <item
android:id="@+id/menu_position_enter_coordinates" android:id="@+id/menu_position_enter_coordinates"
android:title="@string/menu_position_enter_coordinates"/> android:title="@string/menu_position_enter_coordinates"/>
<item <item
android:id="@+id/menu_position_map_center" android:id="@+id/menu_position_map_center"
android:title="@string/menu_position_map_file_center"/> android:title="@string/menu_position_map_file_center"/>
<item
<item
android:id="@+id/menu_rotation_enable" android:id="@+id/menu_rotation_enable"
android:title="@string/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> </menu>
</item> </item>
<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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.app; package org.oscim.app;
import java.text.DecimalFormat; 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.app; package org.oscim.app;
import android.app.Activity; import android.app.Activity;
import android.os.Bundle; 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 * 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/>. * 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.content.Context;
import android.location.Criteria; import android.location.Criteria;
@ -43,7 +44,7 @@ public class LocationHandler {
mTileMap = tileMap; mTileMap = tileMap;
mLocationManager = (LocationManager) tileMap mLocationManager = (LocationManager) tileMap
.getSystemService(Context.LOCATION_SERVICE); .getSystemService(Context.LOCATION_SERVICE);
mLocationListener = new MyLocationListener(tileMap); mLocationListener = new MyLocationListener();
mSnapToLocationView = (ToggleButton) tileMap mSnapToLocationView = (ToggleButton) tileMap
.findViewById(R.id.snapToLocationView); .findViewById(R.id.snapToLocationView);
@ -63,6 +64,8 @@ public class LocationHandler {
boolean enableShowMyLocation(boolean centerAtFirstFix) { boolean enableShowMyLocation(boolean centerAtFirstFix) {
Log.d("TileMap", "enableShowMyLocation " + mShowMyLocation); Log.d("TileMap", "enableShowMyLocation " + mShowMyLocation);
gotoLastKnownPosition();
if (!mShowMyLocation) { if (!mShowMyLocation) {
Criteria criteria = new Criteria(); Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_FINE); criteria.setAccuracy(Criteria.ACCURACY_FINE);
@ -77,7 +80,7 @@ public class LocationHandler {
Log.d("TileMap", "enableShowMyLocation " + mShowMyLocation); Log.d("TileMap", "enableShowMyLocation " + mShowMyLocation);
mLocationListener.setCenterAtFirstFix(centerAtFirstFix); mLocationListener.setFirstCenter(centerAtFirstFix);
mLocationManager.requestLocationUpdates(bestProvider, 1000, 0, mLocationManager.requestLocationUpdates(bestProvider, 1000, 0,
mLocationListener); mLocationListener);
@ -92,6 +95,7 @@ public class LocationHandler {
void gotoLastKnownPosition() { void gotoLastKnownPosition() {
Location currentLocation; Location currentLocation;
Location bestLocation = null; Location bestLocation = null;
for (String provider : mLocationManager.getProviders(true)) { for (String provider : mLocationManager.getProviders(true)) {
currentLocation = mLocationManager.getLastKnownLocation(provider); currentLocation = mLocationManager.getLastKnownLocation(provider);
if (currentLocation == null) if (currentLocation == null)
@ -103,10 +107,14 @@ public class LocationHandler {
} }
if (bestLocation != null) { if (bestLocation != null) {
GeoPoint point = new GeoPoint(bestLocation.getLatitude(), byte zoom = mTileMap.mMapView.getMapPosition().getZoomLevel();
bestLocation.getLongitude()); 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 { } else {
mTileMap.showToastOnUiThread(mTileMap mTileMap.showToastOnUiThread(mTileMap
@ -197,12 +205,8 @@ public class LocationHandler {
} }
class MyLocationListener implements LocationListener { class MyLocationListener implements LocationListener {
private final TileMap tileMap;
private boolean centerAtFirstFix;
MyLocationListener(TileMap tileMap) { private boolean mSetCenter;
this.tileMap = tileMap;
}
@Override @Override
public void onLocationChanged(Location location) { public void onLocationChanged(Location location) {
@ -222,9 +226,9 @@ public class LocationHandler {
// this.advancedMapViewer.circleOverlay.requestRedraw(); // this.advancedMapViewer.circleOverlay.requestRedraw();
// this.advancedMapViewer.itemizedOverlay.requestRedraw(); // this.advancedMapViewer.itemizedOverlay.requestRedraw();
if (this.centerAtFirstFix || isSnapToLocationEnabled()) { if (mSetCenter || isSnapToLocationEnabled()) {
this.centerAtFirstFix = false; mSetCenter = false;
this.tileMap.mMapView.setCenter(point); mTileMap.mMapView.setCenter(point);
} }
} }
@ -243,12 +247,12 @@ public class LocationHandler {
// do nothing // do nothing
} }
boolean isCenterAtFirstFix() { boolean isFirstCenter() {
return this.centerAtFirstFix; return mSetCenter;
} }
void setCenterAtFirstFix(boolean centerAtFirstFix) { void setFirstCenter(boolean center) {
this.centerAtFirstFix = centerAtFirstFix; mSetCenter = center;
} }
} }
} }

View File

@ -1,21 +1,21 @@
package org.mapsforge.app; package org.oscim.app;
import java.io.FileFilter; import java.io.FileFilter;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import org.mapsforge.android.DebugSettings; import org.oscim.app.filefilter.FilterByFileExtension;
import org.mapsforge.android.MapActivity; import org.oscim.app.filefilter.ValidMapFile;
import org.mapsforge.android.MapView; import org.oscim.app.filefilter.ValidRenderTheme;
import org.mapsforge.android.mapgenerator.MapDatabases; import org.oscim.app.filepicker.FilePicker;
import org.mapsforge.android.rendertheme.InternalRenderTheme; import org.oscim.app.preferences.EditPreferences;
import org.mapsforge.android.utils.AndroidUtils; import org.oscim.core.GeoPoint;
import org.mapsforge.app.filefilter.FilterByFileExtension; import org.oscim.core.MapPosition;
import org.mapsforge.app.filefilter.ValidMapFile; import org.oscim.database.MapDatabases;
import org.mapsforge.app.filefilter.ValidRenderTheme; import org.oscim.theme.InternalRenderTheme;
import org.mapsforge.app.filepicker.FilePicker; import org.oscim.view.DebugSettings;
import org.mapsforge.app.preferences.EditPreferences; import org.oscim.view.MapActivity;
import org.mapsforge.core.GeoPoint; import org.oscim.view.MapView;
import org.mapsforge.core.MapPosition; import org.oscim.view.utils.AndroidUtils;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.app.ActionBar; import android.app.ActionBar;
@ -140,9 +140,9 @@ public class TileMap extends MapActivity {
mLocation.disableShowMyLocation()); mLocation.disableShowMyLocation());
return true; return true;
case R.id.menu_position_last_known: // case R.id.menu_position_last_known:
mLocation.gotoLastKnownPosition(); // mLocation.gotoLastKnownPosition();
return true; // return true;
case R.id.menu_position_enter_coordinates: case R.id.menu_position_enter_coordinates:
showDialog(DIALOG_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 * 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/>. * 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.File;
import java.io.FileFilter; 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 * 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/>. * 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 java.io.FileFilter;
import org.mapsforge.database.OpenResult; import org.oscim.database.OpenResult;
/** /**
* An extension of the {@link FileFilter} interface. * 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 * 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/>. * 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.File;
import java.util.HashMap; import java.util.HashMap;
import org.mapsforge.database.IMapDatabase; import org.oscim.database.IMapDatabase;
import org.mapsforge.database.OpenResult; import org.oscim.database.OpenResult;
import org.mapsforge.database.mapfile.MapDatabase; import org.oscim.database.mapfile.MapDatabase;
/** /**
* Accepts all valid map files. * 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 * 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/>. * 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.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -22,8 +22,8 @@ import java.io.InputStream;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory; import javax.xml.parsers.SAXParserFactory;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.database.OpenResult;
import org.mapsforge.database.OpenResult; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import org.xml.sax.XMLReader; 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 * 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/>. * 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.File;
import java.io.FileFilter; import java.io.FileFilter;
import java.util.Arrays; import java.util.Arrays;
import java.util.Comparator; import java.util.Comparator;
import org.mapsforge.app.R; import org.oscim.app.R;
import org.mapsforge.app.filefilter.ValidFileFilter; import org.oscim.app.filefilter.ValidFileFilter;
import android.annotation.TargetApi; import android.annotation.TargetApi;
import android.app.Activity; 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 * 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/>. * 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.File;
import org.mapsforge.app.R; import org.oscim.app.R;
import android.content.Context; import android.content.Context;
import android.view.Gravity; 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 * 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/>. * 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.annotation.TargetApi;
import android.os.Build; 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 * 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/>. * 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.Context;
import android.content.DialogInterface; 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 * 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/>. * 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.IOException;
import java.io.ObjectInputStream; 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 * 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/>. * 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 * 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/>. * 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.LinkedHashMap;
import java.util.Map; 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 * 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/>. * 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. * 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 * 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/>. * 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. * 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 * 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/>. * 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. * 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 * 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/>. * 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 * 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/>. * 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.database; package org.oscim.database;
import java.util.Map; 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 * 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/>. * 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.oscim.core.Tag;
import org.mapsforge.database.mapfile.MapDatabase; import org.oscim.database.mapfile.MapDatabase;
/** /**
* Callback methods which can be triggered from the {@link 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.database; package org.oscim.database;
public interface IMapTileData { public interface IMapTileData {

View File

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

View File

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

View File

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

View File

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

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.logging.Logger; 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. * 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 * 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/>. * 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 java.io.IOException;
import org.mapsforge.database.OpenResult; import org.oscim.database.OpenResult;
import org.mapsforge.database.mapfile.ReadBuffer; import org.oscim.database.mapfile.ReadBuffer;
/** /**
* Reads and validates the header data from a binary map file. * 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 * 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/>. * 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.oscim.core.Tag;
import org.mapsforge.database.mapfile.MapDatabase; import org.oscim.database.mapfile.MapDatabase;
/** /**
* Contains the immutable metadata of a map file. * Contains the immutable metadata of a map file.
* *
* @see MapDatabase#getMapInfo() * @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. * 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 * 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/>. * 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;
import org.mapsforge.core.Tag; import org.oscim.core.Tag;
class MapFileInfoBuilder { class MapFileInfoBuilder {
BoundingBox boundingBox; BoundingBox boundingBox;

View File

@ -12,11 +12,11 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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.oscim.core.GeoPoint;
import org.mapsforge.database.OpenResult; import org.oscim.database.OpenResult;
import org.mapsforge.database.mapfile.ReadBuffer; import org.oscim.database.mapfile.ReadBuffer;
final class OptionalFields { final class OptionalFields {
/** /**

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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 java.io.IOException;
import org.mapsforge.core.BoundingBox; import org.oscim.core.BoundingBox;
import org.mapsforge.core.Tag; import org.oscim.core.Tag;
import org.mapsforge.database.OpenResult; import org.oscim.database.OpenResult;
import org.mapsforge.database.mapfile.ReadBuffer; import org.oscim.database.mapfile.ReadBuffer;
final class RequiredFields { final class RequiredFields {
/** /**

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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. * 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 * 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/>. * 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 { class SubFileParameterBuilder {
byte baseZoomLevel; byte baseZoomLevel;

View File

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

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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 class Tags {
public final static int MAX = 654; public final static int MAX = 654;

View File

@ -24,7 +24,7 @@
* $Id: Geometry.java 9324 2012-02-27 22:08:12Z pramsey $ * $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; 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 * 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/>. * 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.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
@ -24,16 +24,16 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Properties; import java.util.Properties;
import org.mapsforge.android.mapgenerator.JobTile; import org.oscim.core.BoundingBox;
import org.mapsforge.core.BoundingBox; import org.oscim.core.GeoPoint;
import org.mapsforge.core.GeoPoint; import org.oscim.core.Tag;
import org.mapsforge.core.Tag; import org.oscim.core.WebMercator;
import org.mapsforge.core.WebMercator; import org.oscim.database.IMapDatabase;
import org.mapsforge.database.IMapDatabase; import org.oscim.database.IMapDatabaseCallback;
import org.mapsforge.database.IMapDatabaseCallback; import org.oscim.database.MapInfo;
import org.mapsforge.database.MapInfo; import org.oscim.database.OpenResult;
import org.mapsforge.database.OpenResult; import org.oscim.database.QueryResult;
import org.mapsforge.database.QueryResult; import org.oscim.view.mapgenerator.JobTile;
import org.postgresql.PGConnection; import org.postgresql.PGConnection;
import android.util.Log; import android.util.Log;
@ -216,7 +216,7 @@ public class MapDatabase implements IMapDatabase {
mCoords = new float[100000]; mCoords = new float[100000];
mIndex = new short[100000]; mIndex = new short[100000];
} }
return new OpenResult(); return OpenResult.SUCCESS;
} }
@Override @Override

View File

@ -19,7 +19,7 @@
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
package org.mapsforge.database.postgis; package org.oscim.database.postgis;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.ArrayList; 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 * 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/>. * 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 { public class TileData implements IMapTileData {

View File

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

View File

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

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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 { final class AnyMatcher implements AttributeMatcher {
private static final AnyMatcher INSTANCE = new AnyMatcher(); 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 * 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/>. * 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 { interface AttributeMatcher {
boolean isCoveredBy(AttributeMatcher 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android.rendertheme; package org.oscim.theme;
final class Closed { final class Closed {
public static final int ANY = 0; 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android.rendertheme; package org.oscim.theme;
final class Element { final class Element {
public static final int ANY = 0; 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 * 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/>. * 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.File;
import java.io.FileInputStream; import java.io.FileInputStream;
@ -21,7 +21,6 @@ import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.ObjectInputStream; 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. * 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 * 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/>. * 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.oscim.theme.renderinstruction.Area;
import org.mapsforge.android.rendertheme.renderinstruction.Caption; import org.oscim.theme.renderinstruction.Caption;
import org.mapsforge.android.rendertheme.renderinstruction.Line; import org.oscim.theme.renderinstruction.Line;
import org.mapsforge.android.rendertheme.renderinstruction.PathText; import org.oscim.theme.renderinstruction.PathText;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Paint; 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android.rendertheme; package org.oscim.theme;
import java.io.InputStream; import java.io.InputStream;
import org.mapsforge.android.mapgenerator.Theme;
/** /**
* Enumeration of all internal rendering themes. * 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> * @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; private final String mPath;
@ -39,9 +38,6 @@ public enum InternalRenderTheme implements Theme {
@Override @Override
public InputStream getRenderThemeAsStream() { public InputStream getRenderThemeAsStream() {
// getResourceAsStream(mPath);
return InternalRenderTheme.class.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 * 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/>. * 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 { class MatchingCacheKey {
int mHashCodeValue; int mHashCodeValue;

View File

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

View File

@ -12,9 +12,9 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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 { class PositiveRule extends Rule {
final AttributeMatcher mKeyMatcher; final AttributeMatcher mKeyMatcher;

View File

@ -12,14 +12,14 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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.ArrayList;
import java.util.List; import java.util.List;
import org.mapsforge.android.rendertheme.renderinstruction.RenderInstruction; import org.oscim.core.LRUCache;
import org.mapsforge.core.LRUCache; import org.oscim.core.Tag;
import org.mapsforge.core.Tag; import org.oscim.theme.renderinstruction.RenderInstruction;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Color; 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 * 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/>. * 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.IOException;
import java.io.InputStream; import java.io.InputStream;
@ -24,15 +24,15 @@ import java.util.logging.Logger;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParserFactory; import javax.xml.parsers.SAXParserFactory;
import org.mapsforge.android.rendertheme.renderinstruction.Area; import org.oscim.theme.renderinstruction.Area;
import org.mapsforge.android.rendertheme.renderinstruction.AreaLevel; import org.oscim.theme.renderinstruction.AreaLevel;
import org.mapsforge.android.rendertheme.renderinstruction.Caption; import org.oscim.theme.renderinstruction.Caption;
import org.mapsforge.android.rendertheme.renderinstruction.Circle; import org.oscim.theme.renderinstruction.Circle;
import org.mapsforge.android.rendertheme.renderinstruction.Line; import org.oscim.theme.renderinstruction.Line;
import org.mapsforge.android.rendertheme.renderinstruction.LineSymbol; import org.oscim.theme.renderinstruction.LineSymbol;
import org.mapsforge.android.rendertheme.renderinstruction.PathText; import org.oscim.theme.renderinstruction.PathText;
import org.mapsforge.android.rendertheme.renderinstruction.RenderInstruction; import org.oscim.theme.renderinstruction.RenderInstruction;
import org.mapsforge.android.rendertheme.renderinstruction.Symbol; import org.oscim.theme.renderinstruction.Symbol;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
import org.xml.sax.SAXException; 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 * 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/>. * 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.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -23,8 +23,8 @@ import java.util.Map;
import java.util.Stack; import java.util.Stack;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.mapsforge.android.rendertheme.renderinstruction.RenderInstruction; import org.oscim.core.Tag;
import org.mapsforge.core.Tag; import org.oscim.theme.renderinstruction.RenderInstruction;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
abstract class Rule { abstract class Rule {

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android.rendertheme; package org.oscim.theme;
import java.util.Stack; 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 * 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/>. * 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 { class SingleKeyMatcher implements AttributeMatcher {
private final String mKey; 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 * 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/>. * 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 { class SingleValueMatcher implements AttributeMatcher {
private final String mValue; 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 * 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/>. * 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.FileNotFoundException;
import java.io.InputStream; 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 * 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/>. * 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.oscim.core.Tag;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.theme.IRenderCallback;
import org.mapsforge.core.Tag; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Color; 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 * 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/>. * 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.oscim.core.Tag;
import org.mapsforge.core.Tag; import org.oscim.theme.IRenderCallback;
public class AreaLevel extends RenderInstruction { public class AreaLevel extends RenderInstruction {
private final Area area; 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 * 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/>. * 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.File;
import java.io.FileInputStream; 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 * 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/>. * 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.Locale;
import org.mapsforge.android.rendertheme.IRenderCallback; import org.oscim.core.Tag;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.theme.IRenderCallback;
import org.mapsforge.core.Tag; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Color; 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 * 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/>. * 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.oscim.core.Tag;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.theme.IRenderCallback;
import org.mapsforge.core.Tag; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Color; 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 * 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/>. * 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; 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android.rendertheme.renderinstruction; package org.oscim.theme.renderinstruction;
enum FontStyle { enum FontStyle {
BOLD, BOLD_ITALIC, ITALIC, NORMAL; 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 * 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/>. * 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.Locale;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.mapsforge.android.rendertheme.IRenderCallback; import org.oscim.core.Tag;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.theme.IRenderCallback;
import org.mapsforge.core.Tag; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Color; 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 * 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/>. * 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 java.io.IOException;
import org.mapsforge.android.rendertheme.IRenderCallback; import org.oscim.core.Tag;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.theme.IRenderCallback;
import org.mapsforge.core.Tag; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Bitmap; 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 * 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/>. * 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.Locale;
import org.mapsforge.android.rendertheme.IRenderCallback; import org.oscim.core.Tag;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.theme.IRenderCallback;
import org.mapsforge.core.Tag; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Color; 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 * 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/>. * 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.oscim.core.Tag;
import org.mapsforge.core.Tag; import org.oscim.theme.IRenderCallback;
/** /**
* A RenderInstruction is a basic graphical primitive to draw a map. * 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 * 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/>. * 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 java.io.IOException;
import org.mapsforge.android.rendertheme.IRenderCallback; import org.oscim.core.Tag;
import org.mapsforge.android.rendertheme.RenderThemeHandler; import org.oscim.theme.IRenderCallback;
import org.mapsforge.core.Tag; import org.oscim.theme.RenderThemeHandler;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import android.graphics.Bitmap; 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 * 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/>. * 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 { final class TextKey {
static String getInstance(String key) { 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android; package org.oscim.view;
import android.content.Context; import android.content.Context;
import android.hardware.Sensor; 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 * 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/>. * 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. * 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 * 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/>. * 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.oscim.theme.RenderTheme;
import org.mapsforge.android.mapgenerator.JobTile; import org.oscim.view.mapgenerator.IMapGenerator;
import org.mapsforge.android.rendertheme.RenderTheme; import org.oscim.view.mapgenerator.JobTile;
import android.opengl.GLSurfaceView; 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android; package org.oscim.view;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import org.mapsforge.android.rendertheme.InternalRenderTheme; import org.oscim.core.GeoPoint;
import org.mapsforge.core.GeoPoint; import org.oscim.core.MapPosition;
import org.mapsforge.core.MapPosition; import org.oscim.theme.InternalRenderTheme;
import android.app.Activity; import android.app.Activity;
import android.content.SharedPreferences; 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 * 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/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package org.mapsforge.android.mapgenerator; package org.oscim.view;
import org.mapsforge.android.IMapRenderer;
import org.mapsforge.android.MapView;
import android.util.AttributeSet; import android.util.AttributeSet;
/** /**
* A factory for the internal MapGenerator implementations. * A factory for the internal MapRenderer implementations.
*/ */
public final class MapRendererFactory { 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 mapView
* ... * ...
* @param attributeSet * @param attributeSet
* A collection of attributes which includes the desired MapGenerator. * A collection of attributes which includes the desired MapRenderer.
* @return a new MapGenerator instance. * @return a new MapRenderer instance.
*/ */
public static IMapRenderer createMapRenderer(MapView mapView, public static IMapRenderer createMapRenderer(MapView mapView,
AttributeSet attributeSet) { AttributeSet attributeSet) {
String mapGeneratorName = attributeSet.getAttributeValue(null, String mapRendererName = attributeSet.getAttributeValue(null,
MAP_GENERATOR_ATTRIBUTE_NAME); MAP_RENDERER_ATTRIBUTE_NAME);
if (mapGeneratorName == null) { if (mapRendererName == null) {
return new org.mapsforge.android.glrenderer.MapRenderer(mapView); return new org.oscim.view.glrenderer.MapRenderer(mapView);
} }
MapRenderers mapGeneratorInternal = MapRenderers.valueOf(mapGeneratorName); MapRenderers mapRendererInternal = MapRenderers.valueOf(mapRendererName);
return MapRendererFactory.createMapRenderer(mapView, mapGeneratorInternal); return MapRendererFactory.createMapRenderer(mapView, mapRendererInternal);
} }
public static MapRenderers getMapGenerator(AttributeSet attributeSet) { public static MapRenderers getMapRenderer(AttributeSet attributeSet) {
String mapGeneratorName = attributeSet.getAttributeValue(null, String mapRendererName = attributeSet.getAttributeValue(null,
MAP_GENERATOR_ATTRIBUTE_NAME); MAP_RENDERER_ATTRIBUTE_NAME);
if (mapGeneratorName == null) { if (mapRendererName == null) {
return MapRenderers.GL_RENDERER; return MapRenderers.GL_RENDERER;
} }
return MapRenderers.valueOf(mapGeneratorName); return MapRenderers.valueOf(mapRendererName);
} }
/** /**
* @param mapView * @param mapView
* ... * ...
* @param mapGeneratorInternal * @param mapRendererInternal
* the internal MapGenerator implementation. * the internal MapRenderer implementation.
* @return a new MapGenerator instance. * @return a new MapRenderer instance.
*/ */
public static IMapRenderer createMapRenderer(MapView mapView, public static IMapRenderer createMapRenderer(MapView mapView,
MapRenderers mapGeneratorInternal) { MapRenderers mapRendererInternal) {
switch (mapGeneratorInternal) { switch (mapRendererInternal) {
case SW_RENDERER: case SW_RENDERER:
return new org.mapsforge.android.swrenderer.MapRenderer(mapView); return new org.oscim.view.swrenderer.MapRenderer(mapView);
case GL_RENDERER: 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() { private MapRendererFactory() {

View File

@ -12,7 +12,7 @@
* You should have received a copy of the GNU Lesser General Public License along with * 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/>. * 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. * Enumeration of all internal MapGenerator implementations.

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