Coder Social home page Coder Social logo

icerockdev / moko-maps Goto Github PK

View Code? Open in Web Editor NEW
73.0 7.0 15.0 409 KB

Control your map from common code for mobile (android & ios) Kotlin Multiplatform development

Home Page: https://moko.icerock.dev/

License: Apache License 2.0

Kotlin 100.00%
kotlin android ios moko kotlin-multiplatform kotlin-native

moko-maps's Introduction

moko-maps
GitHub license Download kotlin-version

Mobile Kotlin maps module

This is a Kotlin Multiplatform library that provides controls of maps to common code.

Table of Contents

Features

  • Markers - add markers to map from common code;
  • Route - draw route by waypoints from common code;
  • Camera - control camera (zoom, location) from common code.

Requirements

  • Gradle version 6.0+
  • Android API 16+
  • iOS version 9.0+

Installation

root build.gradle

allprojects {
    repositories {
        mavenCentral()
        maven { url = "https://mapbox.bintray.com/mapbox" } // if mapbox required
    }
}

project build.gradle

dependencies {
    commonMainApi("dev.icerock.moko:maps:0.6.0")
    commonMainApi("dev.icerock.moko:maps-google:0.6.0")
    commonMainApi("dev.icerock.moko:maps-mapbox:0.6.0")
}

kotlin.targets
    .matching { it is org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget }
    .configureEach {
        val target = this as org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

        target.binaries
            .matching { it is org.jetbrains.kotlin.gradle.plugin.mpp.Framework }
            .configureEach {
                val framework = this as org.jetbrains.kotlin.gradle.plugin.mpp.Framework
                val frameworks = listOf("Base", "Maps").map { frameworkPath ->
                    project.file("../ios-app/Pods/GoogleMaps/$frameworkPath/Frameworks").path.let { "-F$it" }
                }.plus(
                    project.file("../ios-app/Pods/Mapbox-iOS-SDK/dynamic").path.let { "-F$it" }
                )

                framework.linkerOpts(frameworks)
            }
    }

With mobile-multiplatform-gradle-plugin cocoapods configuration simplest: build.gradle.kts:

cocoaPods {
    podsProject = file("ios-app/Pods/Pods.xcodeproj")

    precompiledPod(
        scheme = "GoogleMaps",
        onlyLink = true
    ) { podsDir ->
        listOf(
            File(podsDir, "GoogleMaps/Base/Frameworks"),
            File(podsDir, "GoogleMaps/Maps/Frameworks")
        )
    }
    precompiledPod(
        scheme = "Mapbox",
        onlyLink = true
    ) { podsDir ->
        listOf(File(podsDir, "Mapbox-iOS-SDK/dynamic"))
    }
}

project Podfile

pod 'GoogleMaps', '3.7.0'
pod 'Mapbox-iOS-SDK', '5.5.0'

# GoogleMaps is static library that already linked in moko-maps-google. Remove duplicated linking.
post_install do |installer|
  host_targets = installer.aggregate_targets.select { |aggregate_target|
    aggregate_target.name.include? "Pods-"
  }
  
  host_targets.each do |host_target|
    host_target.xcconfigs.each do |config_name, config_file|
      config_file.frameworks.delete("GoogleMaps")
      config_file.frameworks.delete("GoogleMapsBase")
      config_file.frameworks.delete("GoogleMapsCore")
      
      xcconfig_path = host_target.xcconfig_path(config_name)
      config_file.save_as(xcconfig_path)
    end
  end
end

Usage

Markers

class MarkerViewModel(
    val mapsController: GoogleMapController
) : ViewModel() {

    fun start() {
        viewModelScope.launch {
            val marker1 = mapsController.addMarker(
                image = MR.images.marker,
                latLng = LatLng(
                    latitude = 55.045853,
                    longitude = 82.920154
                ),
                rotation = 0.0f
            ) {
                println("marker 1 pressed!")
            }

            marker1.rotation = 90.0f
        }
    }
}

Route

class MarkerViewModel(
    val mapsController: GoogleMapController
) : ViewModel() {

    fun start() {
        viewModelScope.launch {
            val route = mapsController.buildRoute(
                points = listOf(
                    LatLng(
                        latitude = 55.032200,
                        longitude = 82.889360
                    ),
                    LatLng(
                        latitude = 55.030853,
                        longitude = 82.920154
                    ),
                    LatLng(
                        latitude = 55.013109,
                        longitude = 82.926480
                    )
                ),
                lineColor = Color(0xCCCC00FF),
                markersImage = MR.images.marker
            )
        }
    }
}

