Differences between ItemizedOverlay and Overlay class

≯℡__Kan透↙ 提交于 2019-12-09 05:52:47

问题


Can someone tell my when to use Overlay or when to use ItemizedOverlay class!

What are differences between this two classes?

Draw methods do the same thing?

Can I use only ItemizedOverlay class in my project or I must use and Overlay as base class!

Thanks


回答1:


Overlay is a general overlay. ItemizedOverlay is a subclass that makes it easier to create an overlay that is a discrete series of marked points on the map. So, if you are trying to show a bus route, or shade a region, or something like that, Overlay is the class you want. If you are trying to show a collection of restaurants, or churches, or whatever, ItemizedOverlay works.

Note, though, that ItemizedOverlay is designed for modest numbers of points (e.g., dozens). If you have a large number of points, you may need to create your own Overlay just for performance reasons.



来源:https://stackoverflow.com/questions/3628668/differences-between-itemizedoverlay-and-overlay-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!