[TIMOB-20092] iOS: Need ability to generate static image of map for the specified coordinates
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-07-17T13:29:54.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.0.0 |
Components | iOS |
Labels | qe-6.0.0 |
Reporter | Parijat sahai |
Assignee | Angel Petkov |
Created | 2015-08-25T06:05:46.000+0000 |
Updated | 2016-09-23T13:51:22.000+0000 |
Description
In the Map module, there should be a method to return a static image of the map for the specified coordinates. Google Maps API has the capability ([Static API](https://developers.google.com/maps/documentation/staticmaps/intro)) and it seems the Apple Mapkit might also have the feature now. This request is fairly urgent and would be easier to implement, I hope.
Just want to point out that the "toImage()" method isn't good enough. I'm trying to use it, and although it works fine for a previously loaded map, it doesn't work at all if I only have the coordinates in the code and want to get the image in the background without having to load the map view itself (which takes time).
This issue is bigger for iOS, not Android. Please update this ticket to include iOS in the Component list. For iOS, I'm asking you to include the following Apple SDK api: https://developer.apple.com/library/prerelease/ios/documentation/MapKit/Reference/MKMapSnapshotter_class/index.html For Android, currently there exists a workaround to use Google Static Maps API, which might be better. So I'm not as concerned about it. Ideally, it would be better to have ONE module method regardless of the OS, so one doesn't have to create forks in code.
Thanks! Updated the ticket accordingly to support both platforms.
Any status update on this feature? It's been just too long.
You got to be kidding me...it is planned for version 6.0.0? When will it be delivered? It's such a simple change.
Hey [~parijatsahai], quality before quantity :-). We are currently working on the feature and will update ti.map as soon as it is finished - as usual. So you will be able to use it in both your current Titanium SDK version, as well as in the upcoming ones. I will ping you with updates asap.
[~parijatsahai] Here you go: https://github.com/appcelerator-modules/ti.map/releases/tag/iOS-2.8.0 *Demo*:
Verified as fixed, tested the above demo code and changed the coordinates to specific locations and the resulting static image correctly reflected the input. Tested On: iPhone 6 Plus 10.0.1 Device & Simulator iPhone 5S 9.3.5 Device Ti.Map (2.8.0) Mac OSX El Capitan 10.11.6 Ti SDK: 6.0.0.v20160922165510 Appc Studio: 4.8.0.201609191928 Appc NPM: 4.2.8-7 App CLI: 6.0.0-51 Xcode 8.0 Node v4.4.7 *Closing ticket.*