Samples

Please see more examples in the sample directory.

Set Up Locally

Before open project need to setup gradle.properties with tokens:

# mapbox tokens by guide https://docs.mapbox.com/android/maps/guides/install/
mapbox.secretToken=YOUR_SECRET_MAPBOX_KEY
mapbox.publicToken=YOUR_PUBLIC_MAPBOX_KEY

# google maps api key by guide https://developers.google.com/maps/documentation/android-sdk/get-api-key
googleMaps.apiKey=YOUR_API_KEY

ios info.plist setup with tokens:

MGLMapboxAccessToken=YOUR_PUBLIC_MAPBOX_KEY
GoogleAPIkey=YOUR_API_KEY

add the following entry to your .netrc file:

machine api.mapbox.com
login mapbox
password YOUR_SECRET_MAPBOX_KEY

before compilation of iOS target required pod install in sample/ios-app directory

Contributing

All development (both new features and bug fixes) is performed in the develop branch. This way master always contains the sources of the most recently released version. Please send PRs with bug fixes to the develop branch. Documentation fixes in the markdown files are an exception to this rule. They are updated directly in master.

The develop branch is pushed to master on release.

For more details on contributing please see the contributing guide.

License

Copyright 2019 IceRock MAG Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

moko-maps's People

Contributors

alex009 avatar anton6tak avatar dorofeev avatar limonlol avatar prokopishin avatar safaiyeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

moko-maps's Issues

Mapbox

Need implementation of Mapbox feature.

Addition for marker

Need add property "isAnimated" for func move(position: LatLng, rotation: Float)

Rotation for markers of Mapbox iOS

Mapbox iOS not support markers rotation, but common API require it (because gmaps it contains and api was created from gmaps at start).
We can add rotation support by rotating UIImage of marker, or remove rotation from common api.

What is Mapbox Navigation v1.5.1 dependency used for?

What's the problem?

dev.icerock.moko:maps:0.6.0 has a dependency of com.mapbox.navigation:core:1.5.1 (source via PR) and this means developers that use Mapbox maps will be charged Nav SDK pricing per MAU, even the users are not using any functionality of Mapbox Nav SDK.

Why is this occurring now?

dev.icerock.moko:maps:0.5.2 has a dependency of com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6 which doesn't charge Mapbox Nav SDK pricing.

What is Mapbox Navigation being used for?

From looking at the code, it doesn't look like we need this library. Can this dependency be removed?

Unbound issue

e: java.lang.AssertionError: Unbound symbols not allowed
Unbound public symbol for public kotlinx.coroutines/Delay.invokeOnTimeout|-1360839616470570076[0]

Mapbox current location uncaught exception

if we run app first time and give permission to geolocation not so fast - we got error caused kotlin.IllegalStateException: can't get location

