开发者

Partial display on mapkit view

I'm facing an issue with MapKit for too long now and I really need your help to find wh开发者_运维知识库ere the problem might come from... I'm drawing countries borders on a mapkit view. To do so, I add a customized polygon object as an overlay to my map. When it is added, the "viewForOverlay" method returns an overlay view which has the country shape and a specific color that depends on the value of a parameter for this country. Unfortunately, when I try to draw these countries only the polygons located in a square on the left upper corner of the map are displayed, the others remaining invisible... And those who only partially belongs to this square are simply cut...

Would anyone have an hint about where my issue might come from or what could explain this quite strange behavior ?

Great thanks !

Benja


As it might help some of you, I just wanted to let you know that I finally managed to make it work thanks to Anna's help. When creating a customized overlay class (even when it directly inherits from a standard class such as MKPolygon), the boundingMapRectObject needs to be set as a property of your class (that's at least the way I solved it). Hope it will help some of you !

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