CN117171277B - Method, system, device and medium for loading mark of electronic map - Google Patents

Method, system, device and medium for loading mark of electronic map Download PDF

Info

Publication number
CN117171277B
CN117171277B CN202311156253.3A CN202311156253A CN117171277B CN 117171277 B CN117171277 B CN 117171277B CN 202311156253 A CN202311156253 A CN 202311156253A CN 117171277 B CN117171277 B CN 117171277B
Authority
CN
China
Prior art keywords
marks
distance
display screen
display
center point
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
Application number
CN202311156253.3A
Other languages
Chinese (zh)
Other versions
CN117171277A (en
Inventor
王永军
江其
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wide Technology Co ltd
Original Assignee
Beijing Wide Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Wide Technology Co ltd filed Critical Beijing Wide Technology Co ltd
Priority to CN202311156253.3A priority Critical patent/CN117171277B/en
Publication of CN117171277A publication Critical patent/CN117171277A/en
Application granted granted Critical
Publication of CN117171277B publication Critical patent/CN117171277B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Instructional Devices (AREA)

Abstract

The present invention relates to the field of electronic maps, and in particular, to a method, a system, an apparatus, and a medium for loading a label of an electronic map. Comprising the following steps: acquiring a physical center point of a display screen of the electronic map, and determining position information of the physical center point mapped in the electronic map of the current display interface; and determining a first distance between the physical center point and the midpoint of the edge of the display screen, and not loading when the obtained zoom distance is greater than the first distance after the distance between the circle center of the mark and the actual center point is zoomed according to the current zoom level until loading of all marks in the current display screen is completed. The physical center point and the first actual position information are determined, so that the follow-up judgment can be made to have a basis, whether loading processing is needed or not is further determined through the distance between the physical center point and the midpoint of the edge of the display screen, loading efficiency can be improved through the scheme, and meanwhile occupation of a memory is reduced.

Description

一种电子地图的标记加载方法、系统、设备及介质Method, system, device and medium for loading mark of electronic map

技术领域Technical Field

本发明涉及电子地图领域,尤其涉及一种电子地图的标记加载方法、系统、设备及介质。The present invention relates to the field of electronic maps, and in particular to a method, system, device and medium for loading marks on an electronic map.

背景技术Background technique

在现有技术中,通常会将图形标记直接显示在电子地图上。In the prior art, graphic marks are usually displayed directly on an electronic map.

现有技术的缺点如下:如果有大量的标记需要显示会重叠在地图上无法分辨、无法得知具体数量、大量标记也会导致电子地图卡顿、响应缓慢、缩放滑动困难,影响用户体验。The disadvantages of the existing technology are as follows: if a large number of marks need to be displayed, they will overlap on the map and cannot be distinguished, and the specific number cannot be known. A large number of marks will also cause the electronic map to freeze, respond slowly, and make zooming and sliding difficult, affecting the user experience.

发明内容Summary of the invention

本发明所要解决的技术问题是针对现有技术的不足,具体针对电子地图卡顿、响应缓慢、缩放滑动困难,影响用户体验等问题,具体提供了一种电子地图的标记加载方法、系统、设备及介质,具体如下:The technical problem to be solved by the present invention is to address the deficiencies of the prior art, specifically to address the problems of electronic map freezing, slow response, difficulty in zooming and sliding, and impact on user experience, and specifically to provide a method, system, device and medium for loading markers on an electronic map, as follows:

1)第一方面,本发明提供一种电子地图的标记加载方法,具体技术方案如下:1) In the first aspect, the present invention provides a method for loading a mark on an electronic map, and the specific technical solution is as follows:

S1,获取电子地图的显示屏幕的物理中心点,在电子地图上确定与所述物理中心点重合的第一实际位置信息,确定物理中心点与显示屏幕的任一边缘中点的第一距离;S1, obtaining a physical center point of a display screen of an electronic map, determining first actual position information coinciding with the physical center point on the electronic map, and determining a first distance between the physical center point and a midpoint of any edge of the display screen;

S2,当所述第一距离小于实际位置信息和电子地图上的任一标记的圆心的实际位置之间在当前缩放比例下的缩放距离,则,在所述显示屏幕上显示所述任一标记,直至对电子地图上的每个标记进行判断。S2, when the first distance is smaller than the zoom distance between the actual position information and the actual position of the center of any mark on the electronic map at the current zoom ratio, then, displaying the any mark on the display screen until each mark on the electronic map is judged.

本发明提供的一种电子地图的标记加载方法的有益效果如下:The beneficial effects of the electronic map mark loading method provided by the present invention are as follows:

通过确定物理中心点以及第一实际位置信息,可以使得后续的判断具有依据,进而通过物理中心点与显示屏幕边缘中点的距离来进一步确定是否需要进行加载处理,通过上述方案可以提升加载的效率,同时减少内存的占用。By determining the physical center point and the first actual position information, a basis can be provided for subsequent judgments, and the distance between the physical center point and the midpoint of the edge of the display screen can be used to further determine whether loading processing is required. The above solution can improve loading efficiency and reduce memory usage.

在上述方案的基础上,本发明还可以做如下改进。Based on the above solution, the present invention can also be improved as follows.

进一步,还包括:Furthermore, it also includes:

当所述缩放级别未发生变化,所述物理中心点发生变化时,确定变化后的物理中心点距离变化前的标定点的增量的绝对值,当所述绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。When the zoom level does not change and the physical center point changes, the absolute value of the increment of the physical center point after the change from the calibration point before the change is determined, and when the absolute value is greater than the first distance, all marks in the current display screen are loaded.

进一步,还包括:Furthermore, it also includes:

当所述缩放级别发生变化,所述物理中心点未发生变化时,分别计算所述物理中心点未变化时与标定点之间的第二距离以及所述物理中心点发生变化后与所述标定点之间的第三距离,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。When the zoom level changes and the physical center point does not change, the second distance between the physical center point and the calibration point when the physical center point does not change and the third distance between the physical center point and the calibration point after the physical center point changes are calculated respectively; when the absolute value of the difference between the second distance and the third distance is greater than the first distance, all markers in the current display screen are loaded.

进一步,还包括:Furthermore, it also includes:

当所述显示屏幕中的电子地图发生变动时,判断发生变动前与发生变动后的标记是否存在重复,生成判断结果,当判断结果为是时,剔除重复信息。When the electronic map on the display screen changes, it is determined whether there is duplication between the marks before and after the change, and a determination result is generated. If the determination result is yes, the duplication information is removed.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

遍历所述当前屏幕中的所有标记,按照与第一实际位置信息之间的距离的升序,对所有标记进行排列,得到升序队列;Traversing all the marks on the current screen, arranging all the marks in ascending order of distances from the first actual position information, and obtaining an ascending queue;

