To set the initial camera position, create a GMSCameraPosition object and then Of the target along with bearing, tilt, and zoom. Object, that allows you to set latitude and longitude Set the initial camera position using the The following images show the visual appearance of different zoom levels: Property of GMSMapView to get the minimum zoom level possible for the map. Note: Due to screen size and density, some devices may not You can expect to see at each zoom level: The following list shows the approximate level of detail Next closest valid value, which can be either the minimum zoom level or the Any number out of the range will be converted to the Levels permitted by the map depends on a number of factors including target, For example, at zoom level 2, the whole world is approximately Hence at zoom level N, the width of the world is approximatelyĢ56 * 2 N points. Increasing the zoom level by 1 doubles the width of the world on the screen. More of the world can be seen on the screen.Īt zoom level 0, the scale of the map is such that the entire world has Levels more detail can be seen on the screen, while at smaller zoom levels The zoom level of the camera determines the scale of the map. Position appear proportionally larger, while features beyond the map positionĪppear proportionally smaller, yielding a three-dimensional effect. Increase the angle beyond 45 degrees, features between the camera and the map Original map, but more features have appeared at the top of the map. The map in this screenshot is still centered on the same point as in the The map displayed with a viewing angle of 45 degrees. Represented by the line at position 4 is now visible. The camera is still pointing at the map's center point, but the area Moves halfway along an arc between straight overhead (0 degrees) and the ground (90 degrees), In the images below, the viewing angle is 45 degrees. The map displayed with the camera's default viewing angle. Schematic of this position 1 is the camera position, and position 2 In the images below, the viewing angle is 0 degrees. When you change the viewing angle, the map appears in perspective, with far-away featuresĪppearing smaller, and nearby features appearing larger. Values greater than 0 correspond to a camera that is pitched toward the horizon by A value of 0 corresponds to a camera pointed (the direction pointing directly below the camera). The tilt defines the camera's position on an arc directly over the map'sĬenter position, measured in degrees from the Often turns a road map to align it with their direction of travel, while hikers using a map andĬompass usually orient the map so that a vertical line is pointing north. The Maps API lets you change a map's bearing. A valueġ80 means the top of the map points due south. ![]() Of the map, the bearing corresponds to the heading of the camera (measured in degrees) relativeĪ bearing of 0 means that the top of the map points to true north.Ī bearing value 90 means the top of the map points due east (90 degrees on a compass). ![]() If you draw a vertical line from the center of the map to the top edge The camera bearing specifies the compass direction, measured in degrees from true north, corresponding ForĮxample, 480, 8 will all be wrapped to 120 degrees. Range will be wrapped such that they fall within the range (-180, 180). Ranges between -180 and 180 degrees, inclusive. Or below this range will be clamped to the nearest value within this range.įor example, specifying a latitude of 100 will set the value to 85. ![]() The latitude can be between -85 and 85 degrees, inclusive. The camera target is the location of the center of the map, specified as Of the camera (and hence the rendering of the map) is specified by theįollowing properties: target (latitude/longitude location), The map view is modeled as a camera looking down on a flat plane. Square, which allows easier logic for tile selection. Projection at approximately +/- 85 degrees to make the resulting map shape In the north and south directions, we cut off base map imagery using the Mercator This characteristic means the map view repeats infinitely east and west. Note: A Mercator projection has a finite height longitudinally (north/south) but an infinite (a sphere) on your device's screen (a flat plane). The Maps SDK for iOS uses the Mercator projection to represent the world's surface Graphics you've added, although you might want to change these additions to fit Level, users can pan the map or change its perspective with very little latency.Ĭhanges to the camera do not change markers, polylines, or other Maps to adjust them to an orientation useful for their context. With Maps SDK for iOS, your users can tilt and rotate your With Maps SDK for iOS, you can change the user's viewpoint of the
0 Comments
Leave a Reply. |