ios - how to create MKCoordinateRegion -



ios - how to create MKCoordinateRegion -

how create mkcoordinateregion .

nsstring *latitudestring = [locationstring substringtoindex:startrange.location]; nsstring *longtitudestring = [locationstring substringwithrange:nsmakerange(startrange.location+2,((endrange.location-1)-(startrange.location+2)))]; cllocationcoordinate2d coord = cllocationcoordinate2dmake((int)latitudestring, (int)longtitudestring); mkcoordinateregion part = mkcoordinateregionmakewithdistance(coord, 500, 500);`

i error "invalid part center:+392128672.00000000, +392128704.00000000 span:+0.00448287, -0.01195557"

remove type casting. utilize below code.

cllocationcoordinate2d coord = cllocationcoordinate2dmake([latitudestring doublevalue], [longtitudestring doublevalue]); mkcoordinateregion part = mkcoordinateregionmakewithdistance(coord, 500, 500);

ios iphone objective-c ios7 mkcoordinateregion

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -