HMS-Core / hms-mapkit-demo

HMS Map Kit demo provides an example of intergrating HMS Map Android SDK. Personalizing how your map displays and interacts with your users tailors their experience to them
https://developer.huawei.com/consumer/en/hms/huawei-MapKit?ha_source=hms1
Apache License 2.0
115 stars 43 forks source link

Can not move map #23

Open Mervetafrali opened 11 months ago

Mervetafrali commented 11 months ago

Since this method used by the Huawei class was called constantly, even if I moved the map, it returned to its previous position. override fun configureMapOnStart(initialCoordinate: MTSLatLng?, zoom: Float) { if (!initialRequestSent) { mapFragment!!.zoomToLocation( MTSLatLng(initialCoordinate?.latitude.orZero(), initialCoordinate?.longitude.orZero()), zoom ) } } I reached the solution by adding a flag to check if the map was created. The same class does not cause problems with google map.