8

I am planning to duplicate the application below just to learn about making geographical apps. How could this high resolution image be generated quickly and without a flicker during the updating? I have been struggling to update my overlays well. My initial problem is flickering once I add new overlays and remove existing ones.

Please don't take offense if you think my question is too easy. I honestly want to hear your ideas/opinions.

NOAA Hi-Def Radar

Radar heatmap screenshot

Tyler Mumford
  • 306
  • 4
  • 12
  • 3
    It seems you have code that you're having a problem with. You're more likely to get help if you share it. – Michael Mior Dec 28 '12 at 05:10
  • 2
    More details are needed. Where are your overlays coming from? are you generating a heatmap with UIBezierPath? do you have trouble animating the paths? – Jano Dec 28 '12 at 10:21
  • @Jano I'm pretty sure he/she's asking how they were able to show a high resolution image on an MKMapView without any performance degradation? – sridvijay Dec 28 '12 at 23:15
  • Have you tried [theAnnotation setCoordinate:newCoordinate]; ? Are you scaling a larger high-res overlay to only display part shown and then moving it, or removing/adding it on each update? – Max Jan 02 '13 at 15:27
  • Have you resolved your problem?). I need the same – Alex Apr 16 '21 at 07:43

2 Answers2

1

Have you seen Apple's HazardMap sample code?

It might be a good starting point. It basically takes some binary data representing earthquake hazard zones and draws them on the map with core graphics. The end result looks similar to your screenshot but isn't as smooth. It's a good foundation nonetheless.

nebs
  • 4,939
  • 9
  • 41
  • 70
0

You might consider looking at UIImageView's animationImages.

If that's not customizable enough for you, you might implement a customized view, override drawRect, and use CGContextDrawImage, passing it the image that's right for the current point in time.

Oh, and you might also consider using UIImage's drawRect.

So many ways to skin the cat :).

beOn
  • 1,799
  • 1
  • 12
  • 13