开发者

mapkit doesn't showing default blue blob on device?

开发者 https://www.devze.com 2022-12-10 12:33 出处:网络
I am using mapkit in my application.i want to show blue blob in mapview.i have set [mapview setShowUserLocation:YES]; but it doe开发者_JS百科sn\'t showing blue blob.also it\'s cordinates are -180.0000

I am using mapkit in my application.i want to show blue blob in mapview.i have set [mapview setShowUserLocation:YES]; but it doe开发者_JS百科sn't showing blue blob.also it's cordinates are -180.0000,-180.0000? how is this happen? is there a bug in mapkit. i am not using location manager to show blue dot.i know that setting showuserlocation to yes will show the blue dot automatically.does someone know why blue blob having negative cordinates and how to solve this problem?


The blue blob isn't default, it's specifically for the Google Maps application. If you want your annotation to show something on the map, you need to provide an MKAnnotationView for it. MapKit comes with the MKPinAnnotationView for free, where you can select a red, green or purple pin. If you want anything else to appear, you will have to provide your own custom view and your own custom art.


if (annotation == aMapView.userLocation) 
{
    return nil; // this might be the moment the location was first detected
}
0

精彩评论

暂无评论...
验证码 换一张
取 消