Uncaught Kotlin exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[UIDispatcher@39f9188, Continuation @ $provideLocationPermissionCOROUTINE$482]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
    at 0   MultiPlatformLibrary                0x000000010a35fa1e kfun:kotlin.Error#<init>(kotlin.String?;kotlin.Throwable?){} + 126 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:14:63)
    at 1   MultiPlatformLibrary                0x000000010a4761ee kfun:kotlinx.coroutines.CoroutinesInternalError#<init>(kotlin.String;kotlin.Throwable){} + 126 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Exceptions.common.kt:28:77)
    at 2   MultiPlatformLibrary                0x000000010a4e0df4 kfun:kotlinx.coroutines.DispatchedTask#handleFatalException(kotlin.Throwable?;kotlin.Throwable?){} + 900 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:93:22)
    at 3   MultiPlatformLibrary                0x000000010a4e0a0a kfun:kotlinx.coroutines.DispatchedTask#run(){} + 3530 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:64:13)
    at 4   MultiPlatformLibrary                0x000000010a5702ba kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.dispatch$lambda-0#internal + 90 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:17:19)
    at 5   MultiPlatformLibrary                0x000000010a570850 kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$897.invoke#internal + 64 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:16:32)
    at 6   MultiPlatformLibrary                0x000000010a5708b0 kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$897.$<bridge-UNN>invoke(){}#internal + 64 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:16:32)
    at 7   MultiPlatformLibrary                0x000000010a570cf9 _6465762e696365726f636b2e6d6f6b6f3a6d76766d_knbridge413 + 185 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:16:32)
    at 8   libdispatch.dylib                   0x000000010de2b7ec _dispatch_call_block_and_release + 12
    at 9   libdispatch.dylib                   0x000000010de2c9c8 _dispatch_client_callout + 8
    at 10  libdispatch.dylib                   0x000000010de3ae75 _dispatch_main_queue_callback_4CF + 1152
    at 11  CoreFoundation                      0x00007fff2038bdab __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    at 12  CoreFoundation                      0x00007fff2038662e __CFRunLoopRun + 2685
    at 13  CoreFoundation                      0x00007fff203856c6 CFRunLoopRunSpecific + 567
    at 14  GraphicsServices                    0x00007fff2b76adb3 GSEventRunModal + 139
    at 15  UIKitCore                           0x00007fff24675187 -[UIApplication _run] + 912
    at 16  UIKitCore                           0x00007fff2467a038 UIApplicationMain + 101
    at 17  EASY2RIDE (D)                       0x0000000107cd37c8 main + 56 (/Users/alekseymikhailovwork/Documents/development/icerockdev_workspace/bmw/bmw-moto-mobile/ios-app/src/AppDelegate.swift:<unknown>)
    at 18  libdyld.dylib                       0x00007fff20256409 start + 1
Caused by: kotlin.IllegalStateException: can't get location
    at 0   MultiPlatformLibrary                0x000000010a36639f kfun:kotlin.Throwable#<init>(kotlin.String?){} + 95 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Throwable.kt:23:37)
    at 1   MultiPlatformLibrary                0x000000010a35ecad kfun:kotlin.Exception#<init>(kotlin.String?){} + 93 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:44)
    at 2   MultiPlatformLibrary                0x000000010a35ef1d kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 93 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:44)
    at 3   MultiPlatformLibrary                0x000000010a35f49d kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 93 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/Exceptions.kt:70:44)
    at 4   MultiPlatformLibrary                0x000000010aa310ed kfun:dev.icerock.moko.maps.mapbox.MapboxController.getCurrentLocation#internal + 957 (/Users/runner/work/moko-maps/moko-maps/maps-mapbox/src/iosX64Main/kotlin/dev/icerock/moko/maps/mapbox/MapboxController.kt:69:22)
    at 5   MultiPlatformLibrary                0x000000010aa35a8a kfun:dev.icerock.moko.maps.mapbox.MapboxController#showMyLocation(kotlin.Float){} + 186 (/Users/runner/work/moko-maps/moko-maps/maps-mapbox/src/iosX64Main/kotlin/dev/icerock/moko/maps/mapbox/MapboxController.kt:146:24)
    at 6   MultiPlatformLibrary                0x000000010aac5e98 kfun:com.bmw.moto.feature.mainScreen.presentation.MainTestRideScreenViewModel.$subscribeToLocationTracker$lambda-3COROUTINE$148.invokeSuspend#internal + 2008 (/Users/alekseymikhailovwork/Documents/development/icerockdev_workspace/bmw/bmw-moto-mobile/mpp-library/feature/mainScreen/src/commonMain/kotlin/com/bmw/moto/feature/mainScreen/presentation/MainTestRideScreenViewModel.kt:58:38)
    at 7   MultiPlatformLibrary                0x000000010a389608 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 760 (/Users/teamcity1/teamcity_work/f01984a9f5203417/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:30:39)
    at 8   MultiPlatformLibrary                0x000000010a4e072b kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2795 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:39:50)
    at 9   MultiPlatformLibrary                0x000000010a5702ba kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.dispatch$lambda-0#internal + 90 (/Users/runner/work/moko-mvvm/moko-mvvm/mvvm/src/iosMain/kotlin/dev/icerock/moko/mvvm/viewmodel/UIDispatcher.kt:17:19)
    ... and 14 more common stack frames skipped

Can't use maps-mapbox

I tried to update moko-maps to 0.5.0 and got the error while building:

