Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinates become 0 no matter what I set them too. (centerCoordinate) using RMTileSource #197

Open
SudoPlz opened this issue Sep 11, 2013 · 0 comments

Comments

@SudoPlz
Copy link

SudoPlz commented Sep 11, 2013

My code is this

//Creating the point
CLLocationCoordinate2D centerPoint;
 centerPoint.latitude = 36.966029;
 centerPoint.longitude = -121.977739;

//print out its contents
NSLog(@"Coords should be: lat %f,long %f ", centerPoint.latitude,centerPoint.longitude);

// create the map view
_map = [[RMMapView alloc]
            initWithFrame: self.view.bounds
            andTilesource:cartoSource
            centerCoordinate:centerPoint
            zoomLevel:6
            maxZoomLevel:18
            minZoomLevel:1
            backgroundImage:nil];

//print out its centerCoordinates
NSLog(@"NEW coords: lat %f,long %f ", _map.centerCoordinate.latitude,_map.centerCoordinate.longitude);

//set the center coordinates AGAIN
[_map setCenterCoordinate:centerPoint animated:0];

//print out centerCoordinates
NSLog(@"NEW coords: lat %f,long %f ", _map.centerCoordinate.latitude,_map.centerCoordinate.longitude);

The NSLogs print out the following:

Coords should be: lat 36.966029,long -121.977739 
NEW coords: lat 0.000000,long 0.000000 
NEW coords: lat 0.000000,long 0.000000 
NEW coords: lat 0.000000,long 0.00 000

No matter what coordinates I set my centerCoordinate to, it is always 0.
The same does not happen when I use another constructor like
say
[initWithrame:];

What am I doing wrong? Is this a bug?

yarry pushed a commit to yarry/route-me that referenced this issue Jul 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant