moving with google street view api - api

My question is, is there any way to have a animated street view with automatic moving forward with it's web street view API?
I have a polyline of places that I have been and I want to have a animated street view.

Yes, you can. If you have the polyline you have its coordinates. So what you would have to do is getting the coordinates of the path (just the vertices or as many steps as you want between the vertices) and set those coordinates as StreetView position via setPosition with a certain delay one after the other. To get the coordinates you can use polyline.getPath(), which will return an array.
With heading (and pitch) of the StreetViewPov object you can change the view direction of the StreetView panorama along the route (if you want to).

Related

SceneKit Move Camera

There is a big scene,eg:a house ,I want to use TapGes to move camera to see different rooms. Now I have two questions:
1.I can not get the 3D point from this tapPoint in the scene
Is there any other way?
Here are some examples that may help.
57018359 - this post one tells you how to touch a 2d screen (tap) and translate it to 3d coordinates with you deciding the depth (z), like if you wanted to tap the screen and place an object in 3d space.
57003908 - this post tells you how to select an object with a hitTest (tap). For example, if you showed the front of a house with a door and tap it, then the function would return your door node provided you name the node "door" and took some kind of action when it's touched. Then you could reposition your camera based on that position. You'll want to go iterate through all results because there might be overlapping or plus Z nodes
55129224 - this post gives you quick example of creating a camera class. You can use this to reposition your camera or move it forward and back, etc.

Google Maps API v3 my map does not center on kml polygon

my problem is all in the title, I built a map with a center and zoom and I load a kml file representing a specific area according to the user's choice. It works fine, except that my map does not auto center and zoom on the loaded polygon. It zooms but only the upper part of the polygon is visible. The PreserveViewport option does not help me more as I set it to true I don't get any change as expected... Maybe is there a way to get the kml polygon's center in order to re-set the map's center ? I've browsed the web with no success. You can have a look here
Actually working, forgot tu update my css for map in order to get it show entirely. Thanks again, you saved me lots of time.

How to get coordinates of corners of visible bing map?

I'm using Bing Maps in a windows 8 app and I need to display pushpins at numerous locations.
Is there any way to get the GPS coordinates of the corners of the visible map?
Or alternatively a way to get the distance of the visible map? (e.g. 40km width, 60km height)
I need this in order to limit the number of pushpins I attach to the map to just being the ones on the visible part of the map.
You can get this information directly from the Bounds property of the map instance, which returns a LocationRect defined by the Northwest and Southeast lat/lng locations shown in the current view.
http://msdn.microsoft.com/en-us/library/hh846504.aspx
Try using the TryPixelToLocation method.
Location locationOfPixel
if(MyMap.TryPixelToLocation(ThePointToLookUp, out locationOfPixel))
{
//locationOfPixelshould contain the lat/long of the give point on the map.
}
Obviously, you will need to work out what the pixel locations of the top left, top right, bottom left and bottom right of your map control are and pass them in accordingly.

Titanium Appcelerator - Creating Directions Using a Map?

I'm creating a simple Map application in Titanium Appcelerator, right now focusing only on iOS. I have 2 Annotations specified by the latitude and longitude. I want to draw the directions between the 2 points on the Map.
I see the
mapview.addRoute();
method on the MapView object, but it requires you to input all the points in the route to draw it properly?! That doesn't sound right at all - why would it require me to find all the points when the Google Map can do that already.
Is there a way that I'm missing to simply say "here's point A, here's point B, draw the route between the 2 points on the map".
Drawing routes on the map is nothing more than a vector drawing. The same does the mapsapp on your phone.
You will have to interrogate the maps apis for directions,get the directions (points) and use it in your code to draw the route.
If you don't want to do it yourself there is a free module in the marketplace that can help
https://marketplace.appcelerator.com/apps/2580?87150712
If you want to get your hands dirty, this post might help you:
http://developer.appcelerator.com/question/74221/mobile-map-route-from-google-server

Adapt a drawn overlay to match roads

In my application I can draw an overlay (PolyLine) on my map (MKMapView). This overlay however, is not bounded to actual roads. Is there a way (some API or others) to adapt the overlay so that it covers/overlays a real road.
The application is run on mobile devices (iPod Touch & iPhone), so to not make my app a very battery consuming one, I would set the Core Location Accuracy not to the highest. As a result, the location will be a bit next to the road where you are. Then I would still like my program to adjust this error...
To get an overlay that matches actual roads, I used Google Maps API Webservices. I already had an array of all points forming a route and I used these points (coordinates) to easily create an overlay that maps on real roads.
I used the first and last point to create a navigation between and set all the other points as 'waypoints', see Directions API
To find the nearest address of a point, I used the Geocoding API
Google Maps API Webservices: http://code.google.com/intl/nl-NL/apis/maps/documentation/webservices/