Could not find com.mapbox.navigator:mapbox-navigation-native:7.0.0.
Searched in the following locations:
- https://jcenter.bintray.com/com/mapbox/navigator/mapbox-navigation-native/7.0.0/mapbox-navigation-native-7.0.0.pom
- https://dl.google.com/dl/android/maven2/com/mapbox/navigator/mapbox-navigation-native/7.0.0/mapbox-navigation-native-7.0.0.pom
- https://dl.bintray.com/ekito/koin/com/mapbox/navigator/mapbox-navigation-native/7.0.0/mapbox-navigation-native-7.0.0.pom
- https://dl.bintray.com/icerockdev/moko/com/mapbox/navigator/mapbox-navigation-native/7.0.0/mapbox-navigation-native-7.0.0.pom
- https://kotlin.bintray.com/native-xcode/com/mapbox/navigator/mapbox-navigation-native/7.0.0/mapbox-navigation-native-7.0.0.pom
Required by:
project :common > dev.icerock.moko:maps-mapbox:0.5.0 > dev.icerock.moko:maps-mapbox-android:0.5.0 > com.mapbox.mapboxsdk:mapbox-android-navigation:0.42.6

As for dependencies I'm using:
"dev.icerock.moko:maps:0.5.0"
"dev.icerock.moko:maps-mapbox:0.5.0"

Both set in common source set.

issue with marker move func

hello.
lib version 0.5.2
trying to use marker move function and get error:

java.lang.NoSuchMethodError: No static method move-5hxI4Gw$default(Ldev/icerock/moko/maps/Marker;Ldev/icerock/moko/geo/LatLng;FJILjava/lang/Object;)V in class Ldev/icerock/moko/maps/Marker$DefaultImpls; or its super classes (declaration of 'dev.icerock.moko.maps.Marker$DefaultImpls' appears in .../my classes/...

Sample crashed after open mapbox screen

Sample app crashed right after press "Mapbox Maps" button on main screen

0   ???                                 0x0000000117d3890c 0x0 + 4694706444,
1   moko-maps                           0x000000010236561c main + 0,
2   Mapbox                              0x0000000102deb47c -[MGLMapView addAnnotations:] + 1832,
3   Mapbox                              0x0000000102deacec -[MGLMapView addAnnotation:] + 120,
4   MultiPlatformLibrary                0x000000010ad1dee4 kfun:dev.icerock.moko.maps.mapbox.MapboxController#addMarker(dev.icerock.moko.resources.ImageResource;dev.icerock.moko.geo.LatLng;kotlin.Float;kotlin.Function0<kotlin.Unit>?){}dev.icerock.moko.maps.Marker + 1248,
5   MultiPlatformLibrary                0x000000010ad2d260 kfun:com.icerockdev.library.MapboxViewModel.$createMarkersCOROUTINE$5.invokeSuspend#internal + 1036,
6   MultiPlatformLibrary                0x000000010ad2db08 kfun:com.icerockdev.library.MapboxViewModel.createMarkers#internal + 212,
7   MultiPlatformLibrary                0x000000010ad30204 kfun:com.icerockdev.library.MapboxViewModel.$start$lambda-1COROUTINE$7.invokeSuspend#internal + 5244,
8   MultiPlatformLibrary                0x000000010aa2c1ac kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 532,
9   MultiPlatformLibrary                0x000000010ab2f2bc kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2236,
10  MultiPlatformLibrary                0x000000010ad26200 kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.dispatch$lambda-0#internal + 112,
11  MultiPlatformLibrary                0x000000010ad26728 kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$10.invoke#internal + 64,
12  MultiPlatformLibrary                0x000000010ad26788 kfun:dev.icerock.moko.mvvm.viewmodel.UIDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$10.$<bridge-UNN>invoke(){}#internal + 64,
13  MultiPlatformLibrary                0x000000010ad26bb8 _6465762e696365726f636b2e6d6f6b6f3a6d76766d_knbridge4 + 188,
14  libdispatch.dylib                   0x000000010c0fe338 _dispatch_call_block_and_release + 24,
15  libdispatch.dylib                   0x000000010c0ff730 _dispatch_client_callout + 16,
16  libdispatch.dylib                   0x000000010c10d710 _dispatch_main_queue_callback_4CF + 976,
17  CoreFoundation                      0x00000001a1da67fc 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 690172,
18  CoreFoundation                      0x00000001a1da16d0 50CF3336-313F-3A7D-9048-CB1ED8EC3368 + 669392,
19  CoreFoundation                      0x00000001a1da0ce8 CFRunLoopRunSpecific + 424,
20  GraphicsServices                    0x00000001abeeb38c GSEventRunModal + 160,
21  UIKitCore                           0x00000001a5ecf444 UIApplicationMain + 1932,
22  moko-maps                           0x000000010236565c main + 64,
23  libdyld.dylib                       0x00000001a1c288f0 3D6D64B4-CB2B-3CC4-A7E9-02774DF7AE74 + 6384

Implement show of route for Mapbox iOS

For now MapboxDirections Cocoapod can't be processed by cinterop tool, it not allow us to implement buildRoute method.

Exception in thread "main" java.lang.Error: /var/folders/c6/fcjx052j7jx6dn5jdygs4_h00000gp/T/tmp8468429452304852533.m:1:9: fatal error: could not build module 'MapboxNavigation'
	at org.jetbrains.kotlin.native.interop.indexer.UtilsKt.ensureNoCompileErrors(Utils.kt:152)
	at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesASTFiles(ModuleSupport.kt:67)
	at org.jetbrains.kotlin.native.interop.indexer.ModuleSupportKt.getModulesInfo(ModuleSupport.kt:13)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.buildNativeLibrary(main.kt:499)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.processCLib(main.kt:264)
	at org.jetbrains.kotlin.native.interop.gen.jvm.MainKt.interop(main.kt:72)
	at org.jetbrains.kotlin.cli.utilities.InteropCompilerKt.invokeInterop(InteropCompiler.kt:45)
	at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:19)
	at org.jetbrains.kotlin.cli.utilities.MainKt.main(main.kt:37)