依据所述升序队列,顺次确定与升序队列中第一显示标记存在碰撞关系的第一隐藏标记,将第一显示标记与所有第一隐藏标记进行关联,记录第一隐藏标记的个数,并将所有第一隐藏标记进行隐藏处理;According to the ascending queue, first hidden marks that collide with the first display marks in the ascending queue are sequentially determined, the first display marks are associated with all first hidden marks, the number of first hidden marks is recorded, and all first hidden marks are hidden;

当所述升序队列中的第二显示标记与所述第一显示标记不存在碰撞关系,则依据所述升序队列,顺次确定所述第二显示标记之后的标记与所述第二显示标记存在碰撞关系的第二隐藏标记,将所述第二显示标记与所有第二隐藏标记进行关联,记录第二隐藏标记的个数,并将所有第二隐藏标记进行隐藏处理,直至完成升序队列中所有标记的关联;When the second display mark in the ascending queue does not have a collision relationship with the first display mark, the second hidden mark after the second display mark and having a collision relationship with the second display mark are sequentially determined according to the ascending queue, the second display mark is associated with all the second hidden marks, the number of the second hidden marks is recorded, and all the second hidden marks are hidden until the association of all the marks in the ascending queue is completed;

将所有显示标记进行整合得到显示集合,将显示集合显示在所述当前显示屏幕中。All display tags are integrated to obtain a display set, and the display set is displayed in the current display screen.

上述进一步的方案的有益效果为:The beneficial effects of the above further scheme are:

标记不产生重叠,用户可以清晰辨认具体位置标记数量;Marks do not overlap, and users can clearly identify the number of marks at specific locations;

减小地图标记显示数据量,减轻地图显示压力、让地图运行顺畅、不卡顿,增强用户体验。Reduce the amount of data displayed by map markers, alleviate map display pressure, make the map run smoothly and without lag, and enhance user experience.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

当所述升序队列中的隐藏标记与所述显示集合中的每一个显示标记均没有碰撞关系,则将该隐藏标记更改为显示标记,顺次判断所述升序队列中的每一个隐藏标记与所述显示集合中的每一个显示标记之间的碰撞关系,直至遍历升序队列中的所有隐藏标记,在所述当前显示屏幕中显示所有由隐藏标记更改为显示标记的标记。When the hidden mark in the ascending queue has no collision relationship with any display mark in the display set, the hidden mark is changed to a display mark, and the collision relationship between each hidden mark in the ascending queue and each display mark in the display set is judged in sequence until all the hidden marks in the ascending queue are traversed, and all marks changed from hidden marks to display marks are displayed in the current display screen.

2)第二方面,本发明还提供一种电子地图的标记加载系统,具体技术方案如下:2) In the second aspect, the present invention also provides a system for loading marks on an electronic map, and the specific technical solution is as follows:

确定模块用于:获取电子地图的显示屏幕的物理中心点,在电子地图上确定与所述物理中心点重合的第一实际位置信息,确定物理中心点与显示屏幕的任一边缘中点的第一距离;The determination module is used to: obtain a physical center point of a display screen of an electronic map, determine first actual position information that coincides with the physical center point on the electronic map, and determine a first distance between the physical center point and a midpoint of any edge of the display screen;

加载模块用于:当所述第一距离小于实际位置信息和电子地图上的任一标记的圆心的实际位置之间在当前缩放比例下的缩放距离,则,在所述显示屏幕上显示所述任一标记,直至对电子地图上的每个标记进行判断。The loading module is used to: when the first distance is less than the zoom distance between the actual position information and the actual position of the center of any mark on the electronic map at the current zoom ratio, then, display the any mark on the display screen until each mark on the electronic map is judged.

在上述方案的基础上,本发明还可以做如下改进。Based on the above solution, the present invention can also be improved as follows.

进一步,还包括:Furthermore, it also includes:

第一判断模块用于:当所述缩放级别未发生变化,所述物理中心点发生变化时,确定变化后的物理中心点距离变化前的标定点的增量的绝对值,当所述绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。The first judgment module is used for: when the zoom level does not change and the physical center point changes, determining the absolute value of the increment of the physical center point after the change from the calibration point before the change, and when the absolute value is greater than the first distance, loading all marks in the current display screen.

进一步,还包括:Furthermore, it also includes:

第二判断模块用于:当所述缩放级别发生变化,所述物理中心点未发生变化时,分别计算所述物理中心点未变化时与标定点之间的第二距离以及所述物理中心点发生变化后与所述标定点之间的第三距离,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。The second judgment module is used for: when the zoom level changes and the physical center point does not change, respectively calculating the second distance between the physical center point and the calibration point when the physical center point does not change and the third distance between the physical center point and the calibration point after the physical center point changes; when the absolute value of the difference between the second distance and the third distance is greater than the first distance, loading all the marks in the current display screen.

进一步,还包括:Furthermore, it also includes:

第三判断模块用于:当所述显示屏幕中的电子地图发生变动时,判断发生变动前与发生变动后的标记是否存在重复,生成判断结果,当判断结果为是时,剔除重复信息。The third judgment module is used to: when the electronic map on the display screen changes, judge whether there is duplication between the marks before and after the change, generate a judgment result, and remove the duplication information when the judgment result is yes.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

遍历所述当前屏幕中的所有标记,按照与第一实际位置信息之间的距离的升序,对所有标记进行排列,得到升序队列;Traversing all the marks on the current screen, arranging all the marks in ascending order of distances from the first actual position information, and obtaining an ascending queue;

依据所述升序队列,顺次确定与升序队列中第一显示标记存在碰撞关系的第一隐藏标记,将第一显示标记与所有第一隐藏标记进行关联,记录第一隐藏标记的个数,并将所有第一隐藏标记进行隐藏处理;According to the ascending queue, first hidden marks that collide with the first display marks in the ascending queue are sequentially determined, the first display marks are associated with all first hidden marks, the number of first hidden marks is recorded, and all first hidden marks are hidden;

当所述升序队列中的第二显示标记与所述第一显示标记不存在碰撞关系,则依据所述升序队列,顺次确定所述第二显示标记之后的标记与所述第二显示标记存在碰撞关系的第二隐藏标记,将所述第二显示标记与所有第二隐藏标记进行关联,记录第二隐藏标记的个数,并将所有第二隐藏标记进行隐藏处理,直至完成升序队列中所有标记的关联;When the second display mark in the ascending queue does not have a collision relationship with the first display mark, the second hidden mark after the second display mark and having a collision relationship with the second display mark are sequentially determined according to the ascending queue, the second display mark is associated with all the second hidden marks, the number of the second hidden marks is recorded, and all the second hidden marks are hidden until the association of all the marks in the ascending queue is completed;

将所有显示标记进行整合得到显示集合,将显示集合显示在所述当前显示屏幕中。All display tags are integrated to obtain a display set, and the display set is displayed in the current display screen.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

当所述升序队列中的隐藏标记与所述显示集合中的每一个显示标记均没有碰撞关系,则将该隐藏标记更改为显示标记,顺次判断所述升序队列中的每一个隐藏标记与所述显示集合中的每一个显示标记之间的碰撞关系,直至遍历升序队列中的所有隐藏标记,在所述当前显示屏幕中显示所有由隐藏标记更改为显示标记的标记。When the hidden mark in the ascending queue has no collision relationship with any display mark in the display set, the hidden mark is changed to a display mark, and the collision relationship between each hidden mark in the ascending queue and each display mark in the display set is judged in sequence until all the hidden marks in the ascending queue are traversed, and all marks changed from hidden marks to display marks are displayed in the current display screen.

3)第三方面,本发明还提供一种计算机设备,所述计算机设备包括处理器,所述处理器与存储器耦合,所述存储器中存储有至少一条计算机程序,所述至少一条计算机程序由所述处理器加载并执行,以使所述计算机设备实现如上所述的一种电子地图的标记加载方法。3) In a third aspect, the present invention further provides a computer device, comprising a processor, the processor being coupled to a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor so that the computer device implements a method for loading markers for an electronic map as described above.

4)第四方面,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一条计算机程序,所述至少一条计算机程序由处理器加载并执行,以使计算机实现如上所述的一种电子地图的标记加载方法。4) In a fourth aspect, the present invention further provides a computer-readable storage medium, wherein at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is loaded and executed by a processor so that the computer implements the electronic map marker loading method as described above.

需要说明的是,本发明的第二方面至第四方面的技术方案及对应的可能的实现方式所取得的有益效果,可以参见上述对第一方面及其对应的可能的实现方式的技术效果,此处不再赘述。It should be noted that the beneficial effects achieved by the technical solutions of the second to fourth aspects of the present invention and the corresponding possible implementation methods can be found in the above-mentioned technical effects of the first aspect and its corresponding possible implementation methods, and will not be repeated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

通过阅读参照以下附图所作的对非限制性实施例的详细描述,本发明的其它特征、目的和优点将会变得更明显:Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

图1为本发明实施例的一种电子地图的标记加载方法的流程示意图;FIG1 is a schematic flow chart of a method for loading marks on an electronic map according to an embodiment of the present invention;

图2为本发明实施例的一种电子地图的标记加载系统的结构示意图;FIG2 is a schematic diagram of the structure of a system for loading marks on an electronic map according to an embodiment of the present invention;

图3为本发明实施例的一种电子地图的标记加载方法的碰撞关系计算示意图;FIG3 is a schematic diagram of collision relationship calculation of a method for loading markers of an electronic map according to an embodiment of the present invention;

图4为本发明实施例的一种电子地图的标记加载方法的加载流程示意图;FIG4 is a schematic diagram of a loading flow of a method for loading marks on an electronic map according to an embodiment of the present invention;

图5为本发明实施例的一种电子地图的标记加载方法的计算机设备框架图。FIG5 is a computer device framework diagram of a method for loading markers for an electronic map according to an embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

如图1所示,本发明实施例的一种电子地图的标记加载方法,包括如下步骤:As shown in FIG1 , a method for loading a mark on an electronic map according to an embodiment of the present invention includes the following steps:

S1,获取电子地图的显示屏幕的物理中心点,在电子地图上确定与所述物理中心点重合的第一实际位置信息,确定物理中心点与显示屏幕的任一边缘中点的第一距离;S1, obtaining a physical center point of a display screen of an electronic map, determining first actual position information coinciding with the physical center point on the electronic map, and determining a first distance between the physical center point and a midpoint of any edge of the display screen;

S2,当所述第一距离小于实际位置信息和电子地图上的任一标记的圆心的实际位置之间在当前缩放比例下的缩放距离,则,在所述显示屏幕上显示所述任一标记,直至对电子地图上的每个标记进行判断。S2, when the first distance is smaller than the zoom distance between the actual position information and the actual position of the center of any mark on the electronic map at the current zoom ratio, then, displaying the any mark on the display screen until each mark on the electronic map is judged.

本发明提供的一种电子地图的标记加载方法的有益效果如下:The beneficial effects of the method for loading marks on an electronic map provided by the present invention are as follows:

通过确定物理中心点以及第一实际位置信息,可以使得后续的判断具有依据,进而通过物理中心点与显示屏幕边缘中点的距离来进一步确定是否需要进行加载处理,通过上述方案可以提升加载的效率,同时减少内存的占用。By determining the physical center point and the first actual position information, a basis can be provided for subsequent judgments, and the distance between the physical center point and the midpoint of the edge of the display screen can be used to further determine whether loading processing is required. The above solution can improve loading efficiency and reduce memory usage.

如图4所示,S1之前还包括:确定电子地图上的任意一个标记的圆心、半径以及经纬度的具体过程为:As shown in FIG. 4 , before S1, the specific process of determining the center, radius, longitude and latitude of any mark on the electronic map is as follows:

电子地图为:(Electronic map),即数字地图,是利用计算机技术,以数字方式存储和查阅的地图。An electronic map is a digital map that is stored and viewed digitally using computer technology.

电子地图储存资讯的方法,一般使用向量式图像储存,地图比例可放大、缩小或旋转而不影响显示效果,早期使用位图式储存,地图比例不能放大或缩小,现代电子地图软件一般利用地理信息系统来储存和传送地图数据,也有其他的信息系统。The method of storing information in electronic maps generally uses vector images. The map scale can be enlarged, reduced or rotated without affecting the display effect. In the early days, bitmap storage was used and the map scale could not be enlarged or reduced. Modern electronic map software generally uses geographic information systems to store and transmit map data, and there are also other information systems.

标记是地图上的一个点,通过圆形图标显示在地图上。A marker is a point on the map that is displayed on the map by a circular icon.

标记的圆心与半径通过如下方式确定:圆形的图标实则是一个正方形的内切圆,圆心坐标为正方形2条对角线的交点,而半径为正方形边长的一半。The center and radius of the mark are determined as follows: the circular icon is actually an inscribed circle of a square, the center coordinates are the intersection of the two diagonals of the square, and the radius is half the length of the side of the square.

经纬度即为圆心所在位置的经纬度。The longitude and latitude are the longitude and latitude of the center of the circle.

