how could I load the Google map in terrain view in iphone - objective-c

I'm new in iPhone. How could I load the Google map in terrain view.
MKMapView provides only three options, MKMapTypeStandard, MKMapTypeSatellite, MKMapTypeHybrid.
But I want to show the terrain view, how could I do that.

You can set the value of the mapType property on your MKMapView instance to 3 (instead of using one of the named constants):
yourMapView.mapType = 3;
Works for me when compiling against the 5.0 SDK. No idea if it'll get through the app store approval process...

I solved that problem.
You have to use the webview and html file which contains the javascript and Google maps API.
Just load the html file in webkit which loads the maps.google.com page and the Google maps API directly show the terrain view without interacting with webview.

Related

How to put ballon (point) to Google Maps App

What do I need:
Open google maps application from my ReactNative app with a point on certain coordinates. And show a balloon (ideally with some information inside)
I've checked both Google Maps Intents for Android and Google Maps URL Scheme for iOS but don't see any param responsible for that.
Does anyone know how to solve the moment?
You can not change marker in Google Maps Intents.
if you want to show custom marker you have to use google maps api in Application and draw you own layer over the map.
if you want to use google map api in react native use react-native-maps it provide native map components.
Managed to do that with combining center (to put map center) and q (with same coordinates as in center)
comgooglemaps://?center=59.515383,24.652798&q=59.515383,24.652798
geo://?center=59.515383,24.652798&q=59.515383,24.652798

How to add custom image on native map in Titanium?

currently i am working on native map in Titanium for android and iOS.
you might have seen native maps on which a custom image layer or layout is being displayed, which will rotate and zoom according to the user input (currently i am not talking about annotations)
i have tried using annotation map tile too but it doesn't seems to work as the native map app i have seen
if you have any question or are not able to understand my question please let me know so i could clarify and get solution for one of you
Update:
Can you give a better explanation of what you've tried?
you might already know about mapbox.com and leafletjs.com, by using their library we could make customize maps and offline map in webview but i am looking for some Titanium module which could help me use native map of iOS and android for performing similar functionalities(i am avoiding commercial library and plugins as my app is not commercial app). i want to create map tiles which could be used for offline purpose as the user would have downloaded with the app.
what i have tried yet!!
1: http://i.stack.imgur.com/CLiNh.jpg
2: http://i.stack.imgur.com/QOLO7.jpg
in first image link i have given image in which i showing screenshot of map with rotation (if you notice compass) and the map tile moved accordingly to it
in 2nd image ... i had put a map tile using createAnnontation function, but unable to fix its layout remains same and it doesn't resize when i do zoom in/out too
I assume you are talking about custom tiles on top of a MapView.
There is an example module for iOS at https://github.com/benbahrenburg/benCoding.Map which used the Titanium map module as a base. It is a bit dated, but see the TileOverlay example and code and it will get you on the right track.
The best tutorial I've found on how to create the tiles is at http://www.ericbinnion.com/creating-custom-overlays-for-ios-mapkit-framework/
I've tried to create a similar TileOverlay functionality by forking the Android map module with limited success. I never got it to work as well as the native maps.
You could also check out using Mapbox with Titanium. There are great tutorials and tools for creating your own tiles layers and manipulating existing layers. Adam Paxton gave a great demo of it at TiConf in New York this year.

Implementing loading image in WinrT

How i can implement a default loading image to my image control while the time of image loading. ie need to display the loading image initially and after the actual image loads i need to set that image as my image source. I windows phone i implemented the same with the help of LowProfileImageLoader class. But in windows 8 how i can implement the same.
It's fairly easy to do this in a Windows Store app by using the async functionality. You would set your image source to your loading image (maybe using the ms-appx protocol and loading it from your package) while you use a HttpClient to download the larger image for example. Here is a sample on how to use HttpClient asynchronously.
Per comment: You can use the ProgressRing class and change to the image when you get the ImageOpened event. See this example.

Google Maps event that is called when all visible map tiles are loaded

Is there a way to programmatically determine when Google Maps is done loading visible image tiles in an MKMapView? I would like to take a screenshot of a view in an iPad app that has a Google Map in it, but I don't know how long to wait before taking the screenshot.
I can't seem to find an event that triggers when tiles are done loading so the screenshot will actually have images in it, instead of a blank gray background.
This method:
- (void)mapViewDidFinishLoadingMap:(MKMapView *)mapView
in the MKMapViewDelegate protocol will do that for you.

draw overlay on a map

How to draw an overlay on the mapview?
See a discussion on MacRumors.
Brief version: use iphone-google-maps-component as a way around not being able to overlay on the mapview.
Basically iphone-google-maps-component is:
A component that you can add to your iPhone application to access all basic features of Google Maps (similar to Android's MapView). It uses a UIWebView in the background to load the HTML/Javascript version of Google Maps, and offers a set of Objective-C methods that mimic a subset of the original Javascript methods for controlling the map. It currently supports setting the center location and zooming & panning using the touch interface. You can see it in action