Task :maps-mapbox:cinteropCocoapodMapboxNavigationIosX64 in maps Finished

We should wait for fix of cinterop, or create own cocoapod, what will contains all work with MapboxDirections inside, and create interop with own cocoapod, not directly to MapboxDirections

update to kotlin 1.3.70

Question. Is there a support of offline maps?

I can not see in your docs if this library supports offline maps on android and ios .
is it possible?
I already have maps (OSM tiles) stored in .sqlite files. For different regions supported by my android app. I use osmdroid library for that app and ot works fine with .sqlite stored maps
Is there a way to use offline maps with moko-maps and can i reuse my .sqlite sources for it?

Memory leak

GoogleMapcontroller didn't deinit. When init ViewModel with GoogleMapController, memory grows a lot, but when ViewModel go out from memory, GoogleMapController stay in memory

Mapbox crashed on iOS randomly

0   ???                                 0x0000000124e744a0 0x0 + 4914103456,
1   Snow Tinder                         0x00000001027f8500 main + 0,
2   libobjc.A.dylib                     0x0000000106b6c6a6 _ZN11objc_object17sidetable_releaseEb + 68,
3   MultiPlatformLibrary                0x0000000104a76b62 Kotlin_ObjCExport_releaseAssociatedObject + 34,
4   MultiPlatformLibrary                0x0000000104a76451 _ZN12_GLOBAL__N_113freeContainerEP15ContainerHeader + 1073,
5   MultiPlatformLibrary                0x0000000104a75e55 _ZN12_GLOBAL__N_111decrementRCEP15ContainerHeader + 197,
6   MultiPlatformLibrary                0x0000000104a70a2d _ZN12_GLOBAL__N_114garbageCollectEP11MemoryStateb + 1149,
7   MultiPlatformLibrary                0x0000000104a7fd8a ReleaseHeapRefStrict + 250,
8   MultiPlatformLibrary                0x0000000104a7b2d5 _ZN27BackRefFromAssociatedObject9tryAddRefEv + 229,
9   MultiPlatformLibrary                0x0000000104a66351 _ZN12_GLOBAL__N_113_tryRetainImpEP11objc_objectP13objc_selector + 65,
10  libobjc.A.dylib                     0x0000000106b6c2f8 objc_loadWeakRetained + 245,
11  Mapbox                              0x0000000103fb9f2c -[MGLMapView delegate] + 16,
12  Mapbox                              0x0000000103fb6233 -[MGLMapView cameraIsChanging] + 136,
13  Mapbox                              0x0000000103f44f69 _ZN14MGLMapViewImpl18onCameraIsChangingEv + 35,
14  Mapbox                              0x0000000103cae34a _ZNSt3__110__function6__funcIZN4mbgl9Transform15startTransitionERKNS2_13CameraOptionsERKNS2_16AnimationOptionsENS_8functionIFvdEEERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEEE3$_5NS_9allocatorISK_EEFbNSD_10time_pointINSD_12steady_clockESH_EEEEclEOSP_ + 378,
15  Mapbox                              0x0000000103cacdc7 _ZN4mbgl9Transform17updateTransitionsERKNSt3__16chrono10time_pointINS2_12steady_clockENS2_8durationIxNS1_5ratioILl1ELl1000000000EEEEEEE + 135,
16  Mapbox                              0x0000000103ca96fa _ZN4mbgl3Map4Impl8onUpdateEv + 74,
17  Mapbox                              0x0000000103d592b0 _ZN4mbgl8Renderer4Impl6renderERKNS_10RenderTreeE + 2112,
18  Mapbox                              0x0000000103d57793 _ZN4mbgl8Renderer6renderERKNS_16UpdateParametersE + 51,
19  Mapbox                              0x0000000103f98571 -[MGLMapView renderSync] + 105,
20  Mapbox                              0x0000000103f46811 -[MGLMapViewImplDelegate glkView:drawInRect:] + 39,
21  GLKit                               0x000000011a742ffd -[GLKView _display:] + 283,
22  Mapbox                              0x0000000103f994ee -[MGLMapView updateFromDisplayLink:] + 433,
23  QuartzCore                          0x0000000105c9ed97 _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 663,
24  QuartzCore                          0x0000000105d6d4a2 _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 297,
25  CoreFoundation                      0x0000000107636096 __CFMachPortPerform + 150,
26  CoreFoundation                      0x0000000107662419 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41,
27  CoreFoundation                      0x0000000107661a7b __CFRunLoopDoSource1 + 459,
28  CoreFoundation                      0x000000010765c00a __CFRunLoopRun + 2490,
29  CoreFoundation                      0x000000010765b302 CFRunLoopRunSpecific + 626,
30  GraphicsServices                    0x000000010d7bf2fe GSEventRunModal + 65,
31  UIKitCore                           0x00000001101d2ba2 UIApplicationMain + 140,
32  Snow Tinder                         0x00000001027f8538 main + 56,
33  libdyld.dylib                       0x0000000108fa0541 start + 1

