Is it possible to create marker with animated icon? - ios

I'm using Google Maps SDK for iOS and I would like to display a marker on my map. I've found out that the class GMSMarker is involved but it only accepts UIImage icon.
I would like the icon to be UIView or CALayer such that its contents could be animated. Is this possible?
I know that if needed, both of the aforementioned UI objects can be rendered into UIImage. However, that's utterly unefficient and ugly code. I would be really happy if there was other way.
Thanks in advance,
Pete.

No, the marker (or overlay) can only display UIImage objects, although they do support animated UIImages (see the AnimatedCurrentLocationViewController in the demo project).

Related

Callout for annotation view is cut-off in macOS(Mac-catalyst) app

I am having an issue with annotation view which is shown on Map view.
The call out view on clicking on pin does not showing full address text.
Reference Image
This is working in iOS but not working in Mac catalyst app.
Please help if anyone have any idea.
Thanks all.
You are using MKPinAnnotationView which is deprecated.
Please switch to MKMarkerAnnotationView.
The new class has many advantages.

Here Map SDK IOS (Premium) tap on the marker

Good afternoon, who once worked with heremap sdk premium for ios. How do I make it possible to click on the NMAMapMarker? What they have written in the documentation does not describe it, but maybe I'm wrong.
there are different option available for NMAMapMarker to use.
This represents a marker used to display an icon on a geographical position on a map. The map handles proper placement of icons on the screen as well as panning and rotation.
+mapMarkerWithGeoCoordinates:
+mapMarkerWithGeoCoordinates:icon:
+mapMarkerWithGeoCoordinates:image:
coordinates
icon
draggable
draggingOffsetEnabled
anchorOffset
-initWithGeoCoordinates:
-initWithGeoCoordinates:icon:
-initWithGeoCoordinates:image:
-setAnchorOffsetUsingLayoutPosition:
-setSize:forZoomLevel:
-setSize:forZoomRange:
-resetIconSize
Check for more details : https://developer.here.com/documentation/ios-premium/3.18/api_reference_jazzy/Classes/NMAMapMarker.html#%2Fc:objc(cs)NMAMapMarker(im)initWithGeoCoordinates.
Please revert with your code implementation in case of any further concern.

How to remove an arrow from Google Maps geolocation marker (iOS)?

How do you remove an arrow from Google Maps geolocation marker (iOS)?
This is an arrow I'm talking about
If you really want to remove that arrow everywhere in your app from Google Maps SDK, it might be easiest to modify asset in GoogleMaps.framework.
Just navigate (cd) to GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCoreResources.bundle/ and notice the following files:
GMSSprites-0-1x.png
GMSSprites-0-2x.png
GMSSprites-0-3x.png
If you open these files, you can notice the arrow is there. So just edit directly in the asset by replacing arrow by nothing (transparent pixels).
Note: I haven't test it myself and this is not tested solution, but I believe it should work.
Disclaimer: I'm not sure, but I think this modification might violate Terms & Conditions for using the SDK. I don't get any responsibility for such modification, it's your call...
There is no way to do this with current version of the SDK (1.9.1), and actually there is an open issue with this request: Look here.
As a work around, you can hide the default button with:
_map.myLocationEnabled = NO;
Then create a custom GMSMarker
GMSMarker *pointMarker = [GMSMarker markerWithPosition:currentPosition];
pointMarker.icon = [UIImage imageNamed:#"YourImage"];
pointMarker.map = _map;
And change the position of it using a CLLocationManager, so it always show the current position. It's a bit tricky but is the only way, I could think, that you can achieve this. If you need a more complete example let me know.

Custom info window for GMSMarker utilising UIWebView

I am using the Google Map iOS SDK for a project and have run into a problem whilst trying to implement a custom info window for a GMSMarker object. I have followed the Google video tutorial but instead of using A UILabel and UIImage, I am placing a UIWebView in the UIView as this will display HTML formatted text. However, when I run the code the UIWebView is always blank. If I replace with A UILabel the info window works. Has anyone else tried to use a UIWebView like this with the iOS SDK? I am wondering if it's related to the UIWebView taking too long to render?
last I checked the info window had to be a static uiview as it is rendered to an image. (same as markers are not UIViews but only static images)
the way I do it:
return an empty transparent view to the GMSMapView and THEN:
roll your own that you add as a subview yourself!
This link show what I described:
https://github.com/ryanmaxwell/GoogleMapsCalloutView

iOS - How do you show animations in part of a UIView?

Alfred for iPhone has a cute, animated silver platter character that wiggles his mustache and does other things.
There's one sprite for the motionless character. Various animations are started as the user interacts with the app.
Assuming that they're using a UIView for the app, how is this done? Lots of animated GIFs? SVG animations? Cocos2D in a canvas or something? Lots of images and setting the UIImageView source?
I haven't seen this app.
Could possibly be UIImageView and the animationImages property
#property(nonatomic, copy) NSArray *animationImages
An array of UIImage objects to use for an animation.
It could be Quartz and Core Animation.
It could be Open GL ES.

Resources