S1,获取所述电子地图的显示屏幕的物理中心点,并确定所述物理中心点映射在当前显示界面的电子地图中的第一实际位置信息的具体过程为:S1, the specific process of obtaining the physical center point of the display screen of the electronic map and determining the first actual position information mapped by the physical center point in the electronic map of the current display interface is:

显示屏幕即为显示电子地图的可触摸的屏幕;The display screen is a touchable screen that displays the electronic map;

不同类型或形状的显示屏幕有不同的中心点,将该中心点确定为物理中心点,并基于该点对应在电子地图中的位置,确定第一实际位置信息,位置信息包括但不限于:经纬度或坐标。Display screens of different types or shapes have different center points. The center point is determined as the physical center point, and the first actual location information is determined based on the position of the point corresponding to the electronic map. The location information includes but is not limited to: longitude and latitude or coordinates.

S2,确定物理中心点距离显示屏幕边缘中点的第一距离,当标记的圆心与实际中心点的距离按当前缩放级别缩放后得到的缩放距离大于第一距离则不进行加载,重复S1-S2,直至完成当前显示屏幕中所有标记的加载的过程为:S2, determining the first distance between the physical center point and the midpoint of the edge of the display screen. When the distance between the center of the circle of the marker and the actual center point is scaled by the current zoom level and the zoom distance is larger than the first distance, no loading is performed. S1-S2 are repeated until all markers in the current display screen are loaded. The process is as follows:

S21,确定物理中心点与显示屏幕边缘中点的连线距离;S21, determining the distance between the physical center point and the midpoint of the edge of the display screen;

当显示屏幕为规则的正方形时,显示屏幕边缘中点即为任意一个边缘的中点;When the display screen is a regular square, the midpoint of the edge of the display screen is the midpoint of any edge;

当显示屏幕为规则的长方形时,显示屏幕边缘中点即为长边的中点;When the display screen is a regular rectangle, the midpoint of the edge of the display screen is the midpoint of the long side;

当显示屏幕为不规则图形时,显示屏幕边缘中点即为显示屏边缘距离物理中心点最近的点。When the display screen is an irregular shape, the midpoint of the edge of the display screen is the point on the edge of the display screen that is closest to the physical center point.

S22,在电子地图进行滑动的过程中,确定滑动增量与连线距离的大小关系;S22, during the sliding process of the electronic map, determining the magnitude relationship between the sliding increment and the connection distance;

其中,滑动增量的确定方式包括以下几种:Among them, the sliding increment is determined in the following ways:

1)第一种,如果电子地图的缩放级别不变但物理中心点改变时,重新计算物理中心点对应的第二实际位置信息的位置信息,获取物理中心点未改变时,第一实际位置信息与标定点之间的第一标准距离,重新计算第二实际位置信息与标定点之间的第二标准距离,通过第一标准距离以及第二标准距离来确定滑动增量;1) The first method is, if the zoom level of the electronic map remains unchanged but the physical center point changes, the position information of the second actual position information corresponding to the physical center point is recalculated, the first standard distance between the first actual position information and the calibration point is obtained when the physical center point does not change, the second standard distance between the second actual position information and the calibration point is recalculated, and the sliding increment is determined by the first standard distance and the second standard distance;

2)第二种,如果电子地图的缩放级别不变但物理中心点改变时,重新计算物理中心点对应的第二实际位置信息的位置信息,通过第一实际位置信息的位置信息以及第二实际位置信息的位置信息确定滑动增量;2) The second method is, if the zoom level of the electronic map remains unchanged but the physical center point changes, the position information of the second actual position information corresponding to the physical center point is recalculated, and the sliding increment is determined by the position information of the first actual position information and the position information of the second actual position information;

3)第三种,如果电子地图的缩放级别不变但物理中心点改变时,在显示屏幕上确定一个固定点,在物理中心点未发生改变时,计算该固定点映射在当前显示界面的电子地图中的第三实际位置信息的位置信息,在物理中心点改变后,重新确定该固定点映射在当前显示界面的电子地图中的第四实际位置信息的位置信息,基于第三实际位置信息的位置信息以及第四实际位置信息的位置信息确定滑动增量;3) The third method is, if the zoom level of the electronic map remains unchanged but the physical center point changes, a fixed point is determined on the display screen, and when the physical center point does not change, the position information of the third actual position information mapped by the fixed point in the electronic map of the current display interface is calculated, and after the physical center point changes, the position information of the fourth actual position information mapped by the fixed point in the electronic map of the current display interface is re-determined, and the sliding increment is determined based on the position information of the third actual position information and the position information of the fourth actual position information;

4)第四种,如果电子地图的缩放级别改变但物理中心点不发生改变时,计算缩放级别未改变时,物理中心点距离第三实际位置信息之间的第三标准距离,当缩放级别发生改变后,重新计算物理中心点距离固定点映射在当前显示界面的电子地图中的第五实际位置信息之间的第四标准距离,根据第三标准距离与第四标准距离确定滑动增量。4) The fourth type, if the zoom level of the electronic map changes but the physical center point does not change, the third standard distance between the physical center point and the third actual position information is calculated when the zoom level does not change. When the zoom level changes, the fourth standard distance between the physical center point and the fifth actual position information mapped by the fixed point in the electronic map of the current display interface is recalculated, and the sliding increment is determined based on the third standard distance and the fourth standard distance.

S23,当滑动增量超过连线距离时,加载标记数据。S23, when the sliding increment exceeds the connection distance, loading the marking data.

当滑动增量未超过连线距离时,确定滑动增量对应的显示屏幕范围内增加的所有未进行加载的标记数据,对上述数据进行隐藏式加载,即,与加载标记数据的唯一区别在于隐藏式加载在显示屏幕中不进行显示,暂存于存储器中,当滑动增量超过连线距离时,直接调取存储器中的数据进行显示,增加处理效率。When the sliding increment does not exceed the connection distance, all the unloaded marked data added within the display screen range corresponding to the sliding increment is determined, and the above data is hidden loaded. That is, the only difference from loading marked data is that the hidden loading is not displayed on the display screen, but temporarily stored in the memory. When the sliding increment exceeds the connection distance, the data in the memory is directly retrieved for display, thereby increasing processing efficiency.

加载标记数据的方法分为以下几种:There are several ways to load labeled data:

1)第一种,每次加载出来的标记数据都要和上次加载的数据根据唯一的ID号进行去重。1) The first method is to deduplicate the tag data loaded each time with the data loaded last time based on the unique ID number.

随着比例尺的放大,遍历所有标记数据,按照离第一实际位置信息距离进行由近到远的排序。As the scale is enlarged, all the marked data are traversed and sorted from near to far according to the distance from the first actual position information.

