Improve code / xml formatting, closes #54
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
|
||||
echo yes | android update sdk --filter platform-tools --no-ui
|
||||
echo yes | android update sdk --filter android-21 --no-ui
|
||||
echo yes | android update sdk --filter extra-android-support --no-ui
|
||||
echo yes | android update sdk --filter extra-android-m2repository --no-ui
|
||||
@@ -1,14 +1,14 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=82
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
|
||||
@@ -282,7 +282,7 @@ org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
|
||||
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
|
||||
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
|
||||
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=tab
|
||||
org.eclipse.jdt.core.formatter.tabulation.char=space
|
||||
org.eclipse.jdt.core.formatter.tabulation.size=4
|
||||
org.eclipse.jdt.core.formatter.use_on_off_tags=false
|
||||
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
|
||||
|
||||
72
jdee.gradle
72
jdee.gradle
@@ -1,72 +0,0 @@
|
||||
def prj = { project ->
|
||||
|
||||
"(jde-project-file-version" (["1.0"])
|
||||
"(jde-set-variables" {
|
||||
"'(jde-compile-option-directory" ([project.sourceSets.main.output.classesDir])
|
||||
"'(jde-junit-working-directory" ([project.projectDir])
|
||||
|
||||
"'(jde-compile-option-source" {
|
||||
"'(" (["default"])
|
||||
}
|
||||
|
||||
"'(jde-compile-option-target" {
|
||||
"'(" (["default"])
|
||||
}
|
||||
|
||||
"'(jde-compile-option-command-line-args" {
|
||||
"'(" (["-${project.sourceCompatibility}"])
|
||||
}
|
||||
|
||||
"'(jde-sourcepath" {
|
||||
"'(" (
|
||||
project.sourceSets.main.allSource.srcDirs
|
||||
+ project.sourceSets.test.allSource.srcDirs)
|
||||
}
|
||||
|
||||
"'(jde-global-classpath" {
|
||||
"'(" (
|
||||
[] + project.sourceSets.main.output.classesDir
|
||||
+ project.sourceSets.test.output.classesDir
|
||||
+ project.sourceSets.main.allSource.srcDirs
|
||||
+ project.sourceSets.test.allSource.srcDirs
|
||||
+ (([] as Set) + project.configurations.compile.getFiles()
|
||||
+ project.configurations.testCompile.getFiles()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
task("jdee") << {
|
||||
def output = new File(project.projectDir, "prj.el").newPrintWriter()
|
||||
try {
|
||||
prj.delegate = new NodeBuilder() {
|
||||
def lev = 0
|
||||
|
||||
def write = { Object file ->
|
||||
output.print '\n' + ''.padRight(lev, ' ') + "\"${file}\"".tr('\\', '/')
|
||||
}
|
||||
|
||||
Object createNode(Object name) {
|
||||
output.print '\n' + ''.padRight(lev++, ' ') + name
|
||||
return name
|
||||
}
|
||||
|
||||
Object createNode(Object name, Object value) {
|
||||
createNode(name)
|
||||
value.each write
|
||||
return name
|
||||
}
|
||||
|
||||
void nodeCompleted(Object parent, Object child) {
|
||||
output.print ")"
|
||||
lev--
|
||||
}
|
||||
}
|
||||
prj(project)
|
||||
output.close()
|
||||
} finally {
|
||||
output.flush()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://opensciencemap.org/rendertheme"
|
||||
xmlns:tns="http://opensciencemap.org/rendertheme" elementFormDefault="qualified" xml:lang="en">
|
||||
<xs:schema xmlns:tns="http://opensciencemap.org/rendertheme"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
|
||||
targetNamespace="http://opensciencemap.org/rendertheme" xml:lang="en">
|
||||
<!-- attribute types -->
|
||||
<xs:simpleType name="cap">
|
||||
<xs:restriction base="xs:string">
|
||||
@@ -74,7 +75,8 @@
|
||||
|
||||
<xs:simpleType name="strokeDasharray">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:pattern value="([0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)? *, *)*[0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)?" />
|
||||
<xs:pattern
|
||||
value="([0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)? *, *)*[0-9]+(\.[0-9]+)? *, *[0-9]+(\.[0-9]+)?" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
@@ -89,29 +91,29 @@
|
||||
|
||||
<!-- rendering instructions -->
|
||||
<xs:complexType name="area">
|
||||
<xs:attribute name="id" type="xs:string" use="optional" default="0" />
|
||||
<xs:attribute name="use" type="xs:string" use="optional" default="0" />
|
||||
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
|
||||
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
|
||||
<xs:attribute name="src" type="tns:src" use="optional" />
|
||||
<xs:attribute name="fill" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="stroke" type="tns:color" use="optional" default="#00000000" />
|
||||
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional" default="0" />
|
||||
<xs:attribute name="fade" type="xs:integer" use="optional" default="-1" />
|
||||
<xs:attribute name="blend" type="xs:integer" use="optional" default="-1" />
|
||||
<xs:attribute name="blend-fill" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="mesh" type="xs:boolean" use="optional" default="false" />
|
||||
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke" default="#00000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
|
||||
<xs:attribute name="fade" default="-1" type="xs:integer" use="optional" />
|
||||
<xs:attribute name="blend" default="-1" type="xs:integer" use="optional" />
|
||||
<xs:attribute name="blend-fill" default="#000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="mesh" default="false" type="xs:boolean" use="optional" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="caption">
|
||||
<xs:attribute name="k" type="tns:textKey" use="required" />
|
||||
<xs:attribute name="dy" type="xs:float" use="optional" default="0" />
|
||||
<xs:attribute name="font-family" type="tns:fontFamily" use="optional" default="default" />
|
||||
<xs:attribute name="style" type="tns:fontStyle" use="optional" default="normal" />
|
||||
<xs:attribute name="size" type="tns:nonNegativeFloat" use="optional" default="0" />
|
||||
<xs:attribute name="fill" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="stroke" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional" default="0" />
|
||||
<xs:attribute name="dy" default="0" type="xs:float" use="optional" />
|
||||
<xs:attribute name="font-family" default="default" type="tns:fontFamily" use="optional" />
|
||||
<xs:attribute name="style" default="normal" type="tns:fontStyle" use="optional" />
|
||||
<xs:attribute name="size" default="0" type="tns:nonNegativeFloat" use="optional" />
|
||||
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
|
||||
<!-- priority for label placement, 0 = highest priority -->
|
||||
<xs:attribute name="priority" type="xs:integer" use="optional" default="0" />
|
||||
<xs:attribute name="priority" default="0" type="xs:integer" use="optional" />
|
||||
|
||||
<!-- symbol src name in atlas -->
|
||||
<xs:attribute name="symbol" type="tns:src" use="optional" />
|
||||
@@ -119,37 +121,37 @@
|
||||
|
||||
<xs:complexType name="circle">
|
||||
<xs:attribute name="radius" type="tns:nonNegativeFloat" use="required" />
|
||||
<xs:attribute name="scale-radius" type="xs:boolean" use="optional" default="false" />
|
||||
<xs:attribute name="fill" type="tns:color" use="optional" default="#00000000" />
|
||||
<xs:attribute name="stroke" type="tns:color" use="optional" default="#00000000" />
|
||||
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional" default="0" />
|
||||
<xs:attribute name="scale-radius" default="false" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="fill" default="#00000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke" default="#00000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="line">
|
||||
<!-- style: TODO only in style-line-->
|
||||
<xs:attribute name="id" type="xs:string" use="optional" default="0" />
|
||||
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
|
||||
|
||||
<!-- inherited style -->
|
||||
<xs:attribute name="use" type="xs:string" use="optional" default="0" />
|
||||
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
|
||||
|
||||
<xs:attribute name="src" type="tns:src" use="optional" />
|
||||
<xs:attribute name="stroke" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="width" type="xs:float" use="optional" default="0" />
|
||||
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="width" default="0" type="xs:float" use="optional" />
|
||||
<!-- minimum scaled width to draw outline -->
|
||||
<xs:attribute name="min" type="xs:float" use="optional" default="0" />
|
||||
<xs:attribute name="min" default="0" type="xs:float" use="optional" />
|
||||
<xs:attribute name="dasharray" type="tns:strokeDasharray" use="optional" />
|
||||
<xs:attribute name="cap" type="tns:cap" use="optional" default="round" />
|
||||
<xs:attribute name="outline" type="xs:string" use="optional" default="" />
|
||||
<xs:attribute name="fade" type="xs:integer" use="optional" default="-1" />
|
||||
<xs:attribute name="blur" type="xs:float" use="optional" default="-1" />
|
||||
<xs:attribute name="fix" type="xs:boolean" use="optional" default="false" />
|
||||
<xs:attribute name="cap" default="round" type="tns:cap" use="optional" />
|
||||
<xs:attribute name="outline" default="" type="xs:string" use="optional" />
|
||||
<xs:attribute name="fade" default="-1" type="xs:integer" use="optional" />
|
||||
<xs:attribute name="blur" default="-1" type="xs:float" use="optional" />
|
||||
<xs:attribute name="fix" default="false" type="xs:boolean" use="optional" />
|
||||
|
||||
<!-- stipple repeat in 'pixel' -->
|
||||
<xs:attribute name="stipple" type="xs:integer" use="optional" default="0" />
|
||||
<xs:attribute name="stipple" default="0" type="xs:integer" use="optional" />
|
||||
<!-- stipple color -->
|
||||
<xs:attribute name="stipple-stroke" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="stipple-stroke" default="#000000" type="tns:color" use="optional" />
|
||||
<!-- stipple width relative to line width, i.e 0.0-1.0 -->
|
||||
<xs:attribute name="stipple-width" type="xs:float" use="optional" default="0" />
|
||||
<xs:attribute name="stipple-width" default="0" type="xs:float" use="optional" />
|
||||
|
||||
</xs:complexType>
|
||||
|
||||
@@ -165,25 +167,25 @@
|
||||
-->
|
||||
<xs:complexType name="lineSymbol">
|
||||
<xs:attribute name="src" type="tns:src" use="required" />
|
||||
<xs:attribute name="align-center" type="xs:boolean" use="optional" default="false" />
|
||||
<xs:attribute name="repeat" type="xs:boolean" use="optional" default="false" />
|
||||
<xs:attribute name="align-center" default="false" type="xs:boolean" use="optional" />
|
||||
<xs:attribute name="repeat" default="false" type="xs:boolean" use="optional" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="text">
|
||||
<xs:attribute name="id" type="xs:string" use="optional" default="0" />
|
||||
<xs:attribute name="use" type="xs:string" use="optional" default="0" />
|
||||
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
|
||||
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
|
||||
|
||||
<xs:attribute name="k" type="tns:textKey" use="optional" default="name" />
|
||||
<xs:attribute name="dy" type="xs:float" use="optional" default="0" />
|
||||
<xs:attribute name="font-family" type="tns:fontFamily" use="optional" default="default" />
|
||||
<xs:attribute name="style" type="tns:fontStyle" use="optional" default="normal" />
|
||||
<xs:attribute name="size" type="tns:nonNegativeFloat" use="optional" default="0" />
|
||||
<xs:attribute name="fill" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="stroke" type="tns:color" use="optional" default="#000000" />
|
||||
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat" use="optional" default="0" />
|
||||
<xs:attribute name="caption" type="xs:boolean" use="optional" default="false" />
|
||||
<xs:attribute name="k" default="name" type="tns:textKey" use="optional" />
|
||||
<xs:attribute name="dy" default="0" type="xs:float" use="optional" />
|
||||
<xs:attribute name="font-family" default="default" type="tns:fontFamily" use="optional" />
|
||||
<xs:attribute name="style" default="normal" type="tns:fontStyle" use="optional" />
|
||||
<xs:attribute name="size" default="0" type="tns:nonNegativeFloat" use="optional" />
|
||||
<xs:attribute name="fill" default="#000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
|
||||
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
|
||||
<xs:attribute name="caption" default="false" type="xs:boolean" use="optional" />
|
||||
<!-- priority for label placement, 0 = highest priority -->
|
||||
<xs:attribute name="priority" type="xs:integer" use="optional" default="0" />
|
||||
<xs:attribute name="priority" default="0" type="xs:integer" use="optional" />
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="symbol">
|
||||
@@ -199,7 +201,7 @@
|
||||
|
||||
<!-- match elements -->
|
||||
<xs:complexType name="m">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
||||
<!-- recursion to allow for nested m -->
|
||||
<xs:element name="m" type="tns:m" />
|
||||
|
||||
@@ -217,13 +219,13 @@
|
||||
<xs:element name="outline-layer" type="tns:line" />
|
||||
</xs:choice>
|
||||
|
||||
<xs:attribute name="select" type="tns:selectorList" use="optional" default="any"/>
|
||||
<xs:attribute name="select" default="any" type="tns:selectorList" use="optional" />
|
||||
<xs:attribute name="e" type="tns:elementList" use="optional" />
|
||||
<xs:attribute name="k" type="xs:string" use="optional" />
|
||||
<xs:attribute name="v" type="xs:string" use="optional" />
|
||||
<xs:attribute name="closed" type="tns:closed" use="optional" default="any" />
|
||||
<xs:attribute name="zoom-min" type="xs:unsignedByte" use="optional" default="0" />
|
||||
<xs:attribute name="zoom-max" type="xs:unsignedByte" use="optional" default="127" />
|
||||
<xs:attribute name="closed" default="any" type="tns:closed" use="optional" />
|
||||
<xs:attribute name="zoom-min" default="0" type="xs:unsignedByte" use="optional" />
|
||||
<xs:attribute name="zoom-max" default="127" type="xs:unsignedByte" use="optional" />
|
||||
|
||||
</xs:complexType>
|
||||
|
||||
@@ -233,7 +235,7 @@
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="atlas">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:element name="rect" type="tns:atlasRect" />
|
||||
</xs:choice>
|
||||
<xs:attribute name="img" type="xs:string" use="required" />
|
||||
@@ -241,11 +243,11 @@
|
||||
|
||||
<!-- rendertheme element -->
|
||||
<xs:complexType name="rendertheme">
|
||||
<xs:sequence minOccurs="0" maxOccurs="1">
|
||||
<xs:sequence maxOccurs="1" minOccurs="0">
|
||||
|
||||
<!-- style definitions -->
|
||||
<xs:sequence minOccurs="0" maxOccurs="256">
|
||||
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:sequence maxOccurs="256" minOccurs="0">
|
||||
<xs:choice maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:element name="style-text" type="tns:text" />
|
||||
<xs:element name="style-area" type="tns:area" />
|
||||
<xs:element name="style-line" type="tns:line" />
|
||||
@@ -253,19 +255,21 @@
|
||||
</xs:choice>
|
||||
</xs:sequence>
|
||||
|
||||
<xs:choice minOccurs="0" maxOccurs="1">
|
||||
<xs:choice maxOccurs="1" minOccurs="0">
|
||||
<xs:element name="atlas" type="tns:atlas" />
|
||||
</xs:choice>
|
||||
|
||||
<!-- matching rules -->
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:sequence maxOccurs="unbounded" minOccurs="0">
|
||||
<xs:element name="m" type="tns:m" />
|
||||
</xs:sequence>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="version" type="xs:positiveInteger" use="required" />
|
||||
<xs:attribute name="map-background" type="tns:color" use="optional" default="#ffffff" />
|
||||
<xs:attribute name="base-stroke-width" type="tns:nonNegativeFloat" use="optional" default="1" />
|
||||
<xs:attribute name="base-text-scale" type="tns:nonNegativeFloat" use="optional" default="1" />
|
||||
<xs:attribute name="map-background" default="#ffffff" type="tns:color" use="optional" />
|
||||
<xs:attribute name="base-stroke-width" default="1" type="tns:nonNegativeFloat"
|
||||
use="optional" />
|
||||
<xs:attribute name="base-text-scale" default="1" type="tns:nonNegativeFloat"
|
||||
use="optional" />
|
||||
</xs:complexType>
|
||||
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
@@ -11,6 +11,4 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-21
|
||||
android.library.reference.1=../vtm-android
|
||||
android.library.reference.2=../appcompat
|
||||
target=android-23
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GridView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/filePickerView"
|
||||
android:layout_width="fill_parent" android:layout_height="fill_parent" android:fadingEdge="vertical"
|
||||
android:fadingEdgeLength="30dip" android:columnWidth="100dip" android:numColumns="auto_fit" />
|
||||
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/filePickerView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:fadingEdge="vertical"
|
||||
android:fadingEdgeLength="30dip"
|
||||
android:columnWidth="100dip"
|
||||
android:numColumns="auto_fit" />
|
||||
@@ -1,5 +1,4 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.oscim.android.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
</org.oscim.android.MapView>
|
||||
android:layout_height="fill_parent"></org.oscim.android.MapView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="fill_parent"
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent" android:layout_height="fill_parent">
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/samples" android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||
android:orientation="vertical" android:gravity="center_horizontal" />
|
||||
android:id="@+id/samples"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_horizontal" />
|
||||
</ScrollView>
|
||||
@@ -1,13 +1,11 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.oscim.android.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
</org.oscim.android.MapView>
|
||||
android:layout_height="fill_parent"></org.oscim.android.MapView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:id="@+id/menu_settings"
|
||||
<item
|
||||
android:id="@+id/menu_settings"
|
||||
android:title="@string/menu_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="never" />
|
||||
|
||||
@@ -8,30 +8,25 @@
|
||||
android:id="@+id/theme_default"
|
||||
android:checked="true"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/theme_default">
|
||||
</item>
|
||||
android:title="@string/theme_default"></item>
|
||||
<item
|
||||
android:id="@+id/theme_tubes"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/theme_tubes">
|
||||
</item>
|
||||
android:title="@string/theme_tubes"></item>
|
||||
<item
|
||||
android:id="@+id/theme_osmarender"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/theme_osmarender">
|
||||
</item>
|
||||
android:title="@string/theme_osmarender"></item>
|
||||
<item
|
||||
android:id="@+id/theme_newtron"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/theme_newtron">
|
||||
</item>
|
||||
android:title="@string/theme_newtron"></item>
|
||||
</group>
|
||||
|
||||
<item
|
||||
android:id="@+id/gridlayer"
|
||||
android:showAsAction="never"
|
||||
android:checkable="true"
|
||||
android:title="@string/menu_gridlayer">
|
||||
</item>
|
||||
android:title="@string/menu_gridlayer"></item>
|
||||
|
||||
</menu>
|
||||
@@ -14,13 +14,6 @@
|
||||
*/
|
||||
package org.oscim.android.filepicker;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.oscim.android.test.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
@@ -32,6 +25,13 @@ import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.GridView;
|
||||
|
||||
import org.oscim.android.test.R;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
|
||||
/**
|
||||
* A FilePicker displays the contents of directories. The user can navigate
|
||||
* within the file system and select a single
|
||||
@@ -40,11 +40,11 @@ import android.widget.GridView;
|
||||
* {@link #setFileComparator(Comparator)}. By default subfolders and files are
|
||||
* grouped and each group is ordered
|
||||
* alphabetically.
|
||||
* <p>
|
||||
* <p/>
|
||||
* A {@link FileFilter} can be activated via
|
||||
* {@link #setFileDisplayFilter(FileFilter)} to restrict the displayed files and
|
||||
* folders. By default all files and folders are visible.
|
||||
* <p>
|
||||
* <p/>
|
||||
* Another <code>FileFilter</code> can be applied via
|
||||
* {@link #setFileSelectFilter(ValidFileFilter)} to check if a selected file is
|
||||
* valid before its path is returned. By default all files are considered as
|
||||
@@ -71,8 +71,7 @@ public class FilePicker extends Activity implements AdapterView.OnItemClickListe
|
||||
* directories before displaying them. If set to
|
||||
* null, subfolders and files will not be ordered.
|
||||
*
|
||||
* @param fileComparator
|
||||
* the file comparator (may be null).
|
||||
* @param fileComparator the file comparator (may be null).
|
||||
*/
|
||||
public void setFileComparator(Comparator<File> fileComparator) {
|
||||
mFileComparator = fileComparator;
|
||||
@@ -83,8 +82,7 @@ public class FilePicker extends Activity implements AdapterView.OnItemClickListe
|
||||
* files and subfolders of directories will be
|
||||
* displayed. If set to null, all files and subfolders are shown.
|
||||
*
|
||||
* @param fileDisplayFilter
|
||||
* the file display filter (may be null).
|
||||
* @param fileDisplayFilter the file display filter (may be null).
|
||||
*/
|
||||
public void setFileDisplayFilter(FileFilter fileDisplayFilter) {
|
||||
mFileDisplayFilter = fileDisplayFilter;
|
||||
@@ -95,8 +93,7 @@ public class FilePicker extends Activity implements AdapterView.OnItemClickListe
|
||||
* file to determine if it is valid. If set
|
||||
* to null, all files are considered as valid.
|
||||
*
|
||||
* @param fileSelectFilter
|
||||
* the file selection filter (may be null).
|
||||
* @param fileSelectFilter the file selection filter (may be null).
|
||||
*/
|
||||
public void setFileSelectFilter(ValidFileFilter fileSelectFilter) {
|
||||
mFileSelectFilter = fileSelectFilter;
|
||||
|
||||
@@ -14,10 +14,6 @@
|
||||
*/
|
||||
package org.oscim.android.filepicker;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.oscim.android.test.R;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
@@ -25,6 +21,10 @@ import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.oscim.android.test.R;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* An adapter for the FilePicker GridView.
|
||||
*/
|
||||
@@ -38,8 +38,7 @@ class FilePickerIconAdapter extends BaseAdapter {
|
||||
/**
|
||||
* Creates a new FilePickerIconAdapter with the given context.
|
||||
*
|
||||
* @param context
|
||||
* the context of this adapter, through which new Views are
|
||||
* @param context the context of this adapter, through which new Views are
|
||||
* created.
|
||||
*/
|
||||
FilePickerIconAdapter(Context context) {
|
||||
@@ -103,10 +102,8 @@ class FilePickerIconAdapter extends BaseAdapter {
|
||||
/**
|
||||
* Sets the data of this adapter.
|
||||
*
|
||||
* @param files
|
||||
* the new files for this adapter.
|
||||
* @param newHasParentFolder
|
||||
* true if the file array has a parent folder at index 0, false
|
||||
* @param files the new files for this adapter.
|
||||
* @param newHasParentFolder true if the file array has a parent folder at index 0, false
|
||||
* otherwise.
|
||||
*/
|
||||
void setFiles(File[] files, boolean newHasParentFolder) {
|
||||
|
||||
@@ -25,8 +25,7 @@ public class FilterByFileExtension implements FileFilter {
|
||||
private final String mExtension;
|
||||
|
||||
/**
|
||||
* @param extension
|
||||
* the allowed file name extension.
|
||||
* @param extension the allowed file name extension.
|
||||
*/
|
||||
public FilterByFileExtension(String extension) {
|
||||
mExtension = extension;
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
*/
|
||||
package org.oscim.android.filepicker;
|
||||
|
||||
import java.io.FileFilter;
|
||||
|
||||
import org.oscim.tiling.TileSource.OpenResult;
|
||||
|
||||
import java.io.FileFilter;
|
||||
|
||||
/**
|
||||
* An extension of the {@link FileFilter} interface.
|
||||
*/
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
*/
|
||||
package org.oscim.android.filepicker;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.oscim.tiling.TileSource.OpenResult;
|
||||
import org.oscim.tiling.source.mapfile.MapFileTileSource;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* Accepts all valid map files.
|
||||
*/
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
*/
|
||||
package org.oscim.android.filepicker;
|
||||
|
||||
import org.oscim.theme.XmlThemeBuilder;
|
||||
import org.oscim.tiling.TileSource.OpenResult;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
@@ -22,12 +28,6 @@ import java.io.InputStream;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
|
||||
import org.oscim.theme.XmlThemeBuilder;
|
||||
import org.oscim.tiling.TileSource.OpenResult;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
/**
|
||||
* Accepts all valid render theme XML files.
|
||||
*/
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import org.oscim.android.cache.TileCache;
|
||||
import org.oscim.core.MapPosition;
|
||||
import org.oscim.layers.TileGridLayer;
|
||||
@@ -26,10 +30,6 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
public class BaseMapActivity extends MapActivity {
|
||||
static final Logger log = LoggerFactory.getLogger(BaseMapActivity.class);
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.oscim.android.cache.TileCache;
|
||||
import org.oscim.backend.canvas.Color;
|
||||
import org.oscim.core.MapPosition;
|
||||
@@ -26,8 +28,6 @@ import org.oscim.tiling.source.bitmap.DefaultSources;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class BitmapTileMapActivity extends MapActivity {
|
||||
|
||||
static final Logger log = LoggerFactory.getLogger(BitmapTileMapActivity.class);
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Arrays;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import org.jeo.vector.VectorDataset;
|
||||
import org.jeo.map.Style;
|
||||
import org.jeo.vector.VectorDataset;
|
||||
import org.oscim.layers.OSMIndoorLayer;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||
@@ -33,11 +33,11 @@ import org.oscim.utils.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.Toast;
|
||||
import android.widget.ToggleButton;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class JeoIndoorMapActivity extends BaseMapActivity {
|
||||
public static final Logger log = LoggerFactory.getLogger(JeoIndoorMapActivity.class);
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import org.oscim.android.MapPreferences;
|
||||
import org.oscim.android.MapView;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
public abstract class MapActivity extends AppCompatActivity {
|
||||
MapView mMapView;
|
||||
Map mMap;
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import org.oscim.android.filepicker.FilePicker;
|
||||
import org.oscim.android.filepicker.FilterByFileExtension;
|
||||
import org.oscim.android.filepicker.ValidMapFile;
|
||||
@@ -30,11 +35,6 @@ import org.oscim.theme.VtmThemes;
|
||||
import org.oscim.tiling.source.mapfile.MapFileTileSource;
|
||||
import org.oscim.tiling.source.mapfile.MapInfo;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
|
||||
public class MapsforgeMapActivity extends MapActivity {
|
||||
private static final int SELECT_MAP_FILE = 0;
|
||||
|
||||
|
||||
@@ -17,11 +17,9 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import static org.oscim.android.canvas.AndroidGraphics.drawableToBitmap;
|
||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.core.GeoPoint;
|
||||
@@ -32,9 +30,11 @@ import org.oscim.layers.marker.MarkerItem;
|
||||
import org.oscim.layers.marker.MarkerItem.HotspotPlace;
|
||||
import org.oscim.layers.marker.MarkerSymbol;
|
||||
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Toast;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.oscim.android.canvas.AndroidGraphics.drawableToBitmap;
|
||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
||||
|
||||
public class MarkerOverlayActivity extends BitmapTileMapActivity
|
||||
implements OnItemGestureListener<MarkerItem> {
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.oscim.layers.TileGridLayer;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||
@@ -24,13 +26,11 @@ import org.oscim.layers.tile.vector.labeling.LabelLayer;
|
||||
import org.oscim.theme.IRenderTheme;
|
||||
import org.oscim.theme.ThemeLoader;
|
||||
import org.oscim.theme.VtmThemes;
|
||||
import org.oscim.tiling.source.geojson.OsmRoadLineJsonTileSource;
|
||||
import org.oscim.tiling.source.geojson.OsmBuildingJsonTileSource;
|
||||
import org.oscim.tiling.source.geojson.OsmLanduseJsonTileSource;
|
||||
import org.oscim.tiling.source.geojson.OsmWaterJsonTileSource;
|
||||
import org.oscim.tiling.source.geojson.OsmRoadLabelJsonTileSource;
|
||||
|
||||
import android.os.Bundle;
|
||||
import org.oscim.tiling.source.geojson.OsmRoadLineJsonTileSource;
|
||||
import org.oscim.tiling.source.geojson.OsmWaterJsonTileSource;
|
||||
|
||||
public class OsmJsonMapActivity extends MapActivity {
|
||||
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.oscim.backend.canvas.Color;
|
||||
import org.oscim.core.MapPosition;
|
||||
@@ -27,7 +25,9 @@ import org.oscim.event.Event;
|
||||
import org.oscim.layers.JtsPathLayer;
|
||||
import org.oscim.map.Map.UpdateListener;
|
||||
|
||||
import android.os.Bundle;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import static org.oscim.tiling.source.bitmap.DefaultSources.STAMEN_TONER;
|
||||
|
||||
/**
|
||||
* This is a very INEFFICIENT and somewhat less usefull example for how to use
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.oscim.android.cache.TileCache;
|
||||
import org.oscim.layers.tile.TileLayer;
|
||||
import org.oscim.layers.tile.buildings.S3DBLayer;
|
||||
@@ -24,8 +26,6 @@ import org.oscim.theme.VtmThemes;
|
||||
import org.oscim.tiling.TileSource;
|
||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class S3DBMapActivity extends BaseMapActivity {
|
||||
|
||||
TileCache mS3dbCache;
|
||||
|
||||
@@ -17,9 +17,6 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@@ -28,6 +25,9 @@ import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* A simple start screen for the sample activities.
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,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.oscim.android.test;
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.oscim.android.MapScaleBar;
|
||||
import org.oscim.core.MapPosition;
|
||||
@@ -25,8 +28,6 @@ import org.oscim.theme.IRenderTheme;
|
||||
import org.oscim.theme.ThemeLoader;
|
||||
import org.oscim.theme.VtmThemes;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class SimpleMapActivity extends BaseMapActivity {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package org.oscim.android.test;
|
||||
|
||||
import static org.oscim.utils.ColorUtil.modHsv;
|
||||
import static org.oscim.utils.ColorUtil.shiftHue;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||
@@ -20,12 +24,8 @@ import org.oscim.theme.styles.RenderStyle;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.ToggleButton;
|
||||
import static org.oscim.utils.ColorUtil.modHsv;
|
||||
import static org.oscim.utils.ColorUtil.shiftHue;
|
||||
|
||||
public class ThemeStylerActivity extends BaseMapActivity implements OnSeekBarChangeListener {
|
||||
final Logger log = LoggerFactory.getLogger(ThemeStylerActivity.class);
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
package org.oscim.android.test;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import org.oscim.backend.canvas.Color;
|
||||
import org.oscim.layers.TileGridLayer;
|
||||
import org.oscim.layers.vector.VectorLayer;
|
||||
@@ -25,8 +27,6 @@ import org.oscim.layers.vector.geometries.Style;
|
||||
import org.oscim.theme.VtmThemes;
|
||||
import org.oscim.utils.ColorUtil;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
public class VectorLayerMapActivity extends BaseMapActivity {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,15 +13,15 @@
|
||||
android:targetSdkVersion="22" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:allowBackup="true" >
|
||||
android:label="@string/app_name">
|
||||
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
|
||||
android:screenOrientation="portrait">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-21
|
||||
target=android-23
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
package org.oscim.android.canvas;
|
||||
|
||||
import static android.graphics.Bitmap.Config.ARGB_8888;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.opengl.GLES20;
|
||||
import android.opengl.GLUtils;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import static android.graphics.Bitmap.Config.ARGB_8888;
|
||||
|
||||
public class AndroidBitmap implements org.oscim.backend.canvas.Bitmap {
|
||||
final Bitmap mBitmap;
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
*/
|
||||
package org.oscim.android.canvas;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap.Config;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
@@ -27,10 +29,8 @@ import org.oscim.backend.canvas.Paint;
|
||||
import org.oscim.layers.marker.MarkerItem.HotspotPlace;
|
||||
import org.oscim.layers.marker.MarkerSymbol;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap.Config;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public final class AndroidGraphics extends CanvasAdapter {
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
package org.oscim.android.canvas;
|
||||
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
import android.graphics.Paint.FontMetrics;
|
||||
import android.graphics.Typeface;
|
||||
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
class AndroidPaint implements Paint {
|
||||
private static int getStyle(org.oscim.backend.canvas.Paint.FontStyle fontStyle) {
|
||||
switch (fontStyle) {
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import org.oscim.backend.GL;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.opengl.GLES20;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public class AndroidGL implements GL {
|
||||
|
||||
@@ -17,18 +17,18 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import org.oscim.android.canvas.AndroidGraphics;
|
||||
import org.oscim.backend.GLAdapter;
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.tiling.TileSource;
|
||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.badlogic.gdx.backends.android.AndroidApplication;
|
||||
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
|
||||
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
||||
|
||||
import org.oscim.android.canvas.AndroidGraphics;
|
||||
import org.oscim.backend.GLAdapter;
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.tiling.TileSource;
|
||||
import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||
|
||||
public class MainActivity extends AndroidApplication {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
android:targetSdkVersion="22" />
|
||||
|
||||
<application
|
||||
android:label="VTM Start"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="VTM Start"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name="org.oscim.android.start.TestActivity"
|
||||
|
||||
@@ -11,6 +11,4 @@
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Project target.
|
||||
target=android-21
|
||||
android.library.reference.1=../appcompat
|
||||
android.library.reference.2=../vtm-android
|
||||
target=android-23
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.oscim.android.MapView
|
||||
android:id="@+id/mapView"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" >
|
||||
</org.oscim.android.MapView>
|
||||
android:layout_height="fill_parent"></org.oscim.android.MapView>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,5 +1,8 @@
|
||||
package org.oscim.android.start;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
|
||||
import org.oscim.android.MapPreferences;
|
||||
import org.oscim.android.MapView;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
@@ -11,9 +14,6 @@ import org.oscim.tiling.source.oscimap4.OSciMap4TileSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
|
||||
public class TestActivity extends ActionBarActivity {
|
||||
public static final Logger log = LoggerFactory.getLogger(TestActivity.class);
|
||||
MapView mMapView;
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType">
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/>
|
||||
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.eclipse.cdt.managedbuilder.core.genmakebuilder"/>
|
||||
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS">
|
||||
<mapEntry key="?children?" value="?name?=outputEntries\|?children?=?name?=entry\\\\\\\|\\\|?name?=entry\\\\\\\|\\\|\||"/>
|
||||
<mapEntry key="?name?" value=""/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.append_environment" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.buildArguments" value=""/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.buildCommand" value="ndk-build"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.cleanBuildTarget" value="clean"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.contents" value="org.eclipse.cdt.make.core.activeConfigSettings"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.enableAutoBuild" value="false"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.enableCleanBuild" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.enableFullBuild" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.stopOnError" value="true"/>
|
||||
<mapEntry key="org.eclipse.cdt.make.core.useDefaultBuildCmd" value="true"/>
|
||||
</mapAttribute>
|
||||
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
|
||||
</launchConfiguration>
|
||||
@@ -1,18 +0,0 @@
|
||||
# This file is used to override default values used by the Ant build system.
|
||||
#
|
||||
# This file must be checked in Version Control Systems, as it is
|
||||
# integral to the build system of your project.
|
||||
|
||||
# This file is only used by the Ant script.
|
||||
|
||||
# You can use this to override default values such as
|
||||
# 'source.dir' for the location of your java source folder and
|
||||
# 'out.dir' for the location of your output folder.
|
||||
|
||||
# You can also use it define how the release builds are signed by declaring
|
||||
# the following properties:
|
||||
# 'key.store' for the location of your keystore and
|
||||
# 'key.alias' for the name of the key to use.
|
||||
# The password will be asked during the build when you use the 'release' target.
|
||||
|
||||
#jar.libs.dir=
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="VectorTileMap" default="help">
|
||||
|
||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||
It contains the path to the SDK. It should *NOT* be checked into
|
||||
Version Control Systems. -->
|
||||
<loadproperties srcFile="local.properties" />
|
||||
|
||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||
'android' tool to add properties to it.
|
||||
This is the place to change some Ant specific build properties.
|
||||
Here are some properties you may want to change/update:
|
||||
|
||||
source.dir
|
||||
The name of the source directory. Default is 'src'.
|
||||
out.dir
|
||||
The name of the output directory. Default is 'bin'.
|
||||
|
||||
For other overridable properties, look at the beginning of the rules
|
||||
files in the SDK, at tools/ant/build.xml
|
||||
|
||||
Properties related to the SDK location or the project target should
|
||||
be updated using the 'android' tool with the 'update' action.
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems.
|
||||
|
||||
-->
|
||||
<property file="ant.properties" />
|
||||
|
||||
<!-- The project.properties file is created and updated by the 'android'
|
||||
tool, as well as ADT.
|
||||
|
||||
This contains project specific properties such as project target, and library
|
||||
dependencies. Lower level build properties are stored in ant.properties
|
||||
(or in .classpath for Eclipse projects).
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems. -->
|
||||
<loadproperties srcFile="project.properties" />
|
||||
|
||||
<!-- quick check on sdk.dir -->
|
||||
<fail
|
||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
||||
unless="sdk.dir"
|
||||
/>
|
||||
|
||||
|
||||
<!-- extension targets. Uncomment the ones where you want to do custom work
|
||||
in between standard targets -->
|
||||
<!--
|
||||
<target name="-pre-build">
|
||||
</target>
|
||||
<target name="-pre-compile">
|
||||
</target>
|
||||
|
||||
/* This is typically used for code obfuscation.
|
||||
Compiled code location: ${out.classes.absolute.dir}
|
||||
If this is not done in place, override ${out.dex.input.absolute.dir} */
|
||||
<target name="-post-compile">
|
||||
</target>
|
||||
-->
|
||||
|
||||
<!-- Import the actual build file.
|
||||
|
||||
To customize existing targets, there are two options:
|
||||
- Customize only one target:
|
||||
- copy/paste the target into this file, *before* the
|
||||
<import> task.
|
||||
- customize it to your needs.
|
||||
- Customize the whole content of build.xml
|
||||
- copy/paste the content of the rules files (minus the top node)
|
||||
into this file, replacing the <import> task.
|
||||
- customize to your needs.
|
||||
|
||||
***********************
|
||||
****** IMPORTANT ******
|
||||
***********************
|
||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||
in order to avoid having your file be overridden by tools such as "android update project"
|
||||
-->
|
||||
<!-- version-tag: 1 -->
|
||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||
|
||||
</project>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<lint>
|
||||
<issue id="MissingTranslation" severity="warning" />
|
||||
</lint>
|
||||
@@ -1,44 +0,0 @@
|
||||
-optimizationpasses 5
|
||||
-dontusemixedcaseclassnames
|
||||
-dontskipnonpubliclibraryclasses
|
||||
-dontskipnonpubliclibraryclassmembers
|
||||
-dontpreverify
|
||||
-verbose
|
||||
-libraryjars lib/postgresql-9.0-801.jdbc4.jar
|
||||
-ignorewarnings
|
||||
|
||||
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
|
||||
|
||||
-keep public class * extends android.app.Activity
|
||||
-keep public class * extends android.app.Application
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
|
||||
-keepclassmembers class * extends android.app.Activity {
|
||||
public void *(android.view.View);
|
||||
}
|
||||
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
|
||||
-keep class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
||||
@@ -3,15 +3,12 @@
|
||||
#
|
||||
# This file must be checked in Version Control Systems.
|
||||
#
|
||||
# To customize properties used by the Ant build system use,
|
||||
# To customize properties used by the Ant build system edit
|
||||
# "ant.properties", and override values to adapt the script to your
|
||||
# project structure.
|
||||
#
|
||||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
|
||||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
|
||||
|
||||
# Indicates whether an apk should be generated for each density.
|
||||
split.density=false
|
||||
# Project target.
|
||||
target=android-21
|
||||
|
||||
#proguard.config=proguard.cfg
|
||||
android.library=true
|
||||
android.library.reference.1=../appcompat
|
||||
target=android-23
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
package org.oscim.android;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import android.content.Context;
|
||||
|
||||
import org.oscim.backend.AssetAdapter;
|
||||
|
||||
import android.content.Context;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class AndroidAssets extends AssetAdapter {
|
||||
Context mContext;
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
package org.oscim.android;
|
||||
|
||||
import org.oscim.map.Map;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.Sensor;
|
||||
import android.hardware.SensorEvent;
|
||||
import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
|
||||
import org.oscim.map.Map;
|
||||
|
||||
public class Compass {
|
||||
|
||||
private final SensorEventListener mListener = new SensorEventListener() {
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
package org.oscim.android;
|
||||
|
||||
import org.oscim.core.MapPosition;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.SharedPreferences.Editor;
|
||||
|
||||
import org.oscim.core.MapPosition;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
public class MapPreferences {
|
||||
private static final String KEY_LATITUDE = "latitude";
|
||||
private static final String KEY_LONGITUDE = "longitude";
|
||||
|
||||
@@ -16,7 +16,11 @@ package org.oscim.android;
|
||||
* this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import java.util.HashMap;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Typeface;
|
||||
|
||||
import org.oscim.android.canvas.AndroidBitmap;
|
||||
import org.oscim.core.MapPosition;
|
||||
@@ -27,11 +31,7 @@ import org.oscim.map.Map;
|
||||
import org.oscim.map.Map.UpdateListener;
|
||||
import org.oscim.renderer.BitmapRenderer;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Typeface;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* A MapScaleBar displays the ratio of a distance on the map to the
|
||||
@@ -157,8 +157,7 @@ public class MapScaleBar extends Layer implements UpdateListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param imperialUnits
|
||||
* true if imperial units should be used rather than metric
|
||||
* @param imperialUnits true if imperial units should be used rather than metric
|
||||
* units.
|
||||
*/
|
||||
public void setImperialUnits(boolean imperialUnits) {
|
||||
@@ -169,10 +168,8 @@ public class MapScaleBar extends Layer implements UpdateListener {
|
||||
/**
|
||||
* Overrides the specified text field with the given string.
|
||||
*
|
||||
* @param textField
|
||||
* the text field to override.
|
||||
* @param value
|
||||
* the new value of the text field.
|
||||
* @param textField the text field to override.
|
||||
* @param value the new value of the text field.
|
||||
*/
|
||||
public void setText(TextField textField, String value) {
|
||||
mTextFields.put(textField, value);
|
||||
@@ -192,10 +189,8 @@ public class MapScaleBar extends Layer implements UpdateListener {
|
||||
/**
|
||||
* Redraws the map scale bitmap with the given parameters.
|
||||
*
|
||||
* @param scaleBarLength
|
||||
* the length of the map scale bar in pixels.
|
||||
* @param mapScaleValue
|
||||
* the map scale value in meters.
|
||||
* @param scaleBarLength the length of the map scale bar in pixels.
|
||||
* @param mapScaleValue the map scale value in meters.
|
||||
*/
|
||||
private void redrawMapScaleBitmap(float scaleBarLength, int mapScaleValue) {
|
||||
mBitmap.eraseColor(Color.TRANSPARENT);
|
||||
|
||||
@@ -16,8 +16,12 @@
|
||||
*/
|
||||
package org.oscim.android;
|
||||
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.GestureDetector;
|
||||
|
||||
import org.oscim.android.canvas.AndroidGraphics;
|
||||
import org.oscim.android.gl.AndroidGL;
|
||||
@@ -30,18 +34,14 @@ import org.oscim.map.Map;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.GestureDetector;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
/**
|
||||
* The MapView,
|
||||
*
|
||||
* <p/>
|
||||
* add it your App, have a map!
|
||||
*
|
||||
* <p/>
|
||||
* Dont forget to call onPause / onResume!
|
||||
*/
|
||||
public class MapView extends GLSurfaceView {
|
||||
|
||||
@@ -16,17 +16,6 @@
|
||||
*/
|
||||
package org.oscim.android.cache;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.tiling.ITileCache;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
@@ -37,6 +26,17 @@ import android.database.sqlite.SQLiteStatement;
|
||||
import android.os.Build;
|
||||
import android.os.ParcelFileDescriptor;
|
||||
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.tiling.ITileCache;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class TileCache implements ITileCache {
|
||||
|
||||
final static org.slf4j.Logger log = LoggerFactory.getLogger(TileCache.class);
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
package org.oscim.android.canvas;
|
||||
|
||||
import static android.graphics.Bitmap.Config.ARGB_8888;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.opengl.GLES20;
|
||||
import android.opengl.GLUtils;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import static android.graphics.Bitmap.Config.ARGB_8888;
|
||||
|
||||
public class AndroidBitmap implements org.oscim.backend.canvas.Bitmap {
|
||||
final Bitmap mBitmap;
|
||||
|
||||
|
||||
@@ -17,8 +17,10 @@
|
||||
*/
|
||||
package org.oscim.android.canvas;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap.Config;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
@@ -27,10 +29,8 @@ import org.oscim.backend.canvas.Paint;
|
||||
import org.oscim.layers.marker.MarkerItem.HotspotPlace;
|
||||
import org.oscim.layers.marker.MarkerSymbol;
|
||||
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap.Config;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public final class AndroidGraphics extends CanvasAdapter {
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
package org.oscim.android.canvas;
|
||||
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
import android.graphics.Paint.FontMetrics;
|
||||
import android.graphics.Typeface;
|
||||
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
class AndroidPaint implements Paint {
|
||||
private static int getStyle(org.oscim.backend.canvas.Paint.FontStyle fontStyle) {
|
||||
switch (fontStyle) {
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
package org.oscim.android.gl;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import org.oscim.backend.GL;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.opengl.GLES20;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public class AndroidGL implements GL {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.oscim.android.gl;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.egl.EGLDisplay;
|
||||
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
public class GlConfigChooser implements GLSurfaceView.EGLConfigChooser {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.oscim.android.input;
|
||||
|
||||
import org.oscim.event.Gesture;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
import android.view.GestureDetector.OnDoubleTapListener;
|
||||
import android.view.GestureDetector.OnGestureListener;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import org.oscim.event.Gesture;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
public class GestureHandler implements OnGestureListener, OnDoubleTapListener {
|
||||
private final AndroidMotionEvent mMotionEvent;
|
||||
private final Map mMap;
|
||||
|
||||
@@ -14,7 +14,6 @@ dependencies {
|
||||
sourceSets {
|
||||
main {
|
||||
java.srcDirs = ['src']
|
||||
output.resourcesDir = 'assets'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@
|
||||
*/
|
||||
package org.oscim.awt;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.utils.BufferUtils;
|
||||
|
||||
import org.oscim.backend.GL;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.renderer.bucket.TextureBucket;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -25,13 +32,6 @@ import java.nio.IntBuffer;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import org.oscim.backend.GL;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.renderer.bucket.TextureBucket;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.utils.BufferUtils;
|
||||
|
||||
public class AwtBitmap implements Bitmap {
|
||||
BufferedImage bitmap;
|
||||
int width;
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
*/
|
||||
package org.oscim.awt;
|
||||
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.backend.canvas.Canvas;
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
import java.awt.AlphaComposite;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.RenderingHints;
|
||||
@@ -24,10 +28,6 @@ import java.awt.Shape;
|
||||
import java.awt.font.TextLayout;
|
||||
import java.awt.geom.AffineTransform;
|
||||
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.backend.canvas.Canvas;
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
public class AwtCanvas implements Canvas {
|
||||
|
||||
Graphics2D canvas;
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
*/
|
||||
package org.oscim.awt;
|
||||
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.backend.canvas.Canvas;
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
import java.awt.Font;
|
||||
import java.awt.FontMetrics;
|
||||
import java.awt.Graphics2D;
|
||||
@@ -25,11 +30,6 @@ import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.oscim.backend.CanvasAdapter;
|
||||
import org.oscim.backend.canvas.Bitmap;
|
||||
import org.oscim.backend.canvas.Canvas;
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
public class AwtGraphics extends CanvasAdapter {
|
||||
|
||||
public static void init() {
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
*/
|
||||
package org.oscim.awt;
|
||||
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
import java.awt.BasicStroke;
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
@@ -27,8 +29,6 @@ import java.text.AttributedCharacterIterator.Attribute;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.backend.canvas.Paint;
|
||||
|
||||
public class AwtPaint implements Paint {
|
||||
|
||||
final static float TEXT_OFFSET = 2;
|
||||
@@ -47,6 +47,7 @@ public class AwtPaint implements Paint {
|
||||
}
|
||||
|
||||
static final Font defaultFont;
|
||||
|
||||
static {
|
||||
Map<Attribute, Object> textAttributes = new HashMap<Attribute, Object>();
|
||||
textAttributes.put(TextAttribute.KERNING, TextAttribute.KERNING_ON);
|
||||
|
||||
@@ -2,13 +2,13 @@ package org.oscim.gdx;
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright 2011 See AUTHORS file.
|
||||
*
|
||||
* <p/>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p/>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p/>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -16,13 +16,13 @@ package org.oscim.gdx;
|
||||
* limitations under the License.
|
||||
******************************************************************************/
|
||||
|
||||
import static com.badlogic.jglfw.utils.Memory.getPosition;
|
||||
import org.oscim.backend.GL;
|
||||
|
||||
import java.nio.Buffer;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
|
||||
import org.oscim.backend.GL;
|
||||
import static com.badlogic.jglfw.utils.Memory.getPosition;
|
||||
|
||||
public class GdxGL implements GL {
|
||||
public void activeTexture(int texture) {
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import com.badlogic.gdx.backends.jglfw.JglfwApplication;
|
||||
import com.badlogic.gdx.backends.jglfw.JglfwApplicationConfiguration;
|
||||
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
||||
|
||||
import org.oscim.awt.AwtGraphics;
|
||||
import org.oscim.backend.GLAdapter;
|
||||
import org.oscim.core.Tile;
|
||||
@@ -26,10 +30,6 @@ import org.oscim.utils.FastMath;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.badlogic.gdx.backends.jglfw.JglfwApplication;
|
||||
import com.badlogic.gdx.backends.jglfw.JglfwApplicationConfiguration;
|
||||
import com.badlogic.gdx.utils.SharedLibraryLoader;
|
||||
|
||||
public class GdxMapApp extends GdxMap {
|
||||
|
||||
public static final Logger log = LoggerFactory.getLogger(GdxMapApp.class);
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
package org.oscim.core.osm;
|
||||
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
public abstract class OsmElement {
|
||||
|
||||
public final TagSet tags;
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
package org.oscim.core.osm;
|
||||
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
public class OsmNode extends OsmElement {
|
||||
|
||||
public final double lat;
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
package org.oscim.core.osm;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class OsmRelation extends OsmElement {
|
||||
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
package org.oscim.core.osm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
import com.vividsolutions.jts.geom.CoordinateSequence;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.LineString;
|
||||
import com.vividsolutions.jts.geom.impl.PackedCoordinateSequenceFactory;
|
||||
|
||||
import org.oscim.core.TagSet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OsmWay extends OsmElement {
|
||||
|
||||
public final List<OsmNode> nodes;
|
||||
|
||||
@@ -16,21 +16,10 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.geojson;
|
||||
|
||||
import static com.fasterxml.jackson.core.JsonToken.END_ARRAY;
|
||||
import static com.fasterxml.jackson.core.JsonToken.END_OBJECT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.FIELD_NAME;
|
||||
import static com.fasterxml.jackson.core.JsonToken.START_ARRAY;
|
||||
import static com.fasterxml.jackson.core.JsonToken.START_OBJECT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.VALUE_NUMBER_FLOAT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.VALUE_NUMBER_INT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.VALUE_STRING;
|
||||
import static org.oscim.core.MercatorProjection.latitudeToY;
|
||||
import static org.oscim.core.MercatorProjection.longitudeToX;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.LinkedHashMap;
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
|
||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||
import org.oscim.core.MapElement;
|
||||
@@ -41,10 +30,21 @@ import org.oscim.utils.ArrayUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import static com.fasterxml.jackson.core.JsonToken.END_ARRAY;
|
||||
import static com.fasterxml.jackson.core.JsonToken.END_OBJECT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.FIELD_NAME;
|
||||
import static com.fasterxml.jackson.core.JsonToken.START_ARRAY;
|
||||
import static com.fasterxml.jackson.core.JsonToken.START_OBJECT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.VALUE_NUMBER_FLOAT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.VALUE_NUMBER_INT;
|
||||
import static com.fasterxml.jackson.core.JsonToken.VALUE_STRING;
|
||||
import static org.oscim.core.MercatorProjection.latitudeToY;
|
||||
import static org.oscim.core.MercatorProjection.longitudeToX;
|
||||
|
||||
public class GeoJsonTileDecoder implements ITileDecoder {
|
||||
static final Logger log = LoggerFactory.getLogger(GeoJsonTileDecoder.class);
|
||||
@@ -204,12 +204,10 @@ public class GeoJsonTileDecoder implements ITileDecoder {
|
||||
else if (match(jp, MULTI_LINESTRING)) {
|
||||
type = GeometryType.LINE;
|
||||
multi = true;
|
||||
}
|
||||
else if (match(jp, MULTI_POLYGON)) {
|
||||
} else if (match(jp, MULTI_POLYGON)) {
|
||||
type = GeometryType.POLY;
|
||||
multi = true;
|
||||
}
|
||||
else if (match(jp, MULTI_POINT)) {
|
||||
} else if (match(jp, MULTI_POINT)) {
|
||||
type = GeometryType.POINT;
|
||||
multi = true;
|
||||
}
|
||||
@@ -239,7 +237,8 @@ public class GeoJsonTileDecoder implements ITileDecoder {
|
||||
parseLineString(jp);
|
||||
|
||||
else if (type == GeometryType.POINT)
|
||||
parseCoordinate(jp);;
|
||||
parseCoordinate(jp);
|
||||
;
|
||||
|
||||
} else {
|
||||
//....
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.geojson;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
import org.oscim.tiling.ITileDataSource;
|
||||
import org.oscim.tiling.source.UrlTileDataSource;
|
||||
import org.oscim.tiling.source.UrlTileSource;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public abstract class GeoJsonTileSource extends UrlTileSource {
|
||||
|
||||
public GeoJsonTileSource(String url) {
|
||||
@@ -51,7 +51,9 @@ public abstract class GeoJsonTileSource extends UrlTileSource {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** allow overriding tag handling */
|
||||
/**
|
||||
* allow overriding tag handling
|
||||
*/
|
||||
public abstract void decodeTags(MapElement mapElement, Map<String, Object> properties);
|
||||
|
||||
public Tag rewriteTag(String key, Object value) {
|
||||
@@ -64,7 +66,9 @@ public abstract class GeoJsonTileSource extends UrlTileSource {
|
||||
return new Tag(key, val);
|
||||
}
|
||||
|
||||
/** modify mapElement before process() */
|
||||
/**
|
||||
* modify mapElement before process()
|
||||
*/
|
||||
public void postGeomHook(MapElement mapElement) {
|
||||
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.geojson;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class OsmBuildingJsonTileSource extends GeoJsonTileSource {
|
||||
|
||||
public OsmBuildingJsonTileSource() {
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.geojson;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class OsmLanduseJsonTileSource extends GeoJsonTileSource {
|
||||
static final Logger log = LoggerFactory.getLogger(OsmLanduseJsonTileSource.class);
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ public class OsmRoadLabelJsonTileSource extends GeoJsonTileSource {
|
||||
|
||||
if ("highway".equals(key) && value instanceof String) {
|
||||
highway = (String) entry.getValue();
|
||||
}
|
||||
else if ("name".equals(key) && value instanceof String) {
|
||||
} else if ("name".equals(key) && value instanceof String) {
|
||||
mapElement.tags.add(new Tag("name", (String) value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.geojson;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class OsmRoadLineJsonTileSource extends GeoJsonTileSource {
|
||||
|
||||
static final Logger log = LoggerFactory.getLogger(OsmRoadLineJsonTileSource.class);
|
||||
@@ -54,21 +54,16 @@ public class OsmRoadLineJsonTileSource extends GeoJsonTileSource {
|
||||
|
||||
if ("highway".equals(key) && value instanceof String) {
|
||||
highway = (String) entry.getValue();
|
||||
}
|
||||
else if ("is_link".equals(key)) {
|
||||
} else if ("is_link".equals(key)) {
|
||||
isLink = "yes".equals(value);
|
||||
}
|
||||
else if ("is_tunnel".equals(key)) {
|
||||
} else if ("is_tunnel".equals(key)) {
|
||||
mapElement.tags.add(mTagTunnel);
|
||||
}
|
||||
else if ("is_bridge".equals(key)) {
|
||||
} else if ("is_bridge".equals(key)) {
|
||||
mapElement.tags.add(mTagBridge);
|
||||
}
|
||||
else if ("sort_key".equals(key)) {
|
||||
} else if ("sort_key".equals(key)) {
|
||||
if (value instanceof Integer)
|
||||
mapElement.layer = 5 + (Integer) value;
|
||||
}
|
||||
else if ("railway".equals(key) && value instanceof String) {
|
||||
} else if ("railway".equals(key) && value instanceof String) {
|
||||
mapElement.tags.add(new Tag("railway", (String) value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.geojson;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class OsmWaterJsonTileSource extends GeoJsonTileSource {
|
||||
|
||||
public OsmWaterJsonTileSource() {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package org.oscim.tiling.source.geojson;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class RiverJsonTileSource extends GeoJsonTileSource {
|
||||
|
||||
public RiverJsonTileSource() {
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.mapnik;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.zip.InflaterInputStream;
|
||||
|
||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
@@ -32,6 +27,11 @@ import org.oscim.utils.pool.Pool;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.zip.InflaterInputStream;
|
||||
|
||||
public class TileDecoder extends PbfDecoder {
|
||||
static final Logger log = LoggerFactory.getLogger(TileDecoder.class);
|
||||
|
||||
@@ -209,7 +209,8 @@ public class TileDecoder extends PbfDecoder {
|
||||
boolean hasName = false;
|
||||
String fallbackName = null;
|
||||
|
||||
tagLoop: for (int j = 0; j < (f.numTags << 1); j += 2) {
|
||||
tagLoop:
|
||||
for (int j = 0; j < (f.numTags << 1); j += 2) {
|
||||
int keyIdx = f.tags[j];
|
||||
for (int i = 0; i < numIgnore; i++)
|
||||
if (keyIdx == ignoreLocal[i])
|
||||
@@ -395,8 +396,7 @@ public class TileDecoder extends PbfDecoder {
|
||||
if (type == TAG_GEOM_LINE) {
|
||||
elem.startLine();
|
||||
isLine = true;
|
||||
}
|
||||
else if (type == TAG_GEOM_POLYGON) {
|
||||
} else if (type == TAG_GEOM_POLYGON) {
|
||||
elem.startPolygon();
|
||||
isPoly = true;
|
||||
} else if (type == TAG_GEOM_POINT) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
map-background="#fffcfa" version="1" xmlns="http://mapsforge.org/renderTheme"
|
||||
<rendertheme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" map-background="#fffcfa"
|
||||
version="1" xmlns="http://mapsforge.org/renderTheme"
|
||||
xsi:schemaLocation="http://mapsforge.org/renderTheme ../renderTheme.xsd"> <!-- fdfdfc"> -->
|
||||
<style-text name="road" fill="#101010" font-size="16" k="name" priority="2"
|
||||
stroke="#eeeeee" stroke-width="2.0" />
|
||||
<style-text name="major-road" fill="#101010" font-size="16" font-style="bold"
|
||||
k="name" priority="1" stroke="#eeeeee" stroke-width="2.0" />
|
||||
<style-text name="road" fill="#101010" font-size="16" k="name" priority="2" stroke="#eeeeee"
|
||||
stroke-width="2.0" />
|
||||
<style-text name="major-road" fill="#101010" font-size="16" font-style="bold" k="name"
|
||||
priority="1" stroke="#eeeeee" stroke-width="2.0" />
|
||||
<!-- <style-area name="residential" fill="#e0dfde" fade="10"/> -->
|
||||
<style-area name="residential" fade="10" fill="#e8e7e3" />
|
||||
<style-area name="railway|industrial" fade="10" fill="#e6e3e5" />
|
||||
@@ -46,10 +46,9 @@
|
||||
<style-line name="construction" stroke="#e0e0e0" width="1.2" />
|
||||
<style-line name="highway-service" from="residential" width="-0.6" />
|
||||
<!-- track|footway|path|cycleway -->
|
||||
<style-line name="footway" cap="butt" fix="true" stipple="4"
|
||||
stipple-stroke="#d35c48" stipple-width="0.6" stroke="#aaffffff" width="1.8" />
|
||||
<style-line name="highway:cycleway" from="footway" stipple-stroke="#4040ee"
|
||||
width="0.1" />
|
||||
<style-line name="footway" cap="butt" fix="true" stipple="4" stipple-stroke="#d35c48"
|
||||
stipple-width="0.6" stroke="#aaffffff" width="1.8" />
|
||||
<style-line name="highway:cycleway" from="footway" stipple-stroke="#4040ee" width="0.1" />
|
||||
<style-line name="highway:track" from="footway" stipple="4" stipple-stroke="#a39b68"
|
||||
width="0.1" />
|
||||
<style-line name="highway:path" from="footway" stipple="4" stipple-stroke="#837b58"
|
||||
@@ -58,12 +57,11 @@
|
||||
fade="-1"/> -->
|
||||
<style-line name="footway:z17" stroke="#faf8f5" width="0.3" />
|
||||
<!-- de: ein Weg der für Reiter vorgeshen ist.. -->
|
||||
<style-line name="bridleway" cap="butt" from="footway" stipple-stroke="#837b58"
|
||||
stroke="#d3cb98" width="0.1" />
|
||||
<style-line name="bridleway" cap="butt" from="footway" stipple-stroke="#837b58" stroke="#d3cb98"
|
||||
width="0.1" />
|
||||
<style-line name="steps" cap="butt" fix="true" stipple="2" stipple-stroke="#be6253"
|
||||
stipple-width="1.0" stroke="#aaffffff" width="4.2" />
|
||||
<style-line name="water:outline" cap="butt" fix="true" stroke="#a4bbcc"
|
||||
width="1.0" />
|
||||
<style-line name="water:outline" cap="butt" fix="true" stroke="#a4bbcc" width="1.0" />
|
||||
<style-line name="water" cap="butt" stroke="#afc5e3" width="1.0" />
|
||||
<!-- <style-area name="water" fill="#97b7e5" /> -->
|
||||
<style-area name="water" fill="#afc5e3" />
|
||||
@@ -77,8 +75,7 @@
|
||||
cap="butt" fade="15"/>
|
||||
<style-area name="building" fill="#e9e6e3" fade="15"/>
|
||||
-->
|
||||
<style-line name="building" cap="butt" fade="15" fix="true" stroke="#b7b6b3"
|
||||
width="1.0" />
|
||||
<style-line name="building" cap="butt" fade="15" fix="true" stroke="#b7b6b3" width="1.0" />
|
||||
<!-- <style-area name="building" fill="#eae8e6" fade="15"/> -->
|
||||
<style-area name="building" fade="15" fill="#f2f0eb" />
|
||||
<!-- ways -->
|
||||
@@ -603,24 +600,20 @@
|
||||
<m k="debug" v="area">
|
||||
<line cap="butt" fix="true" stroke="#ff0000" width="1.2" />
|
||||
<area fill="#880000ff" />
|
||||
<caption fill="#ff0000" font-size="15" k="name" stroke="#444444"
|
||||
stroke-width="2.0" />
|
||||
<caption fill="#ff0000" font-size="15" k="name" stroke="#444444" stroke-width="2.0" />
|
||||
</m>
|
||||
<m k="debug" v="way">
|
||||
<line cap="butt" fix="true" stroke="#00ffff" width="1.5" />
|
||||
<caption fill="#00ffff" font-size="15" k="name" stroke="#444444"
|
||||
stroke-width="2.0" />
|
||||
<caption fill="#00ffff" font-size="15" k="name" stroke="#444444" stroke-width="2.0" />
|
||||
</m>
|
||||
<m k="debug" v="box">
|
||||
<line cap="butt" fix="true" stroke="#000000" width="1.5" />
|
||||
</m>
|
||||
|
||||
|
||||
|
||||
</m>
|
||||
|
||||
|
||||
|
||||
<m e="node">
|
||||
<!-- barrier -->
|
||||
<m k="barrier" v="bollard">
|
||||
@@ -651,16 +644,16 @@
|
||||
<!-- place -->
|
||||
<m k="place_label">
|
||||
<m v="suburb" zoom-max="14">
|
||||
<caption fill="#606060" font-size="17" font-style="italic" k="name"
|
||||
priority="4" stroke="#ffffff" stroke-width="2.0" />
|
||||
<caption fill="#606060" font-size="17" font-style="italic" k="name" priority="4"
|
||||
stroke="#ffffff" stroke-width="2.0" />
|
||||
</m>
|
||||
<m v="village" zoom-max="14">
|
||||
<caption fill="#2020cc" font-size="17" k="name" priority="3" stroke="#ffffff"
|
||||
stroke-width="2.0" />
|
||||
</m>
|
||||
<m v="island" zoom-min="10">
|
||||
<caption fill="#000000" font-size="20" font-style="bold" k="name"
|
||||
priority="1" stroke="#ffffff" stroke-width="2.0" />
|
||||
<caption fill="#000000" font-size="20" font-style="bold" k="name" priority="1"
|
||||
stroke="#ffffff" stroke-width="2.0" />
|
||||
</m>
|
||||
<m v="town">
|
||||
<caption fill="#000000" font-size="19" k="name" priority="2" stroke="#ffffff"
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.oscim.tiling.source.UrlTileSource;
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
*
|
||||
*/
|
||||
public class OSciMap1TileSource extends UrlTileSource {
|
||||
|
||||
|
||||
@@ -16,12 +16,6 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.oscimap;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
@@ -31,6 +25,12 @@ import org.oscim.tiling.source.PbfDecoder;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class TileDecoder extends PbfDecoder {
|
||||
static final Logger log = LoggerFactory.getLogger(TileDecoder.class);
|
||||
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
*/
|
||||
package org.oscim.tiling.source.oscimap2;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.oscim.core.GeometryBuffer.GeometryType;
|
||||
import org.oscim.core.MapElement;
|
||||
import org.oscim.core.Tag;
|
||||
@@ -33,6 +29,10 @@ import org.oscim.tiling.source.UrlTileSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class OSciMap2TileSource extends UrlTileSource {
|
||||
|
||||
public OSciMap2TileSource(String url) {
|
||||
|
||||
@@ -9,13 +9,21 @@ import java.util.ArrayList;
|
||||
* @author Public Source from FlipCode
|
||||
*/
|
||||
public class Triangulator {
|
||||
/** The accepted error value */
|
||||
/**
|
||||
* The accepted error value
|
||||
*/
|
||||
private static final float EPSILON = 0.0000000001f;
|
||||
/** The list of points to be triangulated */
|
||||
/**
|
||||
* The list of points to be triangulated
|
||||
*/
|
||||
private final PointList poly = new PointList();
|
||||
/** The list of points describing the triangles */
|
||||
/**
|
||||
* The list of points describing the triangles
|
||||
*/
|
||||
private final PointList tris = new PointList();
|
||||
/** True if we've tried to triangulate */
|
||||
/**
|
||||
* True if we've tried to triangulate
|
||||
*/
|
||||
private boolean tried;
|
||||
|
||||
/**
|
||||
@@ -267,9 +275,13 @@ public class Triangulator {
|
||||
* @author Kevin Glass
|
||||
*/
|
||||
private class Point {
|
||||
/** The x coorindate of this point */
|
||||
/**
|
||||
* The x coorindate of this point
|
||||
*/
|
||||
private final float x;
|
||||
/** The y coorindate of this point */
|
||||
/**
|
||||
* The y coorindate of this point
|
||||
*/
|
||||
private final float y;
|
||||
|
||||
/**
|
||||
@@ -317,7 +329,9 @@ public class Triangulator {
|
||||
* @author Kevin Glass
|
||||
*/
|
||||
private class PointList {
|
||||
/** The list of points */
|
||||
/**
|
||||
* The list of points
|
||||
*/
|
||||
private final ArrayList<Point> points = new ArrayList<Point>();
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,10 +17,6 @@
|
||||
|
||||
package org.oscim.utils.osmpbf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.openstreetmap.osmosis.osmbinary.BinaryParser;
|
||||
import org.openstreetmap.osmosis.osmbinary.Osmformat;
|
||||
import org.oscim.core.Tag;
|
||||
@@ -31,6 +27,10 @@ import org.oscim.core.osm.OsmNode;
|
||||
import org.oscim.core.osm.OsmRelation;
|
||||
import org.oscim.core.osm.OsmWay;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class that reads and parses binary files and sends the contained entities to
|
||||
* the sink.
|
||||
@@ -62,7 +62,9 @@ public class OsmPbfParser extends BinaryParser {
|
||||
* entity.
|
||||
*/
|
||||
static final int NOVERSION = -1;
|
||||
/** The magic number used to indicate no changeset metadata for this entity. */
|
||||
/**
|
||||
* The magic number used to indicate no changeset metadata for this entity.
|
||||
*/
|
||||
static final int NOCHANGESET = -1;
|
||||
|
||||
HashMap<Long, OsmNode> mNodeMap = new HashMap<Long, OsmNode>();
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
*/
|
||||
package org.oscim.utils.osmpbf;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.openstreetmap.osmosis.osmbinary.file.BlockInputStream;
|
||||
import org.oscim.core.osm.OsmData;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class OsmPbfReader {
|
||||
|
||||
public static OsmData process(InputStream is) {
|
||||
|
||||
@@ -17,6 +17,21 @@
|
||||
|
||||
package org.oscim.utils.overpass;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
|
||||
import org.oscim.core.Tag;
|
||||
import org.oscim.core.TagSet;
|
||||
import org.oscim.core.osm.Bound;
|
||||
import org.oscim.core.osm.OsmData;
|
||||
import org.oscim.core.osm.OsmElement;
|
||||
import org.oscim.core.osm.OsmMember;
|
||||
import org.oscim.core.osm.OsmNode;
|
||||
import org.oscim.core.osm.OsmRelation;
|
||||
import org.oscim.core.osm.OsmWay;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
@@ -33,21 +48,6 @@ import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.Inflater;
|
||||
import java.util.zip.InflaterInputStream;
|
||||
|
||||
import org.oscim.core.Tag;
|
||||
import org.oscim.core.TagSet;
|
||||
import org.oscim.core.osm.Bound;
|
||||
import org.oscim.core.osm.OsmData;
|
||||
import org.oscim.core.osm.OsmElement;
|
||||
import org.oscim.core.osm.OsmMember;
|
||||
import org.oscim.core.osm.OsmNode;
|
||||
import org.oscim.core.osm.OsmRelation;
|
||||
import org.oscim.core.osm.OsmWay;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonFactory;
|
||||
import com.fasterxml.jackson.core.JsonParseException;
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonToken;
|
||||
|
||||
public class OverpassAPIReader {
|
||||
private static final String OVERPASS_API = "http://city.informatik.uni-bremen.de/oapi/interpreter";
|
||||
private static final int RESPONSECODE_OK = 200;
|
||||
@@ -78,16 +78,11 @@ public class OverpassAPIReader {
|
||||
/**
|
||||
* Creates a new instance with the specified geographical coordinates.
|
||||
*
|
||||
* @param left
|
||||
* The longitude marking the left edge of the bounding box.
|
||||
* @param right
|
||||
* The longitude marking the right edge of the bounding box.
|
||||
* @param top
|
||||
* The latitude marking the top edge of the bounding box.
|
||||
* @param bottom
|
||||
* The latitude marking the bottom edge of the bounding box.
|
||||
* @param baseUrl
|
||||
* (optional) The base url of the server (eg.
|
||||
* @param left The longitude marking the left edge of the bounding box.
|
||||
* @param right The longitude marking the right edge of the bounding box.
|
||||
* @param top The latitude marking the top edge of the bounding box.
|
||||
* @param bottom The latitude marking the bottom edge of the bounding box.
|
||||
* @param baseUrl (optional) The base url of the server (eg.
|
||||
* http://www.openstreetmap.org/api/0.5).
|
||||
*/
|
||||
public OverpassAPIReader(final double left, final double right,
|
||||
@@ -106,12 +101,10 @@ public class OverpassAPIReader {
|
||||
* Open a connection to the given url and return a reader on the input
|
||||
* stream from that connection.
|
||||
*
|
||||
* @param pUrlStr
|
||||
* The exact url to connect to.
|
||||
* @param pUrlStr The exact url to connect to.
|
||||
* @return An reader reading the input stream (servers answer) or
|
||||
* <code>null</code>.
|
||||
* @throws IOException
|
||||
* on io-errors
|
||||
* @throws IOException on io-errors
|
||||
*/
|
||||
private InputStream getInputStream(final String pUrlStr) throws IOException {
|
||||
URL url;
|
||||
|
||||
@@ -28,7 +28,9 @@ package org.oscim.utils.wkb;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/** The base class of all geometries */
|
||||
/**
|
||||
* The base class of all geometries
|
||||
*/
|
||||
abstract class Geometry implements Serializable {
|
||||
/* JDK 1.5 Serialization */
|
||||
private static final long serialVersionUID = 0x100;
|
||||
@@ -37,7 +39,9 @@ abstract class Geometry implements Serializable {
|
||||
// (May we replace this with an ENUM as soon as JDK 1.5
|
||||
// has gained widespread usage?)
|
||||
|
||||
/** Fake type for linear ring */
|
||||
/**
|
||||
* Fake type for linear ring
|
||||
*/
|
||||
static final int LINEARRING = 0;
|
||||
/**
|
||||
* The OGIS geometry type number for points.
|
||||
@@ -83,8 +87,7 @@ abstract class Geometry implements Serializable {
|
||||
/**
|
||||
* The Text representations of the geometry types
|
||||
*
|
||||
* @param type
|
||||
* ...
|
||||
* @param type ...
|
||||
* @return ...
|
||||
*/
|
||||
static String getTypeString(int type) {
|
||||
@@ -126,8 +129,7 @@ abstract class Geometry implements Serializable {
|
||||
/**
|
||||
* Parse a SRID value, anything <= 0 is unknown
|
||||
*
|
||||
* @param srid
|
||||
* ...
|
||||
* @param srid ...
|
||||
* @return ...
|
||||
*/
|
||||
static int parseSRID(int srid) {
|
||||
@@ -141,8 +143,7 @@ abstract class Geometry implements Serializable {
|
||||
/**
|
||||
* Constructor for subclasses
|
||||
*
|
||||
* @param type
|
||||
* has to be given by all subclasses.
|
||||
* @param type has to be given by all subclasses.
|
||||
*/
|
||||
protected Geometry(int type) {
|
||||
this.type = type;
|
||||
@@ -169,8 +170,7 @@ abstract class Geometry implements Serializable {
|
||||
* geometry specific equals implementation - only defined for non-null
|
||||
* values
|
||||
*
|
||||
* @param other
|
||||
* ...
|
||||
* @param other ...
|
||||
* @return ...
|
||||
*/
|
||||
public boolean equals(Geometry other) {
|
||||
@@ -186,8 +186,7 @@ abstract class Geometry implements Serializable {
|
||||
* Implementors can assume that dimensin, type, srid
|
||||
* and haveMeasure are equal, other != null and other is the same subclass.
|
||||
*
|
||||
* @param other
|
||||
* ...
|
||||
* @param other ...
|
||||
* @return ...
|
||||
*/
|
||||
protected abstract boolean equalsintern(Geometry other);
|
||||
@@ -271,8 +270,7 @@ abstract class Geometry implements Serializable {
|
||||
* Recursively sets the srid on this geometry and all contained
|
||||
* subgeometries
|
||||
*
|
||||
* @param srid
|
||||
* ...
|
||||
* @param srid ...
|
||||
*/
|
||||
void setSrid(int srid) {
|
||||
this.srid = srid;
|
||||
@@ -294,10 +292,8 @@ abstract class Geometry implements Serializable {
|
||||
* Render the WKT version of this Geometry (without SRID) into the given
|
||||
* StringBuffer.
|
||||
*
|
||||
* @param sb
|
||||
* ...
|
||||
* @param putM
|
||||
* ...
|
||||
* @param sb ...
|
||||
* @param putM ...
|
||||
*/
|
||||
void outerWKT(StringBuffer sb, boolean putM) {
|
||||
sb.append(getTypeString());
|
||||
@@ -315,8 +311,7 @@ abstract class Geometry implements Serializable {
|
||||
* Render the WKT without the type name, but including the brackets into the
|
||||
* StringBuffer
|
||||
*
|
||||
* @param sb
|
||||
* ...
|
||||
* @param sb ...
|
||||
*/
|
||||
protected void mediumWKT(StringBuffer sb) {
|
||||
sb.append('(');
|
||||
@@ -328,8 +323,7 @@ abstract class Geometry implements Serializable {
|
||||
* Render the "inner" part of the WKT (inside the brackets) into the
|
||||
* StringBuffer.
|
||||
*
|
||||
* @param SB
|
||||
* ...
|
||||
* @param SB ...
|
||||
*/
|
||||
protected abstract void innerWKT(StringBuffer SB);
|
||||
|
||||
@@ -364,8 +358,7 @@ abstract class Geometry implements Serializable {
|
||||
/**
|
||||
* Splits the SRID=4711; part of a EWKT rep if present and sets the srid.
|
||||
*
|
||||
* @param value
|
||||
* ...
|
||||
* @param value ...
|
||||
* @return value without the SRID=4711; part
|
||||
*/
|
||||
protected String initSRID(String value) {
|
||||
|
||||
@@ -59,8 +59,7 @@ abstract class ValueGetter {
|
||||
/**
|
||||
* Get a 32-Bit integer
|
||||
*
|
||||
* @param index
|
||||
* ...
|
||||
* @param index ...
|
||||
* @return ...
|
||||
*/
|
||||
protected abstract int getInt(int index);
|
||||
@@ -69,8 +68,7 @@ abstract class ValueGetter {
|
||||
* Get a long value. This is not needed directly, but as a nice side-effect
|
||||
* from GetDouble.
|
||||
*
|
||||
* @param index
|
||||
* ...
|
||||
* @param index ...
|
||||
* @return ...
|
||||
*/
|
||||
protected abstract long getLong(int index);
|
||||
|
||||
@@ -135,10 +135,8 @@ public class WKBReader {
|
||||
/**
|
||||
* Parse an Array of "full" Geometries
|
||||
*
|
||||
* @param data
|
||||
* ...
|
||||
* @param count
|
||||
* ...
|
||||
* @param data ...
|
||||
* @param count ...
|
||||
*/
|
||||
private void parseGeometryArray(ValueGetter data, int count, int type) {
|
||||
mGeom.clear();
|
||||
@@ -255,7 +253,7 @@ public class WKBReader {
|
||||
|
||||
/**
|
||||
* Converting a string of hex character to bytes
|
||||
*
|
||||
* <p/>
|
||||
* from http://stackoverflow.com/questions/140131/convert-a-string-
|
||||
* representation-of-a-hex-dump-to-a-byte-array-using-java
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit trunk//EN" "http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
|
||||
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC
|
||||
"-//Google Inc.//DTD Google Web Toolkit trunk//EN"
|
||||
"http://google-web-toolkit.googlecode.com/svn/trunk/distro-source/core/src/gwt-module.dtd">
|
||||
<module>
|
||||
<source path="org/oscim" />
|
||||
</module>
|
||||
@@ -16,14 +16,14 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.oscim.backend.AssetAdapter;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.utils.GdxRuntimeException;
|
||||
|
||||
import org.oscim.backend.AssetAdapter;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public class GdxAssets extends AssetAdapter {
|
||||
static String pathPrefix = "";
|
||||
|
||||
|
||||
@@ -16,6 +16,13 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import com.badlogic.gdx.Application;
|
||||
import com.badlogic.gdx.ApplicationListener;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.InputMultiplexer;
|
||||
import com.badlogic.gdx.utils.Timer;
|
||||
import com.badlogic.gdx.utils.Timer.Task;
|
||||
|
||||
import org.oscim.layers.TileGridLayer;
|
||||
import org.oscim.layers.tile.buildings.BuildingLayer;
|
||||
import org.oscim.layers.tile.vector.VectorTileLayer;
|
||||
@@ -28,13 +35,6 @@ import org.oscim.tiling.TileSource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.badlogic.gdx.Application;
|
||||
import com.badlogic.gdx.ApplicationListener;
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.InputMultiplexer;
|
||||
import com.badlogic.gdx.utils.Timer;
|
||||
import com.badlogic.gdx.utils.Timer.Task;
|
||||
|
||||
public abstract class GdxMap implements ApplicationListener {
|
||||
final static Logger log = LoggerFactory.getLogger(GdxMap.class);
|
||||
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
import com.badlogic.gdx.Input.Buttons;
|
||||
import com.badlogic.gdx.input.GestureDetector.GestureListener;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import org.oscim.core.Tile;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
public class GestureHandler implements GestureListener {
|
||||
private boolean mayFling = true;
|
||||
|
||||
|
||||
@@ -16,17 +16,17 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.Input.Buttons;
|
||||
import com.badlogic.gdx.InputProcessor;
|
||||
|
||||
import org.oscim.layers.GenericLayer;
|
||||
import org.oscim.layers.TileGridLayer;
|
||||
import org.oscim.map.Map;
|
||||
import org.oscim.map.ViewController;
|
||||
import org.oscim.theme.VtmThemes;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.Input.Buttons;
|
||||
import com.badlogic.gdx.InputProcessor;
|
||||
|
||||
public class InputHandler implements InputProcessor {
|
||||
|
||||
private ViewController mViewport;
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
*/
|
||||
package org.oscim.gdx;
|
||||
|
||||
import org.oscim.event.MotionEvent;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input.Buttons;
|
||||
import com.badlogic.gdx.InputProcessor;
|
||||
|
||||
import org.oscim.event.MotionEvent;
|
||||
import org.oscim.map.Map;
|
||||
|
||||
public class MotionHandler extends MotionEvent implements InputProcessor {
|
||||
private final Map mMap;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user