I'm working on a watch app that will amongst other things need to get a person from point A to point B.
one option is to delegate the maps navigation work back to the iPhone and handle messaging updates between the watch and phone etc.
however does anyone know if its possible to simply invoke/launch the Apple Maps app (on the watch) directly from my own watch app and pass the start/end coordinate details -- to automatically initiate turn by turn directions (from the Apple Maps watch app) ?
The second option sounds legit. According to WKInterfaceMap class reference, tapping on the map will directly open the Apple Watch Maps application.
Quoting from the documentation:
A WKInterfaceMap object displays a noninteractive map for the location you specify. Maps must be configured dynamically from your interface controller. Use the methods of the WKInterfaceMap class to specify the visible region of the map and to add any annotations or points of interest. Tapping the map launches the Maps app on the user’s Apple Watch and displays the corresponding location.
Reference: https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WKInterfaceMap_class/index.html
Related
I'm developing an asp.net web app and i need to detect the current Geo location and save it to a variable and than show to user its current place name and through this I will guide the user to where he want to go, and than user will in put the destination and I will guide that what the root will be suitable for him and I will provide full detail.
I'm getting its current location but don't how to show to user by displaying on label or in textbox.
I don't know where to start this.
If you are able to access the current geolocation of the user then you need to do the following things-
Get Destination
Now you need to get the destination name from the user using some mode of text input or, speech to text etc.
Geo Code destination
Now you need a good geocoding API to get the coordinate of the destination that user has entered. You can use google's geocoding API. It is available for both client(JavaScript) and server(C#, Java, PHP -etc) side. All you need is an API key.
Find Route
Now you have to find the route between the two coordinates (your current location and destination coordinates). Google provides a direction API for the same. Again you can implement this both on the client or, server side (I will prefer client side to reduce the load on the server end). This API returns a long polyline string which can be decoded into a list of coordinates to plot the route on the map. It also returns a list of maneuver data containing the direction info and road names etc. This maneuver info will help you to direct your user to the destination at the time of navigation.
Plotting the route
Now is the time to add a map canvas to your application and then plot the route to it. You can now use the list of coordinates that you decoded from the polyline to draw a polygon on the map. See this below screenshot from one of my application where I drew the path on the map and also marked all the maneuver points on the path.
Navigation
Well, now you are almost done. Now you can start navigating to the destination. Now use whatever mechanism you use to get the user location periodically and then update it as a marker (you can use a car's icon) on the map and then whenever you reach (calculate the distance) a maneuver point show user the maneuver message like "Turn right"/"Turn left"/"Continue straight for 100 meter" -etc.
If you are stuck with getting the current user's location then you can use HTML5 to get devices location using the network.
Hope this is helpful for you.
We want to make an app where we need to integrate google map. Though we have visited the google web page for knowing the pricing. We want to know If we integrate as it "Standard User" and want to have below feature
As per our understanding - google charges whenever the map is loaded or API is used by the user. Anything above the daily quota of map load has to be paid.
In Zoom feature - will Zoom in and zoom out is treated as two calls.
Similarly, pan feature - will it be treated as map load
Draw circle to create an area on the map to find specific info which is already fed by the user based on the location. Will it also be treated as a call or map load?
In case if user to find location with typing - will the number of characters typed and its search result will be treated as API call for which we have to pay in the case of the above daily quota
I don't know about the last two but the first two are covered in the FAQ for Google Map APIs
After a web page or application loads a map, a static map image, or a Street View panorama, any user interactions with it, such as panning, zooming, or switching map layers, do not generate additional map loads or affect usage limits.
How to increase/decrease number by Digital Crown like Alarm app?
https://www.apple.com/watch/timekeeping/
As of WatchOS 2, it is now possible to access the Digital Crown for certain kinds of input.
To do so, create a WKInterfacePicker. The items presented for the user to select between can be text, images, or a combination of both.
To use the WKInteracePicker, add it your interface in your WatchKit App and add an outlet to your interface controller in your WatchKit Extension. Then, for the interface controller call myPicker.focus().
See the Apple documentation for fuller information.
At the moment, third-party developers have no access to the digital crown.
In SwiftUI, you could use aPicker or Slider to input numbers. If you want to do something custom with the crown, look at the digitalCrownRotation modifier which you can hook up to a #State or #Binding and use in other parts of your UI or send to your model.
I am doing a Windows Phone app that displays a map and a scaled ellipse, and everything is working well except that I cannot select a location on the map like I can in the standard MapTask app. Am I missing something? I would like the user to select a point on the map and start navigation to that point
Or is there a way to launch the MapTask app and draw the ellipse on that?
If it is Windows Phone 8 maps that you are using then I would have plenty of examples at GitHub for it: https://github.com/nokia-developer/maps-samples
Same examples for Windows phone 7 at at: http://developer.nokia.com/community/wiki/Maps_Examples_for_Windows_phone
Basically there is no automated way on getting the location, thus, if you really want to have a geocoordinate for a location uses selected, then you:
1. Need to catch the user click on the map (check the interaction examples)
2. Get the geocoordinate for the clicked pixel of the map (there is pixel to geo function implemented with maps control)
For Navigation, if you means showing a route with the map, then check the routing examples.
If you really meant navigation, then for windows phone 7 I would not have any answers, but for Windows phone 8 there is the HERE launchers documented at: http://developer.nokia.com/resources/library/Lumia/maps-and-navigation/here-launchers.html
with here launchers you could use Drive or Walk navigation.
Is there is a way to upload my own panoramic images of our hours/building using Google Street View API, then use Google Street View Engine to navigate throw them?
Yes, you need to make custom street view panoramas: https://developers.google.com/maps/documentation/javascript/streetview#CustomStreetView
Here's a great sample of someone who has done this: http://www.gta4.net/map/
I'm doing a similar project for a large building.
First, you need some way to generate a 360 degree panorama for the images. I've adapted hugin to be used in a set of bash scripts to generate the panos automatically in a Linux box. So, I just upload the images to a folder, execute the script with the folder location and number of images per panorama and leave it alone. Depending on the number of images you have per panorama, expect to wait 5-45 minutes for each panorama.
Second, check out the example link for how to use JS and StreetView. I think your task will be easier as you can probably write all your locations inside the JS file rather than relying on database calls and parsing.
Third, make sure your usage is under the limits set by the API if you're not paying for the service. If you go over the daily limit, the tour won't be available.