取离第一实际位置信息中心点最近的标记A1,然后将其他与A1发生了碰撞的标记的状态更改为隐藏,并记录其与A1的碰撞关系,并记录与A1发生碰撞的标记的数量。Take the marker A1 closest to the center point of the first actual position information, then change the status of other markers that collide with A1 to hidden, and record their collision relationship with A1, and record the number of markers that collide with A1.

找出与A1之间没有碰撞关系的且离中心点最近的标记A2,对A2重复执行上述步骤,直至得到所有没有碰撞关系的标记。Find the marker A2 that has no collision relationship with A1 and is closest to the center point, and repeat the above steps for A2 until all markers that have no collision relationship are obtained.

将所有没有隐藏的标记放入集合C(C={A1...An})中,并显示在地图上即完成了标记的聚合。Putting all the unhidden markers into a set C (C = {A1...An}) and displaying them on the map completes the aggregation of the markers.

2)第二种,随着比例尺的缩小遍历所有离中心点最近并且记为隐藏的标记,当与C中任何一个标记都没有碰撞的时候即显示在地图中,重复此操作,直到显示出所有没有与集合元素发生碰撞的标记。2) The second method is to traverse all the markers closest to the center point and marked as hidden as the scale decreases. When there is no collision with any marker in C, it is displayed on the map. Repeat this operation until all markers that do not collide with the set elements are displayed.

碰撞关系的确定方式为:The collision relationship is determined as follows:

如图3所示,设线段S=O1O2的长度,如果S<(R1+R2)即为产生碰撞;As shown in FIG3 , let the length of line segment S = O 1 O 2 , if S < (R 1 + R 2 ) then a collision occurs;

S计算公式为:The calculation formula for S is:

R1以及R2为两个标记的半径,(O1x,O1y)为半径R1对应的标记的圆心,(O2x,O2y)为半径R2对应的标记的圆心。R 1 and R 2 are the radii of two markers, (O 1x , O 1y ) is the center of the marker corresponding to the radius R 1 , and (O 2x , O 2y ) is the center of the marker corresponding to the radius R 2 .

进一步,还包括:Furthermore, it also includes:

当所述缩放级别未发生变化,所述物理中心点发生变化时,确定变化后的物理中心点距离变化前的标定点的增量的绝对值,当所述绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。When the zoom level does not change and the physical center point changes, the absolute value of the increment of the physical center point after the change from the calibration point before the change is determined, and when the absolute value is greater than the first distance, all marks in the current display screen are loaded.

进一步,还包括:Furthermore, it also includes:

当所述缩放级别发生变化,所述物理中心点未发生变化时,分别计算所述物理中心点未变化时与标定点之间的第二距离以及所述物理中心点发生变化后与所述标定点之间的第三距离,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。When the zoom level changes and the physical center point does not change, the second distance between the physical center point and the calibration point when the physical center point does not change and the third distance between the physical center point and the calibration point after the physical center point changes are calculated respectively; when the absolute value of the difference between the second distance and the third distance is greater than the first distance, all markers in the current display screen are loaded.

进一步,还包括:Furthermore, it also includes:

当所述显示屏幕中的电子地图发生变动时,判断发生变动前与发生变动后的标记是否存在重复,生成判断结果,当判断结果为是时,剔除重复信息。When the electronic map on the display screen changes, it is determined whether there is duplication between the marks before and after the change, and a determination result is generated. If the determination result is yes, the duplication information is removed.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

遍历所述当前屏幕中的所有标记,按照与第一实际位置信息之间的距离的升序,对所有标记进行排列,得到升序队列;Traversing all the marks on the current screen, arranging all the marks in ascending order of distances from the first actual position information, and obtaining an ascending queue;

依据所述升序队列,顺次确定与升序队列中第一显示标记存在碰撞关系的第一隐藏标记,将第一显示标记与所有第一隐藏标记进行关联,记录第一隐藏标记的个数,并将所有第一隐藏标记进行隐藏处理;According to the ascending queue, first hidden marks that collide with the first display marks in the ascending queue are sequentially determined, the first display marks are associated with all first hidden marks, the number of first hidden marks is recorded, and all first hidden marks are hidden;

当所述升序队列中的第二显示标记与所述第一显示标记不存在碰撞关系,则依据所述升序队列,顺次确定所述第二显示标记之后的标记与所述第二显示标记存在碰撞关系的第二隐藏标记,将所述第二显示标记与所有第二隐藏标记进行关联,记录第二隐藏标记的个数,并将所有第二隐藏标记进行隐藏处理,直至完成升序队列中所有标记的关联;When the second display mark in the ascending queue does not have a collision relationship with the first display mark, the second hidden mark after the second display mark and having a collision relationship with the second display mark are sequentially determined according to the ascending queue, the second display mark is associated with all the second hidden marks, the number of the second hidden marks is recorded, and all the second hidden marks are hidden until the association of all the marks in the ascending queue is completed;

将所有显示标记进行整合得到显示集合,将显示集合显示在所述当前显示屏幕中。All display tags are integrated to obtain a display set, and the display set is displayed in the current display screen.

上述进一步的方案的有益效果为:The beneficial effects of the above further scheme are:

标记不产生重叠,用户可以清晰辨认具体位置标记数量;Marks do not overlap, and users can clearly identify the number of marks at specific locations;

减小地图标记显示数据量,减轻地图显示压力、让地图运行顺畅、不卡顿,增强用户体验。Reduce the amount of data displayed by map markers, alleviate map display pressure, make the map run smoothly and without lag, and enhance user experience.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

当所述升序队列中的隐藏标记与所述显示集合中的每一个显示标记均没有碰撞关系,则将该隐藏标记更改为显示标记,顺次判断所述升序队列中的每一个隐藏标记与所述显示集合中的每一个显示标记之间的碰撞关系,直至遍历升序队列中的所有隐藏标记,在所述当前显示屏幕中显示所有由隐藏标记更改为显示标记的标记。When the hidden mark in the ascending queue has no collision relationship with any display mark in the display set, the hidden mark is changed to a display mark, and the collision relationship between each hidden mark in the ascending queue and each display mark in the display set is judged in sequence until all the hidden marks in the ascending queue are traversed, and all marks changed from hidden marks to display marks are displayed in the current display screen.

如图2所示,本发明还提供一种电子地图的标记加载系统,具体技术方案如下:As shown in FIG. 2 , the present invention also provides a system for loading marks on an electronic map, and the specific technical solution is as follows:

确定模块100用于:获取电子地图的显示屏幕的物理中心点,在电子地图上确定与所述物理中心点重合的第一实际位置信息,确定物理中心点与显示屏幕的任一边缘中点的第一距离;The determination module 100 is used to: obtain a physical center point of a display screen of an electronic map, determine first actual position information that coincides with the physical center point on the electronic map, and determine a first distance between the physical center point and a midpoint of any edge of the display screen;

