A method for displaying map alarm points based on web

CN114898011BActive Publication Date: 2024-09-27CHENGDU LUDI SHENGHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210418703.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-21
Publication Date
2024-09-27
Estimated Expiration
2042-04-21

AI Technical Summary

Technical Problem

[0003]但在实际项目过程中,报警点位作为地图的一种可视化元素,如果在没有提供经纬度的情况下,根据现有的WebGis技术方案所提供的绘制点api,是无法实现的

Benefits of technology

[0026] 1. In this industry or other industries, there is no common way to locate a location without longitude and latitude. This application provides a method of approximate longitude and latitude of an alarm point. By obtaining the approximate longitude and latitude of an alarm point, the alarm point can be drawn by calling the API provided by the mainstream WebGis technical solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114898011B
    Figure CN114898011B
Patent Text Reader

Abstract

The present invention belongs to the field of computer information processing, and is specifically a method for displaying map alarm points based on a web terminal, comprising the following steps: drawing map points according to the longitude and latitude coordinates of each punctuation point, comparing the distance of the alarm point with the distance of each punctuation point, and judging the relative position relationship of the alarm point; calculating the approximate longitude and latitude of the alarm point based on the relative position of the alarm point and the longitude and latitude of the relevant punctuation point closest to the alarm point, and then drawing the alarm point through the approximate longitude and latitude of the alarm point; in this industry or other industries, there is no more common way to locate the position without longitude and latitude. The present application provides a method for the approximate longitude and latitude of an alarm point, and the alarm point can be drawn by obtaining the approximate longitude and latitude of the alarm point and calling the API provided by the mainstream WebGis technical solution.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of computer information processing, and in particular is a method for displaying map alarm points based on a web terminal. Background Art

[0002] As front-end development becomes more complex, map Gis has become an indispensable part of most systems, from the most common Gis visualization elements, including points, lines, surfaces, various pop-up boxes, etc. Mainstream smart cities, smart projects, digital twins, etc. are basically inseparable from the development of WebGis. Common mainstream WebGis technical solutions, including leaflet, cesium, mapBox, Baidu Maps, Amap, etc., can all realize conventional visualization elements. As far as the code layer implementation of conventional visualization elements is concerned, the biggest difference between different technical solutions lies mainly in the different coordinate systems based on which the various technical solutions are based, but the API itself is not much different. When drawing points, each technical solution uses the latitude and longitude of the point as the positioning basis to achieve the drawing of the corresponding location.

[0003] However, in the actual project process, the alarm point, as a visualization element of the map, cannot be drawn according to the point drawing API provided by the existing WebGis technical solution without providing longitude and latitude. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention provides a map alarm point display method based on the Web terminal. Without relying on the specific WebGis technical solution and in the absence of the longitude and latitude of the alarm point, the approximate drawing of the alarm point is achieved through the relative position relationship of more than two existing punctuation points on the map.

[0005] In order to achieve the above technical effects, the technical solution of the present invention is as follows:

[0006] A method for displaying map alarm points based on a web terminal, the steps are as follows:

[0007] Step 1. The user creates two or more punctuation points in the background by inputting the punctuation point name, punctuation point distance, and punctuation point longitude and latitude. The background composes a punctuation point list in ascending order of the punctuation point distance. The front end obtains the punctuation point list from the background and draws map points according to the longitude and latitude coordinates of each punctuation point.

[0008] Step 2: Compare the alarm point distance with the distance of each punctuation mark, and construct the left array nearerArr by arranging all punctuation marks whose distance is less than the alarm point distance in ascending order; construct the right array fartherArr by arranging all punctuation marks whose distance is greater than or equal to the alarm point distance in ascending order.

[0009] Furthermore, the number of elements in the left array nearerArr nearerArrLength and the number of elements in the right array farArr farArrLength cannot be 0 at the same time, and the sum of the number of elements in the left array nearerArr nearerArrLength and the number of elements in the right array farArr farArrLength is equal to the total number of punctuation marks totalMarkerLength.

[0010] Step 3: After comparing the total number of punctuation marks totalMarkerLength with the length of the arrays nearerArr and fartherArr, the relative position relationship of the alarm points can be determined, where the total number of punctuation marks totalMarkerLength is the total number of all current punctuation mark markers;

