is it possible to change overlay iocn size when zoom osm droid map - overlay

I spent many hours on it but not getting any fruitful response.I am trying to increasing the size of overlay icon when map is zoom but its not work, I am new on this please help on this

Yes it is, however you have to do the work. Basically, you need to create an MapView.onChangeListener and register it. When the zoom level changes, you need to iterate though your overlays and replace the icon with one of a different size.
At some point in your travels, you'll probably figure out that there will be concurrency/inconsistency issues with over zealous zoomers and panners. To handle this, you can wait until after the user stops scrolling or zooming after a period of time, then do the work.

Related

MKMap infinite loop setting max zoom height

I have a map view with an overlay. I want to restrict the user from zooming out too far. So if the user scrolls out and cant see part of the overlay it zooms them back in to the max height of the overlay. Like the zooming I also want the user not to be able to scroll of the edge.
I have managed to implement this (or so I thought). The code that I have written works on my iPhone 5 but then when I tested it on my Bosses phone and the simulator the map keeps trying to resize and get stuck in an infinite loop.
Here is a video of my app in the Loop.
From the video I can see that the map should loop as both edges are displayed off the map. To stop this my code zooms in so you cant see both edges before it is meant to move back to the edge the user has moved from.
As I said this works on one of my device but not the others! I have been trying to fix this for three days now and feel like banging my head on the keyboard! Any help would be amazing.
Here is a copy of my Code.
I have commented it and tried to make it easy to under stand.
EDIT: just updated to iOS 6.0.1. It still works on my iPhone 5 but It starts really far zoomed in and sets the min zoom too low

progress circle UIControll iPhone

Anybody know how to make progress indicator of doing something like on a screenshot?
There are mainly two way to do this:
Create and save many images with the progress indicator in various positions. Then use UIImageView to display it, changing the image accordingly to the current progress. This is a easy solution, however it requires you to create (manually) the various images. Besides it's not continuos (even if it can be smooth enough, according to the number of images you save). However, it can give a good effect (according to your needs).
Draw the indicator at runtime. In your case it should not be so hard since your progress indicator is very simple. Take a look at CGContext, it will provide all the method to draw a circle, draw lines and fill a path with a color. This will give a better result than the previous solution, however it requires the indicator to be redrawn every time.
Check out TKAProgressCircleView. Does exactly what you need, I use it myself in couple of apps.

iPhone CorePlot: Candle Stick , how to set more distance between every stick when zoom in and zoom out?

CorePlot: Candle Stick ,
how to set more distance between every stick when zoom in and zoom out?
When i try to zoom out, it looks really terrible.
How can i fix it?
You have several options:
Make the bars narrower using the barWidth property.
Filter your data to show fewer bars. Call -reloadData on the plot to load the filtered data.
Make the whole graph wider (probably not an option on iPhone, but may be practical in an iPad or Mac app).

Zooming a hotspot when it clicked

I have to make some hot spots on my image , so that when i click anyone of them they zoom.
For example consider the image
When i click that butterfly then it zoom
Please provide a good solution
Following are my thinking
Use a button and click it and add a subImageView and zoom it.
Zoom a particular region of this image when touch at that place.
Both ideas have their limitations.In first i have to create a saperate image and also my app size will become very large.
and limitation of second is that it will not zoom exact required image.
I was also thinking of masking but i think that is also not very good way, because this is just a sample, i have many images like this and can be many hot spots on a single image.
please guide.
If you are dealing we rather large images you should check out CATiledLayer, which are very fast and efficient to use.
Check out this blog post, including the demo app:
http://www.cimgf.com/2011/03/01/subduing-catiledlayer/

CATiledLayer changing images with different sizes when zooming (Map related :)

I have an UIScrollView with a UIView which in turn contains a CATiledLayer which displays a map.
I have to start with an overview where one can zoom in VERY deep. So I made 4 different images (actually PDFs) with 4 different sizes of the map (the largest has something like 5700 x 6700px)
I add the smallest (the overview) to the CATiledLayer and then swap the images on certain zoom levels.
So far, this kinda works.
The problem is, that when I display the largest map (closest zoom), the tiles get VERY big and it takes ages to draw them (and depending on the levels of detail/bias, the app produces a memory warning an crashes).
I tried to start with the largest map and set the zoom-level to the minimum when the map first shows, but then it takes ages to draw the overview because the tiles become very small (when I don't set it the minimum-zoom, everything works smooth).
I tried to adjust the tile size when I switch the maps - but apparently, this doesn't work.
Any idea how I can solve this? ;)
Thanks for any help...
Edit:
I'm trying now to define two separate CATiledLayers and then swap them when a certain zoom-level is reached - but that makes the app crash?
[myContentView.layer replaceSublayer: tiledLayer with: tiledLayerBig];
oh my... :)
Edit2:
Ok - I got it working - more or less. The only thing that happens now is, that the CATiledLayer behaves strange when I add the largest image. It works fine for a while, but when a certain amount of tiles is drawn, I get a memory warning and the app crashes eventually.
I actually would expect that the invisible tiles would get disposed when they leave the viewport. This doesn't seem to happen, so eventually, all the tiles will be drawn which seems to be too much for the iPhone-memory... :(
Any ideas, how to solve this?
It sounds like the tiles that are no longer being used are not being released from memory. What does your custom override's
- (void)drawRect:(CGRect)rect method
look like?