开发者

Add an image to Android MapView

If I have an image in a Mercator map projection with a particular upper left latitude/longitude and lower right lati开发者_JS百科tude longitude, how would I add this to the Android MapView?

Do I have to extend the overlay class, figure out my current MapView extents and then clip the image using like a BufferedImage? Or do I have to have the image already set up in the same tile structure that Google Maps uses and then just add these tiles to the MapView using an extended Overlay class?


you could use mapView.getLatitudeSpan() and mapView.getLongitudeSpan() to determine if the geo-located image should be displayed or not.


Well the projection is really irrelevant. I could plot it in any map projection, its just that I believe that Google maps also uses Mercator. One other question that I have, is there an easy way to get the map extents of the display, so that I can figure out whether an Overlay layer should draw this image or not? Would that be gotten from the projection contained in the mapView?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