Point for coordinate Google Maps iOS

GMSMarker *marker = [[GMSMarker alloc] init];
marker.position = CLLocationCoordinate2DMake(48.f, 35.f);
marker.map = mapView;
CGPoint point = [mapView.projection pointForCoordinate:marker.position];

Why point has NaN values?

Printing description of point: (CGPoint) point = (x=NaN, y=NaN)


Because CLLocationCoordinate2DMake waits for float values and you are sending an integer values instead.

you can do the following:

float pointA = (float) (arc4random() % 10);
float pointB = (float) (arc4random() % 10);

marker.position = CLLocationCoordinate2DMake(pointA, pointB);

Need Your Help

Easiest way to copy an entire SQL server Database from a server to local SQL Express


I need to copy an entire database from a SQL Server 2005 on my server over to my local SQL Express in order to run my application for a presentation. What is the fastest/easiest way to get this do...

How do I access an individual 'type' inside std::list< std::list< type > >

c++ list struct iterator std

I am creating a function that recursively finds structs within structs.