├── .buckconfig ├── .flowconfig ├── .gitignore ├── .watchmanconfig ├── android ├── app │ ├── BUCK │ ├── app.iml │ ├── build.gradle │ ├── proguard-rules.pro │ ├── react.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── pocketguide │ │ │ ├── MainActivity.java │ │ │ └── MainApplication.java │ │ └── res │ │ ├── drawable │ │ ├── art_pin.png │ │ ├── effigy_pin.png │ │ ├── pin.png │ │ └── temple_pin.png │ │ ├── mipmap-hdpi │ │ └── euphoria_icon.png │ │ ├── mipmap-mdpi │ │ └── euphoria_icon.png │ │ ├── mipmap-xhdpi │ │ └── euphoria_icon.png │ │ └── values │ │ ├── strings.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── pocketguide.iml └── settings.gradle ├── docs ├── android_store_icon.png ├── euphoria_store_feature_graphic.png ├── euphoria_store_icon.png ├── ios-screen-event.png ├── ios-screen-events.png ├── ios-screen-map.png ├── ios-screen-principles.png ├── ios_store_icon.png ├── screen-event.png ├── screen-events.png ├── screen-principles.png └── store_feature_graphic.jpg ├── images ├── Logo.png ├── events │ ├── Locate_Button.png │ ├── Seach_Button_Active.png │ ├── Search_Button_Active.png │ └── Search_Button_Inactive.png ├── map │ ├── Events_Button_Active.png │ ├── Events_Button_Inactive.png │ ├── Ops_Button_Active.png │ ├── Ops_Button_Inactive.png │ └── pins │ │ ├── art_pin.png │ │ ├── bus_pin.png │ │ ├── camp_pin.png │ │ ├── car_pin.png │ │ ├── danger_pin.png │ │ ├── effigy_pin.png │ │ ├── fire_pin.png │ │ ├── hospital_pin.png │ │ ├── man_pin.png │ │ ├── pin.png │ │ ├── temple_pin.png │ │ └── water_pin.png ├── principles │ └── Ten_Principles.png └── tab │ ├── Events_Active.png │ ├── Events_Inactive.png │ ├── Map_Active.png │ ├── Map_Inactive.png │ ├── Principles_Active.png │ └── Principles_Inactive.png ├── index.android.js ├── index.ios.js ├── ios ├── Alchemy 2016.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ └── pocketguide.xcscheme ├── Mapbox.framework │ ├── Base.lproj │ │ ├── Foundation.strings │ │ └── Localizable.strings │ ├── Compass.png │ ├── Compass@2x.png │ ├── Compass@3x.png │ ├── Headers │ │ ├── MGLAccountManager.h │ │ ├── MGLAnnotation.h │ │ ├── MGLAnnotationImage.h │ │ ├── MGLAnnotationView.h │ │ ├── MGLCalloutView.h │ │ ├── MGLClockDirectionFormatter.h │ │ ├── MGLCompassDirectionFormatter.h │ │ ├── MGLCoordinateFormatter.h │ │ ├── MGLFeature.h │ │ ├── MGLGeometry.h │ │ ├── MGLMapCamera.h │ │ ├── MGLMapView+IBAdditions.h │ │ ├── MGLMapView+MGLCustomStyleLayerAdditions.h │ │ ├── MGLMapView.h │ │ ├── MGLMapViewDelegate.h │ │ ├── MGLMultiPoint.h │ │ ├── MGLOfflinePack.h │ │ ├── MGLOfflineRegion.h │ │ ├── MGLOfflineStorage.h │ │ ├── MGLOverlay.h │ │ ├── MGLPointAnnotation.h │ │ ├── MGLPolygon.h │ │ ├── MGLPolyline.h │ │ ├── MGLShape.h │ │ ├── MGLShapeCollection.h │ │ ├── MGLStyle.h │ │ ├── MGLTilePyramidOfflineRegion.h │ │ ├── MGLTypes.h │ │ ├── MGLUserLocation.h │ │ ├── Mapbox.h │ │ └── NSValue+MGLAdditions.h │ ├── Info.plist │ ├── Mapbox │ ├── Modules │ │ └── module.modulemap │ ├── PrivateHeaders │ │ └── NSData+MGLAdditions.h │ ├── _CodeSignature │ │ └── CodeResources │ ├── api_mapbox_com-digicert.der │ ├── api_mapbox_com-geotrust.der │ ├── default_marker.png │ ├── default_marker@2x.png │ ├── default_marker@3x.png │ ├── en.lproj │ │ ├── Foundation.stringsdict │ │ └── Localizable.stringsdict │ ├── mapbox.png │ ├── mapbox@2x.png │ ├── mapbox@3x.png │ ├── star_tilestream_net.der │ └── strip-frameworks.sh ├── main.jsbundle ├── pocketguide │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── art_pin.imageset │ │ │ ├── Contents.json │ │ │ ├── art_pin-1.png │ │ │ ├── art_pin-2.png │ │ │ └── art_pin.png │ │ ├── effigy_pin.imageset │ │ │ ├── Contents.json │ │ │ ├── effigy_pin-1.png │ │ │ ├── effigy_pin-2.png │ │ │ └── effigy_pin.png │ │ ├── ios │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-40.png │ │ │ │ ├── Icon-40@2x.png │ │ │ │ ├── Icon-40@3x.png │ │ │ │ ├── Icon-60@2x.png │ │ │ │ ├── Icon-60@3x.png │ │ │ │ ├── Icon-76.png │ │ │ │ ├── Icon-76@2x.png │ │ │ │ ├── Icon-83.5@2x.png │ │ │ │ ├── Icon-Small.png │ │ │ │ ├── Icon-Small@2x.png │ │ │ │ └── Icon-Small@3x.png │ │ │ ├── Contents.json │ │ │ ├── Icon-60.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── Icon-60.png │ │ │ ├── Icon-72.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-72.png │ │ │ │ └── Icon-72@2x.png │ │ │ ├── Icon-Small-50.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon-Small-50.png │ │ │ │ └── Icon-Small-50@2x.png │ │ │ ├── Icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── Icon.png │ │ │ │ └── Icon@2x.png │ │ │ ├── README.dataset │ │ │ │ ├── Contents.json │ │ │ │ └── README.md │ │ │ └── iTunesArtwork.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── iTunesArtwork.png │ │ │ │ └── iTunesArtwork@2x.png │ │ ├── pin.imageset │ │ │ ├── Contents.json │ │ │ ├── pin-1.png │ │ │ ├── pin-2.png │ │ │ └── pin.png │ │ └── temple_pin.imageset │ │ │ ├── Contents.json │ │ │ ├── temple_pin-1.png │ │ │ ├── temple_pin-2.png │ │ │ └── temple_pin.png │ ├── Info.plist │ └── main.m └── pocketguideTests │ ├── Info.plist │ └── pocketguideTests.m ├── package.json ├── readme.md ├── scripts └── exportKMLToAnnotations.js ├── src ├── RootView.js ├── RootViewContainer.js ├── __tests__ │ └── actionCreators.spec.js ├── actionCreators.js ├── appRoutes.js ├── data │ ├── staticData │ │ ├── annotations │ │ │ ├── art.json │ │ │ ├── landmarks.json │ │ │ ├── opencamping.json │ │ │ ├── roads.json │ │ │ └── tcs.json │ │ ├── geoJSON │ │ │ ├── art.json │ │ │ ├── landmarks.json │ │ │ ├── opencamping.json │ │ │ ├── roads.json │ │ │ └── tcs.json │ │ ├── kml │ │ │ ├── art.kml │ │ │ ├── landmarks.kml │ │ │ ├── opencamping.kml │ │ │ ├── roads.kml │ │ │ └── tcs.kml │ │ └── staticMapAnnotations.js │ └── transformers │ │ ├── __tests__ │ │ └── geoJsonToAnnotations.spec.js │ │ └── geoJSONToAnnotations.js ├── events │ ├── __tests__ │ │ └── eventsReducer.spec.js │ ├── components │ │ ├── EventView.js │ │ ├── EventsContainerView.js │ │ └── EventsView.js │ └── eventsReducer.js ├── map │ ├── MapView.js │ ├── __tests__ │ │ └── mapReducer.spec.js │ └── mapReducer.js ├── nav │ ├── EventsNavBar.js │ ├── MapNavBar.js │ ├── NavBar.js │ ├── NavSearchButton.js │ └── PrinciplesNavBar.js ├── principles │ └── PrinciplesView.js ├── reducers.js ├── styles │ ├── ColorConstants.js │ ├── EventViewStyles.js │ ├── NavBarStyles.js │ ├── PrinciplesViewStyles.js │ └── StyleConstants.js └── tabs │ ├── TabBar.js │ ├── TabButton.js │ ├── __tests__ │ └── tabsReducer.spec.js │ └── tabsReducer.js └── test ├── main.js └── mocha.opts /.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | 3 | # We fork some components by platform. 4 | .*/*[.]android.js 5 | 6 | # Ignore templates with `@flow` in header 7 | .*/local-cli/generator.* 8 | 9 | # Ignore malformed json 10 | .*/node_modules/y18n/test/.*\.json 11 | 12 | # Ignore the website subdir 13 | /website/.* 14 | 15 | # Ignore BUCK generated dirs 16 | /\.buckd/ 17 | 18 | # Ignore unexpected extra @providesModule 19 | .*/node_modules/commoner/test/source/widget/share.js 20 | 21 | # Ignore duplicate module providers 22 | # For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root 23 | .*/Libraries/react-native/React.js 24 | .*/Libraries/react-native/ReactNative.js 25 | .*/node_modules/jest-runtime/build/__tests__/.* 26 | 27 | [include] 28 | 29 | [libs] 30 | node_modules/react-native/Libraries/react-native/react-native-interface.js 31 | node_modules/react-native/flow 32 | flow/ 33 | 34 | [options] 35 | module.system=haste 36 | 37 | esproposal.class_static_fields=enable 38 | esproposal.class_instance_fields=enable 39 | 40 | experimental.strict_type_args=true 41 | 42 | munge_underscores=true 43 | 44 | module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' 45 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 46 | 47 | suppress_type=$FlowIssue 48 | suppress_type=$FlowFixMe 49 | suppress_type=$FixMe 50 | 51 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(30\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 52 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(30\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 53 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 54 | 55 | unsafe.enable_getters_and_setters=true 56 | 57 | [version] 58 | ^0.30.0 59 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | project.xcworkspace 24 | 25 | # Android/IJ 26 | # 27 | *.iml 28 | .idea 29 | .gradle 30 | local.properties 31 | android/app/pocketguide-key.keystore 32 | 33 | # node.js 34 | # 35 | node_modules/ 36 | npm-debug.log 37 | 38 | *.sublime* 39 | # BUCK 40 | buck-out/ 41 | \.buckd/ 42 | android/app/libs 43 | android/keystores/debug.keystore 44 | -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /android/app/BUCK: -------------------------------------------------------------------------------- 1 | import re 2 | 3 | # To learn about Buck see [Docs](https://buckbuild.com/). 4 | # To run your application with Buck: 5 | # - install Buck 6 | # - `npm start` - to start the packager 7 | # - `cd android` 8 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` 9 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck 10 | # - `buck install -r android/app` - compile, install and run application 11 | # 12 | 13 | lib_deps = [] 14 | for jarfile in glob(['libs/*.jar']): 15 | name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) 16 | lib_deps.append(':' + name) 17 | prebuilt_jar( 18 | name = name, 19 | binary_jar = jarfile, 20 | ) 21 | 22 | for aarfile in glob(['libs/*.aar']): 23 | name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) 24 | lib_deps.append(':' + name) 25 | android_prebuilt_aar( 26 | name = name, 27 | aar = aarfile, 28 | ) 29 | 30 | android_library( 31 | name = 'all-libs', 32 | exported_deps = lib_deps 33 | ) 34 | 35 | android_library( 36 | name = 'app-code', 37 | srcs = glob([ 38 | 'src/main/java/**/*.java', 39 | ]), 40 | deps = [ 41 | ':all-libs', 42 | ':build_config', 43 | ':res', 44 | ], 45 | ) 46 | 47 | android_build_config( 48 | name = 'build_config', 49 | package = 'com.pocketguide', 50 | ) 51 | 52 | android_resource( 53 | name = 'res', 54 | res = 'src/main/res', 55 | package = 'com.pocketguide', 56 | ) 57 | 58 | android_binary( 59 | name = 'app', 60 | package_type = 'debug', 61 | manifest = 'src/main/AndroidManifest.xml', 62 | keystore = '//android/keystores:debug', 63 | deps = [ 64 | ':app-code', 65 | ], 66 | ) 67 | -------------------------------------------------------------------------------- /android/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 /usr/local/Cellar/android-sdk/24.3.3/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 | 19 | # Disabling obfuscation is useful if you collect stack traces from production crashes 20 | # (unless you are using a system that supports de-obfuscate the stack traces). 21 | -dontobfuscate 22 | 23 | # React Native 24 | 25 | # Keep our interfaces so they can be used by other ProGuard rules. 26 | # See http://sourceforge.net/p/proguard/bugs/466/ 27 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip 28 | -keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters 29 | -keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip 30 | 31 | # Do not strip any method/class that is annotated with @DoNotStrip 32 | -keep @com.facebook.proguard.annotations.DoNotStrip class * 33 | -keep @com.facebook.common.internal.DoNotStrip class * 34 | -keepclassmembers class * { 35 | @com.facebook.proguard.annotations.DoNotStrip *; 36 | @com.facebook.common.internal.DoNotStrip *; 37 | } 38 | 39 | -keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { 40 | void set*(***); 41 | *** get*(); 42 | } 43 | 44 | -keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } 45 | -keep class * extends com.facebook.react.bridge.NativeModule { *; } 46 | -keepclassmembers,includedescriptorclasses class * { native ; } 47 | -keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } 48 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } 49 | -keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } 50 | 51 | -dontwarn com.facebook.react.** 52 | 53 | # okhttp 54 | 55 | -keepattributes Signature 56 | -keepattributes *Annotation* 57 | -keep class okhttp3.** { *; } 58 | -keep interface okhttp3.** { *; } 59 | -dontwarn okhttp3.** 60 | 61 | # okio 62 | 63 | -keep class sun.misc.Unsafe { *; } 64 | -dontwarn java.nio.file.* 65 | -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement 66 | -dontwarn okio.** 67 | -------------------------------------------------------------------------------- /android/app/react.gradle: -------------------------------------------------------------------------------- 1 | import org.apache.tools.ant.taskdefs.condition.Os 2 | 3 | def config = project.hasProperty("react") ? project.react : []; 4 | 5 | def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" 6 | def entryFile = config.entryFile ?: "index.android.js" 7 | 8 | // because elvis operator 9 | def elvisFile(thing) { 10 | return thing ? file(thing) : null; 11 | } 12 | 13 | def reactRoot = elvisFile(config.root) ?: file("../../") 14 | def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] 15 | 16 | void runBefore(String dependentTaskName, Task task) { 17 | Task dependentTask = tasks.findByPath(dependentTaskName); 18 | if (dependentTask != null) { 19 | dependentTask.dependsOn task 20 | } 21 | } 22 | 23 | gradle.projectsEvaluated { 24 | // Grab all build types and product flavors 25 | def buildTypes = android.buildTypes.collect { type -> type.name } 26 | def productFlavors = android.productFlavors.collect { flavor -> flavor.name } 27 | 28 | // When no product flavors defined, use empty 29 | if (!productFlavors) productFlavors.add('') 30 | 31 | productFlavors.each { productFlavorName -> 32 | buildTypes.each { buildTypeName -> 33 | // Create variant and target names 34 | def targetName = "${productFlavorName.capitalize()}${buildTypeName.capitalize()}" 35 | def targetPath = productFlavorName ? 36 | "${productFlavorName}/${buildTypeName}" : 37 | "${buildTypeName}" 38 | 39 | // React js bundle directories 40 | def jsBundleDirConfigName = "jsBundleDir${targetName}" 41 | def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?: 42 | file("$buildDir/intermediates/assets/${targetPath}") 43 | 44 | def resourcesDirConfigName = "resourcesDir${targetName}" 45 | def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?: 46 | file("$buildDir/intermediates/res/merged/${targetPath}") 47 | def jsBundleFile = file("$jsBundleDir/$bundleAssetName") 48 | 49 | // Bundle task name for variant 50 | def bundleJsAndAssetsTaskName = "bundle${targetName}JsAndAssets" 51 | 52 | def currentBundleTask = tasks.create( 53 | name: bundleJsAndAssetsTaskName, 54 | type: Exec) { 55 | group = "react" 56 | description = "bundle JS and assets for ${targetName}." 57 | 58 | // Create dirs if they are not there (e.g. the "clean" task just ran) 59 | doFirst { 60 | jsBundleDir.mkdirs() 61 | resourcesDir.mkdirs() 62 | } 63 | 64 | // Set up inputs and outputs so gradle can cache the result 65 | inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) 66 | outputs.dir jsBundleDir 67 | outputs.dir resourcesDir 68 | 69 | // Set up the call to the react-native cli 70 | workingDir reactRoot 71 | 72 | // Set up dev mode 73 | def devEnabled = !targetName.toLowerCase().contains("release") 74 | if (Os.isFamily(Os.FAMILY_WINDOWS)) { 75 | commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}", 76 | "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir 77 | } else { 78 | commandLine "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}", 79 | "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir 80 | } 81 | 82 | enabled config."bundleIn${targetName}" || 83 | config."bundleIn${buildTypeName.capitalize()}" ?: 84 | targetName.toLowerCase().contains("release") 85 | } 86 | 87 | // Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process 88 | currentBundleTask.dependsOn("merge${targetName}Resources") 89 | currentBundleTask.dependsOn("merge${targetName}Assets") 90 | 91 | runBefore("processArmeabi-v7a${targetName}Resources", currentBundleTask) 92 | runBefore("processX86${targetName}Resources", currentBundleTask) 93 | runBefore("processUniversal${targetName}Resources", currentBundleTask) 94 | runBefore("process${targetName}Resources", currentBundleTask) 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 15 | 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/pocketguide/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.pocketguide; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. 9 | * This is used to schedule rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "pocketguide"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/pocketguide/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.pocketguide; 2 | 3 | import android.app.Application; 4 | import android.util.Log; 5 | 6 | import com.facebook.react.ReactApplication; 7 | import com.mapbox.reactnativemapboxgl.ReactNativeMapboxGLPackage; 8 | import com.facebook.react.ReactInstanceManager; 9 | import com.facebook.react.ReactNativeHost; 10 | import com.facebook.react.ReactPackage; 11 | import com.facebook.react.shell.MainReactPackage; 12 | 13 | import java.util.Arrays; 14 | import java.util.List; 15 | 16 | public class MainApplication extends Application implements ReactApplication { 17 | 18 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { 19 | @Override 20 | protected boolean getUseDeveloperSupport() { 21 | return BuildConfig.DEBUG; 22 | } 23 | 24 | @Override 25 | protected List getPackages() { 26 | return Arrays.asList( 27 | new MainReactPackage(), 28 | new ReactNativeMapboxGLPackage() 29 | ); 30 | } 31 | }; 32 | 33 | @Override 34 | public ReactNativeHost getReactNativeHost() { 35 | return mReactNativeHost; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/art_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/app/src/main/res/drawable/art_pin.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/effigy_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/app/src/main/res/drawable/effigy_pin.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/app/src/main/res/drawable/pin.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/temple_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/app/src/main/res/drawable/temple_pin.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/euphoria_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/app/src/main/res/mipmap-hdpi/euphoria_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/euphoria_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/app/src/main/res/mipmap-mdpi/euphoria_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/euphoria_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/app/src/main/res/mipmap-xhdpi/euphoria_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Alchemy 2016 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:1.3.1' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | mavenLocal() 18 | jcenter() 19 | maven { 20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 21 | url "$rootDir/../node_modules/react-native/android" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /android/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 | 20 | android.useDeprecatedNdk=true 21 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip 6 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # For Cygwin, ensure paths are in UNIX format before anything is touched. 46 | if $cygwin ; then 47 | [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 48 | fi 49 | 50 | # Attempt to set APP_HOME 51 | # Resolve links: $0 may be a link 52 | PRG="$0" 53 | # Need this for relative symlinks. 54 | while [ -h "$PRG" ] ; do 55 | ls=`ls -ld "$PRG"` 56 | link=`expr "$ls" : '.*-> \(.*\)$'` 57 | if expr "$link" : '/.*' > /dev/null; then 58 | PRG="$link" 59 | else 60 | PRG=`dirname "$PRG"`"/$link" 61 | fi 62 | done 63 | SAVED="`pwd`" 64 | cd "`dirname \"$PRG\"`/" >&- 65 | APP_HOME="`pwd -P`" 66 | cd "$SAVED" >&- 67 | 68 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 69 | 70 | # Determine the Java command to use to start the JVM. 71 | if [ -n "$JAVA_HOME" ] ; then 72 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 73 | # IBM's JDK on AIX uses strange locations for the executables 74 | JAVACMD="$JAVA_HOME/jre/sh/java" 75 | else 76 | JAVACMD="$JAVA_HOME/bin/java" 77 | fi 78 | if [ ! -x "$JAVACMD" ] ; then 79 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 80 | 81 | Please set the JAVA_HOME variable in your environment to match the 82 | location of your Java installation." 83 | fi 84 | else 85 | JAVACMD="java" 86 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 87 | 88 | Please set the JAVA_HOME variable in your environment to match the 89 | location of your Java installation." 90 | fi 91 | 92 | # Increase the maximum file descriptors if we can. 93 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 94 | MAX_FD_LIMIT=`ulimit -H -n` 95 | if [ $? -eq 0 ] ; then 96 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 97 | MAX_FD="$MAX_FD_LIMIT" 98 | fi 99 | ulimit -n $MAX_FD 100 | if [ $? -ne 0 ] ; then 101 | warn "Could not set maximum file descriptor limit: $MAX_FD" 102 | fi 103 | else 104 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 105 | fi 106 | fi 107 | 108 | # For Darwin, add options to specify how the application appears in the dock 109 | if $darwin; then 110 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 111 | fi 112 | 113 | # For Cygwin, switch paths to Windows format before running java 114 | if $cygwin ; then 115 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 116 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 158 | function splitJvmOpts() { 159 | JVM_OPTS=("$@") 160 | } 161 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 162 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 163 | 164 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 165 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/pocketguide.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'pocketguide' 2 | 3 | include ':app' 4 | include ':react-native-mapbox-gl' 5 | project(':react-native-mapbox-gl').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mapbox-gl/android') 6 | 7 | -------------------------------------------------------------------------------- /docs/android_store_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/android_store_icon.png -------------------------------------------------------------------------------- /docs/euphoria_store_feature_graphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/euphoria_store_feature_graphic.png -------------------------------------------------------------------------------- /docs/euphoria_store_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/euphoria_store_icon.png -------------------------------------------------------------------------------- /docs/ios-screen-event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/ios-screen-event.png -------------------------------------------------------------------------------- /docs/ios-screen-events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/ios-screen-events.png -------------------------------------------------------------------------------- /docs/ios-screen-map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/ios-screen-map.png -------------------------------------------------------------------------------- /docs/ios-screen-principles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/ios-screen-principles.png -------------------------------------------------------------------------------- /docs/ios_store_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/ios_store_icon.png -------------------------------------------------------------------------------- /docs/screen-event.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/screen-event.png -------------------------------------------------------------------------------- /docs/screen-events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/screen-events.png -------------------------------------------------------------------------------- /docs/screen-principles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/screen-principles.png -------------------------------------------------------------------------------- /docs/store_feature_graphic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/docs/store_feature_graphic.jpg -------------------------------------------------------------------------------- /images/Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/Logo.png -------------------------------------------------------------------------------- /images/events/Locate_Button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/events/Locate_Button.png -------------------------------------------------------------------------------- /images/events/Seach_Button_Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/events/Seach_Button_Active.png -------------------------------------------------------------------------------- /images/events/Search_Button_Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/events/Search_Button_Active.png -------------------------------------------------------------------------------- /images/events/Search_Button_Inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/events/Search_Button_Inactive.png -------------------------------------------------------------------------------- /images/map/Events_Button_Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/Events_Button_Active.png -------------------------------------------------------------------------------- /images/map/Events_Button_Inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/Events_Button_Inactive.png -------------------------------------------------------------------------------- /images/map/Ops_Button_Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/Ops_Button_Active.png -------------------------------------------------------------------------------- /images/map/Ops_Button_Inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/Ops_Button_Inactive.png -------------------------------------------------------------------------------- /images/map/pins/art_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/art_pin.png -------------------------------------------------------------------------------- /images/map/pins/bus_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/bus_pin.png -------------------------------------------------------------------------------- /images/map/pins/camp_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/camp_pin.png -------------------------------------------------------------------------------- /images/map/pins/car_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/car_pin.png -------------------------------------------------------------------------------- /images/map/pins/danger_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/danger_pin.png -------------------------------------------------------------------------------- /images/map/pins/effigy_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/effigy_pin.png -------------------------------------------------------------------------------- /images/map/pins/fire_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/fire_pin.png -------------------------------------------------------------------------------- /images/map/pins/hospital_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/hospital_pin.png -------------------------------------------------------------------------------- /images/map/pins/man_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/man_pin.png -------------------------------------------------------------------------------- /images/map/pins/pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/pin.png -------------------------------------------------------------------------------- /images/map/pins/temple_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/temple_pin.png -------------------------------------------------------------------------------- /images/map/pins/water_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/map/pins/water_pin.png -------------------------------------------------------------------------------- /images/principles/Ten_Principles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/principles/Ten_Principles.png -------------------------------------------------------------------------------- /images/tab/Events_Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/tab/Events_Active.png -------------------------------------------------------------------------------- /images/tab/Events_Inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/tab/Events_Inactive.png -------------------------------------------------------------------------------- /images/tab/Map_Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/tab/Map_Active.png -------------------------------------------------------------------------------- /images/tab/Map_Inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/tab/Map_Inactive.png -------------------------------------------------------------------------------- /images/tab/Principles_Active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/tab/Principles_Active.png -------------------------------------------------------------------------------- /images/tab/Principles_Inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/images/tab/Principles_Inactive.png -------------------------------------------------------------------------------- /index.android.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import React from 'react'; 4 | import {AppRegistry} from 'react-native'; 5 | import RootViewContainer from './src/RootViewContainer' 6 | 7 | const pocketguide = React.createClass({ 8 | render () { 9 | return ( 10 | 11 | ) 12 | } 13 | }) 14 | 15 | AppRegistry.registerComponent('pocketguide', () => pocketguide) 16 | -------------------------------------------------------------------------------- /index.ios.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import React from 'react'; 4 | import {AppRegistry} from 'react-native'; 5 | import RootViewContainer from './src/RootViewContainer' 6 | 7 | const pocketguide = React.createClass({ 8 | render () { 9 | return ( 10 | 11 | ) 12 | } 13 | }) 14 | 15 | AppRegistry.registerComponent('pocketguide', () => pocketguide) 16 | -------------------------------------------------------------------------------- /ios/Alchemy 2016.xcodeproj/xcshareddata/xcschemes/pocketguide.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 67 | 68 | 78 | 80 | 86 | 87 | 88 | 89 | 90 | 91 | 97 | 99 | 105 | 106 | 107 | 108 | 110 | 111 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Base.lproj/Foundation.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/Base.lproj/Foundation.strings -------------------------------------------------------------------------------- /ios/Mapbox.framework/Base.lproj/Localizable.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/Base.lproj/Localizable.strings -------------------------------------------------------------------------------- /ios/Mapbox.framework/Compass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/Compass.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/Compass@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/Compass@2x.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/Compass@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/Compass@3x.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLAccountManager.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLTypes.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | /** 8 | The MGLAccountManager object provides a global way to set a Mapbox API access 9 | token. 10 | */ 11 | @interface MGLAccountManager : NSObject 12 | 13 | #pragma mark Authorizing Access 14 | 15 | /** 16 | Set the 17 | Mapbox access token 18 | to be used by all instances of MGLMapView in the current application. 19 | 20 | Mapbox-hosted vector tiles and styles require an API access token, which you 21 | can obtain from the 22 | Mapbox account page. 23 | Access tokens associate requests to Mapbox’s vector tile and style APIs with 24 | your Mapbox account. They also deter other developers from using your styles 25 | without your permission. 26 | 27 | @param accessToken A Mapbox access token. Calling this method with a value of 28 | `nil` has no effect. 29 | 30 | @note You must set the access token before attempting to load any Mapbox-hosted 31 | style. Therefore, you should generally set it before creating an instance of 32 | MGLMapView. The recommended way to set an access token is to add an entry to 33 | your application’s Info.plist file with the key `MGLMapboxAccessToken` and 34 | the type String. Alternatively, you may call this method from your 35 | application delegate’s `-applicationDidFinishLaunching:` method. 36 | */ 37 | + (void)setAccessToken:(nullable NSString *)accessToken; 38 | 39 | /** 40 | Returns the 41 | Mapbox access token 42 | in use by instances of MGLMapView in the current application. 43 | */ 44 | + (nullable NSString *)accessToken; 45 | 46 | + (BOOL)mapboxMetricsEnabledSettingShownInApp __attribute__((deprecated("Telemetry settings are now always shown in the ℹ️ menu."))); 47 | 48 | @end 49 | 50 | NS_ASSUME_NONNULL_END 51 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLAnnotation.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | #import "MGLTypes.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /** 10 | The `MGLAnnotation` protocol is used to provide annotation-related information 11 | to a map view. To use this protocol, you adopt it in any custom objects that 12 | store or represent annotation data. Each object then serves as the source of 13 | information about a single map annotation and provides critical information, 14 | such as the annotation’s location on the map. Annotation objects do not provide 15 | the visual representation of the annotation but typically coordinate (in 16 | conjunction with the map view’s delegate) the creation of an appropriate 17 | objects to handle the display. 18 | 19 | An object that adopts this protocol must implement the `coordinate` property. 20 | The other methods of this protocol are optional. 21 | */ 22 | @protocol MGLAnnotation 23 | 24 | #pragma mark Position Attributes 25 | 26 | /** 27 | The center point (specified as a map coordinate) of the annotation. (required) 28 | (read-only) 29 | */ 30 | @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; 31 | 32 | @optional 33 | 34 | #pragma mark Title Attributes 35 | 36 | /** 37 | The string containing the annotation’s title. 38 | 39 | Although this property is optional, if you support the selection of annotations 40 | in your map view, you are expected to provide this property. This string is 41 | displayed in the callout for the associated annotation. 42 | */ 43 | @property (nonatomic, readonly, copy, nullable) NSString *title; 44 | 45 | /** 46 | The string containing the annotation’s subtitle. 47 | 48 | This string is displayed in the callout for the associated annotation. 49 | */ 50 | @property (nonatomic, readonly, copy, nullable) NSString *subtitle; 51 | 52 | #if !TARGET_OS_IPHONE 53 | 54 | /** The string containing the annotation’s tooltip. */ 55 | @property (nonatomic, readonly, copy, nullable) NSString *toolTip; 56 | 57 | #endif 58 | 59 | @end 60 | 61 | NS_ASSUME_NONNULL_END 62 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLAnnotationImage.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLTypes.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | /** The MGLAnnotationImage class is responsible for presenting point-based annotations visually on a map view. Annotation image objects wrap `UIImage` objects and may be recycled later and put into a reuse queue that is maintained by the map view. */ 8 | @interface MGLAnnotationImage : NSObject 9 | 10 | #pragma mark Initializing and Preparing the Image Object 11 | 12 | /** 13 | Initializes and returns a new annotation image object. 14 | 15 | @param image The image to be displayed for the annotation. 16 | @param reuseIdentifier The string that identifies that this annotation image is reusable. 17 | @return The initialized annotation image object or `nil` if there was a problem initializing the object. 18 | */ 19 | + (instancetype)annotationImageWithImage:(UIImage *)image reuseIdentifier:(NSString *)reuseIdentifier; 20 | 21 | #pragma mark Getting and Setting Attributes 22 | 23 | /** The image to be displayed for the annotation. */ 24 | @property (nonatomic, strong, nullable) UIImage *image; 25 | 26 | /** 27 | The string that identifies that this annotation image is reusable. (read-only) 28 | 29 | You specify the reuse identifier when you create the image object. You use this type later to retrieve an annotation image object that was created previously but which is currently unused because its annotation is not on screen. 30 | 31 | If you define distinctly different types of annotations (with distinctly different annotation images to go with them), you can differentiate between the annotation types by specifying different reuse identifiers for each one. 32 | */ 33 | @property (nonatomic, readonly) NSString *reuseIdentifier; 34 | 35 | /** 36 | A Boolean value indicating whether the annotation is enabled. 37 | 38 | The default value of this property is `YES`. If the value of this property is `NO`, the annotation image ignores touch events and cannot be selected. 39 | */ 40 | @property (nonatomic, getter=isEnabled) BOOL enabled; 41 | 42 | @end 43 | 44 | NS_ASSUME_NONNULL_END 45 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLCalloutView.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLTypes.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @protocol MGLCalloutViewDelegate; 8 | @protocol MGLAnnotation; 9 | 10 | /** 11 | A protocol for a `UIView` subclass that displays information about a selected annotation near that annotation. 12 | */ 13 | @protocol MGLCalloutView 14 | 15 | /** 16 | An object conforming to the `MGLAnnotation` protocol whose details this callout view displays. 17 | */ 18 | @property (nonatomic, strong) id representedObject; 19 | 20 | /** 21 | A view that the user may tap to perform an action. This view is conventionally positioned on the left side of the callout view. 22 | */ 23 | @property (nonatomic, strong) UIView *leftAccessoryView; 24 | 25 | /** 26 | A view that the user may tap to perform an action. This view is conventionally positioned on the right side of the callout view. 27 | */ 28 | @property (nonatomic, strong) UIView *rightAccessoryView; 29 | 30 | /** 31 | An object conforming to the `MGLCalloutViewDelegate` method that receives messages related to the callout view’s interactive subviews. 32 | */ 33 | @property (nonatomic, weak) id delegate; 34 | 35 | /** 36 | Presents a callout view by adding it to `inView` and pointing at the given rect of `inView`’s bounds. Constrains the callout to the bounds of the given view. 37 | */ 38 | - (void)presentCalloutFromRect:(CGRect)rect inView:(UIView *)view constrainedToView:(UIView *)constrainedView animated:(BOOL)animated; 39 | 40 | /** 41 | Dismisses the callout view. 42 | */ 43 | - (void)dismissCalloutAnimated:(BOOL)animated; 44 | 45 | @end 46 | 47 | /** 48 | The MGLCalloutViewDelegate protocol defines a set of optional methods that you can use to receive messages from an object that conforms to the MGLCalloutView protocol. The callout view uses these methods to inform the delegate that the user has interacted with the the callout view. 49 | */ 50 | @protocol MGLCalloutViewDelegate 51 | 52 | @optional 53 | /** 54 | Returns a Boolean value indicating whether the entire callout view “highlights” when tapped. The default value is `YES`, which means the callout view highlights when tapped. 55 | 56 | The return value of this method is ignored unless the delegate also responds to the `-calloutViewTapped` method. 57 | */ 58 | - (BOOL)calloutViewShouldHighlight:(UIView *)calloutView; 59 | 60 | /** 61 | Tells the delegate that the callout view has been tapped. 62 | */ 63 | - (void)calloutViewTapped:(UIView *)calloutView; 64 | 65 | /** 66 | Called before the callout view appears on screen, or before the appearance animation will start. 67 | */ 68 | - (void)calloutViewWillAppear:(UIView *)calloutView; 69 | 70 | /** 71 | Called after the callout view appears on screen, or after the appearance animation is complete. 72 | */ 73 | - (void)calloutViewDidAppear:(UIView *)calloutView; 74 | 75 | @end 76 | 77 | NS_ASSUME_NONNULL_END 78 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLClockDirectionFormatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLTypes.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | /** 9 | The `MGLClockDirectionFormatter` class provides properly formatted descriptions 10 | of headings relative to the user, known as clock positions. For 11 | example, a value of `90` may be formatted as “3 o’clock”, depending on the 12 | locale. 13 | 14 | Use this class to create localized heading strings when displaying directions 15 | relative to the user’s current location and heading. To format a direction 16 | irrespective of the user’s orientation, use `MGLCompassDirectionFormatter` 17 | instead. 18 | */ 19 | @interface MGLClockDirectionFormatter : NSFormatter 20 | 21 | /** 22 | The unit style used by this formatter. 23 | 24 | This property defaults to `NSFormattingUnitStyleMedium`. 25 | */ 26 | @property (nonatomic) NSFormattingUnitStyle unitStyle; 27 | 28 | /** 29 | Returns a clock position string for the provided value. 30 | 31 | @param direction The heading, measured in degrees, where 0° means “straight 32 | ahead” and 90° means “directly to your right”. 33 | @return The clock position string appropriately formatted for the receiver’s 34 | locale. 35 | */ 36 | - (NSString *)stringFromDirection:(CLLocationDirection)direction; 37 | 38 | /** 39 | This method is not supported for the `MGLDirectionFormatter` class. 40 | */ 41 | - (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error; 42 | 43 | @end 44 | 45 | NS_ASSUME_NONNULL_END 46 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLCompassDirectionFormatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLTypes.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | /** 9 | The `MGLCompassDirectionFormatter` class provides properly formatted 10 | descriptions of absolute headings. For example, a value of `90` may be 11 | formatted as “east”, depending on the locale. 12 | 13 | Use this class to create localized heading strings when displaying directions 14 | irrespective of the user’s current location. To format a direction relative to 15 | the user’s current location, use `MGLCompassDirectionFormatter` instead. 16 | */ 17 | @interface MGLCompassDirectionFormatter : NSFormatter 18 | 19 | /** 20 | The unit style used by this formatter. 21 | 22 | This property defaults to `NSFormattingUnitStyleMedium`. 23 | */ 24 | @property (nonatomic) NSFormattingUnitStyle unitStyle; 25 | 26 | /** 27 | Returns a heading string for the provided value. 28 | 29 | @param direction The heading, measured in degrees, where 0° means “due north” 30 | and 90° means “due east”. 31 | @return The heading string appropriately formatted for the formatter’s locale. 32 | */ 33 | - (NSString *)stringFromDirection:(CLLocationDirection)direction; 34 | 35 | /** 36 | This method is not supported for the `MGLDirectionFormatter` class. 37 | */ 38 | - (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLCoordinateFormatter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLTypes.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | /** 9 | The `MGLCoordinateFormatter` class provides properly formatted descriptions of 10 | geographic coordinate pairs. Use this class to create localized coordinate 11 | strings when displaying location information to users. 12 | */ 13 | @interface MGLCoordinateFormatter : NSFormatter 14 | 15 | /** 16 | Determines whether the output may contain minutes of arc when nonzero. 17 | 18 | The default value of this property is `YES`, causing the receiver to include 19 | minutes of arc in its output. If `allowsSeconds` is `YES`, this property is 20 | ignored and the output always includes minutes of arc. 21 | */ 22 | @property (nonatomic) BOOL allowsMinutes; 23 | 24 | /** 25 | Determines whether the output may contain seconds of arc when nonzero. 26 | 27 | The default value of this property is `YES`, causing the receiver to include 28 | seconds of arc in its output. 29 | */ 30 | @property (nonatomic) BOOL allowsSeconds; 31 | 32 | /** 33 | The unit style used by this formatter. 34 | 35 | The default value of this property is `NSFormattingUnitStyleMedium`. 36 | */ 37 | @property (nonatomic) NSFormattingUnitStyle unitStyle; 38 | 39 | /** 40 | Returns a coordinate string for the provided value. 41 | 42 | @param coordinate The coordinate’s value. 43 | @return The coordinate string appropriately formatted for the formatter’s 44 | locale. 45 | */ 46 | - (NSString *)stringFromCoordinate:(CLLocationCoordinate2D)coordinate; 47 | 48 | /** 49 | This method is not supported for the `MGLCoordinateFormatter` class. 50 | */ 51 | - (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error; 52 | 53 | @end 54 | 55 | NS_ASSUME_NONNULL_END 56 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLFeature.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLPolyline.h" 4 | #import "MGLPolygon.h" 5 | #import "MGLPointAnnotation.h" 6 | #import "MGLShapeCollection.h" 7 | 8 | #import "MGLTypes.h" 9 | 10 | NS_ASSUME_NONNULL_BEGIN 11 | 12 | /** 13 | The `MGLFeature` protocol is used to provide details about geographic features 14 | contained in a map view’s 15 | tile sources. 16 | Each concrete subclass of `MGLShape` in turn has a subclass that conforms to 17 | this protocol. 18 | 19 | Typically, you do not create feature objects yourself but rather obtain them 20 | using `-[MGLMapView visibleFeaturesAtPoint:]` and related methods. Each feature 21 | object associates a shape with an identifier and attributes as specified by the 22 | source. Like ordinary `MGLAnnotation` objects, some kinds of `MGLFeature` 23 | objects can also be added to a map view using `-[MGLMapView addAnnotations:]` 24 | and related methods. 25 | */ 26 | @protocol MGLFeature 27 | 28 | /** 29 | An object that uniquely identifies the feature in its containing 30 | tile source. 31 | 32 | The value of this property is currently always an `NSNumber` object but may in 33 | the future be an instance of another class, such as `NSString`. 34 | 35 | The identifier corresponds to the 36 | feature identifier 37 | (`id`) in the tile source. If the source does not specify the feature’s 38 | identifier, the value of this property is `nil`. 39 | 40 | For details about the identifiers used in most Mapbox-provided styles, consult 41 | the 42 | Mapbox Streets 43 | layer reference. 44 | */ 45 | @property (nonatomic, copy, nullable, readonly) id identifier; 46 | 47 | /** 48 | A dictionary of attributes for this feature specified by the 49 | tile source. 50 | 51 | The keys and values of this dictionary are determined by the tile source. In 52 | the tile source, each attribute name is a string, while each attribute value 53 | may be a null value, Boolean value, integer, floating-point number, or string. 54 | These data types are mapped to instances of the following Foundation classes: 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
In the tile sourceIn this dictionary
Null NSNull
Boolean NSNumber (use the boolValue property)
Integer NSNumber (use the unsignedLongLongValue or longLongValue property)
Floating-point number NSNumber (use the doubleValue property)
String NSString
68 | 69 | For details about the attribute names and values found in Mapbox-provided 70 | vector tile sources, consult the 71 | Mapbox Streets 72 | and 73 | Mapbox Terrain 74 | layer references. 75 | */ 76 | @property (nonatomic, copy, readonly) NS_DICTIONARY_OF(NSString *, id) *attributes; 77 | 78 | /** 79 | Returns the feature attribute for the given attribute name. 80 | 81 | See the `attributes` property’s documentation for details on keys and values 82 | associated with this method. 83 | */ 84 | - (nullable id)attributeForKey:(NSString *)key; 85 | 86 | @end 87 | 88 | /** 89 | The `MGLPointFeature` class represents a point in a 90 | tile source. 91 | */ 92 | @interface MGLPointFeature : MGLPointAnnotation 93 | @end 94 | 95 | /** 96 | The `MGLPolylineFeature` class represents a polyline in a 97 | tile source. 98 | */ 99 | @interface MGLPolylineFeature : MGLPolyline 100 | @end 101 | 102 | /** 103 | The `MGLPolygonFeature` class represents a polygon in a 104 | tile source. 105 | */ 106 | @interface MGLPolygonFeature : MGLPolygon 107 | @end 108 | 109 | /** 110 | The `MGLMultiPointFeature` class represents a multipoint in a 111 | tile source. 112 | */ 113 | @interface MGLMultiPointFeature : MGLMultiPoint 114 | @end 115 | 116 | /** 117 | The `MGLMultiPolylineFeature` class represents a multipolyline in a 118 | tile source. 119 | */ 120 | @interface MGLMultiPolylineFeature : MGLMultiPolyline 121 | @end 122 | 123 | /** 124 | The `MGLMultiPolygonFeature` class represents a multipolygon in a 125 | tile source. 126 | */ 127 | @interface MGLMultiPolygonFeature : MGLMultiPolygon 128 | @end 129 | 130 | /** 131 | The `MGLShapeCollectionFeature` class represents a shape collection in a 132 | tile source. 133 | */ 134 | @interface MGLShapeCollectionFeature : MGLShapeCollection 135 | @end 136 | 137 | NS_ASSUME_NONNULL_END 138 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLGeometry.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | #import "MGLTypes.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /** Defines the area spanned by an `MGLCoordinateBounds`. */ 10 | typedef struct MGLCoordinateSpan { 11 | /** Latitudes spanned by an `MGLCoordinateBounds`. */ 12 | CLLocationDegrees latitudeDelta; 13 | /** Longitudes spanned by an `MGLCoordinateBounds`. */ 14 | CLLocationDegrees longitudeDelta; 15 | } MGLCoordinateSpan; 16 | 17 | /** 18 | Creates a new `MGLCoordinateSpan` from the given latitudinal and longitudinal 19 | deltas. 20 | */ 21 | NS_INLINE MGLCoordinateSpan MGLCoordinateSpanMake(CLLocationDegrees latitudeDelta, CLLocationDegrees longitudeDelta) { 22 | MGLCoordinateSpan span; 23 | span.latitudeDelta = latitudeDelta; 24 | span.longitudeDelta = longitudeDelta; 25 | return span; 26 | } 27 | 28 | /** 29 | Returns `YES` if the two coordinate spans represent the same latitudinal change 30 | and the same longitudinal change. 31 | */ 32 | NS_INLINE BOOL MGLCoordinateSpanEqualToCoordinateSpan(MGLCoordinateSpan span1, MGLCoordinateSpan span2) { 33 | return (span1.latitudeDelta == span2.latitudeDelta && 34 | span1.longitudeDelta == span2.longitudeDelta); 35 | } 36 | 37 | /** An area of zero width and zero height. */ 38 | extern const MGLCoordinateSpan MGLCoordinateSpanZero; 39 | 40 | /** A rectangular area as measured on a two-dimensional map projection. */ 41 | typedef struct MGLCoordinateBounds { 42 | /** Coordinate at the southwest corner. */ 43 | CLLocationCoordinate2D sw; 44 | /** Coordinate at the northeast corner. */ 45 | CLLocationCoordinate2D ne; 46 | } MGLCoordinateBounds; 47 | 48 | /** 49 | Creates a new `MGLCoordinateBounds` structure from the given southwest and 50 | northeast coordinates. 51 | */ 52 | NS_INLINE MGLCoordinateBounds MGLCoordinateBoundsMake(CLLocationCoordinate2D sw, CLLocationCoordinate2D ne) { 53 | MGLCoordinateBounds bounds; 54 | bounds.sw = sw; 55 | bounds.ne = ne; 56 | return bounds; 57 | } 58 | 59 | /** Returns `YES` if the two coordinate bounds are equal to each other. */ 60 | NS_INLINE BOOL MGLCoordinateBoundsEqualToCoordinateBounds(MGLCoordinateBounds bounds1, MGLCoordinateBounds bounds2) { 61 | return (bounds1.sw.latitude == bounds2.sw.latitude && 62 | bounds1.sw.longitude == bounds2.sw.longitude && 63 | bounds1.ne.latitude == bounds2.ne.latitude && 64 | bounds1.ne.longitude == bounds2.ne.longitude); 65 | } 66 | 67 | /** Returns `YES` if the coordinate is within the coordinate bounds. */ 68 | NS_INLINE BOOL MGLCoordinateInCoordinateBounds(CLLocationCoordinate2D coordinate, MGLCoordinateBounds bounds) { 69 | return (coordinate.latitude >= bounds.sw.latitude && 70 | coordinate.latitude <= bounds.ne.latitude && 71 | coordinate.longitude >= bounds.sw.longitude && 72 | coordinate.longitude <= bounds.ne.longitude); 73 | } 74 | 75 | /** Returns the area spanned by the coordinate bounds. */ 76 | NS_INLINE MGLCoordinateSpan MGLCoordinateBoundsGetCoordinateSpan(MGLCoordinateBounds bounds) { 77 | return MGLCoordinateSpanMake(bounds.ne.latitude - bounds.sw.latitude, 78 | bounds.ne.longitude - bounds.sw.longitude); 79 | } 80 | 81 | /** 82 | Returns a coordinate bounds with southwest and northeast coordinates that are 83 | offset from those of the source bounds. 84 | */ 85 | NS_INLINE MGLCoordinateBounds MGLCoordinateBoundsOffset(MGLCoordinateBounds bounds, MGLCoordinateSpan offset) { 86 | MGLCoordinateBounds offsetBounds = bounds; 87 | offsetBounds.sw.latitude += offset.latitudeDelta; 88 | offsetBounds.sw.longitude += offset.longitudeDelta; 89 | offsetBounds.ne.latitude += offset.latitudeDelta; 90 | offsetBounds.ne.longitude += offset.longitudeDelta; 91 | return offsetBounds; 92 | } 93 | 94 | /** 95 | Returns `YES` if the coordinate bounds covers no area. 96 | 97 | @note A bounds may be empty but have a non-zero coordinate span (e.g., when its 98 | northeast point lies due north of its southwest point). 99 | */ 100 | NS_INLINE BOOL MGLCoordinateBoundsIsEmpty(MGLCoordinateBounds bounds) { 101 | MGLCoordinateSpan span = MGLCoordinateBoundsGetCoordinateSpan(bounds); 102 | return span.latitudeDelta == 0 || span.longitudeDelta == 0; 103 | } 104 | 105 | /** Returns a formatted string for the given coordinate bounds. */ 106 | NS_INLINE NSString *MGLStringFromCoordinateBounds(MGLCoordinateBounds bounds) { 107 | return [NSString stringWithFormat:@"{ sw = {%.1f, %.1f}, ne = {%.1f, %.1f}}", 108 | bounds.sw.latitude, bounds.sw.longitude, 109 | bounds.ne.latitude, bounds.ne.longitude]; 110 | } 111 | 112 | /** Returns radians, converted from degrees. */ 113 | NS_INLINE CGFloat MGLRadiansFromDegrees(CLLocationDegrees degrees) { 114 | return (CGFloat)(degrees * M_PI) / 180; 115 | } 116 | 117 | /** Returns degrees, converted from radians. */ 118 | NS_INLINE CLLocationDegrees MGLDegreesFromRadians(CGFloat radians) { 119 | return radians * 180 / M_PI; 120 | } 121 | 122 | /** 123 | Methods for round-tripping Mapbox geometry structure values. 124 | */ 125 | @interface NSValue (MGLGeometryAdditions) 126 | 127 | @end 128 | 129 | NS_ASSUME_NONNULL_END 130 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLMapCamera.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | #import "MGLTypes.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /** 10 | An `MGLMapCamera` object represents a viewpoint from which the user observes 11 | some point on an `MGLMapView`. 12 | */ 13 | @interface MGLMapCamera : NSObject 14 | 15 | /** Coordinate at the center of the map view. */ 16 | @property (nonatomic) CLLocationCoordinate2D centerCoordinate; 17 | 18 | /** Heading measured in degrees clockwise from true north. */ 19 | @property (nonatomic) CLLocationDirection heading; 20 | 21 | /** 22 | Pitch toward the horizon measured in degrees, with 0 degrees resulting in a 23 | two-dimensional map. 24 | */ 25 | @property (nonatomic) CGFloat pitch; 26 | 27 | /** Meters above ground level. */ 28 | @property (nonatomic) CLLocationDistance altitude; 29 | 30 | /** Returns a new camera with all properties set to 0. */ 31 | + (instancetype)camera; 32 | 33 | /** 34 | Returns a new camera using based on information about the camera’s viewpoint 35 | and focus point. 36 | 37 | @param centerCoordinate The geographic coordinate on which the map should be 38 | centered. 39 | @param eyeCoordinate The geometric coordinate at which the camera should be 40 | situated. 41 | @param eyeAltitude The altitude (measured in meters) above the map at which the 42 | camera should be situated. The altitude may be less than the distance from 43 | the camera’s viewpoint to the camera’s focus point. 44 | */ 45 | + (instancetype)cameraLookingAtCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate 46 | fromEyeCoordinate:(CLLocationCoordinate2D)eyeCoordinate 47 | eyeAltitude:(CLLocationDistance)eyeAltitude; 48 | 49 | /** 50 | Returns a new camera with the given distance, pitch, and heading. 51 | 52 | @param centerCoordinate The geographic coordinate on which the map should be 53 | centered. 54 | @param distance The straight-line distance from the viewpoint to the 55 | `centerCoordinate`. 56 | @param pitch The viewing angle of the camera, measured in degrees. A value of 57 | `0` results in a camera pointed straight down at the map. Angles greater 58 | than `0` result in a camera angled toward the horizon. 59 | @param heading The camera’s heading, measured in degrees clockwise from true 60 | north. A value of `0` means that the top edge of the map view corresponds to 61 | true north. The value `90` means the top of the map is pointing due east. 62 | The value `180` means the top of the map points due south, and so on. 63 | */ 64 | + (instancetype)cameraLookingAtCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate 65 | fromDistance:(CLLocationDistance)distance 66 | pitch:(CGFloat)pitch 67 | heading:(CLLocationDirection)heading; 68 | 69 | @end 70 | 71 | NS_ASSUME_NONNULL_END 72 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLMapView+IBAdditions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLTypes.h" 4 | 5 | @class MGLMapView; 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | @interface MGLMapView (IBAdditions) 10 | 11 | // Core properties that can be manipulated in the Attributes inspector in 12 | // Interface Builder. These redeclarations merely add the IBInspectable keyword. 13 | // They appear here to ensure that they appear above the convenience properties; 14 | // inspectables declared in MGLMapView.h are always sorted before those in 15 | // MGLMapView+IBAdditions.h, due to ASCII sort order. 16 | 17 | #if TARGET_INTERFACE_BUILDER 18 | 19 | // HACK: We want this property to look like a URL bar in the Attributes 20 | // inspector, but just calling it styleURL would violate Cocoa naming 21 | // conventions and conflict with the existing NSURL property. Fortunately, IB 22 | // strips out the two underscores for display. 23 | @property (nonatomic, nullable) IBInspectable NSString *styleURL__; 24 | 25 | #endif // TARGET_INTERFACE_BUILDER 26 | 27 | // Convenience properties related to the initial viewport. These properties 28 | // are not meant to be used outside of Interface Builder. latitude and longitude 29 | // are backed by properties of type CLLocationDegrees, but these declarations 30 | // must use the type double because Interface Builder is unaware that 31 | // CLLocationDegrees is a typedef for double. 32 | 33 | @property (nonatomic) IBInspectable double latitude; 34 | @property (nonatomic) IBInspectable double longitude; 35 | @property (nonatomic) IBInspectable double zoomLevel; 36 | 37 | // Renamed properties. Interface Builder derives the display name of each 38 | // inspectable from the runtime name, but runtime names don’t always make sense 39 | // in UI. 40 | 41 | @property (nonatomic) IBInspectable BOOL allowsZooming; 42 | @property (nonatomic) IBInspectable BOOL allowsScrolling; 43 | @property (nonatomic) IBInspectable BOOL allowsRotating; 44 | @property (nonatomic) IBInspectable BOOL allowsTilting; 45 | @property (nonatomic) IBInspectable BOOL showsUserLocation; 46 | 47 | @end 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLMapView+MGLCustomStyleLayerAdditions.h: -------------------------------------------------------------------------------- 1 | #import "MGLMapView.h" 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | typedef void (^MGLCustomStyleLayerPreparationHandler)(void); 6 | 7 | typedef void (^MGLCustomStyleLayerDrawingHandler)(CGSize size, 8 | CLLocationCoordinate2D centerCoordinate, 9 | double zoomLevel, 10 | CLLocationDirection direction, 11 | CGFloat pitch, 12 | CGFloat perspectiveSkew); 13 | 14 | typedef void (^MGLCustomStyleLayerCompletionHandler)(void); 15 | 16 | @interface MGLMapView (MGLCustomStyleLayerAdditions) 17 | 18 | - (void)insertCustomStyleLayerWithIdentifier:(NSString *)identifier preparationHandler:(MGLCustomStyleLayerPreparationHandler)preparation drawingHandler:(MGLCustomStyleLayerDrawingHandler)drawing completionHandler:(MGLCustomStyleLayerCompletionHandler)completion belowStyleLayerWithIdentifier:(nullable NSString *)otherIdentifier; 19 | 20 | - (void)removeCustomStyleLayerWithIdentifier:(NSString *)identifier; 21 | 22 | - (void)setCustomStyleLayersNeedDisplay; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLMultiPoint.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLShape.h" 5 | 6 | #import "MGLTypes.h" 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | /** 11 | The `MGLMultiPoint` class is an abstract superclass used to define shapes 12 | composed of multiple points. You should not create instances of this class 13 | directly. Instead, you should create instances of the `MGLPolyline` or 14 | `MGLPolygon` classes. However, you can use the method and properties of this 15 | class to access information about the specific points associated with the line 16 | or polygon. 17 | */ 18 | @interface MGLMultiPoint : MGLShape 19 | 20 | /** The array of coordinates associated with the shape. */ 21 | @property (nonatomic, readonly) CLLocationCoordinate2D *coordinates NS_RETURNS_INNER_POINTER; 22 | 23 | /** The number of coordinates associated with the shape. (read-only) */ 24 | @property (nonatomic, readonly) NSUInteger pointCount; 25 | 26 | /** 27 | Retrieves one or more coordinates associated with the shape. 28 | 29 | @param coords On input, you must provide a C array of structures large enough 30 | to hold the desired number of coordinates. On output, this structure 31 | contains the requested coordinate data. 32 | @param range The range of points you want. The `location` field indicates the 33 | first point you are requesting, with `0` being the first point, `1` being 34 | the second point, and so on. The `length` field indicates the number of 35 | points you want. The array in _`coords`_ must be large enough to accommodate 36 | the number of requested coordinates. 37 | */ 38 | - (void)getCoordinates:(CLLocationCoordinate2D *)coords range:(NSRange)range; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLOfflineRegion.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLTypes.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | /** 8 | An object conforming to the `MGLOfflineRegion` protocol determines which 9 | resources are required by an `MGLOfflinePack` object. At present, only 10 | instances of `MGLTilePyramidOfflineRegion` may be used as `MGLOfflinePack` 11 | regions, but additional conforming implementations may be added in the future. 12 | */ 13 | @protocol MGLOfflineRegion 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END 18 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLOverlay.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLAnnotation.h" 5 | #import "MGLGeometry.h" 6 | 7 | #import "MGLTypes.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /** 12 | The `MGLOverlay` protocol defines a specific type of annotation that represents 13 | both a point and an area on a map. Overlay objects are essentially data objects 14 | that contain the geographic data needed to represent the map area. For example, 15 | overlays can take the form of common shapes such as rectangles and circles. 16 | They can also describe polygons and other complex shapes. 17 | 18 | You use overlays to layer more sophisticated content on top of a map view. For 19 | example, you could use an overlay to show the boundaries of a national park or 20 | trace a bus route along city streets. This SDK defines several concrete classes 21 | that conform to this protocol and define standard shapes. 22 | 23 | Because overlays are also annotations, they have similar usage pattern to 24 | annotations. When added to a map view using the `-addOverlay:` method, that 25 | view detects whenever the overlay’s defined region intersects the visible 26 | portion of the map. At that point, the map view asks its delegate to provide a 27 | special overlay view to draw the visual representation of the overlay. If you 28 | add an overlay to a map view as an annotation instead, it is treated as an 29 | annotation with a single point. 30 | */ 31 | @protocol MGLOverlay 32 | 33 | /** 34 | The approximate center point of the overlay area. (required) (read-only) 35 | 36 | This point is typically set to the center point of the map’s bounding 37 | rectangle. It is used as the anchor point for any callouts displayed for the 38 | annotation. 39 | */ 40 | @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; 41 | 42 | /** 43 | The cooordinate rectangle that encompasses the overlay. (required) (read-only) 44 | 45 | This property contains the smallest rectangle that completely encompasses the 46 | overlay. Implementers of this protocol must set this area when implementing 47 | their overlay class, and after setting it, you must not change it. 48 | */ 49 | @property (nonatomic, readonly) MGLCoordinateBounds overlayBounds; 50 | 51 | /** 52 | Returns a Boolean indicating whether the specified rectangle intersects the 53 | receiver’s shape. 54 | 55 | You can implement this method to provide more specific bounds checking for an 56 | overlay. If you do not implement it, the bounding rectangle is used to detect 57 | intersections. 58 | 59 | @param overlayBounds The rectangle to intersect with the receiver’s area. 60 | @return `YES` if any part of the map rectangle intersects the receiver’s shape 61 | or `NO` if it does not. 62 | */ 63 | - (BOOL)intersectsOverlayBounds:(MGLCoordinateBounds)overlayBounds; 64 | 65 | @end 66 | 67 | NS_ASSUME_NONNULL_END 68 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLPointAnnotation.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLShape.h" 5 | 6 | #import "MGLTypes.h" 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | /** 11 | The `MGLPointAnnotation` class defines a concrete annotation object located at 12 | a specified point. You can use this class, rather than define your own, in 13 | situations where all you want to do is associate a point on the map with a 14 | title. 15 | */ 16 | @interface MGLPointAnnotation : MGLShape 17 | 18 | /** 19 | The coordinate point of the annotation, specified as a latitude and longitude. 20 | */ 21 | @property (nonatomic, assign) CLLocationCoordinate2D coordinate; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLPolygon.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLMultiPoint.h" 5 | #import "MGLOverlay.h" 6 | 7 | #import "MGLTypes.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /** 12 | The `MGLPolygon` class represents a shape consisting of one or more points that 13 | define a closed polygon. The points are connected end-to-end in the order they 14 | are provided. The first and last points are connected to each other to create 15 | the closed shape. 16 | */ 17 | @interface MGLPolygon : MGLMultiPoint 18 | 19 | /** 20 | The array of polygons nested inside the receiver. 21 | 22 | The area occupied by any interior polygons is excluded from the overall shape. 23 | Interior polygons should not overlap. An interior polygon should not have 24 | interior polygons of its own. 25 | 26 | If there are no interior polygons, the value of this property is `nil`. 27 | */ 28 | @property (nonatomic, nullable, readonly) NS_ARRAY_OF(MGLPolygon *) *interiorPolygons; 29 | 30 | /** 31 | Creates and returns an `MGLPolygon` object from the specified set of 32 | coordinates. 33 | 34 | @param coords The array of coordinates defining the shape. The data in this 35 | array is copied to the new object. 36 | @param count The number of items in the `coords` array. 37 | @return A new polygon object. 38 | */ 39 | + (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count; 40 | 41 | /** 42 | Creates and returns an `MGLPolygon` object from the specified set of 43 | coordinates and interior polygons. 44 | 45 | @param coords The array of coordinates defining the shape. The data in this 46 | array is copied to the new object. 47 | @param count The number of items in the `coords` array. 48 | @param interiorPolygons An array of `MGLPolygon` objects that define regions 49 | excluded from the overall shape. If this array is `nil` or empty, the shape 50 | is considered to have no interior polygons. 51 | @return A new polygon object. 52 | */ 53 | + (instancetype)polygonWithCoordinates:(CLLocationCoordinate2D *)coords count:(NSUInteger)count interiorPolygons:(nullable NS_ARRAY_OF(MGLPolygon *) *)interiorPolygons; 54 | 55 | @end 56 | 57 | /** 58 | The `MGLMultiPolygon` class represents a shape consisting of one or more 59 | polygons that do not overlap. For example, you would use an `MGLMultiPolygon` 60 | object to represent an atoll together with an island in the atoll’s lagoon: 61 | the atoll itself would be one `MGLPolygon` object, while the inner island would 62 | be another. 63 | 64 | @note `MGLMultiPolygon` objects cannot be added to a map view using 65 | `-[MGLMapView addAnnotations:]` and related methods. 66 | */ 67 | @interface MGLMultiPolygon : MGLShape 68 | 69 | /** 70 | An array of polygons forming the multipolygon. 71 | */ 72 | @property (nonatomic, copy, readonly) NS_ARRAY_OF(MGLPolygon *) *polygons; 73 | 74 | /** 75 | Creates and returns a multipolygon object consisting of the given polygons. 76 | 77 | @param polygons The array of polygons defining the shape. 78 | @return A new multipolygon object. 79 | */ 80 | + (instancetype)multiPolygonWithPolygons:(NS_ARRAY_OF(MGLPolygon *) *)polygons; 81 | 82 | @end 83 | 84 | NS_ASSUME_NONNULL_END 85 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLPolyline.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLMultiPoint.h" 5 | #import "MGLOverlay.h" 6 | 7 | #import "MGLTypes.h" 8 | 9 | NS_ASSUME_NONNULL_BEGIN 10 | 11 | /** 12 | The `MGLPolyline` class represents a shape consisting of one or more points 13 | that define connecting line segments. The points are connected end-to-end in 14 | the order they are provided. The first and last points are not connected to 15 | each other. 16 | */ 17 | @interface MGLPolyline : MGLMultiPoint 18 | 19 | /** 20 | Creates and returns an `MGLPolyline` object from the specified set of 21 | coordinates. 22 | 23 | @param coords The array of coordinates defining the shape. The data in this 24 | array is copied to the new object. 25 | @param count The number of items in the `coords` array. 26 | @return A new polyline object. 27 | */ 28 | + (instancetype)polylineWithCoordinates:(CLLocationCoordinate2D *)coords 29 | count:(NSUInteger)count; 30 | 31 | @end 32 | 33 | /** 34 | The `MGLMultiPolyline` class represents a shape consisting of one or more 35 | polylines. For example, you could use an `MGLMultiPolyline` object to represent 36 | both sides of a divided highway (dual carriageway), excluding the median 37 | (central reservation): each carriageway would be a distinct `MGLPolyline` 38 | object. 39 | 40 | @note `MGLMultiPolyline` objects cannot be added to a map view using 41 | `-[MGLMapView addAnnotations:]` and related methods. 42 | */ 43 | @interface MGLMultiPolyline : MGLShape 44 | 45 | /** 46 | An array of polygons forming the multipolyline. 47 | */ 48 | @property (nonatomic, copy, readonly) NS_ARRAY_OF(MGLPolyline *) *polylines; 49 | 50 | /** 51 | Creates and returns a multipolyline object consisting of the given polylines. 52 | 53 | @param polylines The array of polylines defining the shape. 54 | @return A new multipolyline object. 55 | */ 56 | + (instancetype)multiPolylineWithPolylines:(NS_ARRAY_OF(MGLPolyline *) *)polylines; 57 | 58 | @end 59 | 60 | NS_ASSUME_NONNULL_END 61 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLShape.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLAnnotation.h" 4 | 5 | #import "MGLTypes.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /** 10 | The `MGLShape` class is an abstract class that defines the basic properties for 11 | all shape-based annotation objects. This class must be subclassed and cannot be 12 | used as is. Subclasses are responsible for defining the geometry of the shape 13 | and providing an appropriate value for the coordinate property inherited from 14 | the `MGLAnnotation` protocol. 15 | */ 16 | @interface MGLShape : NSObject 17 | 18 | /** 19 | The title of the shape annotation. The default value of this property is `nil`. 20 | */ 21 | @property (nonatomic, copy, nullable) NSString *title; 22 | 23 | /** 24 | The subtitle of the shape annotation. The default value of this property is 25 | `nil`. 26 | */ 27 | @property (nonatomic, copy, nullable) NSString *subtitle; 28 | 29 | #if !TARGET_OS_IPHONE 30 | 31 | /** 32 | The tooltip of the shape annotation. The default value of this property is 33 | `nil`. 34 | */ 35 | @property (nonatomic, copy, nullable) NSString *toolTip; 36 | 37 | #endif 38 | 39 | @end 40 | 41 | NS_ASSUME_NONNULL_END 42 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLShapeCollection.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLShape.h" 4 | 5 | #import "MGLTypes.h" 6 | 7 | NS_ASSUME_NONNULL_BEGIN 8 | 9 | /** 10 | The `MGLShapeCollection` class represents a shape consisting of one or more 11 | distinct but related shapes that are instances of `MGLShape`. The constituent 12 | shapes can be a mixture of different kinds of shapes. 13 | 14 | @note `MGLShapeCollection` objects cannot be added to a map view using 15 | `-[MGLMapView addAnnotations:]` and related methods. 16 | */ 17 | @interface MGLShapeCollection : MGLShape 18 | 19 | /** 20 | An array of shapes forming the shape collection. 21 | */ 22 | @property (nonatomic, copy, readonly) NS_ARRAY_OF(MGLShape *) *shapes; 23 | 24 | /** 25 | Creates and returns a shape collection consisting of the given shapes. 26 | 27 | @param shapes The array of shapes defining the shape collection. The data in 28 | this array is copied to the new object. 29 | @return A new shape collection object. 30 | */ 31 | + (instancetype)shapeCollectionWithShapes:(NS_ARRAY_OF(MGLShape *) *)shapes; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLTilePyramidOfflineRegion.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLOfflineRegion.h" 4 | #import "MGLGeometry.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | /** 9 | An offline region defined by a style URL, geographic coordinate bounds, and 10 | range of zoom levels. 11 | */ 12 | @interface MGLTilePyramidOfflineRegion : NSObject 13 | 14 | /** 15 | URL of the style whose resources are required for offline viewing. 16 | 17 | In addition to the JSON stylesheet, different styles may require different font 18 | glyphs, sprite sheets, and other resources. 19 | 20 | The URL may be a full HTTP or HTTPS URL or a Mapbox URL indicating the style’s 21 | map ID (`mapbox://styles/{user}/{style}`). 22 | */ 23 | @property (nonatomic, readonly) NSURL *styleURL; 24 | 25 | /** 26 | The coordinate bounds for the geographic region covered by the downloaded 27 | tiles. 28 | */ 29 | @property (nonatomic, readonly) MGLCoordinateBounds bounds; 30 | 31 | /** 32 | The minimum zoom level for which to download tiles and other resources. 33 | 34 | For more information about zoom levels, `-[MGLMapView zoomLevel]`. 35 | */ 36 | @property (nonatomic, readonly) double minimumZoomLevel; 37 | 38 | /** 39 | The maximum zoom level for which to download tiles and other resources. 40 | 41 | For more information about zoom levels, `-[MGLMapView zoomLevel]`. 42 | */ 43 | @property (nonatomic, readonly) double maximumZoomLevel; 44 | 45 | - (instancetype)init NS_UNAVAILABLE; 46 | 47 | /** 48 | Initializes a newly created offline region with the given style URL, geographic 49 | coordinate bounds, and range of zoom levels. 50 | 51 | This is the designated initializer for `MGLTilePyramidOfflineRegion`. 52 | 53 | @param styleURL URL of the map style for which to download resources. The URL 54 | may be a full HTTP or HTTPS URL or a Mapbox URL indicating the style’s map 55 | ID (`mapbox://styles/{user}/{style}`). Specify `nil` for the default style. 56 | Relative file URLs cannot be used as offline style URLs. To download the 57 | online resources required by a local style, specify a URL to an online copy 58 | of the style. 59 | @param bounds The coordinate bounds for the geographic region to be covered by 60 | the downloaded tiles. 61 | @param minimumZoomLevel The minimum zoom level to be covered by the downloaded 62 | tiles. This parameter should be set to at least 0 but no greater than the 63 | value of the `maximumZoomLevel` parameter. For each required tile source, if 64 | this parameter is set to a value less than the tile source’s minimum zoom 65 | level, the download covers zoom levels down to the tile source’s minimum 66 | zoom level. 67 | @param maximumZoomLevel The maximum zoom level to be covered by the downloaded 68 | tiles. This parameter should be set to at least the value of the 69 | `minimumZoomLevel` parameter. For each required tile source, if this 70 | parameter is set to a value greater than the tile source’s minimum zoom 71 | level, the download covers zoom levels up to the tile source’s maximum zoom 72 | level. 73 | */ 74 | - (instancetype)initWithStyleURL:(nullable NSURL *)styleURL bounds:(MGLCoordinateBounds)bounds fromZoomLevel:(double)minimumZoomLevel toZoomLevel:(double)maximumZoomLevel NS_DESIGNATED_INITIALIZER; 75 | 76 | @end 77 | 78 | NS_ASSUME_NONNULL_END 79 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLTypes.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #pragma once 4 | 5 | #if !__has_feature(nullability) 6 | #define NS_ASSUME_NONNULL_BEGIN 7 | #define NS_ASSUME_NONNULL_END 8 | #define nullable 9 | #define nonnull 10 | #define null_resettable 11 | #define _Nullable 12 | #define _Nonnull 13 | #endif 14 | 15 | NS_ASSUME_NONNULL_BEGIN 16 | 17 | /** Indicates an error occurred in the Mapbox SDK. */ 18 | extern NSString * const MGLErrorDomain; 19 | 20 | /** Error constants for the Mapbox SDK. */ 21 | typedef NS_ENUM(NSInteger, MGLErrorCode) { 22 | /** An unknown error occurred. */ 23 | MGLErrorCodeUnknown = -1, 24 | /** The resource could not be found. */ 25 | MGLErrorCodeNotFound = 1, 26 | /** The connection received an invalid server response. */ 27 | MGLErrorCodeBadServerResponse = 2, 28 | /** An attempt to establish a connection failed. */ 29 | MGLErrorCodeConnectionFailed = 3, 30 | }; 31 | 32 | /** 33 | The mode used to track the user location on the map. Used with 34 | `MGLMapView.userTrackingMode`. 35 | */ 36 | typedef NS_ENUM(NSUInteger, MGLUserTrackingMode) { 37 | /** The map does not follow the user location. */ 38 | MGLUserTrackingModeNone = 0, 39 | /** The map follows the user location. */ 40 | MGLUserTrackingModeFollow, 41 | /** The map follows the user location and rotates when the heading changes. */ 42 | MGLUserTrackingModeFollowWithHeading, 43 | /** The map follows the user location and rotates when the course changes. */ 44 | MGLUserTrackingModeFollowWithCourse, 45 | }; 46 | 47 | NS_ASSUME_NONNULL_END 48 | 49 | #ifndef NS_ARRAY_OF 50 | // Foundation collection classes adopted lightweight generics in iOS 9.0 and OS X 10.11 SDKs. 51 | #if __has_feature(objc_generics) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100) 52 | /** Inserts a type specifier for a pointer to a lightweight generic with the given collection and object classes. Use a `*` for any non-`id` object classes but no `*` for the collection class. */ 53 | #define NS_ARRAY_OF(ObjectClass...) NSArray 54 | #define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray 55 | #define NS_SET_OF(ObjectClass...) NSSet 56 | #define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet 57 | #define NS_DICTIONARY_OF(ObjectClass...) NSDictionary 58 | #define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary 59 | #else 60 | #define NS_ARRAY_OF(ObjectClass...) NSArray 61 | #define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray 62 | #define NS_SET_OF(ObjectClass...) NSSet 63 | #define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet 64 | #define NS_DICTIONARY_OF(ObjectClass...) NSDictionary 65 | #define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/MGLUserLocation.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "MGLAnnotation.h" 5 | 6 | #import "MGLTypes.h" 7 | 8 | NS_ASSUME_NONNULL_BEGIN 9 | 10 | /** The MGLUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class directly. Instead, you retrieve an existing MGLUserLocation object from the userLocation property of the map view displayed in your application. */ 11 | @interface MGLUserLocation : NSObject 12 | 13 | #pragma mark Determining the User’s Position 14 | 15 | /** 16 | The current location of the device. (read-only) 17 | 18 | This property contains `nil` if the map view is not currently showing the user location or if the user’s location has not yet been determined. 19 | */ 20 | @property (nonatomic, readonly, nullable) CLLocation *location; 21 | 22 | /** A Boolean value indicating whether the user’s location is currently being updated. (read-only) */ 23 | @property (nonatomic, readonly, getter=isUpdating) BOOL updating; 24 | 25 | /** 26 | The heading of the user location. (read-only) 27 | 28 | This property is `nil` if the user location tracking mode is not `MGLUserTrackingModeFollowWithHeading`. 29 | */ 30 | @property (nonatomic, readonly, nullable) CLHeading *heading; 31 | 32 | #pragma mark Accessing the User Annotation Text 33 | 34 | /** The title to display for the user location annotation. */ 35 | @property (nonatomic, copy) NSString *title; 36 | 37 | /** The subtitle to display for the user location annotation. */ 38 | @property (nonatomic, copy, nullable) NSString *subtitle; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/Mapbox.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /// Project version number for Mapbox. 4 | FOUNDATION_EXPORT double MapboxVersionNumber; 5 | 6 | /// Project version string for Mapbox. 7 | FOUNDATION_EXPORT const unsigned char MapboxVersionString[]; 8 | 9 | #import "MGLAnnotationView.h" 10 | #import "MGLAccountManager.h" 11 | #import "MGLAnnotation.h" 12 | #import "MGLAnnotationImage.h" 13 | #import "MGLCalloutView.h" 14 | #import "MGLClockDirectionFormatter.h" 15 | #import "MGLCompassDirectionFormatter.h" 16 | #import "MGLCoordinateFormatter.h" 17 | #import "MGLFeature.h" 18 | #import "MGLGeometry.h" 19 | #import "MGLMapCamera.h" 20 | #import "MGLMapView.h" 21 | #import "MGLMapView+IBAdditions.h" 22 | #import "MGLMapView+MGLCustomStyleLayerAdditions.h" 23 | #import "MGLMapViewDelegate.h" 24 | #import "MGLMultiPoint.h" 25 | #import "MGLOfflinePack.h" 26 | #import "MGLOfflineRegion.h" 27 | #import "MGLOfflineStorage.h" 28 | #import "MGLOverlay.h" 29 | #import "MGLPointAnnotation.h" 30 | #import "MGLPolygon.h" 31 | #import "MGLPolyline.h" 32 | #import "MGLShape.h" 33 | #import "MGLShapeCollection.h" 34 | #import "MGLStyle.h" 35 | #import "MGLTilePyramidOfflineRegion.h" 36 | #import "MGLTypes.h" 37 | #import "MGLUserLocation.h" 38 | #import "NSValue+MGLAdditions.h" 39 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Headers/NSValue+MGLAdditions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLGeometry.h" 4 | #import "MGLOfflinePack.h" 5 | 6 | NS_ASSUME_NONNULL_BEGIN 7 | 8 | /** 9 | Methods for round-tripping values for Mapbox-defined types. 10 | */ 11 | @interface NSValue (MGLAdditions) 12 | 13 | #pragma mark Working with Geographic Coordinate Values 14 | 15 | /** 16 | Creates a new value object containing the specified Core Location geographic 17 | coordinate structure. 18 | 19 | @param coordinate The value for the new object. 20 | @return A new value object that contains the geographic coordinate information. 21 | */ 22 | + (instancetype)valueWithMGLCoordinate:(CLLocationCoordinate2D)coordinate; 23 | 24 | /** 25 | The Core Location geographic coordinate structure representation of the value. 26 | */ 27 | @property (readonly) CLLocationCoordinate2D MGLCoordinateValue; 28 | 29 | /** 30 | Creates a new value object containing the specified Mapbox coordinate span 31 | structure. 32 | 33 | @param span The value for the new object. 34 | @return A new value object that contains the coordinate span information. 35 | */ 36 | + (instancetype)valueWithMGLCoordinateSpan:(MGLCoordinateSpan)span; 37 | 38 | /** 39 | The Mapbox coordinate span structure representation of the value. 40 | */ 41 | @property (readonly) MGLCoordinateSpan MGLCoordinateSpanValue; 42 | 43 | /** 44 | Creates a new value object containing the specified Mapbox coordinate bounds 45 | structure. 46 | 47 | @param bounds The value for the new object. 48 | @return A new value object that contains the coordinate bounds information. 49 | */ 50 | + (instancetype)valueWithMGLCoordinateBounds:(MGLCoordinateBounds)bounds; 51 | 52 | /** 53 | The Mapbox coordinate bounds structure representation of the value. 54 | */ 55 | @property (readonly) MGLCoordinateBounds MGLCoordinateBoundsValue; 56 | 57 | #pragma mark Working with Offline Map Values 58 | 59 | /** 60 | Creates a new value object containing the given `MGLOfflinePackProgress` 61 | structure. 62 | 63 | @param progress The value for the new object. 64 | @return A new value object that contains the offline pack progress information. 65 | */ 66 | + (NSValue *)valueWithMGLOfflinePackProgress:(MGLOfflinePackProgress)progress; 67 | 68 | /** 69 | The `MGLOfflinePackProgress` structure representation of the value. 70 | */ 71 | @property (readonly) MGLOfflinePackProgress MGLOfflinePackProgressValue; 72 | 73 | @end 74 | 75 | NS_ASSUME_NONNULL_END 76 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/Info.plist -------------------------------------------------------------------------------- /ios/Mapbox.framework/Mapbox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/Mapbox -------------------------------------------------------------------------------- /ios/Mapbox.framework/Modules/module.modulemap: -------------------------------------------------------------------------------- 1 | framework module Mapbox { 2 | umbrella header "Mapbox.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/PrivateHeaders/NSData+MGLAdditions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "MGLTypes.h" 4 | 5 | NS_ASSUME_NONNULL_BEGIN 6 | 7 | @interface NSData (MGLAdditions) 8 | 9 | - (NSData *)mgl_compressedData; 10 | 11 | - (NSData *)mgl_decompressedData; 12 | 13 | @end 14 | 15 | NS_ASSUME_NONNULL_END 16 | -------------------------------------------------------------------------------- /ios/Mapbox.framework/api_mapbox_com-digicert.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/api_mapbox_com-digicert.der -------------------------------------------------------------------------------- /ios/Mapbox.framework/api_mapbox_com-geotrust.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/api_mapbox_com-geotrust.der -------------------------------------------------------------------------------- /ios/Mapbox.framework/default_marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/default_marker.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/default_marker@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/default_marker@2x.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/default_marker@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/default_marker@3x.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/en.lproj/Foundation.stringsdict: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/en.lproj/Foundation.stringsdict -------------------------------------------------------------------------------- /ios/Mapbox.framework/en.lproj/Localizable.stringsdict: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/en.lproj/Localizable.stringsdict -------------------------------------------------------------------------------- /ios/Mapbox.framework/mapbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/mapbox.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/mapbox@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/mapbox@2x.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/mapbox@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/mapbox@3x.png -------------------------------------------------------------------------------- /ios/Mapbox.framework/star_tilestream_net.der: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/Mapbox.framework/star_tilestream_net.der -------------------------------------------------------------------------------- /ios/Mapbox.framework/strip-frameworks.sh: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # 3 | # Copyright 2015 Realm Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | ################################################################################ 18 | 19 | # This script strips all non-valid architectures from dynamic libraries in 20 | # the application's `Frameworks` directory. 21 | # 22 | # The following environment variables are required: 23 | # 24 | # BUILT_PRODUCTS_DIR 25 | # FRAMEWORKS_FOLDER_PATH 26 | # VALID_ARCHS 27 | # EXPANDED_CODE_SIGN_IDENTITY 28 | 29 | 30 | # Signs a framework with the provided identity 31 | code_sign() { 32 | # Use the current code_sign_identitiy 33 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 34 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" 35 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 36 | } 37 | 38 | echo "Stripping frameworks" 39 | cd "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}" 40 | 41 | for file in $(find . -type f -perm +111); do 42 | # Skip non-dynamic libraries 43 | if ! [[ "$(file "$file")" == *"dynamically linked shared library"* ]]; then 44 | continue 45 | fi 46 | # Get architectures for current file 47 | archs="$(lipo -info "${file}" | rev | cut -d ':' -f1 | rev)" 48 | stripped="" 49 | for arch in $archs; do 50 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 51 | # Strip non-valid architectures in-place 52 | lipo -remove "$arch" -output "$file" "$file" || exit 1 53 | stripped="$stripped $arch" 54 | fi 55 | done 56 | if [[ "$stripped" != "" ]]; then 57 | echo "Stripped $file of architectures:$stripped" 58 | if [ "${CODE_SIGNING_REQUIRED}" == "YES" ]; then 59 | code_sign "${file}" 60 | fi 61 | fi 62 | done 63 | 64 | if [ "$ACTION" = "install" ]; then 65 | echo "Copy .bcsymbolmap files to .xcarchive" 66 | find . -name '*.bcsymbolmap' -type f -exec mv {} "${CONFIGURATION_BUILD_DIR}" \; 67 | else 68 | # Delete *.bcsymbolmap files from framework bundle unless archiving 69 | find . -name '*.bcsymbolmap' -type f -exec rm -rf "{}" +\; 70 | fi 71 | -------------------------------------------------------------------------------- /ios/main.jsbundle: -------------------------------------------------------------------------------- 1 | // Offline JS 2 | // To re-generate the offline bundle, run this from the root of your project: 3 | // 4 | // $ react-native bundle --minify 5 | // 6 | // See http://facebook.github.io/react-native/docs/runningondevice.html for more details. 7 | 8 | throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); 9 | -------------------------------------------------------------------------------- /ios/pocketguide/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | @interface AppDelegate : UIResponder 13 | 14 | @property (nonatomic, strong) UIWindow *window; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /ios/pocketguide/AppDelegate.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import "AppDelegate.h" 11 | 12 | #import "RCTBundleURLProvider.h" 13 | #import "RCTRootView.h" 14 | 15 | @implementation AppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 18 | { 19 | NSURL *jsCodeLocation; 20 | 21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; 22 | 23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation 24 | moduleName:@"pocketguide" 25 | initialProperties:nil 26 | launchOptions:launchOptions]; 27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; 28 | 29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 30 | UIViewController *rootViewController = [UIViewController new]; 31 | rootViewController.view = rootView; 32 | self.window.rootViewController = rootViewController; 33 | [self.window makeKeyAndVisible]; 34 | return YES; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ios/pocketguide/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/art_pin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "art_pin.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "art_pin-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "art_pin-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/art_pin.imageset/art_pin-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/art_pin.imageset/art_pin-1.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/art_pin.imageset/art_pin-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/art_pin.imageset/art_pin-2.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/art_pin.imageset/art_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/art_pin.imageset/art_pin.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/effigy_pin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "effigy_pin.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "effigy_pin-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "effigy_pin-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/effigy_pin.imageset/effigy_pin-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/effigy_pin.imageset/effigy_pin-1.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/effigy_pin.imageset/effigy_pin-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/effigy_pin.imageset/effigy_pin-2.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/effigy_pin.imageset/effigy_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/effigy_pin.imageset/effigy_pin.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-Small@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-Small@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "40x40", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-40@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-40@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "60x60", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-60@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-60@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "29x29", 41 | "idiom" : "ipad", 42 | "filename" : "Icon-Small.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "29x29", 47 | "idiom" : "ipad", 48 | "filename" : "Icon-Small@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "40x40", 53 | "idiom" : "ipad", 54 | "filename" : "Icon-40.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "40x40", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-40@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "76x76", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-76.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "76x76", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-76@2x.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "83.5x83.5", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-83.5@2x.png", 79 | "scale" : "2x" 80 | } 81 | ], 82 | "info" : { 83 | "version" : 1, 84 | "author" : "xcode" 85 | } 86 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-60.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon-60.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-60.imageset/Icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/Icon-60.imageset/Icon-60.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-72.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon-72.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon-72@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-72.imageset/Icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/Icon-72.imageset/Icon-72.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-72.imageset/Icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/Icon-72.imageset/Icon-72@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-Small-50.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon-Small-50.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon-Small-50@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-Small-50.imageset/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/Icon-Small-50.imageset/Icon-Small-50.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon-Small-50.imageset/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/Icon-Small-50.imageset/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "Icon.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "Icon@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon.imageset/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/Icon.imageset/Icon.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/Icon.imageset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/Icon.imageset/Icon@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/README.dataset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | }, 6 | "data" : [ 7 | { 8 | "idiom" : "universal", 9 | "filename" : "README.md" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/README.dataset/README.md: -------------------------------------------------------------------------------- 1 | ## iTunesArtwork & iTunesArtwork@2x (App Icon) file extension: 2 | 3 | PNG extension is prepended to these two files - 4 | 5 | While Apple suggested to omit the extension for these files, 6 | the '.png' extension is actually required for iTunesConnect submission. 7 | 8 | This is done for you so you don't have to. 9 | 10 | However, for Ad_hoc or Enterprise distirbution, the extension should be removed 11 | from the files before adding to XCode to avoid error. 12 | 13 | refs: https://developer.apple.com/library/ios/qa/qa1686/_index.html 14 | 15 | ## iTunesArtwork & iTunesArtwork@2x (App Icon) transparency handling: 16 | 17 | As images with alpha channels or transparencies cannot be set as an application's icon on 18 | iTunesConnect, all transparent pixels in your images will be converted into 19 | solid blacks. 20 | 21 | To achieve the best result, you're advised to adjust the transparency settings 22 | in your source files before converting them with makeAppIcon. 23 | 24 | refs: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/AppIcons.html 25 | -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/iTunesArtwork.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "iTunesArtwork.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "iTunesArtwork@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/iTunesArtwork.imageset/iTunesArtwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/iTunesArtwork.imageset/iTunesArtwork.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/ios/iTunesArtwork.imageset/iTunesArtwork@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/ios/iTunesArtwork.imageset/iTunesArtwork@2x.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/pin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "pin.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "pin-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "pin-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/pin.imageset/pin-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/pin.imageset/pin-1.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/pin.imageset/pin-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/pin.imageset/pin-2.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/pin.imageset/pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/pin.imageset/pin.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/temple_pin.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "temple_pin.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "temple_pin-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "temple_pin-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/temple_pin.imageset/temple_pin-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/temple_pin.imageset/temple_pin-1.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/temple_pin.imageset/temple_pin-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/temple_pin.imageset/temple_pin-2.png -------------------------------------------------------------------------------- /ios/pocketguide/Images.xcassets/temple_pin.imageset/temple_pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jayfunk/pocketguide/ee1b7e071733022a81658893f9e3834df7823f7e/ios/pocketguide/Images.xcassets/temple_pin.imageset/temple_pin.png -------------------------------------------------------------------------------- /ios/pocketguide/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ITSAppUsesNonExemptEncryption 6 | 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.2 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 3 25 | LSRequiresIPhoneOS 26 | 27 | NSAppTransportSecurity 28 | 29 | NSExceptionDomains 30 | 31 | localhost 32 | 33 | NSTemporaryExceptionAllowsInsecureHTTPLoads 34 | 35 | 36 | pocketguide-web-server.herokuapp.com 37 | 38 | NSTemporaryExceptionAllowsInsecureHTTPLoads 39 | 40 | 41 | 42 | 43 | NSLocationWhenInUseUsageDescription 44 | 45 | UILaunchStoryboardName 46 | LaunchScreen 47 | UIRequiredDeviceCapabilities 48 | 49 | armv7 50 | 51 | UISupportedInterfaceOrientations 52 | 53 | UIInterfaceOrientationPortrait 54 | UIInterfaceOrientationLandscapeLeft 55 | UIInterfaceOrientationLandscapeRight 56 | 57 | UIViewControllerBasedStatusBarAppearance 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /ios/pocketguide/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | 12 | #import "AppDelegate.h" 13 | 14 | int main(int argc, char * argv[]) { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ios/pocketguideTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios/pocketguideTests/pocketguideTests.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2015-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. An additional grant 7 | * of patent rights can be found in the PATENTS file in the same directory. 8 | */ 9 | 10 | #import 11 | #import 12 | 13 | #import "RCTLog.h" 14 | #import "RCTRootView.h" 15 | 16 | #define TIMEOUT_SECONDS 600 17 | #define TEXT_TO_LOOK_FOR @"Welcome to React Native!" 18 | 19 | @interface pocketguideTests : XCTestCase 20 | 21 | @end 22 | 23 | @implementation pocketguideTests 24 | 25 | - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test 26 | { 27 | if (test(view)) { 28 | return YES; 29 | } 30 | for (UIView *subview in [view subviews]) { 31 | if ([self findSubviewInView:subview matching:test]) { 32 | return YES; 33 | } 34 | } 35 | return NO; 36 | } 37 | 38 | - (void)testRendersWelcomeScreen 39 | { 40 | UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; 41 | NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; 42 | BOOL foundElement = NO; 43 | 44 | __block NSString *redboxError = nil; 45 | RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { 46 | if (level >= RCTLogLevelError) { 47 | redboxError = message; 48 | } 49 | }); 50 | 51 | while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { 52 | [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 53 | [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; 54 | 55 | foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { 56 | if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { 57 | return YES; 58 | } 59 | return NO; 60 | }]; 61 | } 62 | 63 | RCTSetLogFunction(RCTDefaultLogFunction); 64 | 65 | XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); 66 | XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); 67 | } 68 | 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "pocketguide", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "test": "mocha", 7 | "map-data:build": "node scripts/exportKMLToAnnotations.js", 8 | "android:build": "cd android && ./gradlew assembleRelease && cd ../", 9 | "android:install-release": "cd android && ./gradlew installRelease && cd ../", 10 | "android:clean": "cd android && ./gradlew clean && cd ../", 11 | "start": "react-native run-android", 12 | "react-native:reset": "react-native start --reset-cache" 13 | }, 14 | "dependencies": { 15 | "events": "^1.1.0", 16 | "react": "^15.3.1", 17 | "react-native": "^0.32.0", 18 | "react-native-mapbox-gl": "^5.0.0", 19 | "react-native-simple-store": "^1.1.0", 20 | "react-redux": "^4.4.5", 21 | "redux": "^3.5.2", 22 | "redux-logger": "^2.6.1", 23 | "redux-thunk": "^2.1.0" 24 | }, 25 | "devDependencies": { 26 | "babel-eslint": "^6.0.4", 27 | "babel-preset-react-native": "^1.9.0", 28 | "babel-register": "^6.9.0", 29 | "chai": "^3.5.0", 30 | "eslint": "^2.12.0", 31 | "jsdom": "^8.3.1", 32 | "mocha": "^2.5.3", 33 | "node-uuid": "^1.4.7", 34 | "sinon": "^1.17.5", 35 | "sinon-chai": "^2.8.0", 36 | "standard": "^5.4.1", 37 | "togeojson": "^0.13.0" 38 | }, 39 | "babel": { 40 | "presets": [ 41 | "react-native" 42 | ] 43 | }, 44 | "standard": { 45 | "parser": "babel-eslint", 46 | "globals": [ 47 | "describe", 48 | "it", 49 | "expect" 50 | ] 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | #The Burners Pocket Guide 2 | 3 | ##Getting Started 4 | 5 | ###Installation 6 | 7 | run through react-native setup steps 8 | 9 | ####Basics 10 | Clone the repo 11 | 12 | `npm install` 13 | 14 | React Native requires the basic setup explained at [React Native: Getting Started](https://facebook.github.io/react-native/docs/getting-started.html). 15 | 16 | After installing these dependencies there are two simple commands to get a React Native project all set up for development. 17 | 18 | `npm install -g react-native-cli` 19 | 20 | react-native-cli is a command line interface that does the rest of the set up. It’s installable via npm. This will install react-native as a command in your terminal. You only ever need to do this once. 21 | 22 | ###Android Startup 23 | 24 | Startup your android emulator by using something like `emulator @Nexus_5_API_23_x86`. Or ensure there is a device connected setup for debug. 25 | 26 | `cd ~/pocketguide` 27 | 28 | `react-native run-android` 29 | 30 | To see your changes you have to open the rage-shake-menu (either shake the device or press the menu button on devices, press F2 or Page Up for emulator, ⌘+M for Genymotion), and then press `Reload JS`. 31 | 32 | ####Troubleshooting 33 | `com.android.ddmlib.InstallException: Failed to establish session` 34 | 35 | Ensure the emulator you are using has Use Host GPU toggled in the emulator settings. 36 | 37 | 38 | ###IOS Startup 39 | 40 | `cd ~/pocketguide` 41 | 42 | `react-native run-ios` 43 | - or - 44 | Open /Users/jfunk/projects/pocketguide/ios/pocketguide.xcodeproj in Xcode 45 | 46 | Hit the Run button 47 | 48 | ###Annotations 49 | 50 | Generally annotations are exported from a google map or some other format. KML formatted annotations from google maps is the preferred starting format. Currently, annotations are broken up into different catagories for simplicity when managing. Once you have split all of the KML annotaitons into their separate categories KML file use the `npm run map-data:build` command to transform the KML annotations into `react-native-mapbox-gl` compatible annotations. You will need to manually configure the annotaitonImage for annotaitons of different types. 51 | 52 | ##License 53 | 54 | © 2016 [Tyler Cook](https://github.com/jayfunk) 55 | 56 | Contributors: [cmunoz3](https://github.com/cmunoz3) 57 | 58 | [MPL 2.0](https://www.mozilla.org/MPL/2.0/) (similar to the LGPL in terms of [copyleft](https://en.wikipedia.org/wiki/Copyleft) but more compatible with the App Store) 59 | -------------------------------------------------------------------------------- /scripts/exportKMLToAnnotations.js: -------------------------------------------------------------------------------- 1 | var tj = require('togeojson') 2 | var fs = require('fs') 3 | var jsdom = require('jsdom').jsdom 4 | var rootPath = './src/data/staticData/' 5 | var geoJSONToAnnotations = require('../src/data/transformers/geoJSONToAnnotations') 6 | 7 | var fileNames = [ 8 | 'art', 9 | 'landmarks', 10 | 'opencamping', 11 | 'roads', 12 | 'tcs' 13 | ] 14 | 15 | fileNames.forEach(function(fileName) { 16 | var kml = jsdom(fs.readFileSync(rootPath + 'kml/' + fileName + '.kml', 'utf8')); 17 | 18 | var geoJSON = tj.kml(kml, { styles: true }); 19 | fs.writeFileSync(rootPath + 'geoJSON/' + fileName + '.json', JSON.stringify(geoJSON, null, 2)) 20 | 21 | var annotations = geoJSONToAnnotations(geoJSON) 22 | fs.writeFileSync(rootPath + 'annotations/' + fileName + '.json', JSON.stringify(annotations, null, 2)) 23 | }) 24 | -------------------------------------------------------------------------------- /src/RootView.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {View, Navigator, BackAndroid, StyleSheet} from 'react-native' 3 | import {loadData} from './actionCreators' 4 | import {connect} from 'react-redux' 5 | import appRoutes from './appRoutes' 6 | import NavBar from './nav/NavBar' 7 | import TabBar from './tabs/TabBar' 8 | import {NAV_BAR_SIZE} from './styles/StyleConstants' 9 | import {CONTENT_BACKGROUND} from './styles/ColorConstants' 10 | 11 | const styles = StyleSheet.create({ 12 | view: { 13 | flex: 1, 14 | backgroundColor: CONTENT_BACKGROUND 15 | }, 16 | routeView: { 17 | marginTop: NAV_BAR_SIZE 18 | } 19 | }) 20 | 21 | const RootView = React.createClass({ 22 | propTypes: { 23 | loadData: PropTypes.func.isRequired, 24 | changeActiveTab: PropTypes.func.isRequired 25 | }, 26 | 27 | componentWillMount () { 28 | this.props.loadData() 29 | }, 30 | 31 | componentDidMount () { 32 | BackAndroid.addEventListener('hardwareBackPress', () => { 33 | if (this.navigator && this.navigator.getCurrentRoutes().length > 1) { 34 | this.navigator.pop() 35 | return true 36 | } 37 | return false 38 | }) 39 | }, 40 | 41 | render () { 42 | return ( 43 | 44 | { 46 | if (route.name === 'Event') { 47 | return Navigator.SceneConfigs.HorizontalSwipeJump 48 | } 49 | return Navigator.SceneConfigs.HorizontalSwipeJumpFromRight 50 | }} 51 | sceneStyle={styles.routeView} 52 | initialRoute = {appRoutes.events} 53 | renderScene = {(route, navigator) => { 54 | this._storeNavigatorInstance(navigator) 55 | 56 | if (route.component) { 57 | return 61 | } 62 | }} 63 | navigationBar = {} 64 | onDidFocus={this._setTabState} 65 | /> 66 | 70 | 71 | ) 72 | }, 73 | 74 | _setTabState (route) { 75 | this.props.changeActiveTab(route.name) 76 | }, 77 | 78 | onTabChange (route) { 79 | const [first, second, third] = this.navigator.getCurrentRoutes() 80 | if (first && second && third && first.name === 'Events' && second.name === 'Event' && third.name === 'Map') { 81 | this.navigator.pop() 82 | } else { 83 | this.navigator.resetTo(route) 84 | } 85 | }, 86 | 87 | _storeNavigatorInstance (navigator) { 88 | this.navigator = navigator 89 | } 90 | }) 91 | 92 | function mapDispatchToProps (dispatch, props) { 93 | return { 94 | loadData: () => { 95 | dispatch(loadData()) 96 | }, 97 | changeActiveTab: (name) => { 98 | dispatch({ 99 | type: 'tabs:active:update', 100 | activeTab: name 101 | }) 102 | } 103 | } 104 | } 105 | 106 | export default connect(null, mapDispatchToProps)(RootView) 107 | -------------------------------------------------------------------------------- /src/RootViewContainer.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {createStore, applyMiddleware} from 'redux' 3 | import {Provider} from 'react-redux' 4 | import thunk from 'redux-thunk' 5 | import RootView from './RootView' 6 | import reducers from './reducers' 7 | import createLogger from 'redux-logger' 8 | import {NetInfo} from 'react-native' 9 | import store from 'react-native-simple-store' 10 | 11 | const logger = createLogger() 12 | 13 | export default React.createClass({ 14 | getInitialState () { 15 | return { 16 | store: createStore( 17 | reducers, 18 | applyMiddleware( 19 | thunk.withExtraArgument({netInfo: NetInfo, diskStore: store}), 20 | logger 21 | ) 22 | ) 23 | } 24 | }, 25 | 26 | render () { 27 | return ( 28 | 29 | 30 | 31 | ) 32 | } 33 | }) 34 | -------------------------------------------------------------------------------- /src/actionCreators.js: -------------------------------------------------------------------------------- 1 | // android emulator url: 2 | // const URL = 'http://10.0.2.2:3000/api/mobile' 3 | 4 | // genymotion emulator url: 5 | // const URL = 'http://10.0.3.2:3000/api/mobile' 6 | 7 | // ios local url: 8 | // const URL = 'http://localhost:3000/api/mobile' 9 | 10 | // heroku url: 11 | const URL = 'http://pocketguide-web-server.herokuapp.com/api/mobile' 12 | 13 | const LAST_DATA = 'LAST_DATA' 14 | const LAST_MODIFIED = 'LAST_MODIFIED' 15 | 16 | export function loadData () { 17 | return (dispatch, getState, {netInfo, diskStore}) => { 18 | dispatch({ 19 | type: 'data:load' 20 | }) 21 | 22 | netInfo.addEventListener('change', isConnected => { 23 | if (!isConnected) return loadFromDisk(dispatch, diskStore) 24 | 25 | return diskStore.get(LAST_MODIFIED).then(lastModified => { 26 | return fetchData(dispatch, diskStore, lastModified) 27 | }).catch(error => { 28 | dispatch({ 29 | type: 'data:load:error', 30 | errorMessage: `Unable to load data from disk. ${error}` 31 | }) 32 | }) 33 | }) 34 | } 35 | } 36 | 37 | function loadFromDisk (dispatch, diskStore) { 38 | return diskStore 39 | .get(LAST_DATA) 40 | .then(data => { 41 | loadComplete(dispatch, data) 42 | }) 43 | .catch(error => { 44 | dispatch({ 45 | type: 'data:load:error', 46 | errorMessage: `Unable to load data from disk. ${error}` 47 | }) 48 | }) 49 | } 50 | 51 | function loadComplete (dispatch, data) { 52 | dispatch({ 53 | type: 'data:load:complete', 54 | events: data.events 55 | }) 56 | } 57 | 58 | function fetchData (dispatch, diskStore, lastModified) { 59 | return fetch(URL, { 60 | timeout: 10000, 61 | headers: getHeaders(lastModified) 62 | }).then(response => { 63 | const status = response.status 64 | if (response.ok) { 65 | return response.json() 66 | } else if (status === 304) { 67 | loadFromDisk(dispatch, diskStore) 68 | } else { 69 | dispatch({ 70 | type: 'data:load:error', 71 | errorMessage: `Unable to load data from server. Unknown server response: ${response.status}` 72 | }) 73 | } 74 | }).then(data => { 75 | if (data) { 76 | writeToDisk(data, diskStore) 77 | loadComplete(dispatch, data) 78 | } 79 | }).catch(error => { 80 | console.error(error) 81 | return loadFromDisk(dispatch, diskStore) 82 | }) 83 | } 84 | 85 | function getHeaders (lastModified) { 86 | if (lastModified === null) return {} 87 | return { 88 | 'Last-Modified': lastModified 89 | } 90 | } 91 | 92 | function writeToDisk (data, diskStore) { 93 | diskStore.save(LAST_DATA, data) 94 | diskStore.save(LAST_MODIFIED, Date.now()) 95 | } 96 | -------------------------------------------------------------------------------- /src/appRoutes.js: -------------------------------------------------------------------------------- 1 | import EventsContainerView from './events/components/EventsContainerView' 2 | import EventView from './events/components/EventView' 3 | import MapView from './map/MapView' 4 | import PrinciplesView from './principles/PrinciplesView' 5 | 6 | const routes = { 7 | events: { 8 | name: 'Events', 9 | activeImage: require('../images/tab/Events_Active.png'), 10 | inactiveImage: require('../images/tab/Events_Inactive.png'), 11 | component: EventsContainerView 12 | }, 13 | event: { 14 | name: 'Event', 15 | activeImage: require('../images/tab/Events_Active.png'), 16 | inactiveImage: require('../images/tab/Events_Inactive.png'), 17 | component: EventView 18 | }, 19 | map: { 20 | name: 'Map', 21 | activeImage: require('../images/tab/Map_Active.png'), 22 | inactiveImage: require('../images/tab/Map_Inactive.png'), 23 | component: MapView 24 | }, 25 | principles: { 26 | name: 'Principles', 27 | activeImage: require('../images/tab/Principles_Active.png'), 28 | inactiveImage: require('../images/tab/Principles_Inactive.png'), 29 | component: PrinciplesView 30 | } 31 | } 32 | 33 | export const createRoute = (eventName, props) => { 34 | return Object.assign({}, routes[eventName], { props }) 35 | } 36 | 37 | export default routes 38 | -------------------------------------------------------------------------------- /src/data/staticData/kml/roads.kml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Roads 5 | 6 | Boulevard 1 7 | 8 | #line-E65100-8-nodesc 9 | 10 | 1 11 | -85.2693812,33.4820173,0.0 -85.2693679,33.4819244,0.0 -85.2691573,33.4816817,0.0 -85.2690232,33.4815609,0.0 -85.2689454,33.4814155,0.0 -85.2689213,33.4813215,0.0 -85.2688998,33.4811806,0.0 -85.2689213,33.4810709,0.0 -85.26905,33.4809188,0.0 -85.2691573,33.4807756,0.0 -85.2692673,33.4806548,0.0 -85.2693397,33.4805497,0.0 -85.2694014,33.480411,0.0 -85.2694094,33.4802611,0.0 -85.2693719,33.4801067,0.0 -85.269282,33.4799054,0.0 -85.2691694,33.4797353,0.0 -85.2690611,33.4796288,0.0 -85.2689286,33.4795424,0.0 -85.2686423,33.4794501,0.0 12 | 13 | 14 | 15 | Boulevard 2 16 | 17 | #line-E65100-7-nodesc 18 | 19 | 1 20 | -85.2706043,33.4790329,0.0 -85.2705306,33.479185,0.0 -85.2704474,33.4792756,0.0 -85.2702329,33.4794132,0.0 -85.2701014,33.4794814,0.0 -85.2698882,33.4795698,0.0 -85.2697809,33.4796526,0.0 -85.2696803,33.4797588,0.0 -85.2695476,33.479892,0.0 -85.2693558,33.4800597,0.0 21 | 22 | 23 | 24 | Boulevard 3 25 | 26 | #line-E65100-8-nodesc 27 | 28 | 1 29 | -85.2693491,33.4805508,0.0 -85.2693839,33.4806605,0.0 -85.2695301,33.4807533,0.0 -85.2696911,33.4807219,0.0 -85.2697715,33.4807756,0.0 -85.2697635,33.4808562,0.0 -85.2697742,33.4809166,0.0 -85.2698976,33.4810486,0.0 -85.2699646,33.4811179,0.0 -85.2700424,33.4812052,0.0 -85.2702141,33.4813528,0.0 -85.2703992,33.4814826,0.0 -85.2705681,33.48159,0.0 -85.270721,33.4816884,0.0 -85.2709034,33.4818002,0.0 -85.2711073,33.4819367,0.0 30 | 31 | 32 | 33 | 34 | #line-E65100-10-nodesc 35 | 36 | 1 37 | -85.2693839,33.4806605,0.0 -85.2692498,33.4806806,0.0 38 | 39 | 40 | 41 | 42 | #line-E65100-8-nodesc 43 | 44 | 1 45 | -85.2695301,33.4807533,0.0 -85.2695194,33.480845,0.0 -85.269561,33.4808886,0.0 -85.2696548,33.4809143,0.0 -85.2697219,33.4809076,0.0 -85.2697742,33.4809166,0.0 46 | 47 | 48 | 49 | Boulevard 4 50 | 51 | #line-E65100-8-nodesc 52 | 53 | 1 54 | -85.2688931,33.4812029,0.0 -85.2679637,33.4819467,0.0 55 | 56 | 57 | 58 | Timmy Lane 59 | 60 | #line-E65100-10-nodesc 61 | 62 | 1 63 | -85.2691613,33.4816917,0.0 -85.2690621,33.4817902,0.0 -85.2690406,33.4819009,0.0 -85.2690567,33.4819815,0.0 -85.2691358,33.4821224,0.0 -85.2694188,33.4823741,0.0 -85.2694872,33.4825105,0.0 64 | 65 | 66 | 67 | 68 | #line-E65100-11-nodesc 69 | 70 | 1 71 | -85.2689132,33.4813394,0.0 -85.2687724,33.481308,0.0 72 | 73 | 74 | 75 | Exit road 76 | 77 | #line-FFEA00-5-nodesc 78 | 79 | 1 80 | -85.268653,33.4794155,0.0 -85.268653,33.4791783,0.0 -85.2686825,33.4784489,0.0 -85.2690312,33.4783796,0.0 -85.2691733,33.4783841,0.0 -85.2693986,33.4783818,0.0 -85.2697313,33.4783818,0.0 -85.2702758,33.4783707,0.0 -85.2704743,33.4783707,0.0 -85.270717,33.4783785,0.0 -85.2710375,33.4783886,0.0 -85.2711448,33.4783819,0.0 -85.2711823,33.4783685,0.0 81 | 82 | 83 | 84 | path 85 | 86 | #line-FFCC80-4-nodesc 87 | 88 | 1 89 | -85.2691144,33.4816414,0.0 -85.2699995,33.4811649,0.0 90 | 91 | 92 | 93 | path 94 | #line-FBC02D-5-nodesc 95 | 96 | 1 97 | -85.267843,33.4821626,0.0 -85.2681099,33.4823708,0.0 98 | 99 | 100 | 101 | path 102 | #line-FBC02D-5-nodesc 103 | 104 | 1 105 | -85.267906,33.482119,0.0 -85.2677397,33.4822902,0.0 106 | 107 | 108 | 109 | path 110 | #line-FBC02D-5-nodesc 111 | 112 | 1 113 | -85.2679758,33.4818898,0.0 -85.267725,33.4816996,0.0 114 | 115 | 116 | 117 | path 118 | 119 | #line-FBC02D-3-nodesc 120 | 121 | 1 122 | -85.2694014,33.4803573,0.0 -85.2691975,33.4803293,0.0 123 | 124 | 125 | 126 | -------------------------------------------------------------------------------- /src/data/staticData/staticMapAnnotations.js: -------------------------------------------------------------------------------- 1 | import art from './annotations/art.json' 2 | import landmarks from './annotations/landmarks.json' 3 | import opencamping from './annotations/opencamping.json' 4 | import roads from './annotations/roads.json' 5 | import tcs from './annotations/tcs.json' 6 | 7 | const allMapAnnotations = [] 8 | 9 | export default allMapAnnotations.concat( 10 | art, 11 | landmarks, 12 | opencamping, 13 | roads, 14 | tcs 15 | ) 16 | -------------------------------------------------------------------------------- /src/data/transformers/__tests__/geoJsonToAnnotations.spec.js: -------------------------------------------------------------------------------- 1 | var geoJSONToAnnotations = require('../geoJSONToAnnotations') 2 | 3 | describe('geoJSONToAnnotations', () => { 4 | it('should transform geo json point feature to annotation point', () => { 5 | var geoJson = { 6 | features: [{ 7 | type: 'Feature', 8 | properties: { 9 | name: 'Rangers', 10 | styleUrl: '#icon-503-DB4436-nodesc', 11 | styleHash: '-3b37c65d', 12 | title: 'Rangers', 13 | description: 'We are awesome!', 14 | 'marker-color': '', 15 | 'marker-size': '', 16 | 'marker-symbol': 'danger' 17 | }, 18 | geometry: { 19 | coordinates: [ 20 | -83.33864, 21 | 33.377138, 22 | 0 23 | ], 24 | type: 'Point' 25 | }, 26 | id: '175f34b700d3df7ab7d17235274b79e6' 27 | }] 28 | } 29 | 30 | var expected = [{ 31 | id: '175f34b700d3df7ab7d17235274b79e6', 32 | coordinates: [33.377138, -83.33864], 33 | type: 'point', 34 | title: 'Rangers', 35 | subtitle: 'We are awesome!', 36 | annotationImage: { 37 | url: '', 38 | height: 30, 39 | width: 70 40 | } 41 | }] 42 | 43 | var actual = geoJSONToAnnotations(geoJson) 44 | expect(actual).to.eql(expected); 45 | }) 46 | 47 | it('should transform geo json line string feature to annotation polyline', () => { 48 | var geoJson = { 49 | features: [{ 50 | type: 'Feature', 51 | properties: { 52 | name: 'Hearth Camp', 53 | title: 'Hearth Camp', 54 | description: '', 55 | 'marker-color': '', 56 | 'marker-size': '', 57 | 'marker-symbol': '', 58 | stroke: '#e7857f', 59 | 'stroke-width': 4, 60 | 'stroke-opacity': 1, 61 | fill: '#e7857f', 62 | 'fill-opacity': 0.20000000298023224 63 | }, 64 | geometry: { 65 | coordinates: [ 66 | [ 67 | [-83.338815, 33.377057, 0], 68 | [-83.339329, 33.377106, 0], 69 | [-83.33905, 33.376638, 0], 70 | [-83.33864, 33.376785, 0], 71 | [-83.338815, 33.377057, 0] 72 | ] 73 | ], 74 | type: 'Polygon' 75 | }, 76 | id: '621705c016fcebf3855df695ca03b973' 77 | }] 78 | } 79 | 80 | var expected = [{ 81 | coordinates: [ 82 | [33.377057, -83.338815], 83 | [33.377106, -83.339329], 84 | [33.376638, -83.33905], 85 | [33.376785, -83.33864], 86 | [33.377057, -83.338815] 87 | ], 88 | title: 'Hearth Camp', 89 | subtitle: '', 90 | type: 'polygon', 91 | strokeColor: '#e7857f', 92 | strokeWidth: 5, 93 | strokeAlpha: 0.5, 94 | fillColor: '#0E3453', 95 | fillAlpha: 0.5, 96 | id: '621705c016fcebf3855df695ca03b973' 97 | }] 98 | 99 | var actual = geoJSONToAnnotations(geoJson) 100 | expect(actual).to.eql(expected) 101 | }) 102 | 103 | it('should transform geo json polygon feature to annotation polygon', () => { 104 | var geoJson = { 105 | features: [{ 106 | type: 'Feature', 107 | properties: { 108 | name: 'Hearth Camp', 109 | title: 'Hearth Camp', 110 | description: '', 111 | 'marker-color': '', 112 | 'marker-size': '', 113 | 'marker-symbol': '', 114 | stroke: '#e7857f', 115 | 'stroke-width': 4, 116 | 'stroke-opacity': 1, 117 | fill: '#e7857f', 118 | 'fill-opacity': 0.20000000298023224 119 | }, 120 | geometry: { 121 | coordinates: [ 122 | [ 123 | [-83.338815, 33.377057, 0], 124 | [-83.339329, 33.377106, 0], 125 | [-83.33905, 33.376638, 0], 126 | [-83.33864, 33.376785, 0], 127 | [-83.338815, 33.377057, 0] 128 | ] 129 | ], 130 | type: 'Polygon' 131 | }, 132 | id: '621705c016fcebf3855df695ca03b973' 133 | }] 134 | } 135 | 136 | var expected = [{ 137 | coordinates: [ 138 | [33.377057, -83.338815], 139 | [33.377106, -83.339329], 140 | [33.376638, -83.33905], 141 | [33.376785, -83.33864], 142 | [33.377057, -83.338815] 143 | ], 144 | title: 'Hearth Camp', 145 | subtitle: '', 146 | type: 'polygon', 147 | strokeColor: '#e7857f', 148 | strokeWidth: 5, 149 | strokeAlpha: .5, 150 | fillColor: '#0E3453', 151 | fillAlpha: 0.5, 152 | id: '621705c016fcebf3855df695ca03b973' 153 | }] 154 | 155 | var actual = geoJSONToAnnotations(geoJson) 156 | 157 | expect(actual).to.eql(expected) 158 | }) 159 | }) 160 | -------------------------------------------------------------------------------- /src/data/transformers/geoJSONToAnnotations.js: -------------------------------------------------------------------------------- 1 | var uuid = require('node-uuid') 2 | 3 | function geoJSONToAnnotations (geoJSON) { 4 | if (!geoJSON || !geoJSON.features) throw new Error('Invalid GeoJSON data.') 5 | return geoJSON.features.map(function (feature) { 6 | return convert(feature) 7 | }) 8 | } 9 | 10 | function convert (feature) { 11 | switch (feature.geometry.type.toLowerCase()) { 12 | case 'point': return convertPoint(feature) 13 | case 'linestring': return convertLineString(feature) 14 | case 'polygon': return convertPolygon(feature) 15 | } 16 | } 17 | 18 | function convertPoint (feature) { 19 | var properties = feature.properties 20 | return { 21 | id: feature.id ? feature.id : uuid.v4(), 22 | coordinates: convertCoordinate(feature.geometry.coordinates), 23 | type: 'point', 24 | title: properties.name, 25 | subtitle: properties.description, 26 | annotationImage: { 27 | source: {uri: 'pin'}, 28 | height: 70, 29 | width: 30 30 | } 31 | } 32 | } 33 | 34 | function convertCoordinate (coordinate) { 35 | return coordinate.slice(0, -1).reverse() 36 | } 37 | 38 | function convertLineString (feature) { 39 | var properties = feature.properties 40 | return { 41 | id: feature.id ? feature.id : uuid.v4(), 42 | coordinates: convertLineStringCoordinates(feature), 43 | type: 'polyline', 44 | title: properties.title, 45 | subtitle: properties.description, 46 | strokeColor: '#000000', 47 | strokeWidth: 5, 48 | strokeAlpha: 0.5 49 | } 50 | } 51 | 52 | function convertLineStringCoordinates (feature) { 53 | return feature.geometry.coordinates.map(function (coordinate) { 54 | return convertCoordinate(coordinate) 55 | }) 56 | } 57 | 58 | function convertPolygon (feature) { 59 | var properties = feature.properties 60 | return { 61 | id: feature.id ? feature.id : uuid.v4(), 62 | coordinates: convertPolygonCoordinates(feature), 63 | type: 'polygon', 64 | title: properties.title, 65 | subtitle: properties.description, 66 | strokeColor: properties.stroke, 67 | strokeWidth: 5, 68 | strokeAlpha: 0.5, 69 | fillColor: '#0E3453', 70 | fillAlpha: 0.5 71 | } 72 | } 73 | 74 | function convertPolygonCoordinates (feature) { 75 | return feature.geometry.coordinates.pop().map(function (coordinate) { 76 | return convertCoordinate(coordinate) 77 | }) 78 | } 79 | 80 | module.exports = geoJSONToAnnotations 81 | -------------------------------------------------------------------------------- /src/events/__tests__/eventsReducer.spec.js: -------------------------------------------------------------------------------- 1 | import reducer from '../eventsReducer' 2 | 3 | describe('eventsReducer', () => { 4 | it('should set initial state', () => { 5 | const actual = reducer() 6 | 7 | expect(actual).to.eql({ 8 | events: [], 9 | isLoading: false, 10 | filter: null, 11 | sort: 'ASC', 12 | selectedEvent: null, 13 | errorMessage: null 14 | }) 15 | }) 16 | 17 | it('should handle data:load', () => { 18 | const actual = reducer(reducer(), { 19 | type: 'data:load' 20 | }) 21 | 22 | expect(actual.isLoading).to.be.true 23 | }) 24 | 25 | it('should handle data:load:complete', () => { 26 | const state = { 27 | events: [], 28 | isLoading: true, 29 | filter: null, 30 | sort: 'ASC', 31 | selectedEvent: null, 32 | errorMessage: null 33 | } 34 | 35 | const event = { 36 | id: 1, 37 | name: 'D20 Adventuring', 38 | startTime: '5:11:00 PM', 39 | endTime: '7:11:00 PM', 40 | dateOfEvent: '4/29/2016', 41 | location: 'Margaritaville: D20', 42 | description: 'Come for a silly adventure as our fates are controlled by a giant inflatable D20 as master minded by a Wagon Drunk Christine.', 43 | shortDescription: 'Come for a silly adventure as our fates are controlled by a giant infl...', 44 | coordinates: [33.376888, -83.336285], 45 | latitude: 33.376888, 46 | longitude: -83.336285, 47 | hasCoordinates: true, 48 | intendedAges: 'All Ages', 49 | themeCampName: 'Margaritaville:D20' 50 | } 51 | 52 | const actual = reducer(state, { 53 | type: 'data:load:complete', 54 | events: [event] 55 | }) 56 | 57 | expect(actual).to.eql({ 58 | events: [event], 59 | isLoading: false, 60 | filter: null, 61 | sort: 'ASC', 62 | selectedEvent: null, 63 | errorMessage: null 64 | }) 65 | }) 66 | 67 | it('should handle data:load:error', () => { 68 | const state = { 69 | events: [], 70 | isLoading: true, 71 | filter: null, 72 | sort: 'ASC', 73 | selectedEvent: null, 74 | errorMessage: null 75 | } 76 | 77 | const actual = reducer(state, { 78 | type: 'data:load:error', 79 | errorMessage: 'Thing didnt load' 80 | }) 81 | 82 | expect(actual).to.eql({ 83 | events: [], 84 | isLoading: false, 85 | filter: null, 86 | sort: 'ASC', 87 | selectedEvent: null, 88 | errorMessage: 'Thing didnt load' 89 | }) 90 | }) 91 | 92 | it('should remove the error message if a data:load:complete occurrs after an error', () => { 93 | const state = { 94 | events: [], 95 | isLoading: true, 96 | filter: null, 97 | sort: 'ASC', 98 | selectedEvent: null, 99 | errorMessage: 'error message' 100 | } 101 | 102 | const actual = reducer(state, { 103 | type: 'data:load:complete', 104 | events: [] 105 | }) 106 | 107 | expect(actual).to.eql({ 108 | events: [], 109 | isLoading: false, 110 | filter: null, 111 | sort: 'ASC', 112 | selectedEvent: null, 113 | errorMessage: null 114 | }) 115 | }) 116 | 117 | it('should handle events:filter', () => { 118 | const state = { 119 | events: [], 120 | isLoading: false, 121 | filter: null, 122 | sort: 'ASC', 123 | selectedEvent: null, 124 | errorMessage: null 125 | } 126 | 127 | const actual = reducer(state, { 128 | type: 'events:filter', 129 | filter: ' Something ' 130 | }) 131 | 132 | expect(actual).to.eql({ 133 | events: [], 134 | isLoading: false, 135 | filter: 'something', 136 | sort: 'ASC', 137 | selectedEvent: null, 138 | errorMessage: null 139 | }) 140 | }) 141 | 142 | it('should handle events:sort', () => { 143 | const state = { 144 | events: [], 145 | isLoading: false, 146 | filter: null, 147 | sort: 'ASC', 148 | selectedEvent: null, 149 | errorMessage: null 150 | } 151 | 152 | const actual = reducer(state, { 153 | type: 'events:sort', 154 | sort: 'DESC' 155 | }) 156 | 157 | expect(actual).to.eql({ 158 | events: [], 159 | isLoading: false, 160 | sort: 'DESC', 161 | filter: null, 162 | selectedEvent: null, 163 | errorMessage: null 164 | }) 165 | }) 166 | 167 | it('should handle event:selected', () => { 168 | const state = { 169 | events: [], 170 | isLoading: true, 171 | filter: 'something', 172 | sort: 'ASC', 173 | selectedEvent: null, 174 | errorMessage: null 175 | } 176 | 177 | const actual = reducer(state, { 178 | type: 'event:selected', 179 | selectedEvent: {} 180 | }) 181 | 182 | expect(actual.selectedEvent).to.eql({}) 183 | expect(actual.filter).to.not.exist 184 | }) 185 | }) 186 | -------------------------------------------------------------------------------- /src/events/components/EventView.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {View, ScrollView, Text, Image, TouchableHighlight} from 'react-native' 3 | import {connect} from 'react-redux' 4 | import styles from '../../styles/EventViewStyles' 5 | import {GENERAL_FONT} from '../../styles/ColorConstants' 6 | import {createRoute} from '../../appRoutes' 7 | 8 | const EventView = React.createClass({ 9 | propTypes: { 10 | navigator: PropTypes.object.isRequired, 11 | event: PropTypes.object.isRequired, 12 | handleLocatePress: PropTypes.func.isRequired 13 | }, 14 | 15 | render: function () { 16 | return ( 17 | 18 | 19 | 20 | {this.props.event.name} 21 | 22 | 23 | {this.props.event.description} 24 | 25 | 26 | {this.props.event.dateOfEvent} 27 | - 28 | {this.props.event.startTime} 29 | - 30 | {this.props.event.endTime} 31 | 32 | {this._renderHostingThemeCamp()} 33 | 34 | Intended Ages: {this.props.event.intendedAges} 35 | 36 | 37 | Location: {this.props.event.location} 38 | 39 | {this._renderLocateButton()} 40 | 41 | ) 42 | }, 43 | 44 | _renderHostingThemeCamp () { 45 | if (this.props.event.themeCampName) { 46 | return ( 47 | 48 | Hosting Theme Camp: {this.props.event.themeCampName} 49 | 50 | ) 51 | } 52 | return null 53 | }, 54 | 55 | _renderLocateButton () { 56 | if (!this.props.event.hasCoordinates) return 57 | 58 | return ( 59 | 60 | 61 | 62 | 63 | LOCATE 64 | 65 | ) 66 | } 67 | }) 68 | 69 | function mapDispatchToProps (dispatch, ownProps) { 70 | return { 71 | handleLocatePress: () => { 72 | const mapRoute = createRoute('map', { selectedEvent: ownProps.event }) 73 | ownProps.navigator.push(mapRoute) 74 | dispatch({ 75 | type: 'map:event:selected', 76 | selectedEvent: ownProps.event 77 | }) 78 | } 79 | } 80 | } 81 | 82 | export default connect(null, mapDispatchToProps)(EventView) 83 | -------------------------------------------------------------------------------- /src/events/components/EventsContainerView.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {connect} from 'react-redux' 3 | import EventsView from './EventsView' 4 | import EventView from './EventView' 5 | import {ActivityIndicator, View, Text} from 'react-native' 6 | import styles from '../../styles/EventViewStyles' 7 | 8 | const EventsContainerView = React.createClass({ 9 | propTypes: { 10 | navigator: PropTypes.object, 11 | events: PropTypes.array.isRequired, 12 | filter: PropTypes.string, 13 | sort: PropTypes.string.isRequired, 14 | isLoading: PropTypes.bool.isRequired, 15 | selectedEvent: PropTypes.object, 16 | errorMessage: PropTypes.string, 17 | handleEventPress: PropTypes.func.isRequired 18 | }, 19 | 20 | render () { 21 | if (this.props.selectedEvent) { 22 | return 26 | } 27 | if (this.props.errorMessage) { 28 | return ( 29 | 30 | {this.props.errorMessage} 31 | 32 | ) 33 | } 34 | return ( 35 | 36 | 40 | 44 | 45 | ) 46 | } 47 | }) 48 | 49 | function mapStateToProps (state) { 50 | return { 51 | ...state.events, 52 | events: filterEvents(state.events) 53 | } 54 | } 55 | 56 | function filterEvents ({events, filter}) { 57 | if (!filter) return events 58 | 59 | if (filter.length === 0) return events 60 | 61 | return events.filter(event => { 62 | return event.name.toLowerCase().indexOf(filter) > -1 63 | }) 64 | } 65 | 66 | function mapDispatchToProps (dispatch, ownProps) { 67 | return { 68 | handleEventPress: (selectedEvent) => { 69 | dispatch({ 70 | type: 'event:selected', 71 | selectedEvent 72 | }) 73 | } 74 | } 75 | } 76 | 77 | export default connect(mapStateToProps, mapDispatchToProps)(EventsContainerView) 78 | -------------------------------------------------------------------------------- /src/events/components/EventsView.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {View, ListView, Text, TouchableOpacity} from 'react-native' 3 | import {GENERAL_FONT, BORDER} from '../../styles/ColorConstants' 4 | 5 | const styles = { 6 | eventView: { 7 | paddingLeft: 5, 8 | borderWidth: 0, 9 | borderBottomWidth: 2, 10 | borderBottomColor: BORDER, 11 | height: 80, 12 | flex: 1, 13 | flexDirection: 'row', 14 | alignItems: 'center' 15 | }, 16 | eventText: { 17 | color: GENERAL_FONT, 18 | fontWeight: 'bold', 19 | flex: 1 20 | }, 21 | descriptionText: { 22 | color: GENERAL_FONT, 23 | flex: 2 24 | } 25 | } 26 | 27 | export default React.createClass({ 28 | propTypes: { 29 | events: PropTypes.array.isRequired, 30 | onEventPress: PropTypes.func.isRequired 31 | }, 32 | 33 | render () { 34 | return ( 35 | 40 | ) 41 | }, 42 | 43 | _createDataSource () { 44 | const ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2}) 45 | return ds.cloneWithRows(this._getRows(this.props.events)) 46 | }, 47 | 48 | _getRows (events) { 49 | return events.map(event => { 50 | return [event.name, event.shortDescription] 51 | }) 52 | }, 53 | 54 | _renderRow (rowData, sectionId, rowId) { 55 | return this._handleEventPress(rowId)}> 57 | 58 | 59 | {rowData[0]} 60 | 61 | 62 | {rowData[1]} 63 | 64 | 65 | 66 | }, 67 | 68 | _handleEventPress (rowId) { 69 | this.props.onEventPress(this.props.events[rowId]) 70 | } 71 | }) 72 | -------------------------------------------------------------------------------- /src/events/eventsReducer.js: -------------------------------------------------------------------------------- 1 | export default function eventsReducer (state = defaultState(), action = {}) { 2 | switch (action.type) { 3 | case 'data:load': return handleDataLoad(state, action) 4 | case 'data:load:complete': return handleDataLoadComplete(state, action) 5 | case 'data:load:error': return handleDataLoadError(state, action) 6 | case 'events:filter': return handleEventsFilter(state, action) 7 | case 'events:sort': return handleEventsSort(state, action) 8 | case 'event:selected': return handleEventSelected(state, action) 9 | default: return state 10 | } 11 | } 12 | 13 | function defaultState () { 14 | return { 15 | sort: 'ASC', 16 | events: [], 17 | filter: null, 18 | isLoading: false, 19 | selectedEvent: null, 20 | errorMessage: null 21 | } 22 | } 23 | 24 | function handleDataLoad (state) { 25 | return { 26 | ...state, 27 | isLoading: true 28 | } 29 | } 30 | 31 | function handleDataLoadComplete (state, {events}) { 32 | return Object.assign({}, state, { 33 | events, 34 | errorMessage: null, 35 | isLoading: false 36 | }) 37 | } 38 | 39 | function handleDataLoadError (state, {errorMessage}) { 40 | return Object.assign({}, state, { 41 | errorMessage, 42 | isLoading: false 43 | }) 44 | } 45 | 46 | function handleEventsFilter (state, {filter}) { 47 | return Object.assign({}, state, { 48 | filter: filter ? filter.trim().toLowerCase() : null 49 | }) 50 | } 51 | 52 | function handleEventsSort (state, {sort}) { 53 | return Object.assign({}, state, { 54 | sort 55 | }) 56 | } 57 | 58 | function handleEventSelected (state, action) { 59 | return Object.assign({}, state, { 60 | filter: null, 61 | selectedEvent: action.selectedEvent 62 | }) 63 | } 64 | -------------------------------------------------------------------------------- /src/map/MapView.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {StyleSheet} from 'react-native' 3 | import {connect} from 'react-redux' 4 | import Mapbox, {MapView} from 'react-native-mapbox-gl' 5 | 6 | const mapBoxAccessToken = 'pk.eyJ1IjoiY2hlZjA5OCIsImEiOiJjaWtwcjlocDQxMzZzdXhrbXE5NXp3bmViIn0.F9CMetNmIS4woy5gK1O3Ug' 7 | 8 | const styles = StyleSheet.create({ 9 | container: { 10 | flex: 1, 11 | borderWidth: 0 12 | }, 13 | map: { 14 | flex: 2 15 | }, 16 | drawer: { 17 | flex: 0.1 18 | } 19 | }) 20 | 21 | const MapsView = React.createClass({ 22 | propTypes: { 23 | center: PropTypes.object.isRequired, 24 | selectedEvent: PropTypes.object, 25 | filter: PropTypes.object.isRequired, 26 | errorMessage: PropTypes.string, 27 | annotations: PropTypes.array.isRequired, 28 | staticAnnotations: PropTypes.array.isRequired, 29 | zoomLevel: PropTypes.number.isRequired, 30 | openAnnotation: PropTypes.func.isRequired 31 | }, 32 | 33 | componentWillMount () { 34 | Mapbox.setAccessToken(mapBoxAccessToken) 35 | }, 36 | 37 | render () { 38 | return ( 39 | this._map = map} 41 | initialZoomLevel={this.props.zoomLevel} 42 | initialCenterCoordinate={this.props.center} 43 | style={styles.container} 44 | styleURL={Mapbox.mapStyles.satellite} 45 | annotations={this._getDisplayAnnotations()} 46 | showsUserLocation 47 | /> 48 | ) 49 | }, 50 | 51 | _getDisplayAnnotations () { 52 | let eventAnnotations = [] 53 | 54 | if (this.props.selectedEvent) { 55 | const filteredEventAnnotations = this._filterEventAnnotations() 56 | return filteredEventAnnotations 57 | } 58 | 59 | if (this.props.filter.showAnnotations) { 60 | eventAnnotations = eventAnnotations.concat(this.props.annotations) 61 | } 62 | 63 | if (this.props.filter.showStaticAnnotations) { 64 | eventAnnotations = eventAnnotations.concat(this.props.staticAnnotations) 65 | } 66 | return eventAnnotations 67 | }, 68 | 69 | _filterEventAnnotations () { 70 | const foundEventAnnotation = this.props.annotations.find(event => { 71 | return event.id === this.props.selectedEvent.id 72 | }) 73 | if (foundEventAnnotation) { 74 | return [foundEventAnnotation] 75 | } 76 | return [] 77 | } 78 | }) 79 | 80 | function mapStateToProps (state) { 81 | return state.map 82 | } 83 | 84 | function mapDispatchToProps (dispatch) { 85 | return { 86 | openAnnotation: ({src}) => { 87 | dispatch({ 88 | type: 'map:annotation:selected', 89 | selectedAnnotation: src 90 | }) 91 | } 92 | } 93 | } 94 | 95 | export default connect(mapStateToProps, mapDispatchToProps)(MapsView) 96 | -------------------------------------------------------------------------------- /src/map/__tests__/mapReducer.spec.js: -------------------------------------------------------------------------------- 1 | import reducer from '../mapReducer' 2 | import staticAnnotations from '../../data/staticData/staticMapAnnotations' 3 | 4 | describe('mapReducer', () => { 5 | it('should set its initial state', () => { 6 | const actual = reducer() 7 | 8 | expect(actual).to.eql({ 9 | filter: { 10 | showAnnotations: true, 11 | showStaticAnnotations: true 12 | }, 13 | errorMessage: null, 14 | annotations: [], 15 | staticAnnotations, 16 | center: { 17 | latitude: 33.378917, 18 | longitude: -83.337274 19 | }, 20 | zoomLevel: 15, 21 | selectedEvent: null, 22 | selectedAnnotation: null 23 | }) 24 | }) 25 | 26 | it('should handle map:toggle:show-annotations', () => { 27 | const actual = reducer(reducer(), { 28 | type: 'map:toggle:show-annotations' 29 | }) 30 | 31 | expect(actual.filter).to.eql({ 32 | showAnnotations: false, 33 | showStaticAnnotations: true 34 | }) 35 | 36 | const actual2 = reducer(actual, { 37 | type: 'map:toggle:show-static-annotations' 38 | }) 39 | 40 | expect(actual2.filter).to.eql({ 41 | showAnnotations: false, 42 | showStaticAnnotations: false 43 | }) 44 | 45 | const actual3 = reducer(actual2, { 46 | type: 'map:toggle:show-annotations' 47 | }) 48 | 49 | expect(actual3.filter).to.eql({ 50 | showAnnotations: true, 51 | showStaticAnnotations: false 52 | }) 53 | }) 54 | 55 | it('should handle clear selectedEvent when filters are changed', () => { 56 | const state = { 57 | filter: { 58 | showAnnotations: false, 59 | showStaticAnnotations: false 60 | }, 61 | selectedEvent: {} 62 | } 63 | 64 | const actual = reducer(state, { 65 | type: 'map:toggle:show-annotations' 66 | }) 67 | 68 | expect(actual.selectedEvent).to.not.exist 69 | 70 | const actual2 = reducer(state, { 71 | type: 'map:toggle:show-static-annotations' 72 | }) 73 | 74 | expect(actual2.selectedEvent).to.not.exist 75 | }) 76 | 77 | it('should handle data:load:complete', () => { 78 | const actual = reducer(reducer(), { 79 | type: 'data:load:complete', 80 | events: [{ 81 | id: 1, 82 | name: 'test', 83 | coordinates: ['lat', 'long'] 84 | }] 85 | }) 86 | 87 | expect(actual.annotations).to.eql([{ 88 | id: 1, 89 | type: 'point', 90 | title: 'test', 91 | coordinates: ['lat', 'long'], 92 | annotationImage: { 93 | url: 'image!pin', 94 | width: 30, 95 | height: 70 96 | } 97 | }]) 98 | }) 99 | 100 | it('should handle data:load:error', () => { 101 | const actual = reducer(reducer(), { 102 | type: 'data:load:error', 103 | errorMessage: 'test' 104 | }) 105 | 106 | expect(actual.errorMessage).to.eql('test') 107 | }) 108 | 109 | it('should handle map:event:selected', () => { 110 | const actual = reducer(reducer(), { 111 | type: 'map:event:selected', 112 | selectedEvent: { 113 | id: 1 114 | } 115 | }) 116 | 117 | expect(actual.selectedEvent).to.eql({ 118 | id: 1 119 | }) 120 | expect(actual.filter.showAnnotations).to.be.false 121 | expect(actual.filter.showStaticAnnotations).to.be.false 122 | }) 123 | 124 | it('should handle map:annotation:selected', () => { 125 | const actual = reducer(reducer(), { 126 | type: 'map:annotation:selected', 127 | selectedAnnotation: { 128 | id: 1 129 | } 130 | }) 131 | 132 | expect(actual.selectedAnnotation).to.eql({ 133 | id: 1 134 | }) 135 | }) 136 | }) 137 | -------------------------------------------------------------------------------- /src/map/mapReducer.js: -------------------------------------------------------------------------------- 1 | import staticAnnotations from '../data/staticData/staticMapAnnotations' 2 | 3 | export default function mapReducer (state = defaultState(), action = {}) { 4 | switch (action.type) { 5 | case 'map:toggle:show-annotations': return handleToggleShowAnnotations(state, action) 6 | case 'map:toggle:show-static-annotations': return handleToggleStaticShowAnnotations(state, action) 7 | case 'data:load:complete': return handleDataLoadComplete(state, action) 8 | case 'data:load:error': return handleDataLoadError(state, action) 9 | case 'map:event:selected': return handleEventSelected(state, action) 10 | case 'map:annotation:selected': return handleAnnotationSelected(state, action) 11 | default: return state 12 | } 13 | } 14 | 15 | function defaultState () { 16 | return { 17 | filter: { 18 | showAnnotations: true, 19 | showStaticAnnotations: true 20 | }, 21 | errorMessage: null, 22 | annotations: [], 23 | staticAnnotations: staticAnnotations, 24 | center: { 25 | latitude: 33.480632, 26 | longitude: -85.269295 27 | }, 28 | zoomLevel: 15, 29 | selectedEvent: null, 30 | selectedAnnotation: null 31 | } 32 | } 33 | 34 | function handleToggleShowAnnotations (state) { 35 | return Object.assign({}, state, { 36 | filter: { 37 | showAnnotations: !state.filter.showAnnotations, 38 | showStaticAnnotations: state.filter.showStaticAnnotations 39 | }, 40 | selectedEvent: null 41 | }) 42 | } 43 | 44 | function handleToggleStaticShowAnnotations (state) { 45 | return Object.assign({}, state, { 46 | filter: { 47 | showAnnotations: state.filter.showAnnotations, 48 | showStaticAnnotations: !state.filter.showStaticAnnotations 49 | }, 50 | selectedEvent: null 51 | }) 52 | } 53 | 54 | function handleDataLoadComplete (state, {events}) { 55 | return Object.assign({}, state, { 56 | annotations: buildEventAnnotations(events) 57 | }) 58 | } 59 | 60 | function buildEventAnnotations (events) { 61 | return events 62 | .filter(event => event && event.coordinates) 63 | .map(event => { 64 | return { 65 | id: `${event.id}`, 66 | type: 'point', 67 | title: event.name, 68 | coordinates: event.coordinates 69 | } 70 | }) 71 | } 72 | 73 | function handleDataLoadError (state, {errorMessage}) { 74 | return Object.assign({}, state, { 75 | errorMessage 76 | }) 77 | } 78 | 79 | function handleEventSelected (state, {selectedEvent}) { 80 | return Object.assign({}, state, { 81 | selectedEvent, 82 | filter: { 83 | showAnnotations: false, 84 | showStaticAnnotations: false 85 | } 86 | }) 87 | } 88 | 89 | function handleAnnotationSelected (state, {selectedAnnotation}) { 90 | return Object.assign({}, state, { 91 | selectedAnnotation 92 | }) 93 | } 94 | -------------------------------------------------------------------------------- /src/nav/EventsNavBar.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {View, Text, TouchableOpacity} from 'react-native' 3 | import {connect} from 'react-redux' 4 | import NavSearchButton from './NavSearchButton' 5 | import {EVENTS_THEME} from '../styles/ColorConstants' 6 | import styles from '../styles/NavBarStyles' 7 | 8 | const background = { 9 | backgroundColor: EVENTS_THEME 10 | } 11 | 12 | const EventsNavBar = React.createClass({ 13 | propTypes: { 14 | navigator: PropTypes.object, 15 | showEventDetail: PropTypes.bool.isRequired, 16 | hideEventDetail: PropTypes.func.isRequired 17 | }, 18 | 19 | render () { 20 | return ( 21 | 24 | 25 | {this._renderLeftSide()} 26 | 27 | 28 | {this._renderSearchButton()} 29 | 30 | 31 | ) 32 | }, 33 | 34 | _renderLeftSide () { 35 | if (!this.props.showEventDetail) { 36 | return ( 37 | 38 | Events 39 | 40 | ) 41 | } 42 | 43 | return ( 44 | 47 | 48 | Back 49 | 50 | 51 | ) 52 | }, 53 | 54 | _renderSearchButton () { 55 | if (this.props.showEventDetail) return 56 | return 57 | } 58 | }) 59 | 60 | function mapStateToProps (state, ownProps) { 61 | return { 62 | showEventDetail: !!state.events.selectedEvent 63 | } 64 | } 65 | 66 | function mapDispatchToProps (dispatch, ownProps) { 67 | return { 68 | hideEventDetail: () => { 69 | ownProps.navigator.pop() 70 | dispatch({ 71 | type: 'event:selected', 72 | selectedEvent: null 73 | }) 74 | } 75 | } 76 | } 77 | 78 | export default connect(mapStateToProps, mapDispatchToProps)(EventsNavBar) 79 | -------------------------------------------------------------------------------- /src/nav/MapNavBar.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {View, Text, TouchableOpacity, Image} from 'react-native' 3 | import {connect} from 'react-redux' 4 | import styles from '../styles/NavBarStyles' 5 | import {MAP_THEME} from '../styles/ColorConstants' 6 | 7 | const background = { 8 | backgroundColor: MAP_THEME 9 | } 10 | 11 | const MapNavBar = React.createClass({ 12 | propTypes: { 13 | navigator: PropTypes.object, 14 | toggleShowAnnotations: PropTypes.func.isRequired, 15 | showAnnotations: PropTypes.bool.isRequired, 16 | toggleShowStaticAnnotations: PropTypes.func.isRequired, 17 | showStaticAnnotations: PropTypes.bool.isRequired 18 | }, 19 | 20 | render () { 21 | return ( 22 | 25 | 26 | Map 27 | 28 | 29 | 32 | {this._renderEventsIcon()} 33 | 34 | 35 | 36 | 39 | {this._renderOpsIcon()} 40 | 41 | 42 | 43 | ) 44 | }, 45 | 46 | _renderEventsIcon () { 47 | if (this.props.showAnnotations) { 48 | return 49 | } 50 | return 51 | }, 52 | 53 | _renderOpsIcon () { 54 | if (this.props.showStaticAnnotations) { 55 | return 56 | } 57 | return 58 | } 59 | }) 60 | 61 | function mapStateToProps (state, ownProps) { 62 | return { 63 | showAnnotations: state.map.filter.showAnnotations, 64 | showStaticAnnotations: state.map.filter.showStaticAnnotations 65 | } 66 | } 67 | 68 | function mapDispatchToProps (dispatch, ownProps) { 69 | return { 70 | toggleShowAnnotations: () => { 71 | dispatch({ 72 | type: 'map:toggle:show-annotations' 73 | }) 74 | }, 75 | toggleShowStaticAnnotations: () => { 76 | dispatch({ 77 | type: 'map:toggle:show-static-annotations' 78 | }) 79 | } 80 | } 81 | } 82 | 83 | export default connect(mapStateToProps, mapDispatchToProps)(MapNavBar) 84 | 85 | -------------------------------------------------------------------------------- /src/nav/NavBar.js: -------------------------------------------------------------------------------- 1 | import MapNavBar from './MapNavBar' 2 | import PrinciplesNavBar from './PrinciplesNavBar' 3 | import EventsNavBar from './EventsNavBar' 4 | import React, {PropTypes} from 'react' 5 | 6 | export default React.createClass({ 7 | propTypes: { 8 | navigator: PropTypes.object, 9 | navState: PropTypes.object 10 | }, 11 | 12 | render () { 13 | if (this._isMap()) { 14 | return 15 | } 16 | 17 | if (this._isPrinciples()) { 18 | return 19 | } 20 | 21 | return 24 | }, 25 | 26 | _isMap () { 27 | const currentRoutes = this.props.navigator.getCurrentRoutes() 28 | return currentRoutes[0].name === 'Map' || currentRoutes[currentRoutes.length - 1].name === 'Map' 29 | }, 30 | 31 | _isPrinciples () { 32 | const currentRoutes = this.props.navigator.getCurrentRoutes() 33 | return currentRoutes[0].name === 'Principles' || currentRoutes[currentRoutes.length - 1].name === 'Principles' 34 | } 35 | }) 36 | -------------------------------------------------------------------------------- /src/nav/NavSearchButton.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {Image, TextInput, TouchableOpacity} from 'react-native' 3 | import {connect} from 'react-redux' 4 | import styles from '../styles/NavBarStyles' 5 | 6 | const textInput = { 7 | width: 200, 8 | margin: 5, 9 | height: 50, 10 | textAlign: 'left' 11 | } 12 | 13 | const image = { 14 | marginRight: 10 15 | } 16 | 17 | const NavSearchButton = React.createClass({ 18 | propTypes: { 19 | search: PropTypes.func.isRequired, 20 | clearSearch: PropTypes.func.isRequired 21 | }, 22 | 23 | getInitialState () { 24 | return { 25 | isShowingSearchBar: false 26 | } 27 | }, 28 | 29 | render () { 30 | if (this.state.isShowingSearchBar) return this._renderSearchInput() 31 | 32 | return ( 33 | 37 | 38 | 39 | ) 40 | }, 41 | 42 | _renderSearchInput () { 43 | return ( 44 | 53 | ) 54 | }, 55 | 56 | _clearSearchTerm () { 57 | this.props.clearSearch() 58 | }, 59 | 60 | _resetSearchButton () { 61 | this.setState({ 62 | isShowingSearchBar: false 63 | }) 64 | }, 65 | 66 | _handleSearchInput (searchTerm) { 67 | this.props.search(searchTerm) 68 | }, 69 | 70 | onSearchPress () { 71 | this.setState({ 72 | isShowingSearchBar: !this.state.isShowingSearchBar 73 | }) 74 | } 75 | }) 76 | 77 | function mapDispatchToProps (dispatch, props) { 78 | return { 79 | search: (filter) => { 80 | dispatch({ 81 | type: 'events:filter', 82 | filter 83 | }) 84 | }, 85 | clearSearch: () => { 86 | dispatch({ 87 | type: 'events:filter', 88 | filter: null 89 | }) 90 | } 91 | } 92 | } 93 | 94 | export default connect(null, mapDispatchToProps)(NavSearchButton) 95 | -------------------------------------------------------------------------------- /src/nav/PrinciplesNavBar.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {View, Text} from 'react-native' 3 | import styles from '../styles/NavBarStyles' 4 | import {PRINCIPLES_THEME} from '../styles/ColorConstants' 5 | 6 | const background = { 7 | backgroundColor: PRINCIPLES_THEME 8 | } 9 | 10 | export default React.createClass({ 11 | propTypes: { 12 | navigator: PropTypes.object 13 | }, 14 | 15 | render () { 16 | return ( 17 | 20 | 21 | Principles 22 | 23 | 24 | 25 | ) 26 | } 27 | }) 28 | -------------------------------------------------------------------------------- /src/principles/PrinciplesView.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import {ScrollView, Text, Image} from 'react-native' 3 | import tenPrinciples from '../../images/principles/Ten_Principles.png' 4 | import styles from '../styles/PrinciplesViewStyles' 5 | 6 | export default React.createClass({ 7 | render () { 8 | return ( 9 | 10 | 11 | Radical Inclusion 12 | Anyone may be a part of Alchemy. We welcome and respect the stranger. No prerequisites exist for participation in our community. 13 | Gifting 14 | Alchemy is devoted to acts of gift giving. The value of a gift is unconditional. Gifting does not contemplate a return or an exchange for something of equal value. 15 | Decommodification 16 | In order to preserve the spirit of gifting, our community seeks to create social environments that are unmediated by commercial sponsorships, transactions, or advertising. We stand ready to protect our culture from such exploitation. We resist the substitution of consumption for participatory experience. 17 | Radical Self-reliance 18 | Alchemy encourages the individual to discover, exercise and rely on his or her inner resources. 19 | Radical Self-expression 20 | Radical self-expression arises from the unique gifts of the individual. No one other than the individual or a collaborating group can determine its content. It is offered as a gift to others. In this spirit, the giver should respect the rights and liberties of the recipient. 21 | Communal Effort 22 | Our community values creative cooperation and collaboration. We strive to produce, promote and protect social networks, public spaces, works of art, and methods of communication that support such interaction. 23 | Civic Responsibility 24 | We value civil society. Community members who organize events should assume responsibility for public welfare and endeavor to communicate civic responsibilities to participants. They must also assume responsibility for conducting events in accordance with local, state and federal laws. 25 | Leaving No Trace 26 | Our community respects the environment. We are committed to leaving no physical trace of our activities wherever we gather. We clean up after ourselves and endeavor, whenever possible, to leave such places in a better state than when we found them. 27 | Participation 28 | Our community is committed to a radically participatory ethic. We believe that transformative change, whether in the individual or in society, can occur only through the medium of deeply personal participation. We achieve being through doing. Everyone is invited to work. Everyone is invited to play. We make the world real through actions that open the heart. 29 | Immediacy 30 | Immediate experience is, in many ways, the most important touchstone of value in our culture. We seek to overcome barriers that stand between us and a recognition of our inner selves, the reality of those around us, participation in society, and contact with a natural world exceeding human powers. No idea can substitute for this experience. 31 | 32 | ) 33 | } 34 | }) 35 | -------------------------------------------------------------------------------- /src/reducers.js: -------------------------------------------------------------------------------- 1 | import {combineReducers} from 'redux' 2 | import eventsReducer from './events/eventsReducer' 3 | import mapReducer from './map/mapReducer' 4 | import tabsReducer from './tabs/tabsReducer' 5 | 6 | export default combineReducers({ 7 | events: eventsReducer, 8 | map: mapReducer, 9 | tabs: tabsReducer 10 | }) 11 | -------------------------------------------------------------------------------- /src/styles/ColorConstants.js: -------------------------------------------------------------------------------- 1 | export const EVENTS_THEME = '#DC4A6C' 2 | export const BORDER = '#001119' 3 | export const CONTENT_BACKGROUND = '#0E3453' 4 | export const TAB_BACKGROUND = '#07233D' 5 | export const MAP_THEME = '#7A79CA' 6 | export const PRINCIPLES_THEME = '#F5BD54' 7 | export const GENERAL_FONT = '#6FADD4' 8 | export const ERROR_FONT = '#ff3333' 9 | export const NAV_BAR_FONT = '#001119' 10 | export const NAV_BAR_ACTIVE_SEARCH_BACKGROUND = '#0D1F2F' 11 | -------------------------------------------------------------------------------- /src/styles/EventViewStyles.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet} from 'react-native' 2 | import {GENERAL_FONT, ERROR_FONT} from '../styles/ColorConstants' 3 | 4 | const styles = StyleSheet.create({ 5 | logoImage: { 6 | width: 176, 7 | height: 150, 8 | alignSelf: 'center', 9 | marginTop: 50, 10 | marginBottom: 50 11 | }, 12 | eventName: { 13 | alignSelf: 'center', 14 | color: GENERAL_FONT, 15 | marginBottom: 20 16 | }, 17 | eventDesc: { 18 | alignSelf: 'center', 19 | color: GENERAL_FONT 20 | }, 21 | times: { 22 | marginTop: 25, 23 | textAlign: 'center', 24 | color: GENERAL_FONT 25 | }, 26 | locateButton: { 27 | marginTop: 25, 28 | marginBottom: 25, 29 | alignSelf: 'center' 30 | }, 31 | locateText: { 32 | textAlign: 'center', 33 | color: GENERAL_FONT 34 | }, 35 | errorMessage: { 36 | textAlign: 'center', 37 | color: ERROR_FONT 38 | }, 39 | loadingIndicator: { 40 | position: 'absolute', 41 | top: 0, 42 | right: 0, 43 | bottom: 0, 44 | left: 0 45 | } 46 | }) 47 | 48 | export default styles 49 | -------------------------------------------------------------------------------- /src/styles/NavBarStyles.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet} from 'react-native' 2 | import {NAV_BAR_FONT, BORDER} from '../styles/ColorConstants' 3 | import {NAV_BAR_SIZE} from '../styles/StyleConstants' 4 | 5 | const styles = StyleSheet.create({ 6 | navbar: { 7 | position: 'absolute', 8 | top: 0, 9 | left: 0, 10 | right: 0, 11 | height: NAV_BAR_SIZE, 12 | justifyContent: 'center', 13 | flexDirection: 'row', 14 | borderBottomColor: BORDER, 15 | borderBottomWidth: 5 16 | }, 17 | navbarText: { 18 | color: NAV_BAR_FONT, 19 | fontSize: 17, 20 | margin: 10, 21 | fontWeight: '300', 22 | textAlign: 'center', 23 | alignItems: 'center' 24 | }, 25 | corner: { 26 | flex: 1, 27 | justifyContent: 'center' 28 | }, 29 | alignLeft: { 30 | alignItems: 'flex-start' 31 | }, 32 | alignRight: { 33 | alignItems: 'flex-end' 34 | }, 35 | navBarButtons: { 36 | marginRight: 10 37 | }, 38 | title: { 39 | overflow: 'hidden', 40 | flex: 3 41 | } 42 | }) 43 | 44 | export default styles 45 | -------------------------------------------------------------------------------- /src/styles/PrinciplesViewStyles.js: -------------------------------------------------------------------------------- 1 | import {StyleSheet} from 'react-native' 2 | import {GENERAL_FONT} from '../styles/ColorConstants' 3 | 4 | const styles = StyleSheet.create({ 5 | tenImage: { 6 | resizeMode: 'contain', 7 | alignSelf: 'center', 8 | height: 302, 9 | width: 207 10 | }, 11 | sectionHeader: { 12 | color: GENERAL_FONT, 13 | fontWeight: 'bold', 14 | marginLeft: 20, 15 | marginBottom: 10 16 | }, 17 | sectionDefinition: { 18 | color: GENERAL_FONT, 19 | marginLeft: 20, 20 | marginRight: 20, 21 | marginBottom: 20 22 | } 23 | }) 24 | 25 | export default styles 26 | -------------------------------------------------------------------------------- /src/styles/StyleConstants.js: -------------------------------------------------------------------------------- 1 | export const NAV_BAR_SIZE = 70 2 | -------------------------------------------------------------------------------- /src/tabs/TabBar.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {StyleSheet, View} from 'react-native' 3 | import {connect} from 'react-redux' 4 | import TabButton from './TabButton' 5 | import appRoutes from '../appRoutes' 6 | import {TAB_BACKGROUND} from '../styles/ColorConstants' 7 | import guid from 'guid' 8 | 9 | const styles = StyleSheet.create({ 10 | tabs: { 11 | flexDirection: 'row', 12 | justifyContent: 'space-around', 13 | backgroundColor: TAB_BACKGROUND 14 | } 15 | }) 16 | 17 | const TabBar = React.createClass({ 18 | propTypes: { 19 | activeTab: PropTypes.string.isRequired, 20 | onTabChange: PropTypes.func.isRequired 21 | }, 22 | 23 | render () { 24 | return 25 | {this._renderTabButtons()} 26 | 27 | }, 28 | 29 | _renderTabButtons () { 30 | return [appRoutes.events, appRoutes.map, appRoutes.principles].map((route, index) => { 31 | const isActiveTab = route.name === this.props.activeTab || 32 | (route.name === 'Events' && this.props.activeTab === 'Event') 33 | const borderStyle = index !== 0 ? {borderLeftWidth: 2} : {borderLeftWidth: 0} 34 | 35 | return 44 | }) 45 | }, 46 | 47 | _handleOnPress (route) { 48 | if (this.props.activeTab !== route.name) { 49 | this.props.onTabChange(route) 50 | } 51 | } 52 | }) 53 | 54 | function mapStateToProps (state, ownProps) { 55 | return state.tabs 56 | } 57 | 58 | export default connect(mapStateToProps)(TabBar) 59 | -------------------------------------------------------------------------------- /src/tabs/TabButton.js: -------------------------------------------------------------------------------- 1 | import React, {PropTypes} from 'react' 2 | import {Image, TouchableHighlight, StyleSheet} from 'react-native' 3 | 4 | const styles = StyleSheet.create({ 5 | tab: { 6 | flex: 1, 7 | alignItems: 'center', 8 | justifyContent: 'center' 9 | } 10 | }) 11 | 12 | export default React.createClass({ 13 | propTypes: { 14 | onPress: PropTypes.func, 15 | isActiveTab: PropTypes.bool, 16 | activeTabColor: PropTypes.string 17 | }, 18 | 19 | render () { 20 | const image = this.props.isActiveTab ? this.props.activeImage : this.props.inactiveImage 21 | 22 | return ( 23 | 24 | 25 | 26 | ) 27 | } 28 | }) 29 | -------------------------------------------------------------------------------- /src/tabs/__tests__/tabsReducer.spec.js: -------------------------------------------------------------------------------- 1 | import reducer from '../tabsReducer' 2 | 3 | describe('tabsReducer', () => { 4 | it('should set its initial state', () => { 5 | const acutal = reducer() 6 | 7 | expect(acutal).to.eql({ 8 | activeTab: 'Events' 9 | }) 10 | }) 11 | 12 | it('should handle tabs:active:update', () => { 13 | const acutal = reducer(reducer(), { 14 | type: 'tabs:active:update', 15 | activeTab: 'Map' 16 | }) 17 | 18 | expect(acutal.activeTab).to.eql('Map') 19 | }) 20 | }) 21 | -------------------------------------------------------------------------------- /src/tabs/tabsReducer.js: -------------------------------------------------------------------------------- 1 | export default function tabsReducer (state = defaultState(), action = {}) { 2 | switch (action.type) { 3 | case 'tabs:active:update': return handleActiveTabUpdate(state, action) 4 | default: return state 5 | } 6 | } 7 | 8 | function defaultState () { 9 | return { 10 | activeTab: 'Events' 11 | } 12 | } 13 | 14 | function handleActiveTabUpdate (state, {activeTab}) { 15 | return Object.assign({}, state, { 16 | activeTab 17 | }) 18 | } 19 | -------------------------------------------------------------------------------- /test/main.js: -------------------------------------------------------------------------------- 1 | import chai from 'chai' 2 | import sinonChai from 'sinon-chai' 3 | 4 | chai.use(sinonChai) 5 | 6 | global.expect = chai.expect 7 | -------------------------------------------------------------------------------- /test/mocha.opts: -------------------------------------------------------------------------------- 1 | --compilers js:babel-register 2 | --require test/main.js 3 | --recursive 4 | --watch 5 | --reporter min 6 | src/**/__tests__/*.js --------------------------------------------------------------------------------