[0011] Furthermore, the specific comparison method is: if the number of elements in the left array nearerArr, nearerArrLength, is equal to the total number of punctuation marks, totalMarkerLength, it is judged that the alarm point is located on the right side of all punctuation marks; if the number of elements in the right array farerArr, farArrLength, is equal to the total number of punctuation marks, totalMarkerLength, it is judged that the alarm point should be located on the left side of all punctuation marks; in other cases, it is judged that the alarm point should be located between the two nearest adjacent punctuation marks, and at this time, nearerArr[nearerArrLength-1] is the nearest left adjacent punctuation mark preMarker, and farerArr[0] is the nearest right adjacent punctuation mark nextMarker.

[0012] Step 4: According to the relative position relationship of the alarm point and the longitude and latitude of the relevant punctuation point closest to the alarm point, the approximate longitude and latitude of the alarm point is calculated based on the relative position of the alarm point, and then the alarm point is drawn using the approximate longitude and latitude of the alarm point; the relevant punctuation point refers to the nearest left adjacent punctuation point preMarker and / or the nearest right adjacent punctuation point nextMarker.

[0013] Furthermore, the specific calculation method of approximate longitude and latitude is as follows:

[0014] If the number of elements in the right array farArr farArrLength is equal to the total number of punctuation marks totalMarkerLength, the alarm point is located on the left side of all punctuation marks, and the approximate longitude approximateAlarmMarkerLng and approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude nextMarkerLng and latitude nextMarkerLat of the nearest right adjacent punctuation mark nextMarker represented by farArr[0];

[0015] If the number of elements in the left array nearestArr nearestArrLength is equal to the total number of punctuation marks totalMarkerLength, the alarm point is located on the right side of all punctuation marks, and the approximate longitude approximateAlarmMarkerLng and approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent punctuation mark preMarker represented by nearestArr[nearerArrLength-1];

[0016] In other cases, the alarm point is located between the two nearest adjacent punctuation points. In this case, nearerArr[nearerArrLength-1] is the nearest left adjacent punctuation point preMarker, and fartherArr[0] is the nearest right adjacent punctuation point nextMarker. Based on the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent punctuation point preMarker, and the longitude nextMarkerLng and latitude nextMarkerLat of the nearest right adjacent punctuation point nextMarker, the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point can be calculated using the following formula:

[0017] let alarmMarkerlngDiff = nextMarkerLng – preMarkerLng;

[0018] let alarmMarkerLatDiff = nextMarkerLat – preMarkerLat;

[0019] According to the alarm point distance alarmMarkerDistance, the nearest left adjacent punctuation point preMarker distance preMarkerDistance, and the nearest right adjacent punctuation point nextMarker distance nextMarkerDistance, the latitude and longitude ratio of the alarm point alarmMarkerLngLatRatio is calculated by the following formula:

[0020] let alarmMarkerLngLatRatio = (alarmMarkerDistance - preMarkerDistance) / (nextMarkerDistance - preMarkerDistance);

[0021] According to the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point, the longitude and latitude ratio alarmMarkerLngLatRatio of the alarm point, and the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent mark preMarker, the approximate longitude approximateAlarmMarkerLng and approximateAlarmMarkerLat of the alarm point can be calculated using the following formula:

[0022] let approximateAlarmMarkerLng = preMarkerLng + alarmMarkerLngLatRatio* alarmMarkerlngDiff;

[0023] let approximateAlarmMarkerLat = preMarkerLat +alarmMarkerLngLatRatio * alarmMarkerLatDiff;

[0024] The approximate longitude approximateAlarmMarkerLng and latitude approximateAlarmMarkerLat of the alarm point obtained by the above method can be called by calling the API provided by the mainstream WebGis technical solution to draw the alarm point on the map.

[0025] The advantages of the present invention are:

[0026] 1. In this industry or other industries, there is no common way to locate a location without longitude and latitude. This application provides a method for approximate longitude and latitude of an alarm point. By obtaining the approximate longitude and latitude of the alarm point, the alarm point can be drawn by calling the API provided by the mainstream WebGis technical solution.

[0027] 2. This application does not depend on a specific WebGis technical solution and is generally suitable for all types of coordinate systems.

[0028] 3. This application can achieve approximate drawing of corresponding locations without precise longitude and latitude, thereby improving the display effect and thus improving the product friendliness and user experience.

[0029] 4. This application obtains the approximate longitude and latitude of the alarm point in proportion through the distance relationship between the alarm point and each punctuation mark, and can effectively use the existing information to draw the approximate position of the alarm point with greater reference value.

[0030] 5. This application obtains the approximate longitude and latitude of the alarm point and draws the approximate position of the alarm point, which can provide users with a more intuitive plan for drawing the alarm point on the map. It has been proven through actual projects that it provides an effective auxiliary method for users to further analyze and determine the true location of the alarm point.

[0031] 6. Through the approximate drawing of the alarm points, the inspection personnel can know the approximate location of the alarm point at the first time, so that they can reach the alarm point site faster, improve the response speed of the alarm point, and improve the economic benefits. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 Schematic diagram of the process of this method.

[0033] Figure 2 This is a schematic diagram of the actual situation of the alarm point.

[0034] Figure 2 In the figure, assuming that there are three punctuation marks A, B, and C, there are three situations of the alarm position as shown in the figure, which are divided into the following three situations: the first situation (the alarm point should be located on the left side of all punctuation marks), the second situation (the alarm point should be located between the two adjacent punctuation marks closest to it), and the third situation (the alarm point is located on the right side of all punctuation marks).

[0035] Figure 3 This is a schematic diagram of Example 1.

[0036] Figure 4 This is a schematic diagram of Example 2.

[0037] Figure 5 This is a schematic diagram of Example 3.

[0038] Figure 6 This is a schematic diagram of Example 4. DETAILED DESCRIPTION

[0039] In order to better understand the above technical solution, further description will be given below through specific embodiments in conjunction with the accompanying drawings. It should be noted that the technical solution of the present invention includes but is not limited to the following embodiments.

[0040] Example 1

[0041] As the instruction manual Figure 2 In the first case, a method for displaying map alarm points based on the Web end is used to obtain three punctuation lists [A, B, C]. The distances between punctuation points A, B, and C are 500 meters, 1000 meters, and 1500 meters, respectively. The longitudes and latitudes of punctuation points A, B, and C are (30.619089, 104.108897), (30.618817, 104.108817), and (30.618548, 104.108811), respectively. The distance between alarm points is 400 meters. The approximate longitude and latitude of the alarm points can be obtained by the following steps:

[0042] 1) Use the map point marking API to draw each punctuation point on the map using the latitude and longitude coordinates of the three punctuation points in the punctuation list [A, B, C];

[0043] 2) Draw the lines between A, B, B, and C on the map in the order of the punctuation list [A, B, C] through the map polyline API;

[0044] 3) Compare the alarm point distance of 400 meters with the distance of each punctuation point, and construct the left array nearerArr by arranging all punctuation points whose distance is less than the alarm point distance in ascending order; construct the right array farerArr by arranging all punctuation points whose distance is greater than or equal to the alarm point distance in ascending order. In this example, nearerArr is empty and farerArr is the array [A, B, C];

[0045] 4) In this example, the total number of punctuation marks totalMarkerLength is 3. After comparing it with the length of the array nearerArr (0 at this time) and the length of the array farArr (3 at this time), because totalMarkerLength is equal to farArrLength, the alarm point is located on the left side of all punctuation marks, so the approximate longitude approximateAlarmMarkerLng and the approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude (nextMarkerLng) and latitude (nextMarkerLat) of the nearest right adjacent punctuation mark (nextMarker) represented by farArr[0] (i.e. punctuation mark A), i.e. (30.619089,104.108897);

[0046] 5) Draw the approximate coordinates of the alarm point through the map point marking API.

[0047] The schematic diagram of the positions of the punctuation points in this embodiment is as follows Figure 3 shown.

[0048] Example 2

[0049] As the instruction manual Figure 2 In the second case, when the alarm point is between A and B, a method for displaying the alarm point on a map based on a Web terminal is used. When there are three punctuation points A, B, and C from left to right on the map, the distances between punctuation points A, B, and C are 500 meters, 1000 meters, and 1500 meters, respectively. The longitudes and latitudes of punctuation points A, B, and C are (30.619089, 104.108897), (30.618817, 104.108817), and (30.618548, 104.108811), respectively. The distance between the alarm points is 600 meters. The following steps can be used to determine that the alarm point should be located between punctuation points A and B:

[0050] 1) Use the map point marking API to draw each punctuation point on the map using the latitude and longitude coordinates of the three punctuation points in the punctuation list [A, B, C];

[0051] 2) Use the map polyline API to draw lines between A, B, and C in the order of the punctuation list [A, B, C] on the map;

[0052] 3) Compare the alarm point distance of 600 meters with the distance of each punctuation point, and construct the left array nearerArr by arranging all punctuation points whose distance is less than the alarm point distance in ascending order; construct the right array farerArr by arranging all punctuation points whose distance is greater than or equal to the alarm point distance in ascending order. In this example, nearerArr is [A], and farthestArr is the array [B,C];

[0053] 4) In this example, the total number of punctuation marks totalMarkerLength is 3. After comparing it with the length of the array nearerArr nearerArrLength (1 at this time) and the length of the array farerArr farerArrLength (2 at this time), at this time, when totalMarkerLength is neither equal to farerArrLength nor to nearerArrLength, the alarm point is located between the two nearest adjacent punctuation marks. At this time, nearerArr[nearerArrLength-1] (i.e. punctuation mark A) is the nearest left adjacent punctuation mark preMarker(30.619089,104.108897), and farerArr[0] (i.e. punctuation mark B) is the nearest right adjacent punctuation mark nextMarker(30.618817,104.108817);

[0054] 5) According to the longitude preMarkerLng(30.619089) and latitude preMarkerLat(104.108897) of the nearest left adjacent punctuation point preMarker and the longitude nextMarkerLng(30.618817) and latitude nextMarkerLat(104.108817) of the nearest right adjacent punctuation point nextMarker, the longitude deviation (alarmMarkerlngDiff) and latitude deviation (alarmMarkerLatDiff) of the alarm point can be calculated by the following formula: -0.00007999999999697138 and -0.00027199999999893976 respectively:

[0055] let alarmMarkerlngDiff = nextMarkerLng – preMarkerLng;

[0056] let alarmMarkerLatDiff = nextMarkerLat – preMarkerLat;

[0057] According to the distance alarmMarkerDistance of the alarm point, the distance preMarkerDistance of the nearest adjacent punctuation mark on the left, and the distance nextMarkerDistance of the nearest adjacent punctuation mark on the right, the latitude and longitude ratio alarmMarkerLngLatRatio of the alarm point is calculated as 0.2 using the following formula:

[0058] let alarmMarkerLngLatRatio = (alarmMarkerDistance - preMarkerDistance) / (nextMarkerDistance - preMarkerDistance);

[0059] According to the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point, the longitude and latitude ratio alarmMarkerLngLatRatio of the alarm point, and the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent mark preMarker, the approximate longitude approximateAlarmMarkerLng and approximateAlarmMarkerLat of the alarm point can be calculated using the following formula:

[0060] let approximateAlarmMarkerLng = preMarkerLng + alarmMarkerLngLatRatio* alarmMarkerlngDiff;

[0061] let approximateAlarmMarkerLat = preMarkerLat +alarmMarkerLngLatRatio * alarmMarkerLatDiff.

[0062] 6) According to the approximate coordinates of the alarm point (30.6190346, 104.108881), draw it through the map point marking API.

[0063] The schematic diagram of the positions of the punctuation points in this embodiment is as follows Figure 4 shown.

[0064] Example 3

[0065] As the instruction manual Figure 2In the second case, when the alarm point is between B and C, a method for displaying the alarm point on a map based on a Web terminal is used. When there are three punctuation points A, B, and C from left to right on the map, the distances between punctuation points A, B, and C are 500 meters, 1000 meters, and 1500 meters, respectively. The longitudes and latitudes of punctuation points A, B, and C are (30.619089, 104.108897), (30.618817, 104.108817), and (30.618548, 104.108811), respectively. The distance between the alarm points is 1200 meters. The following steps can be used to determine that the alarm point should be located between punctuation points B and C:

[0066] 1) Use the map point marking API to draw each punctuation point on the map using the latitude and longitude coordinates of the three punctuation points in the punctuation list [A, B, C];

