It seems that mapbox updated its ios SDK recently with some huge change.
For example, it seems that it is not possible anymore to provide a layer as a custom marker, or to animate a marker as in this example:
https://www.mapbox.com/mapbox-ios-sdk-legacy/examples/cakeyframeanimation/
It seems that every reference to that example is related to a RMM* named class which has been deprecated.
How can I implement an animation in a Mapbox's MGLMapView?
Any kind of suggestion is appreciated, from a series of png to a CAEmitterLayer, to a generic view to be used as a marker so that I could do anything I want with it.
View-based annotations/markers is a feature that will be coming in the v3.3.0 release. Once you’re able to use views, you’ll also be able to use the same Core Animation methods you’re familiar with.
If you would like to try out a pre-release version of v3.3.0, have a look at alpha 3, which has preliminary support for view-based annotations — see MGLAnnotationView.
Related
I'm using MapBox SDK 3.1.1 for iOS, and it doesn't seem there's a way to draw a circle as an overlay (Polygons are included as primitives)
There used to be a way on the legacy SDK, but it's no longer maintained.
Can someone provide insights?
thanks!
If anyone is interested, there's currently no replacement for RMCircle (present in in 1.x version) in the 3.1 SDK.
There's a workaround described here, that uses MapBox annotations
https://github.com/mapbox/mapbox-gl-native/issues/2167#issuecomment-169265375
Look for
- (MGLPolygon*)polygonCircleForCoordinate:(CLLocationCoordinate2D)coordinate withMeterRadius:(double)meterRadius
In addition to what friedbunny suggested (and based on info in the link he posted), you can fix the zoom level, and use metersperpixelatlatitude to make an image of fixed size for your annotation. Then, use the imageForAnnotation MGLMapViewDelegate callback to provide the "overlay" as the MGLAnnotationImage.
If you want to change zoom levels with this method though, you're looking at some pretty tricky juggling of delegate methods and possibly several minor hacks.
My problem is that I cannot find any up to date tutorials with iOS6 and map kit that include storyboards instructing you on how to apply annotations/pins with the use of for-ordinates.
My homework tells me that the tutorials out there are xib, iOS 5 related which now defeats the point because apple implemented their own maps with ios6 and are no longer using Google's..
I've used google and checked out apple's developer's guide..
I can't be the only one searching for this answer...?
Many thanks.
The MapKit API is essentially same between iOS5 and iOS6 - what changed was the source of the mapping data, the graphic design of the maps, and the use of vector data over bitmap data. But most of this is opaque at the API level. Between iOS versions you continue to use the same framework and classes. There are a few additions (such as MKMapItem, routing) and a few simplifications, but any code written for Apple's iOS5 MapKit SDK will work with iOS6 MapKit.
Issues of xib vs. storyboard tutorials are not specific to MapKit, and nothing in MapKit relies on one or the other, so you shouldn't allow that to confuse you. However, here is an iOS6 tutorial to get you started:
http://www.raywenderlich.com/21365/introduction-to-mapkit-in-ios-6-tutorial
For an overview of changes between ios5 and ios6 MapsKit, take a look at the WWDC video from 2012,Getting Around Using Map Kit.
so by using the code below, I've manage to place one pin by using coordinates and placing it in viewDidLoad, but when the code is copied, it fails to build. Any solutions for adding multiple co-ordinates?
I have to create the same animation like http://dribbble.com/shots/1078726-Animated-UI-AE-giveaway in my iOS application.
Is there any iOS SDK for the same which can be used for this?
Any help would be appreciated
That depends on what SDK support you are looking for. You can rotate views in 3D space with a perspective using Core Animation allowing you to fold them.
I would recommend that you read this article about the Anatomy of a Folding Animation. That should get started with folding views. The rest seems to be applying the same kind of fold animation many different times on different parts of the UI.
You will not get any ready made project same as you want.
But you can always learn from example.
If you really want to learn animation in iOS that you should read:
Basic iOS 6 iPhone Animation using Core Animation
You can alo refer Apple iOS document of Core Animation: About Core Animation
If you want to see example from some developer that visit : Search results for animation
This two I think very related to you :
FlipTransform for iOS
MPFoldTransition for iOS
PaperFold-for-iOS
My app currently is using the google maps api v2 for iOS. I would like to add custom tiled overlays, which I realize is not support by the api.
The first approach I took to this problem was to try to extend the GMSOverlay class but I later found that the drawLayer method was never being called.
Next, I tried having my custom class extend UIView and then add my class as a subview to the map view. I was able to use the GMSMapViewDelegate method didChangeCameraPosition to report camera updates back to my custom class so that the tiles could be redrawn. This mostly worked with a couple exceptions, first, only the initial set of tiles would load, and if you panned or zoomed from the initial X,Y,Z the map tiles would not update via the drawInRect method. The second problem was that my custom UIView was covering all the markers and their corresponding callouts after tapping.
My question is, does anyone having any experience adding custom tiles or subclassing the GMSOverlay class to add, for example, custom weather tiles over top of the google map?
Good news from the release notes of v. 1.3.0 of Google Maps SDK for iOS (released today):
Support for custom tile overlays (image-based) via GMSTileLayer.
See: https://developers.google.com/maps/documentation/ios/releases
Have you tried looking at this example?
https://github.com/mtigas/iOS-MapLayerDemo
It is based on the MKMapKit, not the Google-Map SDK. It supports tiles with zoom and is very easy to extend, and might point you in the right direction.
If you need to generate tiles for the map, you can use MapTiler
http://www.maptiler.org/
The Windows version of MapTiler gives more fine grained control of the tile generation.
I want to create an app with 6 views like the sides of a cube, and be able to swipe in each direction to move to another side of the cube.
So I want an animation between view controllers that looks like a cube being rotated.
Some old posts (eg cube structure view controllers) mention the use of #"cube" for the transition type to use in a CATransition, and call UIViewController's transitionFromViewController:toViewController:duration:options:animations:completion method to easily animate between two view controllers.
However, the iOS 6 documentation and header files make no mention of using #"cube" or any other of the string literals mentioned in the old (iOS 5 era) posts.
And I can't find anything about that being deprecated in the iOS 6 release notes or API diffs.
The animation works, but I'm worried my app will be rejected if I use it.
Will it? What's the alternative?
Taken from here:
http://iphonedevsdk.com/forum/iphone-sdk-development/102300-undocumenten-catransition-type.html
"I asked Apple's engineers about this specific issue. They said that officially, undocumented transition effects are just like any other undocumented API feature, and are not allowed.
However, their automated tools are not set up to detect using undocumented transitions like they are using undocumented methods, so you may get away with it, and you may not. It's a gamble."