[go: up one dir, main page]

CN111488103B - Method and device for adsorbing graphic elements of Web page, storage medium and equipment - Google Patents

Method and device for adsorbing graphic elements of Web page, storage medium and equipment Download PDF

Info

Publication number
CN111488103B
CN111488103B CN202010298572.8A CN202010298572A CN111488103B CN 111488103 B CN111488103 B CN 111488103B CN 202010298572 A CN202010298572 A CN 202010298572A CN 111488103 B CN111488103 B CN 111488103B
Authority
CN
China
Prior art keywords
point
adsorption
geographical position
vertical projection
geographical
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
CN202010298572.8A
Other languages
Chinese (zh)
Other versions
CN111488103A (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 Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information 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 Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN202010298572.8A priority Critical patent/CN111488103B/en
Publication of CN111488103A publication Critical patent/CN111488103A/en
Application granted granted Critical
Publication of CN111488103B publication Critical patent/CN111488103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to a method for adsorbing graphic elements of a Web page, which comprises the following steps; acquiring a current geographical position point clicked by a mouse on a map each time; recording a point which is closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point; and sequentially connecting all the adsorption points at the current geographical position to finish the drawing of the adsorption object on the map. The invention does not need to vectorize the objects to be adsorbed, reduces the access of a background server, lightens the rendering of a foreground browser, and improves the operation experience of a user.

Description

Method and device for adsorbing graphic elements of Web page, storage medium and equipment
Technical Field
The invention relates to the field of geographic information systems, in particular to a method, a device, a storage medium and equipment for adsorbing a Web page primitive.
Background
When the WebGIS system increases the operation of the surface primitive object, manual operation is generally needed, but errors often exist when the boundary is determined manually by a person, and the operation under the boundary of an irregular surface is more difficult. In order to solve the above problems, vectorization of an object is generally adopted at present, but this way increases rendering pressure on a browser, increases access to a background, and is inefficient.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method, a device, a storage medium and equipment for adsorbing a Web page primitive aiming at the defects of the prior art.
The technical scheme for solving the technical problems is as follows: a method for adsorbing graphic primitives of a Web page comprises the following steps;
acquiring a current geographical position point clicked by a mouse on a map each time;
recording a point which is closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point;
and sequentially connecting all the adsorption points at the current geographical position to finish the drawing of the adsorption object on the map.
The invention has the beneficial effects that: by acquiring the current geographical position point clicked each time by the mouse on the map, recording the point closest to the current geographical position point in the adsorption geographical area as the current geographical position adsorption point, and completing the adsorption of the object according to all the geographical position adsorption points, the invention does not need to vectorize the object to be adsorbed, reduces the access of a background server, lightens the rendering of a foreground browser and improves the operation experience of a user.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the air conditioner is provided with a fan,
recording a point closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point, specifically comprising the following steps:
randomly selecting a plurality of temporary geographical position points in the adsorption geographical area;
connecting the current geographical position point with the central point of the geographical adsorption area to obtain a reference line segment;
acquiring a vertical projection point of the temporary geographic position point on the reference line segment;
substituting the coordinates (Cx, Cy) of the temporary geographical position point, the coordinates (Ax, Ay) of the current geographical position point and the coordinates (Bx, By) of the central point of the adsorption geographical area into a position relation formula to obtain the distance between the vertical projection point and the end point of the reference line segment, wherein the position relation formula is a relation value
Figure BDA0002453129490000021
Determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result of the relation value r and a first preset value and a second preset value respectively;
and selecting a temporary geographical position point corresponding to the vertical projection point with the shortest distance with the end point of the reference line section as the current geographical position adsorption point.
The beneficial effect of adopting the further scheme is that: the geographical position adsorption point is determined through the current geographical position point and the adsorption geographical area, so that the speed and the accuracy of a user operation map are improved, and the user experience is improved.
Further, the air conditioner is provided with a fan,
determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result between the relation value r and the first preset value and the second preset value respectively, specifically comprising:
when the relation value r is smaller than the first preset value, inputting the coordinate of the vertical projection point and the coordinate of the current geographical position point into a first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
or when the relation value r is larger than the second preset value, inputting the coordinate of the vertical projection point and the coordinate of the central point of the adsorption geographical area into the first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment, wherein the first preset value is smaller than the second preset value;
or when the relation value r is between the first preset value and the second preset value, inputting the coordinate of the vertical projection point, the coordinate of the current geographical position point and the coordinate of the center point of the geographical adsorption area into a second distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
the first distance calculation formula is specifically:
Figure BDA0002453129490000031
wherein (Aa, Ab) and (Ba, Bb) are the coordinates of two geographical location points, respectively;
the second distance calculation formula is specifically:
Figure BDA0002453129490000032
wherein (Px, Py) is the coordinate of the perpendicular projection point.
The beneficial effect of adopting the further scheme is that: and determining the position relation between the temporary geographical position point and the reference line segment according to the comparison result between the relation value and the preset value, so as to accurately obtain the current geographical position adsorption point and improve the accuracy of the user operation map.
Further, the air conditioner is provided with a fan,
the geographical area of adsorption is obtained by the following steps:
acquiring a first geographical position point clicked by a mouse for the first time on a map;
determining a first geographical area according to the first geographical position point, the scaling of the map and the tolerance of the absorption pixels;
acquiring all adsorption objects in the first geographical area, and sending all the adsorption objects to a user for selection;
and determining the area covered by the adsorption object according to the object to be adsorbed selected by the user, the scaling of the map and the tolerance of the adsorption pixel to obtain an adsorption geographical area.
The beneficial effect of adopting the further scheme is that: according to the first geographical position point clicked for the first time by the user, all objects in the area can be listed according to the map scaling and the adsorption pixel tolerance, and the user can conveniently select the object needing to be adsorbed.
Another technical solution of the present invention for solving the above technical problems is as follows: a kind of Web page primitive adsorption equipment, including;
the acquisition module is used for acquiring the current geographic position point clicked by the mouse on the map each time;
the determining module is used for recording a point which is closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point;
and the connecting module is used for sequentially connecting all the adsorption points at the current geographic position to finish the drawing of the adsorption object on the map.
The invention has the beneficial effects that: the invention provides a Web page primitive adsorption device, which is used for completing the adsorption of an object by acquiring a current geographical position point clicked by a mouse on a map each time, recording a point which is closest to the current geographical position point in an adsorption geographical area as a current geographical position adsorption point and according to all the geographical position adsorption points.
Further, the determining module is further configured to:
randomly selecting a plurality of temporary geographical position points in the adsorption geographical area;
connecting the current geographical position point with the central point of the geographical adsorption area to obtain a reference line segment;
acquiring a vertical projection point of the temporary geographic position point on the reference line segment;
substituting the coordinates (Cx, Cy) of the temporary geographical position point, the coordinates (Ax, Ay) of the current geographical position point and the coordinates (Bx, By) of the central point of the adsorption geographical area into a position relation formula to obtain the distance between the vertical projection point and the end point of the reference line segment, wherein the position relation formula is a relation value
Figure BDA0002453129490000041
Determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result of the relation value r and a first preset value and a second preset value respectively;
and selecting a temporary geographical position point corresponding to the vertical projection point with the shortest distance with the end point of the reference line section as the current geographical position adsorption point.
Further, the determining module is further configured to,
when the relation value r is smaller than the first preset value, inputting the coordinate of the vertical projection point and the coordinate of the current geographical position point into a first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
or when the relation value r is larger than the second preset value, inputting the coordinate of the vertical projection point and the coordinate of the central point of the adsorption geographical area into the first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment, wherein the first preset value is smaller than the second preset value;
or when the relation value r is between the first preset value and the second preset value, inputting the coordinate of the vertical projection point, the coordinate of the current geographical position point and the coordinate of the center point of the geographical adsorption area into a second distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
the first distance calculation formula is specifically:
Figure BDA0002453129490000051
wherein (Aa, Ab) and (Ba, Bb) are the coordinates of two geographical location points, respectively;
the second distance calculation formula is specifically:
Figure BDA0002453129490000052
wherein (Px, Py) is the coordinate of the perpendicular projection point.
Further, the obtaining module is further configured to,
acquiring a first geographical position point clicked by a mouse for the first time on a map;
determining a first geographical area according to the first geographical position point, the scaling of the map and the tolerance of the absorption pixels;
acquiring all adsorption objects in the first geographical area, and sending all the adsorption objects to a user for selection;
and determining the area covered by the adsorption object according to the object to be adsorbed selected by the user, the scaling of the map and the tolerance of the adsorption pixel to obtain an adsorption geographical area. On the basis of the technical scheme, the invention can be further improved as follows.
The invention also provides a computer-readable storage medium, which comprises instructions, and when the instructions are run on a computer, the instructions cause the computer to execute the step of absorbing the Web page primitive according to any one of the above technical solutions.
The invention also provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the step of absorbing the Web page graphic elements according to any one of the above technical schemes.
Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention or in the description of the prior art will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for adsorbing a primitive of a Web page according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for adsorbing primitives on a Web page according to another embodiment of the present invention;
fig. 3 is a diagram illustrating a position example of a current geographical location point, a vertical projection point, a temporary geographical location point, and a center point of an attached geographical area according to another embodiment of the present invention;
fig. 4 is a diagram illustrating a position example of a current geographical location point, a vertical projection point, a temporary geographical location point, and a center point of an attached geographical area according to another embodiment of the present invention;
fig. 5 is a diagram illustrating a position example of a current geographical location point, a vertical projection point, a temporary geographical location point, and a center point of an attached geographical area according to another embodiment of the present invention;
fig. 6 is a block diagram of a Web page primitive adsorption apparatus according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
As shown in fig. 1, which is a schematic flow chart of a method for adsorbing a primitive of a Web page according to an embodiment of the present invention, a method for adsorbing a primitive of a Web page includes the following steps;
110. and acquiring the current geographic position point of each click of the mouse on the map.
120. And recording a point which is closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point.
130. And sequentially connecting all the adsorption points at the current geographical position to finish the drawing of the adsorption object on the map.
It should be understood that the geographic adsorption area is a geographic area covered by an object that the user needs to adsorb, and the user can publish the adsorption object through the GIS map platform, wherein the adsorption object comprises a road, a river, a city, a village, a town, a county, a grid, a responsibility field and the like.
Based on the method for adsorbing the Web page primitive provided by the embodiment, the current geographical position point clicked by the mouse on the map each time is obtained, the point closest to the current geographical position point in the adsorption geographical area is recorded as the current geographical position adsorption point, and the adsorption of the object is completed according to all the geographical position adsorption points.
Further, as shown in fig. 2, which is a schematic flowchart of a method for adsorbing a primitive of a Web page according to another embodiment of the present invention, step 120 specifically includes:
121. and randomly selecting a plurality of temporary geographical location points in the adsorption geographical area.
122. And connecting the current geographical position point with the central point of the adsorption geographical area to obtain a reference line segment, and acquiring a vertical projection point of the temporary geographical position point on the reference line segment.
123. And substituting the coordinates of the temporary geographical position point, the coordinates of the current geographical position point and the coordinates of the central point of the adsorption geographical area into a position relation formula to obtain the distance between the vertical projection point and the end point of the reference line segment.
124. And determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result of the relation value r and the first preset value and the second preset value respectively.
125. And selecting a temporary geographical position point corresponding to the vertical projection point with the shortest distance with the end point of the reference line section as a current geographical position adsorption point.
According to the embodiment, the geographical position adsorption point determined by the current geographical position point, the adsorption geographical area and the shortest distance formula is used, so that the rapidness and the accuracy of the user operation map are improved, and the user experience is improved.
Further, step 123 specifically includes:
substituting the coordinates (Ax, Ay) of the current geographical location point, the coordinates (Bx, By) of the center point of the adsorption geographical area and the coordinates (Cx, Cy) of the temporary geographical location point into the formula
Figure BDA0002453129490000081
Obtaining a relation value r;
when the relation value r is smaller than a first preset value, inputting the coordinate of the vertical projection point and the coordinate of the current geographical position point into a first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
or when the relation value r is larger than a second preset value, inputting the coordinate of the vertical projection point and the coordinate of the central point of the adsorption geographical area into a first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment, wherein the first preset value is smaller than the second preset value;
or when the relation value r is between the first preset value and the second preset value, inputting the coordinate of the vertical projection point, the coordinate of the current geographical position point and the coordinate of the central point of the adsorption geographical area into a second distance calculation formula to obtain the distance between the vertical projection point and the reference line segment.
Wherein the first distance calculation formula is:
Figure BDA0002453129490000082
where (Aa, Ab) and (Ba, Bb) are the coordinates of the two inputted geographical location points, respectively.
The second distance calculation formula is:
Figure BDA0002453129490000091
where (Px, Py) is the coordinate of the vertical projected point, (Ax, Ay) is the coordinate of the current geographical location point, and (Bx, By) is the coordinate of the center point of the geographical area of the attachment.
In this embodiment, the position of the vertical projection point on the reference line segment is determined by the formula r. Usually, the first preset value is 0, the second preset value is 1, and when r is greater than 0 and less than 1, as shown in fig. 3, the vertical projection point is on the reference line segment. When r <0, the vertical projection point is on the extension of the reference line segment toward the direction of the current geographical location point, as shown in fig. 4. When r >1, the vertical projection point is on the extension line of the reference line segment in the direction of adsorbing the center point of the geographical area, as shown in fig. 5. When r is 0, the vertical projection point coincides with the current geographical position point. When r is 1, the vertical projection point coincides with the center point of the adsorption geographical area.
Further, the geographical area of adsorption is obtained by:
acquiring a first geographical position point clicked by a mouse for the first time on a map;
determining a first geographical area according to the first geographical position point, the scaling of the map and the tolerance of the absorption pixel;
acquiring all adsorption objects in a first geographical area, and sending all the adsorption objects to a user for selection;
and determining the area covered by the adsorption object according to the object to be adsorbed selected by the user, the scaling of the map and the tolerance of the adsorption pixel to obtain the adsorption geographical area.
It should be appreciated that when the mouse clicks on a certain location point on the map, the current map scale is 1: 100, the tolerance of the absorption pixel is 20px, all objects within a 100-meter radius range, such as a region, a county, a street, a river and the like, which are centered on the geographic position point clicked by the mouse, pop up a window, list all the objects in the window, and the user selects the object to be absorbed through the window.
According to the embodiment, all the objects in the area are listed according to the first geographical position point clicked by the user and the map scaling and the adsorption pixel tolerance, so that the user can conveniently select the object needing to be adsorbed.
For example, when a mouse clicks a certain position point on a map, according to the current map zoom level of 1:200 m and the adsorption pixel tolerance of 10px for example, a back-end query service is called to query all objects within a range of 200 m from the position point, a window is popped up, and all objects meeting the conditions are listed. When a user selects a certain object to be adsorbed, such as a certain street, the GIS foreground calculates the current clicked position point and the nearest point on the street, the first adsorption is determined to be completed, and the user continues to click the mouse to complete the subsequent adsorption operation.
As shown in fig. 4, a block diagram of a device for adsorbing a primitive on a Web page according to another embodiment of the present invention includes;
the acquisition module is used for acquiring the current geographic position point clicked by the mouse on the map each time;
the determining module is used for recording a point which is closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point;
and the connecting module is used for sequentially connecting all the adsorption points at the current geographic position to finish the drawing of the adsorption object on the map.
Based on the above embodiment, the device for adsorbing the primitive of the Web page,
by acquiring the current geographical position point clicked each time by the mouse on the map, recording the point closest to the current geographical position point in the adsorption geographical area as the current geographical position adsorption point, and completing the adsorption of the object according to all the geographical position adsorption points, the invention does not need to vectorize the object to be adsorbed, reduces the access of a background server, lightens the rendering of a foreground browser and improves the operation experience of a user.
Further, the determining module is further configured to:
randomly selecting a plurality of temporary geographical position points in the adsorption geographical area;
connecting the current geographical position point with the central point of the geographical adsorption area to obtain a reference line segment;
acquiring a vertical projection point of the temporary geographic position point on the reference line segment;
substituting the coordinates (Cx, Cy) of the temporary geographical position point, the coordinates (Ax, Ay) of the current geographical position point and the coordinates (Bx, By) of the central point of the adsorption geographical area into a position relation formula to obtain the distance between the vertical projection point and the end point of the reference line segment, wherein the position relation formula is a relation value
Figure BDA0002453129490000101
Determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result of the relation value r and a first preset value and a second preset value respectively;
and selecting a temporary geographical position point corresponding to the vertical projection point with the shortest distance with the end point of the reference line section as the current geographical position adsorption point.
Further, the determining module is further configured to,
when the relation value r is smaller than the first preset value, inputting the coordinate of the vertical projection point and the coordinate of the current geographical position point into a first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
or when the relation value r is larger than the second preset value, inputting the coordinate of the vertical projection point and the coordinate of the central point of the adsorption geographical area into the first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment, wherein the first preset value is smaller than the second preset value;
or when the relation value r is between the first preset value and the second preset value, inputting the coordinate of the vertical projection point, the coordinate of the current geographical position point and the coordinate of the center point of the geographical adsorption area into a second distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
the first distance calculation formula is specifically:
Figure BDA0002453129490000111
wherein (Aa, Ab) and (Ba, Bb) are the coordinates of two geographical location points, respectively;
the second distance calculation formula is specifically:
Figure BDA0002453129490000112
wherein (Px, Py) is the coordinate of the perpendicular projection point.
Further, the obtaining module is further configured to,
acquiring a first geographical position point clicked by a mouse for the first time on a map;
determining a first geographical area according to the first geographical position point, the scaling of the map and the tolerance of the absorption pixels;
acquiring all adsorption objects in the first geographical area, and sending all the adsorption objects to a user for selection;
and determining the area covered by the adsorption object according to the object to be adsorbed selected by the user, the scaling of the map and the tolerance of the adsorption pixel to obtain an adsorption geographical area.
The invention also provides a computer-readable storage medium, which comprises instructions, and when the instructions are run on a computer, the instructions cause the computer to execute the step of absorbing the Web page primitive according to any one of the above technical solutions.
The invention also provides a computer device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the step of absorbing the Web page graphic elements according to any one of the above technical schemes.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (8)

1. A method for adsorbing graphic primitives of a Web page is characterized by comprising the following steps;
acquiring a current geographical position point clicked by a mouse on a map each time;
recording a point which is closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point;
sequentially connecting all the adsorption points at the current geographical position to finish the drawing of the adsorption object on the map;
recording a point closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point, specifically comprising the following steps:
randomly selecting a plurality of temporary geographical position points in the adsorption geographical area;
connecting the current geographical position point with the central point of the geographical adsorption area to obtain a reference line segment;
acquiring a vertical projection point of the temporary geographic position point on the reference line segment;
substituting the coordinates (Cx, Cy) of the temporary geographical position point, the coordinates (Ax, Ay) of the current geographical position point and the coordinates (Bx, By) of the center point of the adsorption geographical area into a position relation formula to obtain the distance between the vertical projection point and the end point of the reference line segment, wherein the position relation formula is specifically the position relation formula
Value of relationship
Figure FDA0002999496830000011
Determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result of the relation value r and a first preset value and a second preset value respectively; and selecting a temporary geographical position point corresponding to the vertical projection point with the shortest distance with the end point of the reference line section as the current geographical position adsorption point.
2. The method for adsorbing the graphic element on the Web page according to claim 1, wherein the determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result between the relationship value r and the first preset value and the second preset value respectively comprises:
when the relation value r is smaller than the first preset value, inputting the coordinate of the vertical projection point and the coordinate of the current geographical position point into a first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
or when the relation value r is larger than the second preset value, inputting the coordinate of the vertical projection point and the coordinate of the central point of the adsorption geographical area into the first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment, wherein the first preset value is smaller than the second preset value;
or when the relation value r is between the first preset value and the second preset value, inputting the coordinate of the vertical projection point, the coordinate of the current geographical position point and the coordinate of the center point of the geographical adsorption area into a second distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
the first distance calculation formula is specifically:
Figure FDA0002999496830000021
wherein (Aa, Ab) and (Ba, Bb) are the coordinates of two geographical location points, respectively;
the second distance calculation formula is specifically:
Figure FDA0002999496830000022
wherein (Px, Py) is the coordinate of the perpendicular projection point.
3. A method for adsorbing a Web page element according to claim 1 or 2, further comprising the step of obtaining said adsorption geographical area by:
acquiring a first geographical position point clicked by a mouse for the first time on a map;
determining a first geographical area according to the first geographical position point, the scaling of the map and the tolerance of the absorption pixels;
acquiring all adsorption objects in the first geographical area, and sending all the adsorption objects to a user for selection;
and determining the area covered by the adsorption object according to the object to be adsorbed selected by the user, the scaling of the map and the tolerance of the adsorption pixel to obtain an adsorption geographical area.
4. A kind of Web page primitive adsorption equipment, characterized by that, including;
the acquisition module is used for acquiring the current geographic position point clicked by the mouse on the map each time;
the determining module is used for recording a point which is closest to the current geographical position point in the adsorption geographical area as a current geographical position adsorption point;
the connection module is used for sequentially connecting all the adsorption points at the current geographical position to finish the drawing of the adsorption object on a map;
wherein the determining module is further configured to:
randomly selecting a plurality of temporary geographical position points in the adsorption geographical area;
connecting the current geographical position point with the central point of the geographical adsorption area to obtain a reference line segment;
acquiring a vertical projection point of the temporary geographic position point on the reference line segment;
substituting the coordinates (Cx, Cy) of the temporary geographical position point, the coordinates (Ax, Ay) of the current geographical position point and the coordinates (Bx, By) of the central point of the adsorption geographical area into a position relation formula to obtain the distance between the vertical projection point and the end point of the reference line segment, wherein the position relation formula is a relation value
Figure FDA0002999496830000041
Figure FDA0002999496830000042
Determining the distance between the vertical projection point and the end point of the reference line segment according to the comparison result of the relation value r and a first preset value and a second preset value respectively;
and selecting a temporary geographical position point corresponding to the vertical projection point with the shortest distance with the end point of the reference line section as the current geographical position adsorption point.
5. A Web page element adsorption apparatus according to claim 4, wherein said determining module is further configured to,
when the relation value r is smaller than the first preset value, inputting the coordinate of the vertical projection point and the coordinate of the current geographical position point into a first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
or when the relation value r is larger than the second preset value, inputting the coordinate of the vertical projection point and the coordinate of the central point of the adsorption geographical area into the first distance calculation formula to obtain the distance between the vertical projection point and the reference line segment, wherein the first preset value is smaller than the second preset value;
or when the relation value r is between the first preset value and the second preset value, inputting the coordinate of the vertical projection point, the coordinate of the current geographical position point and the coordinate of the center point of the geographical adsorption area into a second distance calculation formula to obtain the distance between the vertical projection point and the reference line segment;
the first distance calculation formula is specifically:
Figure FDA0002999496830000043
wherein (Aa, Ab) and (Ba, Bb) are the coordinates of two geographical location points, respectively;
the second distance calculation formula is specifically:
Figure FDA0002999496830000051
wherein (Px, Py) is the coordinate of the perpendicular projection point.
6. A Web page primitive adsorption apparatus according to claim 4 or 5, wherein the obtaining module is further configured to,
acquiring a first geographical position point clicked by a mouse for the first time on a map;
determining a first geographical area according to the first geographical position point, the scaling of the map and the tolerance of the absorption pixels;
acquiring all adsorption objects in the first geographical area, and sending all the adsorption objects to a user for selection;
and determining the area covered by the adsorption object according to the object to be adsorbed selected by the user, the scaling of the map and the tolerance of the adsorption pixel to obtain an adsorption geographical area.
7. A computer-readable storage medium comprising instructions, which when run on a computer, cause the computer to perform the steps of Web page primitive adsorption according to any one of claims 1-3.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor when executing the program realizes the steps of Web page primitive adsorption as claimed in any one of claims 1-3.
CN202010298572.8A 2020-04-16 2020-04-16 Method and device for adsorbing graphic elements of Web page, storage medium and equipment Active CN111488103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010298572.8A CN111488103B (en) 2020-04-16 2020-04-16 Method and device for adsorbing graphic elements of Web page, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010298572.8A CN111488103B (en) 2020-04-16 2020-04-16 Method and device for adsorbing graphic elements of Web page, storage medium and equipment

Publications (2)

Publication Number Publication Date
CN111488103A CN111488103A (en) 2020-08-04
CN111488103B true CN111488103B (en) 2021-05-18

Family

ID=71798413

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010298572.8A Active CN111488103B (en) 2020-04-16 2020-04-16 Method and device for adsorbing graphic elements of Web page, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN111488103B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204297B (en) * 2021-04-28 2023-04-18 万翼科技有限公司 Method and device for selecting elements in graphic primitive, electronic equipment and storage medium
CN113963088B (en) * 2021-10-20 2025-07-01 广东天亿马信息产业股份有限公司 Vector boundary editing adsorption method, system and readable storage medium
CN114020182B (en) * 2021-11-04 2025-07-15 北京沃东天骏信息技术有限公司 Method and device for adjusting position of graphic element, electronic device, and computer-readable medium
CN114049412B (en) * 2021-11-23 2025-02-18 上海歆广数据科技有限公司 A method and system for renormalizing grid boundaries in electronic maps

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714960A (en) * 2013-12-13 2015-06-17 方正国际软件(北京)有限公司 Method and system for adsorbing multimedia information through track points

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7308117B2 (en) * 2000-02-04 2007-12-11 National Science And Technology Development Agency System and method for manipulating information and map for geographical resource management
CN104700710A (en) * 2015-04-07 2015-06-10 苏州市测绘院有限责任公司 Simulation map for house property mapping
CN105069118B (en) * 2015-08-11 2018-04-03 北京思特奇信息技术股份有限公司 A kind of application scenarios management method and system based on GIS configurations
CN106898246B (en) * 2015-12-21 2019-07-09 高德软件有限公司 A kind of generation method of indoor map and generate system
CN106780736B (en) * 2017-01-09 2021-04-27 网易(杭州)网络有限公司 Map data processing method and device and three-dimensional map generation method and device
CN108731691B (en) * 2017-04-19 2022-12-13 腾讯科技(深圳)有限公司 Method and device for determining yaw point of navigation equipment
CN110457512B (en) * 2018-05-08 2022-03-25 腾讯科技(深圳)有限公司 Map display method, map display device, server, terminal and storage medium
CN110399443B (en) * 2019-07-22 2020-10-09 上海图聚智能科技股份有限公司 Map editing method and device, mobile platform and storage medium
CN110634156A (en) * 2019-08-28 2019-12-31 重庆知行宏图科技有限公司 Online registration method of indoor plane graph

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714960A (en) * 2013-12-13 2015-06-17 方正国际软件(北京)有限公司 Method and system for adsorbing multimedia information through track points

Also Published As

Publication number Publication date
CN111488103A (en) 2020-08-04

Similar Documents

Publication Publication Date Title
CN111488103B (en) Method and device for adsorbing graphic elements of Web page, storage medium and equipment
EP3304945B1 (en) System, method, and apparatus for data processing and display
CN108235736B (en) Positioning method, cloud server, terminal, system, electronic device and computer program product
US8610717B2 (en) Efficient pre-computing of simplified vector data for rendering at multiple zoom levels
US8339399B2 (en) Declustering point-of-interest icons
EP2560144B1 (en) Generating and serving tiles in a digital mapping system
EP2565583B1 (en) Navigation device, method of outputting a map, and method of generating a database
JP2021185408A (en) Building block data merging method, device, electronic apparatus, computer readable storage medium, and computer program
CN110221616A (en) A kind of method, apparatus, equipment and medium that map generates
CN110070623B (en) Guide line drawing prompting method, device, computer equipment and storage medium
CN110689598A (en) Three-dimensional modeling method and system for multilayer road
CN111380540B (en) Map matching method and device, medium and terminal
CN110634156A (en) Online registration method of indoor plane graph
EP1738329B1 (en) Generating and serving tiles in a digital mapping system
CN111369676B (en) Map image processing method and device and vehicle-mounted equipment
CN110058260B (en) Method for orienting a map for a LIDAR system
CN113177099B (en) Terminal aggregation method, apparatus, electronic device and readable storage medium
CN114124104A (en) Road positioning data compression storage method and terminal equipment
CN109727189B (en) Image correction method based on spatial analysis technology
CN118354279A (en) Method and device for determining associated information, electronic equipment and storage medium
CN110866078A (en) Data processing method and device, display control method and device and vehicle
CN110119458B (en) Grid retrieval method and device
CN103186528A (en) Method, device and mobile terminal for screening geographical information
CN112508112A (en) Zebra crossing fusion method and system based on relative position of stop line
CN112508111B (en) Rod fusion method and system, server and medium based on road structure

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