Mapkit with multiple annotations - iphone

I have a map displaying multiple annotations.
I'd like to mimic the behavior of the Places tab on the Photos built-in app (iOS 4), where the annotations are automatically joined together or splited apart as the user changes the zoom level.
How do I do that?
Thanks!

The specific clustering functionality that is used in the 'Places' feature of The Photos app is not exposed to developers currently. If your are looking for a magic library, sample code or the like to do this currently you are out of luck.
If you are very comfortable with MapKit and clustering techniques in general you could work on rolling your own solution or contributing to a public effort to achieve this.
Some things to look at:
iPhone Map Kit cluster pinpoints
http://googlegeodevelopers.blogspot.com/2009/04/markerclusterer-solution-to-too-many.html

Related

Creating overlays for different apps in OSX

I want to create an app for OSX which would work as an addon (displaying some overlaying information) to other app. Something like Poker Tracker for example - it shows extra information for poker games while playing on tables.
Just wondering is it possible using Swift? Can you point me to some direction what to look for? some libraries helping with such case? Never developed anything for OSX but keen to learn.
Thanks in advance.
Just wondering is it possible using Swift?
Yes, you can use Swift to create macOS applications. It's not magic, though -- your Swift code can only do things that are actually possible.
Can you point me to some direction what to look for?
Look for an API that lets other apps interact with the host application. That API will define what your "add on" application can reasonably do.
Without some sort of API or scripting interface, it's going to be very difficult to write a program that interacts with the host application. The best option is probably the Accessibility API in macOS. Accessibility is meant as an assistive technology, but it's often repurposed for tasks like automated testing. You might be able to use it to gain some level of control over the host app.
As far as I know it doesn't expose any API, so it would need to be image scraped.
This is really a tall order, and doubly so if you're asking basic questions about language capabilities. I think you'd have much better luck creating an efficient user interface so that the user could enter the relevant information directly, e.g. what cards the other users are showing, bet sizes, etc.

BlackBerry 10.2 Map is supporting overlay maps?

We experienced so many problems to port a geomapping application to BlackBerry 10. 6-7 months a go, BlackBerry 10 Map service was not supporting overlay maps.
Are there any improvements on BlackBerry 10.2 on it?
The design of the mapping system in BB10 seems very well suited to a developer providing a source for overlay tiles -- either from a network server source or locally generated from data -- but I have not seen any indication that such API additions are on the road map.
There are some small improvements in 10.2. We have GeoPolyline and GeoPolygon classes. Unfortunately while using these classes with the 10.2 Beta API does not produce compilation or run time errors, I can't get them to produce visible marks on the map either.
The ability to overlay data on a map or, by suppressing the default background tiles, creating all new maps that provide the same UI experience to the user as other mapping solutions on the platform seems like too powerful a tool to pass up. I hope they get around to it soon.
There isn't any improvement yet...

Advanced iOS Interface Design?

I've done a bit of iPhone development (3 apps in the appstore currently) but the interface has been pretty plain. I've used the stock components for the most part (UITableViewController, etc.) with a little bit of customization, but for the most part everything looks pretty generic. I'd like to get started developing apps with a richer user interface, but haven't found any good resources to get me started.
What resources have you all come across that outline how to create more advanced iOS interfaces (both iPhone and iPad)? Books? Blog entries? Just looking at the apps I have installed right now, some of the interfaces I've been very impressed with are the ESPN Score Center, XFINITY TV, Facebook, etc.
What about 3rd party interface component libraries? Are there any you recommend that provide more advanced interface components than those in the stock iOS library?
I'd love to take a look at any resources that you recommend for getting started.
I love Ray Wenderlich's tutorials. He's got one on Core Graphics which allows you to draw your own Table Views with headers, buttons, and bezier-curved footers!
Here's a little secret that often gets overlooked: a lot of the cool UI elements you see are stock Apple elements that have been customised to the brink of no return.
The main reason for this is Apple have put a lot of time and effort into making components that just plain work. A UIScrollView, for example, has had many more combined hours of testing than any app you write could hope to achieve.
The trick is to know exactly how to customise elements. A UITabBar is a good example: I've seen several apps that use their own custom tab bars. The problem is, often they don't handle edge cases particularly well. You might have issues if somebody tries to hit two items at the same time (I've actually seen an app that used their own implementation of a tab-bar crash if you pressed two items at the same time).
But if you use Apple's UITabBarController and either subclass, categorise, or otherwise overload it to get the customisation you want, you get a lot of the low-level event handling stuff for free.
You would be amazed with what you can do with a UITableViewController, and you get things like view recycling for free (some of the apps I've worked on have things like independent cell resizing, customised animation of cells, horizontal implementations of a tableview, etc).
Not a particularly useful answer, I grant you, but the point I want to get across here is once you've designed your kick-ass UI step back and consider what can be achieved with the existing toolset before rolling your own. You'll thank me when you come to bug fixing!
I also like Three20. Until now I didn't use it in my projects, but I played with it. And there's some really cool stuff in it. ;-) I think that's one way to extend your standard User Interfaces.
Another really cool part is designing your own elements. I like this really. Because you then have in your App something nobody else has. :-D
I've started looking into using Opacity for Mac, it's a pretty neat desktop application where you can generate your own graphical elements (buttons, switches, icons, etc) and then automatically generate the CocoaTouch / Quartz2D classes and headers to drop in your app ... Some elements work best when they're natively drawn on the device, rather than stored/loaded as pngs, or whatever. Moreover, you get #2x Retina display support for free. While not an interface dress-up framework, the fact that it generates Quartz2D code for you makes this a real contender for anyone who's remotely graphically creative but short on complex 2D programming skills.
Speaking of beautiful interfaces, if you're looking for inspiration or actual graphical elements to put in your interface, I frequently get some great ideas at 365psd ... they actually provide the Photoshop documents to reproduce some eye dropping UI goods, for FREE. Some places may just give you a PNG, but this does little good if you want to scale it (#2x or iPad) or customize it to fit your needs. It's like open source for graphical UI design.

Can I use my own tiles in MapKit, instead of Google's?

I'm currently trying to decide wether to accept a client's proposal or not. Basically, I'm asked to create a MapView that displays markers at several locations on a map, with the additional requirement that the client's own map tiles are used instead of Google Maps'.
I do not know yet how the client stores their own map tiles, but I was assured that I'd be able to convert them into any format I'd need.
Is it possible to use different map tiles in MapKit's MapView?
Do you have good online literature about this? Links please?
If this is possible, I'd propably have to create a server that sends the files to the device.
How hard is it to create such a server? Is it just "setup apache, done." or is there more to it?
How hard, or time-consuming would both these things be, in relation to just setting up a normal MapView?
Thanks for your answers.
You can't use custom tiles with MapKit. You're limited to using the ones provided by Google.
It could be easier to create a "Google Maps-ish" web app that uses the custom titles and can be viewed on the iPhone through UIWebView?
Have you looked at alternate map frameworks on the iPhone? I know there is at least one open source map engine, also with tiles (that are not as good as the Google tiles, but hey).
A decent set of them is here:
Creating an IPhone Map application
The "easiest" way to do this within the Google Map framework is simply to map the client's map as a texture on top of the "ground." You can create textures at different resolutions, for different zoom factors. Then you won't need to do any special coding at all --- everything will just work.
The way you do this is with a KML region that maps to ground level.
See: http://earth.google.com/outreach/tutorial_region.html

are there any good statistic visualization libraries for the iphone?

I wonder if every developer would have to code statistic visualization by him/herself, or if there's a lib already that can be used to draw charts, curves, stats, etc. (like in the stock app for example)?
Take a look at this graphing package, it will also compile on the iPhone:
http://www.mpkju.fr/~graphview/page1/page1.html
Note that I've not used it yet, I ran across it before and made a note of the potential usefulness of it.
You might use the Google Charts API, and just use the images that come back from that:
http://code.google.com/apis/chart/
For instance, you can retrieve the bytes from this URL
http://chart.apis.google.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World
and insert them into an NSImage, or just let the web view do the rendering for you.
Core Plot is a cross-platform (Mac / iPhone) plotting framework being developed by a group of scientifically-minded Cocoa developers. It is based on Core Animation, and was advancing quite quickly the last time I checked in. You might want to read the mailing list archives to get an idea of the design goals and current state of the framework.