CN113448972B - Map display method, device, terminal and storage medium - Google Patents
Map display method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN113448972B CN113448972B CN202010217062.3A CN202010217062A CN113448972B CN 113448972 B CN113448972 B CN 113448972B CN 202010217062 A CN202010217062 A CN 202010217062A CN 113448972 B CN113448972 B CN 113448972B
- Authority
- CN
- China
- Prior art keywords
- user
- map
- users
- position information
- user data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2393—Updating materialised views
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Remote Sensing (AREA)
- User Interface Of Digital Computer (AREA)
- Instructional Devices (AREA)
Abstract
The embodiment of the application provides a map display method, a map display device, a terminal and a storage medium. Wherein, the method comprises the following steps: and in a processing period, determining whether the position of the user changes or not according to the position information of each user in the user data received from the server and the first database, wherein the processing period is obtained by prolonging the preset period when the number of the users in the preset period is larger than the preset number, and if the position of the first user changes, updating the icon of the first user displayed in the map by using the position information of the first user in the user data. According to the technical scheme, the processing period is obtained by prolonging the preset period, so that the number of users in the user data received in the preset period is the same as that of the users in the processing period, when the icons of the users in the map are updated according to the received user data in the processing period, the icons of the users can be displayed in the map in the processing period, and the problem that the icons of the users are displayed in a stuck state is solved.
Description
Technical Field
The embodiment of the application relates to the technical field of display, in particular to a map display method, a map display device, a terminal and a storage medium.
Background
Private networks refer to professional networks that provide secure and reliable wireless services for a particular department or group. In a private network system, aiming at some fields such as department command scheduling and organization management, the position information of private network members plays an important role.
At present, when the position of a user in a group changes, the user sends changed position information to a server, the server sends the changed position information to a terminal, the terminal updates the position of the user stored locally according to the changed position information, and icons of the users are displayed in a map according to the changed position information.
However, in the prior art, the terminal needs to be refreshed every time the terminal receives the location information of one user, and under the condition that a large number of users report the location information to the server concurrently, the data volume received by the private network terminal from the server is large, so that the icon display of the user is blocked.
Disclosure of Invention
The embodiment of the application provides a map display method, a map display device, a terminal and a storage medium, which are used for solving the problem that icon display of a user in a map is stuck.
In a first aspect, an embodiment of the present application provides a map display method, including:
in a processing period, determining whether the position of the user changes or not according to the position information of each user in the user data received from the server and the first database; the user data comprises position information of a plurality of users, the first database comprises the position information of the plurality of users displayed in the map, and the processing period is obtained by prolonging the preset period when the number of the users in the preset period is larger than the preset number;
and if the position of the first user is changed, updating the icon of the first user displayed in the map by adopting the position information of the first user in the user data.
In one implementation, the method further comprises:
receiving user data sent by the server in the preset period, and updating the icon of the user in the map according to the user data;
and if the number of the users in the user data received in the preset period is larger than the preset number, prolonging the preset period to obtain the processing period.
In one implementation, before the updating the icon of the first user displayed in the map with the location information of the first user in the user data, the method further includes:
acquiring the display range of the map on a display screen;
determining whether the first user is in the display range according to the position information of the first user;
if the first user is in the display range, acquiring the zoom scale of the map, and determining whether the zoom scale of the map changes;
correspondingly, the updating the icon of the first user displayed in the map by using the position information of the first user in the user data includes:
and if the scaling of the map is not changed, emptying the icon of the first user displayed in the map, and drawing the icon of the first user in the map according to the position information of the first user in the user data.
In one implementation, the updating the first user's icon displayed in the map with the first user's location information in the user data further includes:
if the zoom scale of the map is changed and the zoom scale is larger than a preset scale, emptying icons of all users displayed in the map, wherein all the users comprise a first user and other users;
drawing the icon of the first user in the map according to the position information and the zoom scale of the first user in the user data, and drawing the icons of the other users in the map according to the position information and the zoom scale of the other users which have been displayed on the map in the first database.
In one implementation, the method further comprises:
if the zoom scale of the map is changed and the zoom scale is smaller than the preset scale, emptying icons of all users displayed in the map;
acquiring the position information of an aggregation point according to the position information of the first user and the position information of the other users in the user data, wherein the position information of the aggregation point is obtained by aggregating the position information of the first user and the position information of the other users;
and drawing the icon of the convergent point in the map according to the position information of the convergent point.
In a second aspect, an embodiment of the present application provides a map display apparatus, including:
the processing module is used for determining whether the position of the user changes or not according to the position information of each user in the user data received from the server and the first database in the processing period; the user data comprises position information of a plurality of users, the first database comprises the position information of the plurality of users displayed in the map, and the processing period is obtained by prolonging the preset period when the number of the users in the preset period is larger than the preset number;
and the updating module is further used for updating the icon of the first user displayed in the map by adopting the position information of the first user in the user data if the position of the first user changes.
In one implementation, the update module is further configured to:
receiving user data sent by the server in the preset period, and updating the icon of the user in the map according to the user data;
and the processing module is used for prolonging the preset period to obtain the processing period if the number of the users in the user data received in the preset period is greater than the preset number.
In one implementation, the method further comprises:
the acquisition module is used for acquiring the display range of the map on a display screen;
the processing module is further configured to determine whether the first user is within the display range according to the position information of the first user;
the obtaining module is further configured to obtain a zoom ratio of the map if the first user is within the display range, and the processing module is further configured to determine whether the zoom ratio of the map changes;
the update module is specifically configured to:
and if the zoom scale of the map is not changed, emptying the icon of the first user displayed in the map, and drawing the icon of the first user in the map according to the position information of the first user in the user data.
In one implementation, the update module is specifically configured to:
if the zoom scale of the map is changed and the zoom scale is larger than a preset scale, emptying icons of all users displayed in the map, wherein all the users comprise a first user and other users;
drawing the icon of the first user in the map according to the position information of the first user and the zoom scale in the user data, and drawing the icon of the other user in the map according to the position information of the other user and the zoom scale, which have been displayed on the map in the first database.
In one implementation, the processing module is further configured to:
if the zoom scale of the map is changed and the zoom scale is smaller than the preset scale, emptying icons of all users displayed in the map;
the obtaining module is further configured to obtain location information of an aggregation point according to the location information of the first user and the location information of the other users in the user data, where the location information of the aggregation point is obtained by aggregating the location information of the first user and the location information of the other users;
the processing module is further configured to:
and drawing the icon of the convergent point in the map according to the position information of the convergent point.
In one implementation, the user data further includes status information and a service type of the plurality of users.
In a third aspect, an embodiment of the present application provides a terminal device, including:
a memory and a processor;
the memory for storing program code;
the processor is configured to call the program code to execute the method of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored; which when executed performs the method of the first aspect.
The embodiment of the application provides a map display method, a map display device, a terminal and a storage medium, wherein in a processing cycle, whether the position of a user changes or not is determined according to position information of each user in user data received from a server and a first database; the user data comprises position information of a plurality of users, the first database comprises the position information of the plurality of users displayed in the map, the processing period is obtained by prolonging the preset period when the number of the users is larger than the preset number in the preset period, and if the position of the first user changes, the icon of the first user displayed in the map is updated by the position information of the first user in the user data. The embodiment has the following beneficial effects: the processing period is obtained by prolonging the preset period, and the number of the users in the user data received in the preset period and the processing period is the same, so that the icons of the users in the map can be displayed in the map in the processing period when the icons of the users in the map are updated according to the received user data in the processing period, and the problem that the icons of the users are displayed in a stuck state is solved.
Drawings
Fig. 1 is a schematic view of a scene of a map display method according to an embodiment of the present application;
fig. 2 is a first flowchart of a map display method according to an embodiment of the present disclosure;
FIG. 3 is a first diagram of a map interface provided in an embodiment of the present application;
FIG. 4 is a second schematic diagram of a map interface provided in an embodiment of the present application;
fig. 5 is a second flowchart of a map display method according to an embodiment of the present application;
fig. 6 is a third flowchart of a map display method according to an embodiment of the present application;
FIG. 7 is a third schematic diagram of a map interface provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a map display device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," and "fourth," if any, in the description and claims of this application and the above-described figures are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic view of a scene of a map display method according to an embodiment of the present application, as shown in fig. 1, including a server 101 and a terminal 102 that establishes a communication connection with the server 101. Wherein, the terminal device 102 is installed with map software.
In the field of organization and management, in order to facilitate management and task allocation, users in a group can periodically report location information to the server 101, and the server 101 receives and transmits the location information to the terminal device 102, so that icons of the users are displayed on a map on the terminal device 102 side.
In a private network system, when a large number of users report position information to the server 101 concurrently, the amount of data sent by the server 101 to the terminal device 102 is large, and the icon of the user in the map is updated as soon as the terminal device 102 receives the position information of one user, in this case, the amount of data received by the terminal device 102 is large, and the terminal device 102 cannot process the icons simultaneously, so that the icons of a large number of users cannot be displayed in the map at the same time, that is, the icon display of the user is jammed.
In view of the above problem, an embodiment of the present application provides a map display method, where in a processing cycle, when it is determined that a location of a first user changes, an icon of the first user displayed in a map is updated by using location information of the first user in received user data, and the processing cycle is obtained by prolonging a preset cycle when the number of users in the preset cycle is greater than a preset number. The processing period is obtained by prolonging the preset period, and since the number of the users in the user data received in the preset period and the processing period is the same, the icons of the users in the map are updated according to the received user data in the processing period, so that the icons of the users can be displayed in the map in the processing period, and the problem that the icons of the users are displayed in a stuck state is solved.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a first flowchart of a map display method provided in an embodiment of the present application, where an execution main body of the embodiment may be a terminal device in the embodiment of fig. 1. As shown in fig. 2, the map display method provided in this embodiment may include the following steps:
s201, in a processing period, determining whether the position of the user changes or not according to the position information of each user in the user data received from the server and the first database.
S202, if the position of the first user changes, updating the icon of the first user displayed in the map by using the position information of the first user in the user data.
The user data includes location information of a plurality of users, and the first database includes location information of a plurality of users that has been displayed in the map.
Exemplarily, a terminal device runs map software, icons of users are displayed in a map interface, fig. 3 is a schematic diagram of the map interface provided in the embodiment of the present application, as shown in fig. 3, the map interface includes 5 users, and the icon of each user is respectively represented as a solid circle. The terminal device also caches a first database, where the first database includes location information of 5 users that have been displayed on the map, where the 5 users include a user corresponding to the terminal device.
Of course, this embodiment is a technical solution in the case that the number of users is greater than the preset number, and for convenience of description, fig. 3 only takes 5 users as an example for explanation.
The processing period is obtained by prolonging the preset period when the number of users is greater than the preset number in the preset period.
In one implementation, the following steps may be further included before step S201:
and A1, receiving the user data sent by the server in a preset period, and updating the user icon in the map according to the user data.
And A2, if the number of the users in the user data received in the preset period is larger than the preset number, prolonging the preset period to obtain a processing period.
The method comprises the steps that the terminal equipment receives user data sent by a server in a preset period, the user data comprise position information of a plurality of users, and meanwhile when the position of the user is determined to be changed, the icon of the user in a map is updated according to the position information of the user after the position is changed. The server may send the location information of the user with all location changes to the terminal device within a preset period, which may be specifically determined according to an actual situation, and may be, for example, 1s, 2s, or 3s, which is not limited in this embodiment.
Step a1 is similar to the prior art, where if the number of users in the user data received in the preset period is greater than the preset number, the icon of the user after the position change may have a display stuck problem, and in order to avoid the display stuck problem occurring in the next update period, in this embodiment, the number of users in the user data received in the preset period is obtained, and if the user data is greater than the preset number, the preset period is extended to obtain the processing period.
The number of users in the user data sent by the server each time is basically the same, and the difference may be: the position information of the user A received in the preset period indicates that the user is located at the point B, and the position information of the user A received in the processing period indicates that the user A is located at the point C, namely the user A passes through the point B to reach the point C, and the refreshing frequency of the user A are different. Then the preset period is extended to obtain a processing period, and steps S201-S202 are executed in the processing period to realize smooth display of the icon of the user.
It should be noted that, in step a1, only when the preset period matches the number of users, that is, when the user data is received in the preset period, the icon of the user whose position changes may be displayed in the map according to the received user data, and display jamming may not occur. In this way, icons of all users whose positions change when the preset period arrives are also displayed in the map.
Illustratively, the number of users may be 1000, 2000, 5000, etc., and the strength of the extension may be determined according to the number of users. It is determined from an empirical value that the number of users matched with the preset period of 1s may be 500, and then when the number of users is 5000, the processing period may be determined to be 5 s. The present embodiment does not limit the matching manner between the preset period and the processing period.
In this embodiment, the user data sent by the server is received in the processing cycle, and meanwhile, in the processing cycle, it is determined whether there is a change in the location of the user according to the location information of each user in the user data received from the server and the first database, and if there is a change in the location of the first user, the icon of the first user displayed in the map is updated by using the location information of the first user in the user data sent by the server. That is, the icon of the user whose position is changed may be displayed in the map according to the received user data in the processing cycle while the user data is received in the processing cycle, and display jamming may not occur.
On the basis of fig. 3, fig. 4 is a schematic diagram two of a map interface provided in the embodiment of the present application, as shown in fig. 4, the map interface includes 5 users, and an icon of each user is respectively represented as a solid circle, where positions of 3 users (the 3 users are first users) change, and the icons of the 3 users displayed in the map are updated by using the position information of the 3 users in the received user data.
The user data also includes state information and service types of multiple users.
The state information is used to indicate the current state of the user, for example: in a subway.
The service type is used to indicate the service type currently performed by the user, for example: on duty.
Therefore, the state information and the service type of the user are marked on the icon of the user in the map, so that the terminal equipment can conveniently acquire the position information, the state information and the service type of each user in the map in time, and convenience is provided for organizing, managing or commanding and scheduling.
The map display method provided by the embodiment comprises the following steps: in a processing period, determining whether the position of the user changes or not according to the position information of each user in the user data received from the server and the first database; the user data comprises position information of a plurality of users, the first database comprises the position information of the plurality of users displayed in the map, the processing period is obtained by prolonging the preset period when the number of the users is larger than the preset number in the preset period, and if the position of the first user changes, the icon of the first user displayed in the map is updated by the position information of the first user in the user data. The embodiment has the following beneficial effects: the processing period is obtained by prolonging the preset period, and because the number of the users in the user data received in the preset period and the processing period is the same, the icons of the users in the map are updated according to the received user data in the processing period, so that the icons of the users can be displayed in the map in the processing period, and the problem that the icons of the users are displayed in a stuck state is solved.
On the basis of the foregoing embodiment, fig. 5 is a flowchart of a second map display method provided in the embodiment of the present application, and as shown in fig. 5, the map display method provided in the embodiment specifically includes:
s301, in the processing period, according to the position information of each user in the user data received from the server and the first database, determining whether the position of the user changes.
S302, if the position of the first user changes, the display range of the map on the display screen is obtained.
The processing period is obtained by extending the preset period when the number of users is greater than the preset number in the preset period, and the smooth display of the icons of the users can be realized by executing the steps S301 to S306 in the processing period.
In the embodiment, whether the position of the user is changed or not is determined according to the position information of each user in the user data received from the server and the first database, and if the position of the first user is changed, the display range of the map on the display screen is acquired.
Due to the size limitation of the display screen of the terminal device, a complete map cannot be displayed generally, and therefore, the display range of the map on the display screen needs to be acquired to determine whether the first user is in the display range.
In one implementation, obtaining a display range of a map on a display screen includes:
acquiring GPS coordinates of four vertexes of a map currently displayed by a display screen;
and determining the display range of the map on the display screen according to the GPS coordinates of the four vertexes.
Wherein, the four vertexes are four vertexes of the display screen, and the GPS coordinate of each vertex is the GPS coordinate of the vertex in the map, for example: the GPS coordinates of the four vertices are (x1, y1), (x2, y1), (x2, y2), (x1, y2), and the display range of the map on the display screen is (x, y), where a1< x < a2, and B1< y < B2.
S303, determining whether the first user is in the display range according to the position information of the first user.
And determining whether the first user is in the display range according to the position information of the first user, if so, indicating that the first user is currently displayed in the display screen, otherwise, indicating that the first user is not currently displayed in the display screen.
S304, if the first user is in the display range, obtaining the scaling of the map, and determining whether the scaling of the map changes.
And if the first user is in the display range, acquiring the scaling of the current map, and then determining whether the scaling of the map changes according to the pre-stored scaling of the map before the user data sent by the server is received.
Correspondingly, the updating of the icon of the first user displayed in the map by using the position information of the first user in the user data specifically includes steps S305 to S307.
S305, if the scaling of the map is not changed, clearing the icon of the first user displayed in the map, and drawing the icon of the first user in the map according to the position information of the first user in the user data.
And if the scaling of the map is not changed, clearing the icon of the first user displayed in the map, and drawing the icon of the first user in the map according to the position information of the first user in the user data, wherein the icon of the first user is used for indicating the position information of the first user.
S306, if the scaling of the map is changed and the scaling is larger than the preset scale, emptying icons of all users displayed in the map, wherein all users comprise the first user and other users.
S307, drawing the icon of the first user in the map according to the position information and the zoom scale of the first user in the user data, and drawing the icons of other users in the map according to the position information and the zoom scale of other users displayed on the map in the first database.
If the zoom ratio of the map is changed and the zoom ratio is larger than the preset ratio, it is indicated that the icons of all the users in the map are changed, that is, the icons of all the users in the map need to be redrawn, the icons of all the users displayed in the map are cleared, and all the users include the first user and other users, wherein the other users are users whose positions are not changed.
Then, since the position of the first user is changed, the icon of the first user is drawn in the map according to the position information and the zoom scale of the first user in the user data.
Since the positions of the other users do not change, the icons of the other users are drawn in the map according to the position information and the zoom scale of the other users already displayed on the map in the first database.
Wherein, the position information and the scaling of the first user have a corresponding relationship, for example: the position coordinate of the first user is (x1, y1), the scaling is 50%, and the position coordinate corresponding to the icon of the first user is (x1/2, y 1/2).
Likewise, the position information and the scaling of other users may have the correspondence. Of course, in practical applications, the correspondence between the position information of the first user, the position information of the other users, and the scaling ratio includes, but is not limited to, the above examples.
The map display method provided by the embodiment comprises the following steps: in a processing cycle, according to the position information of each user in the user data received from the server and the first database, determining whether the position of the user changes, if the position of the first user changes, obtaining the display range of the map on the display screen, if the first user is in the display range, obtaining the zoom ratio of the map, determining whether the zoom ratio of the map changes, if the zoom ratio of the map does not change, emptying the icons of the first user displayed in the map, drawing the icons of the first user in the map according to the position information of the first user in the user data, if the zoom ratio of the map changes, emptying the icons of all users displayed in the map, wherein all users comprise the first user and other users, drawing the icons of the first user in the map according to the position information and the zoom ratio of the first user in the user data, and drawing the icons of the first user in the map according to the position information of the other users displayed in the map in the first database And scaling, drawing icons of other users in the map. The embodiment has the following beneficial effects: the processing period is obtained by prolonging the preset period, and since the number of the users in the user data received in the preset period and the processing period is the same, the icons of the users in the map are updated according to the received user data in the processing period, so that the icons of the users can be displayed in the map in the processing period, and the problem that the icons of the users are displayed in a stuck state is solved.
On the basis of the foregoing embodiment, as shown in fig. 6, when the scaling of the map is smaller than the preset scale and the scaling is smaller than the preset scale, steps S401 to S403 may be further executed in the processing cycle, where the step S401 includes:
s401, if the scaling of the map is changed and the scaling is smaller than a preset scale, emptying icons of all users displayed in the map.
S402, acquiring the position information of the convergent point according to the position information of the first user in the user data and the position information of other users in the first database.
And S403, drawing an icon of the convergent point in the map according to the position information of the convergent point.
When the zoom scale of the map is smaller than the preset scale, icons of all users are not displayed in the map generally, but icons of the convergence points are displayed, wherein the icons of the convergence points are used for indicating the position information of the convergence points, and the position information of the convergence points is obtained by converging the position information of the first user and the position information of other users. The number of the first user and the number of the other users can be multiple.
In this embodiment, when the zoom scale of the map is smaller than the preset scale, icons of all users displayed in the map are cleared, and since the position of the first user is changed and the positions of other users are not changed, the position information of the rendezvous point is obtained according to the position information of the first user in the user data and the position information of other users in the first database.
In one implementation, the aggregation process may be: the method comprises the steps of obtaining position information of a first user and position information of other users in a preset display range, respectively obtaining an average value of horizontal coordinates of the positions of the users in the preset range and an average value of vertical coordinates of the positions of the users in the preset range, taking the average value of the horizontal coordinates as the horizontal coordinates of an aggregation point in the preset range, and taking the average value of the vertical coordinates as the vertical coordinates of the aggregation point in the preset range. There may be a plurality of aggregation points, and in practical applications, the manner of aggregation processing includes, but is not limited to, the above examples.
Then, the icon of the convergent point can be drawn in the map by using the position information of the convergent point, and the number of users in the corresponding preset display range is marked on the icon of the convergent point.
Fig. 7 is a schematic view three of a map interface provided in the embodiment of the present application, and as shown in fig. 7, because the scaling of the map is smaller than the preset scale, the icons of the users are hidden, and the icons of the aggregation points are displayed by adopting aggregation processing, where the icons of each aggregation point are further marked with the number of users in a corresponding preset display range, which are 32, 50, and 14, respectively. Wherein, the preset display range corresponding to each convergence point is a dotted line circle on the periphery of the preset display range.
When receiving user data from the server next time, if the location information of the aggregation point in the preset display range is not changed, it is not necessary to redraw the icon of the aggregation point.
In addition, when the user enlarges the scaling of the map, the icons of the convergence points can be hidden, and the icons of the users can be displayed.
The map display method provided by the embodiment comprises the following steps: and if the zoom scale of the map is changed and the zoom scale is smaller than the preset scale, emptying icons of all users displayed in the map, acquiring the position information of the convergent point according to the position information of the first user in the user data and the position information of other users in the first database, and drawing the icon of the convergent point in the map according to the position information of the convergent point. The embodiment has the following beneficial effects: when the scaling ratio is smaller than the preset ratio, icons of the convergent points are displayed, so that the personnel distribution can be conveniently checked on the whole, and the organization and management are convenient.
Fig. 8 is a schematic structural diagram of a map display device according to an embodiment of the present application, and as shown in fig. 8, the map display device 80 according to the present embodiment may include: a processing module 801, an updating module 802, and an obtaining module 803.
A processing module 801, configured to determine whether there is a change in the location of the user according to the location information of each user in the user data received from the server and the first database in the processing cycle; the user data comprises position information of a plurality of users, the first database comprises the position information of the plurality of users displayed in the map, and the processing period is obtained by prolonging the preset period when the number of the users in the preset period is larger than the preset number;
the updating module 802 is further configured to update the icon of the first user displayed in the map by using the location information of the first user in the user data if the location of the first user changes.
In one implementation, the update module 802 is further configured to:
receiving user data sent by the server in the preset period, and updating the icon of the user in the map according to the user data;
a processing module 801, configured to, if the number of users in the user data received in the preset period is greater than a preset number, extend the preset period, and obtain the processing period.
In one implementation, the method further comprises:
an obtaining module 803, configured to obtain a display range of the map on a display screen;
the processing module is further configured to determine whether the first user is within the display range according to the location information of the first user;
the obtaining module 803 is further configured to obtain the zoom ratio of the map if the first user is in the display range, and the processing module is further configured to determine whether the zoom ratio of the map changes;
the update module 802 is specifically configured to:
and if the zoom scale of the map is not changed, emptying the icon of the first user displayed in the map, and drawing the icon of the first user in the map according to the position information of the first user in the user data.
In one implementation, the update module 802 is specifically configured to:
if the zoom scale of the map is changed and the zoom scale is larger than a preset scale, emptying icons of all users displayed in the map, wherein all the users comprise a first user and other users;
drawing the icon of the first user in the map according to the position information of the first user and the zoom scale in the user data, and drawing the icon of the other user in the map according to the position information of the other user and the zoom scale, which have been displayed on the map in the first database.
In one implementation, the processing module 801 is further configured to:
if the zoom scale of the map is changed and the zoom scale is smaller than the preset scale, emptying icons of all users displayed in the map;
the obtaining module 803 is further configured to obtain location information of an aggregation point according to the location information of the first user and the location information of the other users in the user data, where the location information of the aggregation point is obtained by aggregating the location information of the first user and the location information of the other users;
the processing module 801 is further configured to:
and drawing the icon of the convergent point in the map according to the position information of the convergent point.
In one implementation, the user data further includes status information and a service type of the plurality of users.
The map display device of this embodiment may be configured to implement the technical solutions in the above method embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 9 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present application, and as shown in fig. 9, the terminal device according to the embodiment includes:
a memory for storing computer execution instructions;
and the processor is used for executing the computer execution instructions stored in the memory so as to realize the steps executed by the access control terminal in the embodiment. Reference may be made in particular to the description relating to the method embodiments described above.
Optionally, the access control device further comprises a bus for connecting the memory, the processor, the transmitter and the receiver.
Embodiments of the present invention further provide a computer-readable storage medium, where computer-executable instructions are stored, and when a processor executes the computer-executable instructions, the method is implemented.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each module may exist alone physically, or two or more modules are integrated into one unit. The unit formed by the modules can be realized in a hardware form, and can also be realized in a form of hardware and a software functional unit.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present application.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.
Claims (10)
1. A map display method, characterized in that the method comprises:
in a processing period, determining whether the position of the user changes or not according to the position information of each user in the user data received from the server and the first database; the user data comprises position information of a plurality of users, the first database comprises the position information of the plurality of users displayed in the map, and the processing period is obtained by prolonging the preset period when the number of the users in the preset period is larger than the preset number;
and if the position of the first user is changed, updating the icon of the first user displayed in the map by adopting the position information of the first user in the user data.
2. The method of claim 1, further comprising:
receiving user data sent by the server in the preset period, and updating the icon of the user in the map according to the user data;
and if the number of the users in the user data received in the preset period is larger than the preset number, prolonging the preset period to obtain the processing period.
3. The method of claim 1, wherein prior to updating the first user's icon displayed in the map with the first user's location information in the user data, further comprising:
acquiring the display range of the map on a display screen;
determining whether the first user is in the display range according to the position information of the first user;
if the first user is in the display range, acquiring the zoom scale of the map, and determining whether the zoom scale of the map changes;
correspondingly, the updating the icon of the first user displayed in the map by using the position information of the first user in the user data includes:
and if the zoom scale of the map is not changed, emptying the icon of the first user displayed in the map, and drawing the icon of the first user in the map according to the position information of the first user in the user data.
4. The method of claim 3, wherein the updating the first user's icon displayed in the map with the first user's location information in the user data further comprises:
if the zoom scale of the map is changed and the zoom scale is larger than a preset scale, emptying icons of all users displayed in the map, wherein all the users comprise a first user and other users;
drawing the icon of the first user in the map according to the position information of the first user and the zoom scale in the user data, and drawing the icon of the other user in the map according to the position information of the other user and the zoom scale, which have been displayed on the map in the first database.
5. The method of claim 4, further comprising:
if the zoom scale of the map is changed and the zoom scale is smaller than the preset scale, emptying icons of all users displayed in the map;
acquiring the position information of an aggregation point according to the position information of the first user and the position information of the other users in the user data, wherein the position information of the aggregation point is obtained by aggregating the position information of the first user and the position information of the other users;
and drawing the icon of the convergent point in the map according to the position information of the convergent point.
6. The method according to any of claims 1-5, wherein said user data further comprises status information and traffic type of said plurality of users.
7. A map display apparatus, comprising:
the processing module is used for determining whether the position of the user changes or not according to the position information of each user in the user data received from the server and the first database in the processing period; the user data comprises position information of a plurality of users, the first database comprises the position information of the plurality of users displayed in the map, and the processing period is obtained by prolonging the preset period when the number of the users in the preset period is larger than the preset number;
and the updating module is further used for updating the icon of the first user displayed in the map by adopting the position information of the first user in the user data if the position of the first user changes.
8. The apparatus of claim 7, wherein the update module is further configured to:
receiving user data sent by the server in the preset period, and updating the icon of the user in the map according to the user data;
the processing module is further configured to, if the number of users in the user data received in the preset period is greater than a preset number, extend the preset period to obtain the processing period.
9. A terminal device, comprising:
a memory and a processor;
the memory for storing program code;
the processor for invoking the program code to perform the method of any one of claims 1-6.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program; the computer program, when executed, implementing the method of any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010217062.3A CN113448972B (en) | 2020-03-25 | 2020-03-25 | Map display method, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010217062.3A CN113448972B (en) | 2020-03-25 | 2020-03-25 | Map display method, device, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113448972A CN113448972A (en) | 2021-09-28 |
CN113448972B true CN113448972B (en) | 2022-09-06 |
Family
ID=77806787
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010217062.3A Active CN113448972B (en) | 2020-03-25 | 2020-03-25 | Map display method, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113448972B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0829704A2 (en) * | 1996-09-13 | 1998-03-18 | Hitachi, Ltd. | Information display system for vehicle navigation |
CN102230968A (en) * | 2011-04-01 | 2011-11-02 | 搜船(北京)网络技术有限公司 | System and method for updating and displaying dynamic object mark position in real time |
CN103888535A (en) * | 2014-03-25 | 2014-06-25 | 天脉聚源(北京)传媒科技有限公司 | Position information processing method and system based on wechat platform |
CN104080049A (en) * | 2014-06-11 | 2014-10-01 | 惠州Tcl移动通信有限公司 | Method and system for displaying change of number of regional users |
CN106980654A (en) * | 2017-03-06 | 2017-07-25 | 广东欧珀移动通信有限公司 | Road condition updating method, device and computer equipment |
CN108681453A (en) * | 2018-05-21 | 2018-10-19 | 京东方科技集团股份有限公司 | The implementation method and device of engine map |
CN109857824A (en) * | 2019-01-10 | 2019-06-07 | 深圳市沃特沃德股份有限公司 | Display methods, device and the readable storage medium storing program for executing of user's map |
CN114173279A (en) * | 2021-12-09 | 2022-03-11 | 广州爱浦路网络技术有限公司 | User terminal position updating period control method, integrated communication network and storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8571580B2 (en) * | 2006-06-01 | 2013-10-29 | Loopt Llc. | Displaying the location of individuals on an interactive map display on a mobile communication device |
-
2020
- 2020-03-25 CN CN202010217062.3A patent/CN113448972B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP0829704A2 (en) * | 1996-09-13 | 1998-03-18 | Hitachi, Ltd. | Information display system for vehicle navigation |
CN102230968A (en) * | 2011-04-01 | 2011-11-02 | 搜船(北京)网络技术有限公司 | System and method for updating and displaying dynamic object mark position in real time |
CN103888535A (en) * | 2014-03-25 | 2014-06-25 | 天脉聚源(北京)传媒科技有限公司 | Position information processing method and system based on wechat platform |
CN104080049A (en) * | 2014-06-11 | 2014-10-01 | 惠州Tcl移动通信有限公司 | Method and system for displaying change of number of regional users |
CN106980654A (en) * | 2017-03-06 | 2017-07-25 | 广东欧珀移动通信有限公司 | Road condition updating method, device and computer equipment |
CN108681453A (en) * | 2018-05-21 | 2018-10-19 | 京东方科技集团股份有限公司 | The implementation method and device of engine map |
CN109857824A (en) * | 2019-01-10 | 2019-06-07 | 深圳市沃特沃德股份有限公司 | Display methods, device and the readable storage medium storing program for executing of user's map |
CN114173279A (en) * | 2021-12-09 | 2022-03-11 | 广州爱浦路网络技术有限公司 | User terminal position updating period control method, integrated communication network and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113448972A (en) | 2021-09-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110035180B (en) | Card display method, device, terminal and storage medium | |
CN106155699B (en) | A kind of management method and mobile terminal of background process | |
CN111552429B (en) | Graph selection method and device and electronic equipment | |
CN110765220A (en) | Thermodynamic diagram-based geographic position determining method and electronic equipment | |
CN107730375A (en) | A kind of method, system and the terminal device of tax management map | |
CN109213493A (en) | Container dispositions method, special resource management terminal and readable storage medium storing program for executing | |
CN113448972B (en) | Map display method, device, terminal and storage medium | |
CN108986034B (en) | Raster data coordinate conversion method, system, terminal equipment and storage medium | |
CN110989877A (en) | Message management method, related equipment and computer readable storage medium | |
CN108038171B (en) | Data writing method and device and data server | |
CN111273842B (en) | Notification message processing method and device, electronic equipment and storage medium | |
CN110471751B (en) | Terminal equipment interaction method and device, readable storage medium and terminal equipment | |
CN107329654A (en) | Draw method, device and the computer-readable recording medium of element floating layer | |
WO2019000468A1 (en) | User location identification method and apparatus, storage medium, and electronic device | |
CN111415168A (en) | Transaction warning method and device | |
US20150364118A1 (en) | Attribute based map marker clustering | |
CN109409936A (en) | Customer consumption portrait generation method, device, equipment and readable storage medium storing program for executing | |
CN110324845B (en) | Resource allocation method and device | |
US11646904B2 (en) | Information processing apparatus and service cost calculation method | |
CN110019596B (en) | Method and device for determining tiles to be displayed and terminal equipment | |
CN114296847A (en) | Layer-based display method and device | |
CN114546171A (en) | Data distribution method, data distribution device, storage medium and electronic equipment | |
CN113989427A (en) | Illumination simulation method and device, electronic equipment and storage medium | |
CN110866071B (en) | Map object display method, device, equipment and storage medium | |
CN116127342B (en) | Information clustering processing method, system and platform based on hotel |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |