Unlock instant, AI-driven research and patent intelligence for your innovation.

A map road rendering method and device

A road and map technology, applied in the computer field, can solve problems such as sudden changes in road width, achieve smooth switching, good switching animation effects, and improve user experience.

Active Publication Date: 2019-04-09
TENCENT TECH (SHENZHEN) CO LTD
View PDF6 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The embodiment of the present invention provides a map road rendering method and device to solve the problem in the prior art that the road width suddenly changes when the map is zoomed

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • A map road rendering method and device
  • A map road rendering method and device
  • A map road rendering method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0080] refer to figure 2 As shown, the map rendering method provided by Embodiment 1 of the present invention specifically includes the following steps:

[0081] Step 200: Obtain the levels before and after zooming according to the zoom command.

[0082] In practice, map rendering usually involves modeling roads on the CPU side to generate a series of triangles, and then uploading the index data of these triangles to the GPU side for direct rendering during rendering. However, in the prior art, for different types of roads , when zooming, a uniform zoom amount is used to zoom, and there will be a problem of road width mutation. For example, when the map is zoomed in, the scale becomes 2 times, and a switching animation will be triggered. In the prior art, the The map is zoomed in globally, and the range of the zoom factor is [1,2]. Then, when the switching animation ends, it directly switches to the road width corresponding to the new level. However, the road width before an...

Embodiment 2

[0147] Hereinafter, a specific application scenario is adopted to further describe the foregoing embodiment in detail. In the second embodiment of the present invention, the description can be divided into two parts.

[0148] 1) CPU side.

[0149] The road model is established on the CPU side, and the normal vector is added to each vertex, and the road width is 0 for modeling.

[0150] 2) Vertex shader. See for details Figure 4 As shown, the details are as follows:

[0151] Step 400: Obtain the rendering width of each frame of the road during the scaling process.

[0152] Specifically, during the scaling process, the calculated road width of each frame can be passed to the vertex shader through the glUniformlf interface, and the vertex shader can obtain the rendering width of each frame.

[0153] Step 401: According to the normal vector of each original vertex of the road and the rendering width of any frame of the road, respectively calculate the offset of each vertex o...

Embodiment 3

[0158] In the embodiment of the present invention, refer to Figure 5 Shown is a schematic diagram of a server architecture environment in Embodiment 3 of the present invention.

[0159] The server is connected to the user terminal, and map applications, such as Tencent Maps, are installed in the user terminal. The user zooms in or out on the map, and then the server performs calculations and other operations, and renders the map in the user terminal according to the results.

[0160] Wherein, the user terminal may be any smart device such as a mobile phone, a computer, or an ipad, and the third embodiment of the present invention only uses a mobile phone as an example for illustration.

[0161] For example, a user opens Tencent Maps on a mobile phone, and after querying a location, wants to zoom in on the map so that the location can be viewed more clearly. Double-tap the screen or slide with two fingers to zoom in on the map, and the server side calculates the road in the ma...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to the technical field of computers, in particular to a map road rendering method and device, and the method comprises the steps: obtaining levels before and after zooming according to a zooming command; Respectively calculating the rendering width of each frame of the road in the scaling process; Wherein the starting frame corresponds to the level before zooming, and the ending frame corresponds to the level after zooming; Calculating the position of the vertex of the road on a display screen according to the rendering width of each frame of the road, the original vertexposition of the road and the normal vector of the original vertex; According to the method, the road width of the road is rendered according to the type of the road, so that the rendering width of each frame of the road in the scaling process is calculated for different types of roads, the road width can be dynamically modified in the scaling process, and the smooth switching of the road widths of different types of roads is realized adaptively.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a map road rendering method and device. Background technique [0002] Map rendering can display intuitive and convenient effects to users. At present, the open source graphics library (OpenGraphics Library, OpenGL) is usually used to render the map. For roads with width in the map, the native OpenGL has poor support for line rendering. Therefore, the current In existing technologies, triangular patches are generally used to render wide roads. [0003] First, the central processing unit (Central Processing Unit, CPU) end establishes a road model, for example, refer to figure 1 As shown, P1P2 is a line segment of the original road. Set the width of the road to w, then the two endpoints of P1 and P2 generate four vertices along the vertical direction of the line segment, and the order is ABCD. [0004] In this way, the position of the four vertices of the road can be ca...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06T3/40G06T11/20
CPCG06T3/40G06T11/20
Inventor 任亚飞庞海霞
Owner TENCENT TECH (SHENZHEN) CO LTD