Location:

Map Structure and Explanation of Terms

This chapter introduces the components of the JS SDK map, common nouns, and some basic knowledge, such as latitude and longitude, level, map plane coordinates, and so on.


JS SDK map composition structure

Using a NavInfo map The map created by the JS SDK usually consists of the following sections:

Map Container

The div object specified in the id created during the preparation phase, this div will be used to carry all layers, dot markers, Vector graphics, control containers.

Layers

NavInfo Map The JS SDK provides official standard layer interfaces such as standard layers, satellite layers, road network layers, and road layers.

Point Markers

A point marker is a type of map feature used to indicate point information at a location, overlaid on a layer. The dotted features in the red rectangle in the picture. Its position on the screen changes as the map zooms and changes center, but remains relatively static with features within the layer.

Point markers support normal point markers (ie Marker) for different scenes.

Map Controls

The control floats on top of all layers and map features to satisfy certain interactions or hints. Generally, it is stationary relative to the map container, and the position does not change as the map zooms and the center changes. The scale and level controls in the gray box in the image above.


Noun explanation

Map Level

The level is proportional to the scale of the map. For each level, the scale of the map is doubled, and the map is displayed in more detail. The minimum level of a Web map is usually 3, and the maximum level is slightly different. The NavInfo map JS SDK is currently at the maximum level of 19.

Longitude and Latitude

Coordinates usually refer to latitude and longitude coordinates. The coordinate range of a four-dimensional map is roughly: 180 degrees east-west (-180-180, negative in the western hemisphere, positive in the eastern hemisphere), 85 degrees north-south (-85-85, northern hemisphere) Positive, the southern hemisphere is negative).

Basemap

Strictly speaking, a basemap refers to a layer at the bottom of all layers and graphics, usually opaque. It can be a single layer, such as a standard layer, or a layer combination, combined with a map satellite layer and a road network layer.

Map Features

Strictly defined map features refer to geographic features displayed on the map, including roads, area polygons, buildings, POI labels, road names, and more. Developer-defined point markers, vector graphics can also be seen as a map element.

Map Plane Pixel Coordinates

The map plane pixel coordinates refer to the plane pixel coordinates on the map after being projected as a plane, and the Web Mercator projection used in the NavInfo map. At the 3rd level, the plane coordinate range is the horizontal and vertical 0-256* 2 to the 3rd power. The pixel is doubled in each level, that is, the nth-order pixel coordinate range is 0-256*2 n-th pixel.

TOP