How to get viewing height or pitch angle from a bing map? - bing-maps

I am using the v7.0 Ajax control from Bing Maps and I'm trying to get the following information while being in the bird's eye view mode on the map:
the viewing height (or altitude) -- this is the zoom level, right?
the pitch angle -- does this always has the same value, no matter of the viewing angle while being in the bird's eye view mode?
Thanks.

There is no such thing as the "altitude" at which a projected map image is created. There is a map scale and resolution (i.e. how many metres each screen pixel corresponds to) which varies according to the zoom level and the location on the earth's surface, but this does not correlate to the view you would get if you were looking down at the earth from x metres above it.
The angle at which Bird's eye imagery is shot varies in different scenes - you can observe this as you pan around the map - the imagery will clearly warp as you move from one scene to the next.

Related

How to adjust max render distance in SceneKit

Currently in my SceneKit scene for a game in iOS using Swift the render distance is very limited, there is a noticeable cutoff in the terrain
of the players perspective, i cant find a "max render distance" setting anywhere and the only option ive seen so far is to just cover it with fog, im clearly missing something as ive seen plenty of games with larger render distances but after searching across google, documentation and stack overflow i cant seem to get an answer, can anyone help?
Camera Far Clipping Plane
To adjust a max distance between the camera and a visible surface, use zFar instance property. If a 3D object's surface is farther from the camera than this distance, the surface is clipped and does not appear. The default value in SceneKit is 100.0 meters.
arscnView.pointOfView?.camera?.zFar = 500.0
Im a dingdong and figured out what i was missing.
What i was looking for was a setting in the camera that your scene is using as the point of view, theres a setting called 'Z clipping" which clips out anything closer then the "near" value or further then the "far" value, and by default far is set to 100 units. just adjust that setting either in code or within XCODE and set it to a higher value to view the entire scene.

What is this default gray circle

I apologize in advance for such a basic question. I haven't been able to find anything online referring to this. I'm probably just not using the right search terms, but I don't know what this is called.
This is zoomed out showing my model which is a large building, and what appears to be a default sort of terrain or horizon. I can't interact with it. What is it and how do I get rid of it?
This view is a little closer and the scene has a sky box applied
This view is much closer at an angle showing the skybox. You can see the gray circle cutting the skybox off at the horizon.
This might be the far clipping plane of the camera coming into effect.
Clipping planes are two (near and far) planes from the camera's origin, away. Anything near than the near is culled, anything further than the far is culled.
If you're using a very wide angle camera, you might get this sort of round clipping effect on a far plane.
Try setting the far plane's value to a much higher number, to see if that helps/solves the problem.
Select your Main Camera in the Hierarchy, and adjust the Clipping plane values in the Inspector, about half way down... here...

How show circle around annotation how in google maps

I use MKMapView.
How to show circle around annotation how in google maps ( when show current user location).
This circle moving with animation to new location and radius of circle dependent from current zoom level.
The annotations themselves don't have a property for showing a circle but you can use a circle overlay with the same center as the coordinate of the annotation to achieve this effect, just like the image below (from one of my projects).
Note: the property for the center of the circle is called "coordinate", just as for the annotations.
The second part is animating the movement. You achieve this by animating the coordinate property of the circle overlay at the same time as the coordinate property of the annotation. This way they will both move together to the new location.
This question can help you with how to move and animate the position of an annotation. If you need the radius of the circle to change at the same time (e.g. when animating the coordinate) you just use Core Animation to animate it together with the coordinate.
Concerning changing the size depending on the zoom level, Map Kit will always handle this for you automatically with Overlays and Annotations so that they always cover the same area of the map, even as the map resizes. (The second image is the same annotations and overlays as below, just zoomed in on the ones to the left (closer to Stockholm in the first image)).

MapKit Show Entire Globe

I am trying to draw the entire globe inside my MKMapView. By pinching to zoom out I am limited to zooming out to a certain level. I would like to be able to zoom out past this level to show the entire globe on the map. This doesn't seem like it would be very difficult, but I have been unable to find any solution.
The map inside an MKMapView doesn't repats on the sides, so you can't zoom out far enough to view the whole world.
Solution: Write your own renderer (very hard task, working with coordinates on a surface like the earth is a pain).

Is my understanding of the functions of compass & GPS correct in AR apps ?

In an AR app whereby you annotate objects or buildings in a camera view, I want to understand the role, that different hardware bits - on the phone (iPhone/Android) - play to achieve the AR effect. Please elaborate more on the following:
Camera: provides the 2D view of reality.
GPS: provides the longitude,latitude of the device.
Compass: direction with respect to magnetic north.
Accelerometer: (does it have a role?)
Altimeter: (does it have a role?)
An example: if the camera view is showing the New York skyline, how does the information from the hardware listed above help me to annotate the view ? Assuming I have the longitude & latitude for the Chrysler building and it is visible in my camera view, how does one calculate with accuracy where to annotate the name on the 2D picture ? I know that given 2 pairs of (longitude,latitude), you can calculate the distance between the points.
use the camera to get the field of view.
use the compass to determine the direction the device is oriented in. The direction determines the set of objects that fall into the field view and need to be reflected with AR adorners.
use the GPS to determine the distance between your location and each object. The distance is usually reflected in the size of the AR adorner you show for that object or in the number of details you show.
use the accelerometer to determine the horizon of the view (a 3-way accelerometer sensitive enough to measure the gravity force). The horizon can be combined with the object altitude to position the AR adorners properly vertically.
use the altimeter for added precision of vertical positioning.
if you have a detailed terrain/buildings information, you can also use the altimeter to determine line of visibility to the various objects and clip out (or partially) the AR adorners for partially obscured or invisible objects.
if the AR device is moving, use the accelerometers to determine the speed and do some either throttling of the number of objects downloaded per view or smart pre-fetching of the objects that will come into view to optimize for the speed of view changes.
I will leave the details of calculating all this data from the devices as an exercise to you. :-)