There is no little man icon to drag onto a street in a map.
Is there a way to enable him programmatically?
Thanks.
The MKMapView does not have support for the "little man" (Pegman) or Street View.
One alternative is to use the Google Maps Javascript API V3 directly. In a UIWebView, load an html file (added as a resource in your app) containing a Google map. For sample html files containing Street View, look for the streetview-*.html files on the Google Maps Javascript API V3 Examples page.
Another alternative is to call the Maps app from yours using openURL: and pass it a Map Link. This will only work on the device (the simulator doesn't have the Maps app and will open the browser instead).
Related
I have been trying just about every tutorial I can find but I have no luck rendering the google map tiles behind the map in the view. I have double checked google console etc. But I have no luck
As you can see I can get the location to load up correctly, but the actual map behind it doesn't work at all. I have run out of ideas :(
try
check it on real device
double check that API Key of google maps correct and you enable google maps form google console
self.view = mapView in didLayoutSubView Method
I'm trying to find a way to know if Streetview is available for a specific latitude and longitude before showing it to the user. This is my current code that correctly shows a Streetview if it's available or shows a black screen. I want to basically remove the black screen situation.
https://gist.github.com/speakerbug/33f267fd3a90dbd3ca07eae5b6c7c8f5
Not sure how to do it in Maps SDK for iOS, but you can check existence of panorama using Street View Image Metadata web service.
For example, the following web service request
https://maps.googleapis.com/maps/api/streetview/metadata?location=41.391073%2C2.180614&key=YOUR_API_KEY
will return
{
"copyright":"© Rodrigo Bastias",
"date":"2017-03",
"location":{
"lat":41.3910524,
"lng":2.1806449
}, "pano_id":"CAoSK0FGMVFpcE5OVHRRTERHX1lzRF93XzRZb2YyajJwaXFXUkFRQzg5THJuOTg.",
"status":"OK"
}
My Iphone app needs to open the google maps application to use the StreetView and the directions mode.
All works fine,But my question is, is there any way of adding a button or something to go back to my app?. I have seen that with UIWebViews maybe thats the only solution..
Thanks in advance
My answer comes from this documentation: Google Maps SDK for iOS, Google Maps URL Scheme
You may add a back button if you register a custom URL scheme for your app and use the comgooglemaps-x-callback:// url scheme to launch the Google Maps iOS app.
Here is a great tutorial for iOS Custom URL Schemes.
The following string would open Google Maps with directions to JFK airport and would add a button in Google Maps with the title "AirApp".
Touching that button would call the custom url scheme sourceapp:// which you would set up by following the tutorial I linked to above.
#"comgooglemaps-x-callback://?daddr=John+F.+Kennedy+International+Airport,+Van+Wyck+Expressway,+Jamaica,+New+York&x-success=sourceapp://?resume=true&x-source=AirApp"
I have a google map that I created with KML:
Here is a link to the map:
http://goo.gl/maps/dkfjU
Here is the complete KML file:
https://dl.dropbox.com/u/94943007/02bb39645a3c9d95afeed5cb9bd5d07c040d8ca8a4ee56b9fb367d38.kml
When browsing this map with my IPAD using safari, for some reason when I tap anywhere on the map, it creates a point there on the map.
How do I disable point creation on the map so that IPAD users are not able to do this?
I checked the link as well and Marcelo seems to be correct. To have a maps with the ability to turn on and off layers you will need to build your own site and perhaps use Javascript and the Google-maps API to build it. Maybe start here: https://developers.google.com/maps/documentation/javascript/tutorial
You cannot disable adding a place mark if you are browsing the map in safari
You can control it if you use map kit iOS API of the iOS SDK.
For importing KML-Data into that SDK, you can use Sample Code from
Apple:
http://developer.apple.com/library/ios/#samplecode/KMLViewer/Introduction/Intro.html
But there is no built-in KML Import in iOS SDK. You can use other
frameworks as mapbox/Simple-KML here
https://github.com/mapbox/Simple-KML
If you want to do this in safari, then you're lost, unless you can manipulate that using JavaScript!!!
how can i use bing maps to draw a route line between two points. i can do that by calling url like:
http://www.bing.com/maps/default.aspx?v=2&lvl=10&dir=0&sty=r&rtp=pos.16.955542_54.73933~pos.17.002046_54.049973
but those urls are not accessible from iphone uiwebview. bing is showing its main page instead.
i tried the bing ios sdk but could not find the way to do this.
If you're still going down the webview route - I'd suggest trying it again, as support for redirecting desktop URLs to mobile equivalents might have been added since.
As long as the right user agent is associated with the request to identify the device as an iPhone, the URL above should get rewritten to something like:
http://m.bing.com/maps/default.aspx?v=2&lvl=10&dir=0&sty=r&rtp=pos.16.955542_54.73933~pos.17.002046_54.049973&mid=10006
and load the mobile directions experience.
Alternatively, go to m.bing.com and follow the directions link and retrieve the mobile-specific URL pattern you're interested in, which doesn't rely on redirecting desktop URLs ... example:
http://m.bing.com/directions#/Maps?w=a.seattle~a.san%20francisco&ul=47.60336588,-122.02145731&mode=1