setRegion setting map to north
DouglasHennrich opened this issue · comments
Douglas Hennrich commented
If I rotate the map and then use setRegion
it sets the map to north and I have to rotate it again
v3.11.1
Hans Knöchel commented
We only call the native methods internally:
- (void)setRegion:(id)args
{
ENSURE_UI_THREAD_1_ARG(args);
ENSURE_TYPE(args, NSDictionary);
id latitude = [args valueForKey:@"latitude"];
id longitude = [args valueForKey:@"longitude"];
id zoom = [args valueForKey:@"zoom"];
id bearing = [args valueForKey:@"bearing"];
id viewingAngle = [args valueForKey:@"viewingAngle"];
ENSURE_TYPE(latitude, NSNumber);
ENSURE_TYPE(longitude, NSNumber)
ENSURE_TYPE_OR_NIL(zoom, NSNumber);
ENSURE_TYPE_OR_NIL(bearing, NSNumber);
ENSURE_TYPE_OR_NIL(viewingAngle, NSNumber);
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:[TiUtils doubleValue:latitude]
longitude:[TiUtils doubleValue:longitude]
zoom:[TiUtils floatValue:zoom def:1]
bearing:[TiUtils floatValue:bearing def:0]
viewingAngle:[TiUtils floatValue:viewingAngle def:0]];
[[[self mapView] mapView] setCamera:camera];
[self replaceValue:args forKey:@"region" notification:NO];
}
So it has to be an issue with the native SDK, which you can lookup and report here.
Douglas Hennrich commented
so how do I set the region on map? I'm trying to put the map on user's location when clicked on a button