加载模块200用于:当所述第一距离小于实际位置信息和电子地图上的任一标记的圆心的实际位置之间在当前缩放比例下的缩放距离,则,在所述显示屏幕上显示所述任一标记,直至对电子地图上的每个标记进行判断。The loading module 200 is used to: when the first distance is less than the zoom distance between the actual position information and the actual position of the center of any mark on the electronic map at the current zoom ratio, then display the any mark on the display screen until each mark on the electronic map is judged.

在上述方案的基础上,本发明还可以做如下改进。Based on the above solution, the present invention can also be improved as follows.

进一步,还包括:Furthermore, it also includes:

第一判断模块用于:当所述缩放级别未发生变化,所述物理中心点发生变化时,确定变化后的物理中心点距离变化前的标定点的增量的绝对值,当所述绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。The first judgment module is used for: when the zoom level does not change and the physical center point changes, determining the absolute value of the increment of the physical center point after the change from the calibration point before the change, and when the absolute value is greater than the first distance, loading all marks in the current display screen.

进一步,还包括:Furthermore, it also includes:

第二判断模块用于:当所述缩放级别发生变化,所述物理中心点未发生变化时,分别计算所述物理中心点未变化时与标定点之间的第二距离以及所述物理中心点发生变化后与所述标定点之间的第三距离,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记。The second judgment module is used for: when the zoom level changes and the physical center point does not change, respectively calculating the second distance between the physical center point and the calibration point when the physical center point does not change and the third distance between the physical center point and the calibration point after the physical center point changes; when the absolute value of the difference between the second distance and the third distance is greater than the first distance, loading all the marks in the current display screen.

进一步,还包括:Furthermore, it also includes:

第三判断模块用于:当所述显示屏幕中的电子地图发生变动时,判断发生变动前与发生变动后的标记是否存在重复,生成判断结果,当判断结果为是时,剔除重复信息。The third judgment module is used to: when the electronic map on the display screen changes, judge whether there is duplication between the marks before and after the change, generate a judgment result, and remove the duplication information when the judgment result is yes.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

遍历所述当前屏幕中的所有标记,按照与第一实际位置信息之间的距离的升序,对所有标记进行排列,得到升序队列;Traversing all the marks on the current screen, arranging all the marks in ascending order of distance from the first actual position information, and obtaining an ascending queue;

依据所述升序队列,顺次确定与升序队列中第一显示标记存在碰撞关系的第一隐藏标记,将第一显示标记与所有第一隐藏标记进行关联,记录第一隐藏标记的个数,并将所有第一隐藏标记进行隐藏处理;According to the ascending queue, first hidden marks that collide with the first display marks in the ascending queue are sequentially determined, the first display marks are associated with all first hidden marks, the number of first hidden marks is recorded, and all first hidden marks are hidden;

当所述升序队列中的第二显示标记与所述第一显示标记不存在碰撞关系,则依据所述升序队列,顺次确定所述第二显示标记之后的标记与所述第二显示标记存在碰撞关系的第二隐藏标记,将所述第二显示标记与所有第二隐藏标记进行关联,记录第二隐藏标记的个数,并将所有第二隐藏标记进行隐藏处理,直至完成升序队列中所有标记的关联;When the second display mark in the ascending queue does not have a collision relationship with the first display mark, the second hidden mark after the second display mark and having a collision relationship with the second display mark are sequentially determined according to the ascending queue, the second display mark is associated with all the second hidden marks, the number of the second hidden marks is recorded, and all the second hidden marks are hidden until the association of all the marks in the ascending queue is completed;

将所有显示标记进行整合得到显示集合,将显示集合显示在所述当前显示屏幕中。All display tags are integrated to obtain a display set, and the display set is displayed in the current display screen.

进一步,当所述缩放级别变化为放大时,当所述第二距离与所述第三距离之差的绝对值大于所述第一距离时,加载当前显示屏幕中所有标记的过程为:Further, when the zoom level changes to zoom in, when the absolute value of the difference between the second distance and the third distance is greater than the first distance, the process of loading all the marks in the current display screen is:

当所述升序队列中的隐藏标记与所述显示集合中的每一个显示标记均没有碰撞关系,则将该隐藏标记更改为显示标记,顺次判断所述升序队列中的每一个隐藏标记与所述显示集合中的每一个显示标记之间的碰撞关系,直至遍历升序队列中的所有隐藏标记,在所述当前显示屏幕中显示所有由隐藏标记更改为显示标记的标记。When the hidden mark in the ascending queue has no collision relationship with any display mark in the display set, the hidden mark is changed to a display mark, and the collision relationship between each hidden mark in the ascending queue and each display mark in the display set is judged in sequence until all the hidden marks in the ascending queue are traversed, and all marks changed from hidden marks to display marks are displayed in the current display screen.

在上述各实施例中,虽然对步骤进行了编号S1、S2等,但只是本发明给出的具体实施例,本领域的技术人员可根据实际情况调整S1、S2等的执行顺序,此也在本发明的保护范围内,可以理解,在一些实施例中,可以包含如上述各实施方式中的部分或全部。In the above embodiments, although the steps are numbered S1, S2, etc., these are only specific embodiments given by the present invention. Those skilled in the art may adjust the execution order of S1, S2, etc. according to actual conditions, which is also within the protection scope of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

需要说明的是,上述实施例提供的一种电子地图的标记加载系统的有益效果与上述一种电子地图的标记加载方法的有益效果相同,在此不再赘述。此外,上述实施例提供的系统在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将系统根据实际情况划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的系统与方法实施例属于同一构思,其具体实现过程详见方法实施例,在此不再赘述。It should be noted that the beneficial effects of the electronic map mark loading system provided by the above embodiment are the same as the beneficial effects of the electronic map mark loading method provided by the above embodiment, which will not be described in detail here. In addition, when the system provided by the above embodiment realizes its functions, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the system can be divided into different functional modules according to actual conditions to complete all or part of the functions described above. In addition, the system and method embodiments provided by the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be described in detail here.

如图5所示,本发明实施例的一种计算机设备300,计算机设备300包括处理器320,处理器320与存储器310耦合,存储器310中存储有至少一条计算机程序330,至少一条计算机程序330由处理器320加载并执行,以使计算机设备300实现上述任一项一种电子地图的标记加载方法,具体地:As shown in FIG5 , a computer device 300 according to an embodiment of the present invention includes a processor 320, the processor 320 is coupled to a memory 310, and the memory 310 stores at least one computer program 330, and the at least one computer program 330 is loaded and executed by the processor 320, so that the computer device 300 implements any one of the above-mentioned methods for loading a mark of an electronic map, specifically:

计算机设备300可因配置或性能不同而产生比较大的差异,可以包括一个或多个处理器320(Central Processing Units,CPU)和一个或多个存储器310,其中,该一个或多个存储器310中存储有至少一条计算机程序330,该至少一条计算机程序330由该一个或多个处理器320加载并执行,以使该计算机设备300实现上述实施例提供的一种电子地图的标记加载方法。当然,该计算机设备300还可以具有有线或无线网络接口、键盘以及输入输出接口等部件,以便进行输入输出,该计算机设备300还可以包括其他用于实现设备功能的部件,在此不做赘述。The computer device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors 320 (Central Processing Units, CPU) and one or more memories 310, wherein the one or more memories 310 store at least one computer program 330, and the at least one computer program 330 is loaded and executed by the one or more processors 320, so that the computer device 300 implements a method for loading a mark of an electronic map provided in the above embodiment. Of course, the computer device 300 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the computer device 300 may also include other components for realizing device functions, which will not be described in detail here.

本发明实施例的一种计算机可读存储介质,计算机可读存储介质中存储有至少一条计算机程序,至少一条计算机程序由处理器加载并执行,以使计算机实现上述任一项权利要求的一种电子地图的标记加载方法。A computer-readable storage medium according to an embodiment of the present invention stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements a method for loading a mark on an electronic map according to any one of the above claims.

可选地,计算机可读存储介质可以是只读存储器(Read-OnlyMemory,ROM)、随机存取存储器(RandomAccess Memory,RAM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)、磁带、软盘和光数据存储设备等。Optionally, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, and the like.

在示例性实施例中,还提供了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行上述任一种电子地图的标记加载方法。In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any of the above-mentioned methods for loading markers on an electronic map.

需要说明的是,本申请的说明书和权利要求书中的术语“第一”、“第二”、等是用于区别类似的对象,而代表对特定的顺序或先后次序进行限定。在适当情况下对于类似的对象的使用顺序可以互换,以便这里描述的本申请的实施例能够以除了图示或描述的顺序以外的顺序实施。It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects and represent the definition of a specific order or sequence. The order of use of similar objects can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than the order shown or described.

所属技术领域的技术人员知道,本发明可以实现为系统、方法或计算机程序产品,因此,本公开可以具体实现为以下形式,即:可以是完全的硬件、也可以是完全的软件(包括固件、驻留软件、微代码等),还可以是硬件和软件结合的形式,本文一般称为“电路”、“模块”或“系统”。此外,在一些实施例中,本发明还可以实现为在一个或多个计算机可读介质中的计算机程序产品的形式,该计算机可读介质中包含计算机可读的程序代码。Those skilled in the art know that the present invention can be implemented as a system, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: it can be complete hardware, it can be complete software (including firmware, resident software, microcode, etc.), or it can be a combination of hardware and software, which is generally referred to as "circuit", "module" or "system" herein. In addition, in some embodiments, the present invention can also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.

可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是一一但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM),只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used or used in conjunction with an instruction execution system, device, or device.

尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims (5)

1. The method for loading the mark of the electronic map is characterized by comprising the following steps of:
S1, acquiring a physical center point of a display screen of an electronic map, determining first actual position information overlapped with the physical center point on the electronic map, and determining a first distance between the physical center point and a midpoint of any edge of the display screen;
S2, when the first distance is smaller than the zoom distance between the first actual position information and the actual position of the circle center of any mark on the electronic map at the current zoom level, displaying any mark on the display screen until judging each mark on the electronic map;
determining a connecting line distance between a physical center point and a midpoint of the edge of the display screen;
When the display screen is a regular square, the midpoint of the edge of the display screen is the midpoint of any one edge;
When the display screen is a regular rectangle, the midpoint of the edge of the display screen is the midpoint of the long side;
when the display screen is an irregular graph, the midpoint of the edge of the display screen is the nearest point of the edge of the display screen from the physical center point;
Further comprises:
when the zoom level is unchanged and the physical center point is changed, determining the absolute value of the increment of the changed physical center point from the calibration point before the change, and loading all the marks in the current display screen when the absolute value is larger than the first distance;
Further comprises:
When the electronic map in the display screen changes, judging whether the marks before and after the change are repeated, generating a judging result, and when the judging result is yes, eliminating repeated information;
Further comprises:
when the zoom level is changed and the physical center point is unchanged, respectively calculating a second distance between the physical center point and a calibration point and a third distance between the physical center point and the calibration point after the physical center point is changed, and loading all marks in a current display screen when the absolute value of the difference between the second distance and the third distance is larger than the first distance;
when the zoom level is changed to be enlarged, and when the absolute value of the difference between the second distance and the third distance is larger than the first distance, loading all marks in the current display screen comprises the following steps:
traversing all marks in the current screen, and arranging all marks according to the ascending order of the distance between the marks and the first actual position information to obtain an ascending order queue;
According to the ascending queue, first hidden marks which have collision relation with first display marks in the ascending queue are sequentially determined, the first display marks are associated with all the first hidden marks, the number of the first hidden marks is recorded, and all the first hidden marks are subjected to hiding treatment;
When a collision relationship does not exist between the second display marks in the ascending queue and the first display marks, determining second hidden marks with collision relationship between marks after the second display marks and the second display marks in sequence according to the ascending queue, associating the second display marks with all the second hidden marks, recording the number of the second hidden marks, and carrying out hiding treatment on all the second hidden marks until the association of all the marks in the ascending queue is completed;
and integrating all the display marks to obtain a display set, and displaying the display set in the current display screen.
2. The method for loading marks of an electronic map according to claim 1, wherein when the zoom level is changed to be enlarged, and when an absolute value of a difference between the second distance and the third distance is greater than the first distance, a process of loading all marks in a current display screen is as follows:
When the hidden marks in the ascending queue have no collision relation with each display mark in the display set, changing the hidden marks into display marks, and sequentially judging the collision relation between each hidden mark in the ascending queue and each display mark in the display set until all hidden marks in the ascending queue are traversed, and displaying all marks changed from the hidden marks into the display marks in the current display screen.
3. A tag loading system for an electronic map, comprising:
the determining module is used for: acquiring a physical center point of a display screen of an electronic map, determining first actual position information overlapped with the physical center point on the electronic map, and determining a first distance between the physical center point and a midpoint of any edge of the display screen;
The loading module is used for: when the first distance is smaller than the zoom distance under the current zoom level between the first actual position information and the actual position of the circle center of any mark on the electronic map, displaying any mark on the display screen until each mark on the electronic map is judged;
determining a connecting line distance between a physical center point and a midpoint of the edge of the display screen;
When the display screen is a regular square, the midpoint of the edge of the display screen is the midpoint of any one edge;
When the display screen is a regular rectangle, the midpoint of the edge of the display screen is the midpoint of the long side;
when the display screen is an irregular graph, the midpoint of the edge of the display screen is the nearest point of the edge of the display screen from the physical center point;
Further comprises:
The first judging module is used for: when the zoom level is unchanged and the physical center point is changed, determining the absolute value of the increment of the changed physical center point from the calibration point before the change, and loading all the marks in the current display screen when the absolute value is larger than the first distance;
Further comprises:
the second judging module is used for: when the electronic map in the display screen changes, judging whether the marks before and after the change are repeated, generating a judging result, and when the judging result is yes, eliminating repeated information;
The second judging module is further configured to: when the zoom level is changed and the physical center point is unchanged, respectively calculating a second distance between the physical center point and a calibration point and a third distance between the physical center point and the calibration point after the physical center point is changed, and loading all marks in a current display screen when the absolute value of the difference between the second distance and the third distance is larger than the first distance;
when the zoom level is changed to be enlarged, and when the absolute value of the difference between the second distance and the third distance is larger than the first distance, loading all marks in the current display screen comprises the following steps:
traversing all marks in the current screen, and arranging all marks according to the ascending order of the distance between the marks and the first actual position information to obtain an ascending order queue;
According to the ascending queue, first hidden marks which have collision relation with first display marks in the ascending queue are sequentially determined, the first display marks are associated with all the first hidden marks, the number of the first hidden marks is recorded, and all the first hidden marks are subjected to hiding treatment;
When a collision relationship does not exist between the second display marks in the ascending queue and the first display marks, determining second hidden marks with collision relationship between marks after the second display marks and the second display marks in sequence according to the ascending queue, associating the second display marks with all the second hidden marks, recording the number of the second hidden marks, and carrying out hiding treatment on all the second hidden marks until the association of all the marks in the ascending queue is completed;
and integrating all the display marks to obtain a display set, and displaying the display set in the current display screen.
4. A computer device, characterized in that it comprises a processor coupled to a memory, in which at least one computer program is stored, which is loaded and executed by the processor, so that the computer device implements a method for marking an electronic map according to claim 1 or 2.
5. A computer readable storage medium, wherein at least one computer program is stored in the computer readable storage medium, and the at least one computer program is loaded and executed by a processor, so that the computer implements a method for loading a label of an electronic map according to claim 1 or 2.
CN202311156253.3A 2023-09-08 2023-09-08 Method, system, device and medium for loading mark of electronic map Active CN117171277B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311156253.3A CN117171277B (en) 2023-09-08 2023-09-08 Method, system, device and medium for loading mark of electronic map

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311156253.3A CN117171277B (en) 2023-09-08 2023-09-08 Method, system, device and medium for loading mark of electronic map