Extensions for Yandex.Maps!

Hi! I want to firstly thank you for your great contributions to Kotlin Multiplatform Project, you guys helped me a lot!
I want to ask you to provide support for Yandex.Maps. It's widely used in post-Soviet countries because it provides more accurate data than Google Maps, Mapbox or even 2GIS. I'd also like to see 2GIS support, but Yandex has a bigger priority since it's user engagement is larger. Thanks!

Select marker

Need callback for select marker
Id for marker, and pass it in callback for select

Update moko-resources dependency without cinterop-pluralizedString

In moko-resources 0.21.0 release cinterop was removed as unused. But Kotlin/Native have own list of dependencies inside klib. All libraries, that depends on moko-resources, have inside own manifest file in klib dependency to dev.icerock.moko:resources-cinterop-pluralizedString. So gradle download new version of moko-resources (0.21.0) and try to compile project, but Kotlin/Native see own dependencies list and see that moko-maps depends on dev.icerock.moko:resources-cinterop-pluralizedString but that library not exist anymore and gradle not download it.
As result we see:

error: could not find "dev.icerock.moko:resources-cinterop-pluralizedString" in [/Users/amikhailov/.konan/kotlin-native-prebuilt-macos-aarch64-1.8.10/bin, /Users/amikhailov/.konan/klib, /Users/amikhailov/.konan/kotlin-native-prebuilt-macos-aarch64-1.8.10/klib/common, /Users/amikhailov/.konan/kotlin-native-prebuilt-macos-aarch64-1.8.10/klib/platform/ios_arm64]

need to publish new version with updated moko resources

Correct calculation of area for Mapbox getSimilarNearAddresses on Android

API pass only radius value when we call getSimilarNearAddresses, but Mapbox not support search of simmilar address and we use Geocoder of Android OS. This implementation require min/max lat/lng for search, not just radius.
For now implemented this logic:

// TODO calculate bounds from radius
        @Suppress("MagicNumber")
        val radiusLatitude = maxRadius * 0.001

        @Suppress("MagicNumber")
        val radiusLongitude = maxRadius * 0.001

It should be fixed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.