[0067] 2) Use the map polyline API to draw the lines between A and B, and between B and C in the order of the punctuation list [A, B, C] on the map;

[0068] 3) Compare the alarm point distance of 1200 meters with the distance of each punctuation point, and construct the left array nearerArr by arranging all punctuation points whose distance is less than the alarm point distance in ascending order; construct the right array farerArr by arranging all punctuation points whose distance is greater than or equal to the alarm point distance in ascending order. In this example, nearerArr is [A, B], and farthestArr is array [C];

[0069] 4) In this example, the total number of punctuation marks totalMarkerLength is 3. After comparing it with the length of the array nearerArr nearerArrLength (2 at this time) and the length of the array farerArr farerArrLength (1 at this time), at this time, when totalMarkerLength is neither equal to farerArrLength nor to nearerArrLength, the alarm point is located between the two nearest adjacent punctuation marks. At this time, nearerArr[nearerArrLength-1] (i.e. punctuation mark B) is the nearest left adjacent punctuation mark preMarker(30.618817,104.108817), and farerArr[0] (i.e. punctuation mark C) is the nearest right adjacent punctuation mark nextMarker(30.618548,104.108811);

[0070] 5) According to the longitude preMarkerLng((30.618817) and latitude preMarkerLat(104.108817) of the nearest left adjacent punctuation point preMarker, and the longitude nextMarkerLng(30.618548) and latitude nextMarkerLat(104.108811) of the nearest right adjacent punctuation point nextMarker, the longitude deviation (alarmMarkerlngDiff) and latitude deviation (alarmMarkerLatDiff) of the alarm point can be calculated by the following formula: -0.000005999999999062311, -0.0002689999999994086 respectively:

[0071] let alarmMarkerlngDiff = nextMarkerLng – preMarkerLng;

[0072] let alarmMarkerLatDiff = nextMarkerLat – preMarkerLat;

[0073] According to the distance alarmMarkerDistance of the alarm point, the distance preMarkerDistance of the nearest adjacent punctuation mark on the left, and the distance nextMarkerDistance of the nearest adjacent punctuation mark on the right, the latitude and longitude ratio alarmMarkerLngLatRatio of the alarm point is calculated as 0.4 using the following formula:

[0074] let alarmMarkerLngLatRatio = (alarmMarkerDistance - preMarkerDistance) / (nextMarkerDistance - preMarkerDistance);

[0075] According to the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point, the longitude and latitude ratio alarmMarkerLngLatRatio of the alarm point, and the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent mark preMarker, the approximate longitude approximateAlarmMarkerLng and approximateAlarmMarkerLat of the alarm point can be calculated using the following formula:

[0076] let approximateAlarmMarkerLng = preMarkerLng + alarmMarkerLngLatRatio* alarmMarkerlngDiff;

[0077] let approximateAlarmMarkerLat = preMarkerLat +alarmMarkerLngLatRatio * alarmMarkerLatDiff.

[0078] 6) According to the approximate coordinates of the alarm point (30.6187094, 104.1088146), draw it through the map point marking API.

[0079] The schematic diagram of the positions of the punctuation points in this embodiment is as follows Figure 5 shown.

[0080] Example 4

[0081] like Figure 2 In the first case, a method for displaying map alarm points based on the Web end is used to obtain three punctuation lists [A, B, C]. The distances between punctuation points A, B, and C are 500 meters, 1000 meters, and 1500 meters, respectively. The longitudes and latitudes of punctuation points A, B, and C are (30.619089, 104.108897), (30.618817, 104.108817), and (30.618548, 104.108811), respectively. The distance between alarm points is 1600 meters. The approximate longitude and latitude of the alarm points can be obtained by the following steps:

[0082] 1) Use the map point marking API to draw each punctuation point on the map using the latitude and longitude coordinates of the three punctuation points in the punctuation list [A, B, C];

[0083] 2) Use the map polyline API to draw lines between A, B, and C in the order of the punctuation list [A, B, C] on the map;

[0084] 3) Compare the alarm point distance of 1600 meters with the distance of each punctuation point, and construct the left array nearerArr by arranging all punctuation points whose distance is less than the alarm point distance in ascending order; construct the right array farerArr by arranging all punctuation points whose distance is greater than or equal to the alarm point distance in ascending order. In this example, nearerArr is [A, B, C], and farthestArr is empty;

[0085] 4) In this example, the total number of punctuation marks totalMarkerLength is 3. After comparing with the length of the array nearerArr nearerArrLength (3 at this time) and the length of the array farerArr farerArrLength (0 at this time), because nearerArrLength is equal to totalMarkerLength, the alarm point is located on the right side of all punctuation marks. The approximate longitude approximateAlarmMarkerLng and the approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude (preMarkerLng) and latitude (preMarkerLat) of the nearest left adjacent punctuation mark (preMarker) represented by nearerArr[nearerArrLength-1] (i.e., punctuation mark C), i.e. (30.618548,104.108811);

[0086] 5) Draw the approximate coordinates of the alarm point through the map point marking API.

[0087] The schematic diagram of the positions of the punctuation points in this embodiment is as follows Figure 6 shown.

[0088] Example 5

[0089] like Figure 1 As shown, a method for displaying map alarm points based on a web terminal, the steps are as follows:

[0090] Step 1. The user creates two or more punctuation points in the background by inputting the punctuation point name, punctuation point distance, and punctuation point longitude and latitude. The background composes a punctuation point list in ascending order of the punctuation point distance. The front end obtains the punctuation point list from the background and draws map points according to the longitude and latitude coordinates of each punctuation point.

[0091] Through the longitude and latitude coordinates, the point marking API provided by the mainstream WebGis technical solution in the prior art can be called to draw the map points; according to the order of the punctuation list, the lines between the punctuation points can be drawn, wherein, through the longitude and latitude coordinates, the polyline API provided by the mainstream WebGis technical solution in the prior art can be called to draw the lines between the map points. The longitude and latitude of the punctuation points and the distance of the punctuation points are manually input through the background system on the spot.

[0092] Step 2: Compare the alarm point distance with the distance of each punctuation mark, and construct the left array nearerArr by arranging all punctuation marks whose distance is less than the alarm point distance in ascending order; construct the right array fartherArr by arranging all punctuation marks whose distance is greater than or equal to the alarm point distance in ascending order.

[0093] First, the system obtains the alarm point distance alarmMarkeDistance and the distances of each punctuation point through conventional fiber optic vibration sensing equipment. According to the comparison relationship between the alarm point distance and the distances of each punctuation point, all punctuation points whose distances are less than the alarm point distance are arranged in ascending order of distance to construct the left array nearerArr; all punctuation points whose distances are greater than or equal to the alarm point distance are arranged in ascending order of distance to construct the right array fartherArr.

[0094] Furthermore, the number of elements in the left array nearerArr nearerArrLength and the number of elements in the right array farArr farArrLength cannot be 0 at the same time, and the sum of the number of elements in the left array nearerArr nearerArrLength and the number of elements in the right array farArr farArrLength is equal to the total number of punctuation marks totalMarkerLength.

[0095] Step 3: After comparing the total number of punctuation marks totalMarkerLength with the length of the arrays nearerArr and fartherArr, the relative position relationship of the alarm points can be determined, where the total number of punctuation marks totalMarkerLength is the total number of all current punctuation mark markers;

[0096] The specific comparison method is: if the number of elements in the left array nearestArr, nearestArrLength, is equal to the total number of punctuation marks, totalMarkerLength, the alarm point is judged to be on the right side of all punctuation marks; if the number of elements in the right array fartherArr, fartherArrLength, is equal to the total number of punctuation marks, totalMarkerLength, the alarm point should be judged to be on the left side of all punctuation marks; in other cases, the alarm point should be judged to be between the two nearest adjacent punctuation marks, and at this time, nearestArr[nearerArrLength-1] is the nearest left adjacent punctuation mark preMarker, and fartherArr[0] is the nearest right adjacent punctuation mark nextMarker.

[0097] Step 4: According to the relative position relationship of the alarm point and the longitude and latitude of the relevant punctuation point closest to the alarm point, the approximate longitude and latitude of the alarm point is calculated based on the relative position of the alarm point, and then the alarm point is drawn using the approximate longitude and latitude of the alarm point; the relevant punctuation point refers to the nearest left adjacent punctuation point preMarker and / or the nearest right adjacent punctuation point nextMarker.