Publications (2)

Publication Number Publication Date
CN117171277A CN117171277A (en) 2023-12-05
CN117171277B true CN117171277B (en) 2024-04-30

Family

ID=88931459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311156253.3A Active CN117171277B (en) 2023-09-08 2023-09-08 Method, system, device and medium for loading mark of electronic map

Country Status (1)

Country Link
CN (1) CN117171277B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100864083B1 (en) * 2007-07-06 2008-10-16 (주)현대유비스 Overlay display device and method for navigation device
CN106289298A (en) * 2015-05-21 2017-01-04 比亚迪股份有限公司 The display packing of point of interest and device, onboard navigation system
CN110555088A (en) * 2019-08-30 2019-12-10 高新兴科技集团股份有限公司 Electronic map label aggregation method
CN110853488A (en) * 2019-10-28 2020-02-28 广州码石信息科技有限公司 POI (Point of interest) label display method, device and equipment
CN116363082A (en) * 2023-03-10 2023-06-30 阿里巴巴(中国)有限公司 Collision detection method, device, equipment and program product for map elements

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100864083B1 (en) * 2007-07-06 2008-10-16 (주)현대유비스 Overlay display device and method for navigation device
CN106289298A (en) * 2015-05-21 2017-01-04 比亚迪股份有限公司 The display packing of point of interest and device, onboard navigation system
CN110555088A (en) * 2019-08-30 2019-12-10 高新兴科技集团股份有限公司 Electronic map label aggregation method
CN110853488A (en) * 2019-10-28 2020-02-28 广州码石信息科技有限公司 POI (Point of interest) label display method, device and equipment
CN116363082A (en) * 2023-03-10 2023-06-30 阿里巴巴(中国)有限公司 Collision detection method, device, equipment and program product for map elements

Also Published As

Publication number Publication date
CN117171277A (en) 2023-12-05

Similar Documents

Publication Publication Date Title
CN114693875B (en) Point cloud visualization optimization method, system, electronic equipment and storage medium
CN108932286B (en) Data query method and device
CN108197777A (en) A kind of method, apparatus and equipment for adjusting air control rule
CN104598712B (en) Anchor point screening technique and its system
CN111695405B (en) Dog face feature point detection method, device and system and storage medium
US8170784B2 (en) Method and apparatus for moving content to mobile devices
CN110647604A (en) Method and device for displaying POI (Point of interest) data of map
CN110796130A (en) Method, device and computer storage medium for character recognition
CN118642761A (en) Instruction dependency construction method, device, equipment and readable storage medium
CN117171277B (en) Method, system, device and medium for loading mark of electronic map
CN112507055B (en) Method and device for realizing administrative region aggregation based on leaf
US20110119256A1 (en) Information processing apparatus, control method therefor, and computer-readable storage medium
WO2024139756A1 (en) Method and apparatus for interpolation of feature map, device, and storage medium
CN115452101B (en) Instrument calibration method, device, equipment and medium
CN116303731B (en) Code matching method and device for hospital standard main data and electronic equipment
CN117372343A (en) Method, apparatus, device, storage medium and program product for detecting chip cavity
CN110609874A (en) Address entity coreference resolution method based on density clustering algorithm
CN116563857A (en) A method, device, equipment, medium and product for identifying signs
CN119768821A (en) Apparatus and method for processing a single instruction for image transformation from a non-integrated position
CN110457705B (en) Method, device, equipment and storage medium for processing point of interest data
JP6060039B2 (en) Specific point name determination device, specific point name determination method, and specific point name determination program
CN113743704A (en) Event monitoring method and device, computer equipment and storage medium
CN111198639A (en) A picture marking method, device, terminal and computer storage medium
CN111753625A (en) Pedestrian detection method, device, equipment and medium
CN116128835B (en) Point cloud analysis-based power transmission wire sag measurement method, device and equipment

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