├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── vcs.xml ├── inspectionProfiles │ ├── profiles_settings.xml │ └── Project_Default.xml ├── modules.xml ├── runConfigurations.xml ├── compiler.xml ├── gradle.xml ├── misc.xml └── codeStyleSettings.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── values │ │ │ │ ├── strings.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── config.xml │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── compass.png │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── compass.png │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── layout │ │ │ │ ├── activity_sensor_list.xml │ │ │ │ ├── activity_image_view.xml │ │ │ │ ├── activity_map_view.xml │ │ │ │ └── activity_main.xml │ │ ├── java │ │ │ └── net │ │ │ │ └── winsion │ │ │ │ └── www │ │ │ │ └── indooratlasdemo │ │ │ │ ├── view │ │ │ │ ├── PointEvaluator.java │ │ │ │ └── BlueDotView.java │ │ │ │ ├── bean │ │ │ │ └── Point.java │ │ │ │ ├── SensorListActivity.java │ │ │ │ ├── utils │ │ │ │ └── CommonMethord.java │ │ │ │ ├── TestData.java │ │ │ │ ├── MainActivity.java │ │ │ │ ├── ImageViewActivity.java │ │ │ │ └── MapViewActivity.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── net │ │ │ └── winsion │ │ │ └── www │ │ │ └── indooratlasdemo │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── net │ │ └── winsion │ │ └── www │ │ └── indooratlasdemo │ │ └── ApplicationTest.java ├── proguard-rules.pro └── build.gradle ├── MapViewLibrary ├── .gitignore ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ └── colors.xml │ │ ├── mipmap-xxhdpi │ │ │ ├── mark.png │ │ │ └── compass.png │ │ └── mipmap-hdpi │ │ │ ├── end_point.png │ │ │ ├── mark_touch.png │ │ │ └── start_point.png │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── onlylemi │ │ └── mapview │ │ └── library │ │ ├── MapViewListener.java │ │ ├── utils │ │ ├── ThreadHelper.java │ │ ├── math │ │ │ ├── TSPNearestNeighbour.java │ │ │ ├── FloydAlgorithm.java │ │ │ └── GeneticAlgorithm.java │ │ ├── MapMath.java │ │ └── MapUtils.java │ │ ├── layer │ │ ├── MapBaseLayer.java │ │ ├── BitmapLayer.java │ │ ├── RouteLayer.java │ │ ├── MapLayer.java │ │ ├── LocationLayer.java │ │ └── MarkLayer.java │ │ └── MapView.java ├── build.gradle └── proguard-rules.pro ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── README.md ├── gradle.properties ├── gradlew.bat └── gradlew /.idea/.name: -------------------------------------------------------------------------------- 1 | IndoorAtlasDemo -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /MapViewLibrary/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':MapViewLibrary' 2 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | IndoorAtlasDemo 3 | 4 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /MapViewLibrary/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MapViewLibrary 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/app/src/main/res/mipmap-xhdpi/compass.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/app/src/main/res/mipmap-xxhdpi/compass.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /MapViewLibrary/src/main/res/mipmap-xxhdpi/mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/MapViewLibrary/src/main/res/mipmap-xxhdpi/mark.png -------------------------------------------------------------------------------- /MapViewLibrary/src/main/res/mipmap-hdpi/end_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/MapViewLibrary/src/main/res/mipmap-hdpi/end_point.png -------------------------------------------------------------------------------- /MapViewLibrary/src/main/res/mipmap-hdpi/mark_touch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/MapViewLibrary/src/main/res/mipmap-hdpi/mark_touch.png -------------------------------------------------------------------------------- /MapViewLibrary/src/main/res/mipmap-xxhdpi/compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/MapViewLibrary/src/main/res/mipmap-xxhdpi/compass.png -------------------------------------------------------------------------------- /MapViewLibrary/src/main/res/mipmap-hdpi/start_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dys1715/IndoorAtlasDemo/HEAD/MapViewLibrary/src/main/res/mipmap-hdpi/start_point.png -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Dec 28 10:00:20 PST 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #ff00a5f5 7 | #3809c5f1 8 | 9 | -------------------------------------------------------------------------------- /MapViewLibrary/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/test/java/net/winsion/www/indooratlasdemo/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package net.winsion.www.indooratlasdemo; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MapViewLibrary/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | #FFFFFF 7 | #ff00a5f5 8 | #3809c5f1 9 | #FF909090 10 | 11 | -------------------------------------------------------------------------------- /MapViewLibrary/src/main/java/com/onlylemi/mapview/library/MapViewListener.java: -------------------------------------------------------------------------------- 1 | package com.onlylemi.mapview.library; 2 | 3 | /** 4 | * MapViewListener 5 | * 6 | * @author: onlylemi 7 | */ 8 | public interface MapViewListener { 9 | 10 | /** 11 | * when mapview load complete to callback 12 | */ 13 | void onMapLoadSuccess(); 14 | 15 | /** 16 | * when mapview load error to callback 17 | */ 18 | void onMapLoadFail(); 19 | } 20 | -------------------------------------------------------------------------------- /app/src/androidTest/java/net/winsion/www/indooratlasdemo/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package net.winsion.www.indooratlasdemo; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IndoorAtlasDemo 2 | Indooratlas室内地磁定位demo 3 | 展示了如何从云端服务器拉取数据并在本地描点功能等其他sdk功能 4 | 5 | API文档地址:http://docs.indooratlas.com/android/2.1.0/ 6 | 7 | 使用过程中注意: 8 | ---------- 9 | ###采集: 10 | 1.在网页上进行楼层图添加时,图片的比例一定要精确!录入的图片长宽最好是和实际长宽一致; 11 | 2.在使用采集器采集地磁数据时,路径勾画一定要规整,出现重复的路径最好完全重合覆盖住。 12 | 在行走采集到的过程中,一定要保持匀速前进,移动速度保持在0.5-0.75m/步为佳,移动时一定要保证直线,尽量不左右偏移; 13 | 3.无障碍开放空间内规划采集路径时,应该尽量多的覆盖,数据采集范围大约为手机中心点1m半径; 14 | 4.采集时保证手机屏幕朝上,平握 15 | ###定位: 16 | 1.在使用定位时,也需要保证屏幕朝上,手机平握。如果手机随手臂甩动,会造成定位点偏移,精度下降 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_sensor_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /MapViewLibrary/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.3" 6 | 7 | defaultConfig { 8 | minSdkVersion 15 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(dir: 'libs', include: ['*.jar']) 23 | } 24 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/values/config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | f24b095c-743c-4f10-832f-0f14d7785bb6 7 | 8 | 9 | 23d425b5-0af4-4a9a-bb9c-66b1d7df6b09 10 | 11 | 12 | c3c3b4ab-d78c-4674-8dd9-d53613f715d7 13 | 14 | 15 | -------------------------------------------------------------------------------- /MapViewLibrary/src/main/java/com/onlylemi/mapview/library/utils/ThreadHelper.java: -------------------------------------------------------------------------------- 1 | package com.onlylemi.mapview.library.utils; 2 | 3 | import java.util.concurrent.ExecutorService; 4 | import java.util.concurrent.Executors; 5 | import java.util.concurrent.ThreadPoolExecutor; 6 | 7 | /** 8 | * Created by dys on 2016/5/23 0023. 9 | */ 10 | public class ThreadHelper { 11 | private static ExecutorService threadPool; 12 | 13 | static { 14 | threadPool = Executors.newFixedThreadPool(5); 15 | // threadPool = Executors.newCachedThreadPool(); 16 | // threadPool = Executors.newSingleThreadExecutor(); 17 | } 18 | 19 | public static ExecutorService getThreadPool() { 20 | return threadPool; 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\Users\D\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /MapViewLibrary/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in E:\eclipse\sdk\android-sdk-windows/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/winsion/www/indooratlasdemo/view/PointEvaluator.java: -------------------------------------------------------------------------------- 1 | package net.winsion.www.indooratlasdemo.view; 2 | 3 | import android.animation.TypeEvaluator; 4 | import android.graphics.PointF; 5 | 6 | /** 7 | * Created by D on 2016/5/6 0006. 8 | * 小点移动操作 9 | */ 10 | public class PointEvaluator implements TypeEvaluator { 11 | @Override 12 | public Object evaluate(float fraction, Object startValue, Object endValue) { 13 | PointF startPoint = (PointF) startValue; 14 | PointF endPoint = (PointF) endValue; 15 | float x = startPoint.x + fraction * (endPoint.x - startPoint.x); 16 | float y = startPoint.y + fraction * (endPoint.y - startPoint.y); 17 | PointF point = new PointF(x, y); 18 | return point; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true 19 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 24 | 25 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion "23.0.3" 6 | 7 | defaultConfig { 8 | applicationId "net.winsion.www.indooratlasdemo" 9 | minSdkVersion 15 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | repositories{ 23 | maven { 24 | url "http://indooratlas-ltd.bintray.com/mvn-public" 25 | } 26 | } 27 | 28 | dependencies { 29 | compile fileTree(dir: 'libs', include: ['*.jar']) 30 | testCompile 'junit:junit:4.12' 31 | compile project(':MapViewLibrary') 32 | compile 'com.android.support:appcompat-v7:23.3.0' 33 | compile 'com.squareup.picasso:picasso:2.5.2' 34 | compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.2.0' 35 | compile 'com.orhanobut:logger:1.11' 36 | compile 'com.indooratlas.android:indooratlas-android-sdk:2.1.2@aar' 37 | compile 'com.anthonycr.grant:permissions:1.0' 38 | } 39 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/winsion/www/indooratlasdemo/bean/Point.java: -------------------------------------------------------------------------------- 1 | package net.winsion.www.indooratlasdemo.bean; 2 | 3 | /** 4 | * Created by D on 2016/4/29 0029. 5 | */ 6 | public class Point { 7 | private float pointX; 8 | private float pointY; 9 | private double latitude; 10 | private double longitude; 11 | 12 | public Point(float pointX, float pointY) { 13 | this.pointX = pointX; 14 | this.pointY = pointY; 15 | } 16 | 17 | public Point(float pointX, float pointY, double latitude, double longitude) { 18 | this.pointX = pointX; 19 | this.pointY = pointY; 20 | this.latitude = latitude; 21 | this.longitude = longitude; 22 | } 23 | 24 | public double getLatitude() { 25 | return latitude; 26 | } 27 | 28 | public void setLatitude(double latitude) { 29 | this.latitude = latitude; 30 | } 31 | 32 | public double getLongitude() { 33 | return longitude; 34 | } 35 | 36 | public void setLongitude(double longitude) { 37 | this.longitude = longitude; 38 | } 39 | 40 | public float getPointX() { 41 | return pointX; 42 | } 43 | 44 | public void setPointX(float pointX) { 45 | this.pointX = pointX; 46 | } 47 | 48 | public float getPointY() { 49 | return pointY; 50 | } 51 | 52 | public void setPointY(float pointY) { 53 | this.pointY = pointY; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_image_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 17 | 18 |