[0098] The specific calculation method of approximate longitude and latitude is as follows:

[0099] If the number of elements in the right array farArr farArrLength is equal to the total number of punctuation marks totalMarkerLength, the alarm point is located on the left side of all punctuation marks, and the approximate longitude approximateAlarmMarkerLng and approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude nextMarkerLng and latitude nextMarkerLat of the nearest right adjacent punctuation mark nextMarker represented by farArr[0];

[0100] If the number of elements in the left array nearestArr nearestArrLength is equal to the total number of punctuation marks totalMarkerLength, the alarm point is located on the right side of all punctuation marks, and the approximate longitude approximateAlarmMarkerLng and approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent punctuation mark preMarker represented by nearestArr[nearerArrLength-1];

[0101] In other cases, the alarm point is located between the two nearest adjacent punctuation points. In this case, nearerArr[nearerArrLength-1] is the nearest left adjacent punctuation point preMarker, and fartherArr[0] is the nearest right adjacent punctuation point nextMarker. Based on the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent punctuation point preMarker, and the longitude nextMarkerLng and latitude nextMarkerLat of the nearest right adjacent punctuation point nextMarker, the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point can be calculated using the following formula:

[0102] let alarmMarkerlngDiff = nextMarkerLng – preMarkerLng;

[0103] let alarmMarkerLatDiff = nextMarkerLat – preMarkerLat;

[0104] According to the alarm point distance alarmMarkerDistance, the nearest left adjacent punctuation point preMarker distance preMarkerDistance, and the nearest right adjacent punctuation point nextMarker distance nextMarkerDistance, the latitude and longitude ratio of the alarm point alarmMarkerLngLatRatio is calculated by the following formula:

[0105] let alarmMarkerLngLatRatio = (alarmMarkerDistance - preMarkerDistance) / (nextMarkerDistance - preMarkerDistance);

[0106] According to the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point, the longitude and latitude ratio alarmMarkerLngLatRatio of the alarm point, and the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent mark preMarker, the approximate longitude approximateAlarmMarkerLng and approximateAlarmMarkerLat of the alarm point can be calculated using the following formula:

[0107] let approximateAlarmMarkerLng = preMarkerLng + alarmMarkerLngLatRatio* alarmMarkerlngDiff;

[0108] let approximateAlarmMarkerLat = preMarkerLat +alarmMarkerLngLatRatio * alarmMarkerLatDiff;

[0109] The approximate longitude approximateAlarmMarkerLng and latitude approximateAlarmMarkerLat of the alarm point obtained by the above method can be called by calling the API provided by the mainstream WebGis technical solution to draw the alarm point on the map.

Claims

1. A method for displaying map alarm points based on a web terminal, characterized in that: Here are the steps: Step 1: The user creates two or more punctuation points by inputting the punctuation point name, punctuation point distance, and punctuation point longitude and latitude in the background. The background composes a punctuation point list in ascending order of the punctuation point distance. The front end obtains the punctuation point list from the background and draws the map points according to the longitude and latitude coordinates of each punctuation point. Step 2: Compare the distance of the alarm point with the distance of each punctuation point respectively, and construct the left array nearerArr by arranging all punctuation points whose distance is less than the distance of the alarm point in ascending order; construct the right array fartherArr by arranging all punctuation points whose distance is greater than or equal to the distance of the alarm point in ascending order; Step 3: After comparing the total number of punctuation marks totalMarkerLength with the length of the arrays nearerArr and fartherArr, the relative position relationship of the alarm points can be determined, where the total number of punctuation marks totalMarkerLength is the total number of all current punctuation mark markers; Step 4: According to the relative position relationship of the alarm point and the longitude and latitude of the relevant punctuation point closest to the alarm point, the approximate longitude and latitude of the alarm point is calculated based on the relative position of the alarm point, and then the alarm point is drawn using the approximate longitude and latitude of the alarm point; the relevant punctuation point refers to the nearest left adjacent punctuation point preMarker and / or the nearest right adjacent punctuation point nextMarker.

2. A web-based map alarm point display method according to claim 1, characterized in that: In step 2, the number of elements in the left array nearerArr nearerArrLength and the number of elements in the right array farArr farArrLength cannot be 0 at the same time, and the sum of the number of elements in the left array nearerArr nearerArrLength and the number of elements in the right array farArr farArrLength is equal to the total number of punctuation marks totalMarkerLength.

3. A web-based map alarm point display method according to claim 1, characterized in that: The specific comparison method in step 3 is: if the number of elements in the left array nearerArr, nearerArrLength, is equal to the total number of punctuation marks, totalMarkerLength, the alarm point is judged to be on the right side of all punctuation marks; if the number of elements in the right array farerArr, farerArrLength, is equal to the total number of punctuation marks, totalMarkerLength, the alarm point should be judged to be on the left side of all punctuation marks; in other cases, the alarm point should be judged to be between the two nearest adjacent punctuation marks, and at this time, nearerArr[nearerArrLength-1] is the nearest left adjacent punctuation mark preMarker, and farerArr[0] is the nearest right adjacent punctuation mark nextMarker.

4. A web-based map alarm point display method according to claim 1, characterized in that: The specific calculation method of the approximate longitude and latitude in step 4 is as follows: If the number of elements in the right array farArr farArrLength is equal to the total number of punctuation marks totalMarkerLength, the alarm point is located on the left side of all punctuation marks, and the approximate longitude approximateAlarmMarkerLng and approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude nextMarkerLng and latitude nextMarkerLat of the nearest right adjacent punctuation mark nextMarker represented by farArr[0]; If the number of elements in the left array nearestArr nearestArrLength is equal to the total number of punctuation marks totalMarkerLength, the alarm point is located on the right side of all punctuation marks, and the approximate longitude approximateAlarmMarkerLng and approximate latitude approximateAlarmMarkerLat of the alarm point are respectively set to the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent punctuation mark preMarker represented by nearestArr[nearerArrLength-1]; In other cases, the alarm point is located between the two nearest adjacent punctuation points. In this case, nearerArr[nearerArrLength-1] is the nearest left adjacent punctuation point preMarker, and fartherArr[0] is the nearest right adjacent punctuation point nextMarker. According to the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent punctuation point preMarker, and the longitude nextMarkerLng and latitude nextMarkerLat of the nearest right adjacent punctuation point nextMarker, the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point can be calculated.

5. A web-based map alarm point display method according to claim 4, characterized in that: The specific method for calculating the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point is as follows: let alarmMarkerlngDiff = nextMarkerLng – preMarkerLng; let alarmMarkerLatDiff = nextMarkerLat – preMarkerLat.

6. A web-based map alarm point display method according to claim 5, characterized in that: According to the alarm point distance alarmMarkerDistance, the nearest left adjacent punctuation point preMarker distance preMarkerDistance, and the nearest right adjacent punctuation point nextMarker distance nextMarkerDistance, the latitude and longitude ratio of the alarm point alarmMarkerLngLatRatio is calculated by the following formula: let alarmMarkerLngLatRatio = (alarmMarkerDistance - preMarkerDistance) / (nextMarkerDistance - preMarkerDistance).

7. A web-based map alarm point display method according to claim 6, characterized in that: According to the longitude deviation alarmMarkerlngDiff and latitude deviation alarmMarkerLatDiff of the alarm point, the longitude and latitude ratio alarmMarkerLngLatRatio of the alarm point, and the longitude preMarkerLng and latitude preMarkerLat of the nearest left adjacent mark preMarker, the approximate longitude approximateAlarmMarkerLng and the approximate latitude approximateAlarmMarkerLat of the alarm point are calculated.

8. A web-based map alarm point display method according to claim 7, characterized in that: The method for calculating the approximate longitude approximateAlarmMarkerLng and the approximate latitude approximateAlarmMarkerLat of the alarm point is: let approximateAlarmMarkerLng = preMarkerLng + alarmMarkerLngLatRatio *alarmMarkerlngDiff; let approximateAlarmMarkerLat = preMarkerLat + alarmMarkerLngLatRatio *alarmMarkerLatDiff; The approximate longitude approximateAlarmMarkerLng and the approximate latitude approximateAlarmMarkerLat of the alarm point obtained by the above method can be used to draw the alarm point on the map.