Skip to content

Commit

Permalink
build: version 4.8.0 (#300)
Browse files Browse the repository at this point in the history
* feat: update sdk

* feat: tsc build and ts update
  • Loading branch information
Kt00s authored Sep 27, 2024
1 parent dfee263 commit 21c5399
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 50 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ type MasstransitVehicles = 'bus' | 'trolleybus' | 'tramway' | 'minibus' | 'subur

type Vehicles = MasstransitVehicles | 'walk' | 'car';

type MapType = 'none' | 'raster' | 'vector';


interface DrivingInfo {
time: string;
Expand Down Expand Up @@ -259,7 +257,6 @@ type YandexLogoPadding = {
| maxFps | number | 60 | Максимальная частота обновления карты |
| logoPosition | YandexLogoPosition | {} | Позиция логотипа Яндекса на карте |
| logoPadding | YandexLogoPadding | {} | Отступ логотипа Яндекса на карте |
| mapType | string | 'vector' | Тип карты |
| mapStyle | string | {} | Стили карты согласно [документации](https://yandex.ru/dev/maps/mapkit/doc/dg/concepts/style.html) |
#### Доступные методы для компонента **MapView**:
Expand Down
2 changes: 1 addition & 1 deletion RNYamap.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Pod::Spec.new do |s|
# s.requires_arc = true

s.dependency "React"
s.dependency "YandexMapsMobile", "4.6.1-full"
s.dependency "YandexMapsMobile", "4.8.0-full"
end
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ android {

defaultConfig {
compileSdkVersion 34
minSdkVersion 23
minSdkVersion 26
targetSdkVersion 34
versionCode 1
versionName "1.1"
Expand All @@ -33,6 +33,6 @@ repositories {
dependencies {
implementation 'com.google.android.gms:play-services-location:+'
implementation 'com.facebook.react:react-native:+'
implementation 'com.yandex.android:maps.mobile:4.6.1-full'
implementation 'com.yandex.android:maps.mobile:4.8.0-full'
implementation 'androidx.core:core-ktx:1.13.1'
}
2 changes: 1 addition & 1 deletion android/src/main/java/ru/vvdev/yamap/RNYamapModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class RNYamapModule internal constructor(context: ReactApplicationContext?) :
@ReactMethod
fun setLocale(locale: String?, successCb: Callback, errorCb: Callback?) {
UiThreadUtil.runOnUiThread(Thread {
I18nManagerFactory.setLocale(locale)
MapKitFactory.setLocale(locale)
successCb.invoke()
})
}
Expand Down
7 changes: 5 additions & 2 deletions android/src/main/java/ru/vvdev/yamap/view/YamapView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ import com.yandex.mapkit.traffic.TrafficLevel
import com.yandex.mapkit.traffic.TrafficListener
import com.yandex.mapkit.transport.TransportFactory
import com.yandex.mapkit.transport.masstransit.FilterVehicleTypes
import com.yandex.mapkit.transport.masstransit.FitnessOptions
import com.yandex.mapkit.transport.masstransit.Route
import com.yandex.mapkit.transport.masstransit.RouteOptions
import com.yandex.mapkit.transport.masstransit.Section
import com.yandex.mapkit.transport.masstransit.Session
import com.yandex.mapkit.transport.masstransit.TimeOptions
Expand All @@ -82,6 +84,7 @@ open class YamapView(context: Context?) : MapView(context), UserLocationObjectLi
private var userLocationIconScale = 1f
private var userLocationBitmap: Bitmap? = null
private val routeMng = RouteManager()
private var routeOptions: RouteOptions = RouteOptions(FitnessOptions(false))
private val masstransitRouter = TransportFactory.getInstance().createMasstransitRouter()
private val drivingRouter: DrivingRouter
private val pedestrianRouter = TransportFactory.getInstance().createPedestrianRouter()
Expand Down Expand Up @@ -338,11 +341,11 @@ open class YamapView(context: Context?) : MapView(context), UserLocationObjectLi
}
}
if (vehicles.size == 0) {
pedestrianRouter.requestRoutes(_points, TimeOptions(), true, listener)
pedestrianRouter.requestRoutes(_points, TimeOptions(), routeOptions, listener)
return
}
val transitOptions = TransitOptions(FilterVehicleTypes.NONE.value, TimeOptions())
masstransitRouter.requestRoutes(_points, transitOptions, true, listener)
masstransitRouter.requestRoutes(_points, transitOptions, routeOptions, listener)
}

fun fitAllMarkers() {
Expand Down
3 changes: 1 addition & 2 deletions build/components/ClusteredYamap.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { ViewProps, ImageSourcePropType, NativeSyntheticEvent, ListRenderItemInfo } from 'react-native';
import { MapType, Animation, Point, DrivingInfo, MasstransitInfo, RoutesFoundEvent, Vehicles, CameraPosition, VisibleRegion, ScreenPoint, MapLoaded, InitialRegion, YandexLogoPosition, YandexLogoPadding } from '../interfaces';
import { Animation, Point, DrivingInfo, MasstransitInfo, RoutesFoundEvent, Vehicles, CameraPosition, VisibleRegion, ScreenPoint, MapLoaded, InitialRegion, YandexLogoPosition, YandexLogoPadding } from '../interfaces';
export interface ClusteredYaMapProps<T = any> extends ViewProps {
userLocationIcon?: ImageSourcePropType;
userLocationIconScale?: number;
Expand All @@ -16,7 +16,6 @@ export interface ClusteredYaMapProps<T = any> extends ViewProps {
showUserPosition?: boolean;
nightMode?: boolean;
mapStyle?: string;
mapType?: MapType;
onCameraPositionChange?: (event: NativeSyntheticEvent<CameraPosition>) => void;
onCameraPositionChangeEnd?: (event: NativeSyntheticEvent<CameraPosition>) => void;
onMapPress?: (event: NativeSyntheticEvent<Point>) => void;
Expand Down
2 changes: 1 addition & 1 deletion build/components/ClusteredYamap.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions build/components/Yamap.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from 'react';
import { ViewProps, ImageSourcePropType, NativeSyntheticEvent } from 'react-native';
import { Point, ScreenPoint, DrivingInfo, MasstransitInfo, RoutesFoundEvent, Vehicles, CameraPosition, VisibleRegion, InitialRegion, MapType, Animation, MapLoaded, YandexLogoPosition, YandexLogoPadding } from '../interfaces';
import { Point, ScreenPoint, DrivingInfo, MasstransitInfo, RoutesFoundEvent, Vehicles, CameraPosition, VisibleRegion, InitialRegion, Animation, MapLoaded, YandexLogoPosition, YandexLogoPadding } from '../interfaces';
export interface YaMapProps extends ViewProps {
userLocationIcon?: ImageSourcePropType;
userLocationIconScale?: number;
showUserPosition?: boolean;
nightMode?: boolean;
mapStyle?: string;
mapType?: MapType;
onCameraPositionChange?: (event: NativeSyntheticEvent<CameraPosition>) => void;
onCameraPositionChangeEnd?: (event: NativeSyntheticEvent<CameraPosition>) => void;
onMapPress?: (event: NativeSyntheticEvent<Point>) => void;
Expand Down
Loading

0 comments on commit 21c5399

Please sign in to comment.