CN117435111A - Strong interaction method for map marking, terminal equipment and storage medium - Google Patents

Strong interaction method for map marking, terminal equipment and storage medium Download PDF

Info

Publication number
CN117435111A
CN117435111A CN202311598869.6A CN202311598869A CN117435111A CN 117435111 A CN117435111 A CN 117435111A CN 202311598869 A CN202311598869 A CN 202311598869A CN 117435111 A CN117435111 A CN 117435111A
Authority
CN
China
Prior art keywords
map
mouse
mark
interaction
marker
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.)
Pending
Application number
CN202311598869.6A
Other languages
Chinese (zh)
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.)
Chang Guang Satellite Technology Co Ltd
Original Assignee
Chang Guang Satellite 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 Chang Guang Satellite Technology Co Ltd filed Critical Chang Guang Satellite Technology Co Ltd
Priority to CN202311598869.6A priority Critical patent/CN117435111A/en
Publication of CN117435111A publication Critical patent/CN117435111A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06F3/04845Interaction 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 for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/60Editing figures and text; Combining figures or text

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Instructional Devices (AREA)

Abstract

The invention relates to a map marking strong interaction method, terminal equipment and storage medium, wherein the method comprises the following steps: constructing a user interaction structure of the map mark, wherein the user interaction structure comprises a mobile interaction response area, a zooming interaction response area and a rotating interaction response area; the earth engine loads map markers and configures the map markers to follow the map as it rotates and tilts; the map mark moving method is adopted to move the map mark, the map mark scaling method is adopted to scale the map mark, and the map mark rotating method is adopted to rotate the map mark. The invention realizes the operation of supporting the user to move, rotate and zoom the map mark, and supplements the defect of the prior map mark strong interaction complete scheme; meanwhile, the problem of operation conflict caused by various interaction integration is solved, and the performance effects of smooth operation, accurate interaction effect and comfortable experience are achieved.

Description

Strong interaction method for map marking, terminal equipment and storage medium
Technical Field
The invention relates to the technical field of front-end development, in particular to a map mark strong interaction method which is used for realizing strong interaction between a map mark loaded in a map engine and a user, so that the user can operate the map mark to move, rotate and zoom.
Background
With the vigorous development of geographic information technology, map-related applications are becoming more and more abundant, and supporting users to mark maps is almost the standard function of such applications. Map engine technology, which is commonly used in the market, can support users to superimpose marks on a map, but support weaker user interactivity for map marks. Taking the current widely-used three-dimensional earth engine mapbox as an example, only the map marks are supported to move by a user, and functions such as rotating and zooming are not performed on the map marks, so that the user cannot perform any desired operation on the map marks created by the user, and related functionality and user experience are seriously affected.
In this case, a method capable of supporting strong interaction of map markers by the user is demanded. At present, a complete map marking strong interaction implementation method is lacked in the prior art, and a related solution method for operation conflict problems caused by various interaction integration is also lacked.
Disclosure of Invention
In order to solve the problems, the invention provides a map marking strong interaction method, a terminal device and a storage medium.
The invention adopts the following technical scheme:
a map marking strong interaction method comprises the following steps:
step one: the method comprises the steps of constructing a user interaction structure of a map marker, wherein the user interaction structure comprises a mobile interaction response area overlapped with a map marker display area, a zooming interaction response area arranged around the mobile interaction response area and a rotating interaction response area arranged around the zooming interaction response area;
step two: the earth engine loads map markers and configures the map markers to follow the map as it rotates and tilts;
step three: the map mark moving method is adopted to move the map mark, the map mark scaling method is adopted to scale the map mark, and the map mark rotating method is adopted to rotate the map mark;
wherein the map marker moving method includes the steps of:
step (1): judging whether the earth engine has a function of supporting the movement of the mark or not, if so, directly using the earth engine to realize the movement of the map mark, otherwise, executing the step (2);
step (2): monitoring a mouse-down event in a mobile interaction response area, and executing the step (3) when the mouse-down event occurs;
step (3): inhibiting the map from being dragged, starting monitoring on a mouse moving event and a mouse releasing event, executing the step (4) when the mouse moving event occurs, and executing the step (5) when the mouse releasing event occurs;
step (4): acquiring the current position of the mouse through a map engine, and setting the map mark position as the current position of the mouse;
step (5): monitoring of a mouse moving event and a mouse releasing event is released;
the map marker scaling method comprises the following steps:
step (1): monitoring a mouse-down event on an element taking the zooming interaction response area as a frame, judging that the mouse is positioned in the zooming interaction response area when the mouse-down event occurs, wherein the position is one of four edges or one of four corners of the zooming interaction response area, and then executing the step (2);
step (2): inhibiting the map from being dragged and the map mark from being moved, saving the current position of the mouse, starting monitoring on a mouse moving event and a mouse releasing event, executing the step (3) when the mouse moving event occurs, and executing the step (4) when the mouse releasing event occurs;
step (3): modifying the mouse display style according to the position of the mouse in the zooming interaction response area;
acquiring the current rotation angle of the map mark, judging whether the map mark is in a transverse direction or a longitudinal direction relative to the map mark according to the current rotation angle of the map mark, and determining the width and height modification modes of the map mark according to the judged direction;
acquiring the current position of a mouse;
calculating and setting the width and the height of the map mark according to the position of the mouse in the zooming interaction response area, the position of the mouse at the last moment, the current position of the mouse and the current width and the height of the map mark;
updating the value of the current position of the mouse;
step (4): monitoring of a mouse moving event and a mouse releasing event is released;
the map marker rotation method includes the steps of:
step (1): monitoring a mouse-down event in the rotating interaction response area, and executing the step (2) when the mouse-down event occurs;
step (2): inhibiting the map from being dragged and the map mark from being moved, calculating the angle of the current position of the mouse relative to the center of the map mark, storing the current rotation angle of the map mark, starting monitoring on a mouse moving event and a mouse releasing event, executing the step (3) when the mouse moving event occurs, and executing the step (4) when the mouse releasing event occurs;
step (3): calculating the angle of the current position of the mouse relative to the center of the map mark and the angle change value of the angle compared with the angle calculated in the step (2), calculating the angle value of the current map mark according to the angle change value and the map mark rotation angle stored in the step (2), and setting the angle value as the map mark rotation angle;
step (4): and removing monitoring on the mouse moving event and the mouse releasing event.
Compared with the prior art, the invention has the following beneficial effects:
the map mark strong interaction method provided by the invention has the advantages that through designing the user interaction structure of the map mark, the earth engine is comprehensively utilized, the map mark is supported to be moved, rotated and zoomed by a user, and the defect of the conventional map mark strong interaction complete scheme is supplemented; meanwhile, the problem of operation conflict caused by various interactive integration is solved, the performance effects of smooth operation, accurate interactive effect and comfortable experience are achieved, the method is applied to related functions of map labeling of users, the functionality and the user experience are greatly enhanced, and the method has high practicability and wide application space.
Drawings
FIG. 1 is a flow chart of a map marking strong interaction method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a user interaction structure of map markers;
FIG. 3 is a flow chart of a map marker movement method;
FIG. 4 is a flow chart of a map marker rotation method;
FIG. 5 is a flow chart of a map marker scaling method;
FIG. 6 is a flow chart of a method for obtaining the position of a mouse in a zoom interactive response area;
FIG. 7 is a schematic view of a map marker in a relatively portrait orientation;
FIG. 8 is a schematic diagram of a map marker in a relatively lateral direction.
Detailed Description
The technical scheme of the present invention will be described in detail with reference to the accompanying drawings and preferred embodiments.
The map mark strong interaction method provided by the embodiment of the invention is combined with the earth engine to realize the movement, rotation and scaling of the map mark, wherein the earth engine can be selected from a mapbox engine which is one of the most widely applied earth engines at present, and the basic technology of front end development adopts html, css, javascript and the like. Specifically, as shown in fig. 1, the map marking strong interaction method of the present embodiment includes the following steps:
step one: and constructing a user interaction structure of the map marker, and realizing map marker elements. The user interaction structure of the map marker comprises a mobile interaction response area, a zooming interaction response area and a rotating interaction response area, as shown in fig. 2, the mobile interaction response area coincides with the map marker display area, the zooming interaction response area is arranged around the mobile interaction response area, and the rotating interaction response area is arranged around the zooming interaction response area. Optionally, the zoom interactive response area is a rectangle with the map mark display area as the center, a square frame is formed around the map mark display area, the rotation interactive response area is a partially hollow circle with the map mark display area as the center, and the hollow area is the area where the movement interactive response area and the zoom interactive response area are located.
Step two: the earth engine loads map marks, taking a mapbox engine as an example, after initializing a mapbox map, loading mark elements onto the map by a mapbox method to realize loading of the map marks, and after loading, configuring the map marks to follow the map when the map rotates and inclines.
Step three: the method comprises the steps of moving, rotating and zooming map marks, specifically moving the map marks by a map mark moving method, zooming the map marks by a map mark zooming method and rotating the map marks by a map mark rotating method. The mapbox engine itself supports the movement of map markers and can therefore be implemented by the mapbox method. For an engine which does not support map marker movement, the movement, rotation and scaling of the map markers can be realized through a front-end technology in combination with the user interaction structure designed in the step one. The map mark moving method, the map mark scaling method, and the map mark rotating method are described in detail below, respectively.
As shown in fig. 3, the map marker moving method includes the steps of:
step (1): judging whether the used earth engine has a function of supporting the movement of the mark or not, if the earth engine has the function of supporting the movement of the mark, for example, a mapbox supports the movement of the mark, the earth engine is directly used for realizing the movement of the map mark; if the earth engine does not have the mark moving function, the earth engine needs to be realized by using front-end codes, and the step (2) is executed at the moment;
step (2): monitoring a mouse-down event in a mobile interaction response area, starting the mobile operation when the mouse-down event occurs, and executing the step (3);
step (3): the map is prohibited from being dragged, and the dragging conflict with the map mark is avoided;
monitoring a mouse moving event and a mouse releasing event is started, and when the mouse moving event occurs, the step (4) is executed; when a mouse unclamping event occurs, executing the step (5);
step (4): and acquiring the current position (longitude and latitude) of the mouse through a map engine, and setting the position of the map mark as the current position of the mouse. In this step, the current position of the mouse and the position of the map mark are obtained by the map engine, specifically, the values of the longitude and latitude of the mouse and the map mark on the map are in the format of [ longitude and latitude ], for example [123,43].
Step (5): monitoring of the mouse moving event and the mouse releasing event is released, and the moving operation is finished.
As shown in fig. 4, the map marker rotation method includes the steps of:
step (1): monitoring a mouse-down event in a rotating interaction response area, starting the rotating operation when the mouse-down event occurs, and executing the step (2);
the step (2) comprises the following steps (2-1) to (2-5):
step (2-1): the map is prohibited from being dragged, and the dragging conflict with the map mark is avoided;
step (2-2): the map mark is forbidden to be moved, so that operation conflict is avoided, the function can be realized through the self function of the earth engine or through monitoring of a front-end release mobile interaction response area;
step (2-3): the angle of the current position of the mouse relative to the center of the map mark is calculated according to the following calculation formula:
let the current position of the mouse be (mouse. X, mouse. Y), the central position of the map mark be (center. X, center. Y), the angle of the current position of the mouse relative to the center of the map mark be: atan2 (center. Y-mouse. Y, center. X-mouse. X); it should be noted that, in the map marker rotation method, the position of the mouse or the map marker refers to the position of the mouse or the map marker in the screen, which is obtained through the front-end technology grammar;
step (2-4): storing the current rotation angle of the map mark;
step (2-5): monitoring of a mouse moving event and a mouse releasing event is started, the step (3) is executed when the mouse moving event occurs, and the step (4) is executed when the mouse releasing event occurs;
the step (3) comprises the following steps (3-1) to (3-3):
step (3-1): calculating the angle of the current position of the mouse relative to the center of the map mark, wherein the calculation formula is the same as that of the step (2-3);
step (3-2): calculating an angle change value of the angle obtained in the step (3-1) compared with the angle obtained in the step (2-3) when the mouse is pressed down;
step (3-3): according to the angle change value calculated in the step (3-2) and the rotation angle of the map mark when the mouse stored in the step (2-4) is pressed, calculating the angle value which the current map mark should be set to, and setting the angle value as the rotation angle of the map mark, namely, the effect that the map mark rotates along with the mouse operation is realized; in a specific implementation, since the attribute values representing the rotation angle are looped in 360 as a set in the front css grammar, for example, 45 and 405 show the same angle effect, by continuously adding the angle change value to the rotation angle of the map marker, the angle value to be set is finally obtained without performing the judgment of addition/subtraction.
Step (4): monitoring of the mouse moving event and the mouse releasing event is released, and the rotating operation is finished.
As shown in fig. 5, the map marker scaling method includes the steps of:
step (1): monitoring a mouse-down event on an element with a zooming interaction response area as a frame, wherein the element is a map mark; for the operation of 'moving + zooming' or 'zooming' on the map marker, firstly monitoring whether a mouse-down event exists on the map marker;
when the mouse pressing event occurs, whether the mouse is in the zooming interactive response area (namely the border of the element) and the specific position (one of the four edges of the top, bottom, left and right or one of the four corners of the top, bottom, left and right) of the zooming interactive response area are judged, and the specific judging method is the following steps of the method for acquiring the position of the mouse in the zooming interactive response area.
When the mouse is not in the scaled interactive response region, there is no response.
When the mouse is in the zooming interaction response area, the zooming operation starts, and the step (2) is executed.
The step (2) comprises the following steps (2-1) to (2-4):
step (2-1): the map is prohibited from being dragged, and the dragging conflict with the map mark is avoided;
step (2-2): the map mark is forbidden to be moved, so that operation conflict is avoided, the function can be realized through the self function of the earth engine or through monitoring of a front-end release mobile interaction response area;
step (2-3): storing the current position of the mouse; it should be noted that, in the map marker zooming method, the position of the mouse or the map marker refers to the position of the mouse or the map marker in the screen, which is also obtained through the front-end technology grammar, for example, in zooming operation, the purpose of obtaining the position of the mouse is to obtain the moving distance of the mouse, so as to know the size of the marker to be zoomed, which is irrelevant to the longitude and latitude of the map;
step (2-4): monitoring of a mouse moving event and a mouse releasing event is started, the step (3) is executed when the mouse moving event occurs, and the step (4) is executed when the mouse releasing event occurs.
The step (3) comprises the following steps (3-1) to (3-5):
step (3-1): according to the step (1), which area (possibly one of four sides or one of four corners) of the current mouse in the zooming interaction response area is obtained, and the mouse display style is modified according to the position of the mouse in the interaction area;
step (3-2): the current rotation angle of the map mark is obtained, the map mark is judged to be in a transverse direction or a longitudinal direction according to the current rotation angle of the map mark, and then the modification modes of the width and the height of the map mark are determined according to the judged direction. The method for judging whether the map mark is relatively in the transverse direction or the longitudinal direction is concretely realized as follows:
assuming that the rotation angle of the acquired map marker is rotateDeg, judgment is made based on the calculation formula |cos (rotateDeg. Pi/180) | < 0.5. When the calculation formula is established, the map mark is relatively in a transverse direction, and if the mouse is positioned above and below the map mark zooming interaction response area to operate, the width of the map mark is modified, namely the zoomed value is the width of the map mark at the moment; and modifying the height of the map marker when the mouse is positioned at the left and right sides of the map marker zooming interaction response area to operate, namely, the zoomed value is the height of the map marker at the moment. When the calculation formula is not established, the map mark is relatively in a longitudinal direction, and the modification mode of the width and the height of the map mark is opposite to the transverse direction, namely the height of the map mark is modified when the mouse is positioned above and below the map mark zooming interaction response area, and the width of the map mark is modified when the mouse is positioned at the left and right.
In step (3-2), the portrait orientation means that the map marker is upright or inverted, and the landscape orientation means that the map marker is rotated by 90 degrees or 270 degrees in a horizontal (corresponding to left-side landscape or right-side landscape) state. However, since the map mark may be in an inclined state, not just in the longitudinal direction or the transverse direction, the present embodiment adopts expressions of being relatively in the longitudinal direction and being relatively in the transverse direction, wherein "relatively in the longitudinal direction" refers to an upright or inverted state in which the map mark is positioned at a left-right offset angle within 45 degrees, fig. 7 shows four cases in which the map mark is relatively in the longitudinal direction, in each case, the angle between the central vertical line of the map mark and the y-axis of the coordinate system is smaller than 45 degrees, at this time, the height of the map mark should be changed when zooming is performed on the upper side or the lower side of the map mark, and the width of the map mark should be changed when zooming is performed on the left side or the right side; "relatively in the lateral direction" means that the map marker is in a horizontal state with a left-right offset angle within 45 degrees, and fig. 8 shows four cases in which the map marker is relatively in the lateral direction, and in each case, the angle between the central vertical line of the map marker and the x-axis of the coordinate system is smaller than 45 degrees, and at this time, the width of the map marker should be changed when zooming is performed on the upper/lower sides of the map marker, and the height of the map marker should be changed when zooming is performed on the left/right sides.
Step (3-3): acquiring the current position of a mouse;
step (3-4): calculating and setting the width and the height of the map mark according to the area result of the mouse in the zooming interaction response area, the position of the mouse at the last moment, the current position of the mouse and the current width and the height of the map mark;
step (3-5): and updating the value of the current position of the mouse.
Step (4): and (5) monitoring the mouse moving event and the mouse releasing event is released, and the current zooming operation is finished.
The method for acquiring the position of the mouse in the zooming interaction response area comprises the following steps of:
acquiring the current position of the mouse and acquiring the current position of the map mark;
acquiring a rotation angle rotateDeg of the map mark;
values of cos (rotateDeg. Pi/180) and sin (rotateDeg. Pi/180) are calculated according to the rotation angle rotateDeg of the map mark, and the following judgment rules are established:
judging whether the map mark is vertical or inverted according to the relation between the value of cos (rotateDeg. Pi/180) and 0, and if the value of cos (rotateDeg. Pi/180) is larger than 0, the map mark is vertical, otherwise, the map mark is inverted;
(II) judging which quadrant the top of the map mark is in according to the relation between the value of sin (rotateDeg. Pi/180) and 0, when the value of sin (rotateDeg. Pi/180) is larger than 0, the top of the map mark is positioned at the upper right, otherwise, the top of the map mark is positioned at the upper left;
(III) judging that the map mark is in a relative transverse direction or a longitudinal direction according to the relation between the value of cos (rotateDeg. Pi/180) and 0.5 and-0.5, when the map mark is in an upright state and the value of cos (rotateDeg. Pi/180) is less than 0.5, the map mark is in the relative transverse direction, otherwise, when the map mark is in an upright state and the value of cos (rotateDeg. Pi/180) is greater than or equal to 0.5, the map mark is in the relative longitudinal direction; the map marker is in a relative landscape when the map marker is in an inverted position and the value of cos (rotateDeg. Pi/180) is greater than-0.5, or in a relative portrait when the map marker is in an inverted position and the value of cos (rotateDeg. Pi/180) is equal to or less than-0.5.
The three steps (i), (ii), (iii) are upright/inverted, top position, relative lateral/relative longitudinal determination includes 8 cases in total, the determination logic of these 8 cases is as shown in fig. 6, and the final purpose of the determination is to determine whether the map marker is currently in the relative longitudinal or relative lateral direction, thereby knowing which value of the width/height of the map marker should be modified when the mouse performs the zoom operation on the up/down/left/right sides of the map marker.
According to the acquired relation between the current position of the mouse and the current position of the map marker, judging which region of the map marker the mouse is located, namely which position of the zooming interaction response region is located, wherein the judged position may result in one of four edges of up, down, left and right or one of four corners of up, right, up, down, left and down (both in a forward direction relative to the map marker) or not in the zooming interaction response region;
after the steps, the corresponding relation between the up-down/left-right scaling of the map mark and the width/height value of the modified map mark and the scaling of the mouse at the up-down/left-right side or the four corners of the map mark can be obtained, and finally, the judging result of the mouse at the scaling interaction response area position is returned for other steps to call.
The map mark strong interaction method provided by the invention has the advantages that through designing the user interaction structure of the map mark, the earth engine is comprehensively utilized, the map mark is supported to be moved, rotated and zoomed by a user, and the defect of the conventional map mark strong interaction complete scheme is supplemented; meanwhile, the invention designs the user interaction structure of the map mark, so that the operation in each area has a clearly corresponding processing method, and the rotation angle of the map mark is obtained and forward/backward judgment is carried out in zooming operation, so that the method adapts and combines various possibilities of the angle of the map mark after rotation, and the like, thereby effectively solving the problem of operation conflict caused by various interaction integration, achieving the performance effects of smooth operation, accurate interaction effect and comfortable experience, applying in the related functions of map marking by users, greatly enhancing the functionality and user experience, and having high practicability and wide application space.
The invention also provides map marking strong interaction terminal equipment which can realize the map marking strong interaction method in the embodiment. The terminal device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps of the map marking strong interaction method embodiment described above when executing the computer program, and the same technical effects can be achieved, and for avoiding repetition, a description is omitted herein. The terminal equipment of the invention can be a mobile phone, a tablet personal computer, a vehicle-mounted touch display device and the like.
The invention also provides a storage medium which is a non-volatile computer readable storage medium, wherein the non-volatile computer readable storage medium stores at least one computer program, when the computer program is executed by a processor, the steps of the map marking strong interaction method embodiment are realized, the same technical effects can be achieved, and the repetition is avoided, so that the description is omitted. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or in some intermediate form, etc. The computer readable storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier wave signal, a telecommunication signal, a software distribution medium, and so forth.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the invention, which are described in detail and are not to be construed as limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (7)

1. The map marking strong interaction method is characterized by comprising the following steps of:
step one: the method comprises the steps of constructing a user interaction structure of a map marker, wherein the user interaction structure comprises a mobile interaction response area overlapped with a map marker display area, a zooming interaction response area arranged around the mobile interaction response area and a rotating interaction response area arranged around the zooming interaction response area;
step two: the earth engine loads map markers and configures the map markers to follow the map as it rotates and tilts;
step three: the map mark moving method is adopted to move the map mark, the map mark scaling method is adopted to scale the map mark, and the map mark rotating method is adopted to rotate the map mark;
wherein the map marker moving method includes the steps of:
step (1): judging whether the earth engine has a function of supporting the movement of the mark or not, if so, directly using the earth engine to realize the movement of the map mark, otherwise, executing the step (2);
step (2): monitoring a mouse-down event in a mobile interaction response area, and executing the step (3) when the mouse-down event occurs;
step (3): inhibiting the map from being dragged, starting monitoring on a mouse moving event and a mouse releasing event, executing the step (4) when the mouse moving event occurs, and executing the step (5) when the mouse releasing event occurs;
step (4): acquiring the current position of the mouse through a map engine, and setting the map mark position as the current position of the mouse;
step (5): monitoring of a mouse moving event and a mouse releasing event is released;
the map marker scaling method comprises the following steps:
step (1): monitoring a mouse-down event on an element taking the zooming interaction response area as a frame, judging that the mouse is positioned in the zooming interaction response area when the mouse-down event occurs, wherein the position is one of four edges or one of four corners of the zooming interaction response area, and then executing the step (2);
step (2): inhibiting the map from being dragged and the map mark from being moved, saving the current position of the mouse, starting monitoring on a mouse moving event and a mouse releasing event, executing the step (3) when the mouse moving event occurs, and executing the step (4) when the mouse releasing event occurs;
step (3): modifying the mouse display style according to the position of the mouse in the zooming interaction response area;
acquiring the current rotation angle of the map mark, judging whether the map mark is in a transverse direction or a longitudinal direction relative to the map mark according to the current rotation angle of the map mark, and determining the width and height modification modes of the map mark according to the judged direction;
acquiring the current position of a mouse;
calculating and setting the width and the height of the map mark according to the position of the mouse in the zooming interaction response area, the position of the mouse at the last moment, the current position of the mouse and the current width and the height of the map mark;
updating the value of the current position of the mouse;
step (4): monitoring of a mouse moving event and a mouse releasing event is released;
the map marker rotation method includes the steps of:
step (1): monitoring a mouse-down event in the rotating interaction response area, and executing the step (2) when the mouse-down event occurs;
step (2): inhibiting the map from being dragged and the map mark from being moved, calculating the angle of the current position of the mouse relative to the center of the map mark, storing the current rotation angle of the map mark, starting monitoring on a mouse moving event and a mouse releasing event, executing the step (3) when the mouse moving event occurs, and executing the step (4) when the mouse releasing event occurs;
step (3): calculating the angle of the current position of the mouse relative to the center of the map mark and the angle change value of the angle compared with the angle calculated in the step (2), calculating the angle value of the current map mark according to the angle change value and the map mark rotation angle stored in the step (2), and setting the angle value as the map mark rotation angle;
step (4): and removing monitoring on the mouse moving event and the mouse releasing event.
2. The map marking strong interaction method according to claim 1, wherein the position of the mouse in the zooming interaction response area is judged by:
acquiring the current position of the mouse and the current position of the map mark;
acquiring a rotation angle rotateDeg of the map mark;
calculating the values of cos (rotateDeg pi/180), sin (rotateDeg pi/180) and cos (rotateDeg pi/180) according to the rotation angle rotateDeg of the map mark, and establishing the following judgment rules: when the value of cos (rotateDeg pi/180) is greater than 0, the map marker is in an upright position, otherwise, is in an inverted position; (ii) when the value of sin (rotateDeg pi/180) is greater than 0, the top of the map marker is at the upper right, otherwise at the upper left; (iii) when the map marker is in an upright position and the value of cos (rotateDeg. Pi./180) is less than 0.5, the map marker is in a relative landscape orientation, otherwise when the map marker is in an upright position and the value of cos (rotateDeg. Pi./180) is greater than or equal to 0.5, the map marker is in a relative portrait orientation; when the map marker is in an inverted position and the value of cos (rotateDeg. Pi/180) is greater than-0.5, the map marker is in a relative transverse direction, otherwise when the map marker is in an inverted position and the value of cos (rotateDeg. Pi/180) is less than or equal to-0.5, the map marker is in a relative longitudinal direction;
judging the position of the mouse in the zooming interaction response area according to the acquired relationship between the current position of the mouse and the position of the map mark;
and returning a position judgment result.
3. A method of strong interaction of map markers according to claim 1 or 2, characterized in that when the map markers are judged to be relatively in the transverse direction or the longitudinal direction according to the current rotation angle of the map markers, the value of cos (rotateDeg. Pi/180) is calculated according to the current rotation angle of the map markers, and when |cos (rotateDeg. Pi/180) | <0.5, the map markers are judged to be relatively in the transverse direction, otherwise relatively in the longitudinal direction.
4. A map marker strong interaction method according to claim 1 or 2, wherein the scaled interaction response region is a circle shape centered on the map marker presentation region, and the rotated interaction response region is a partially hollow circle shape centered on the map marker presentation region.
5. A map marking strong interaction method according to claim 1 or 2, characterized in that the map engine adopts a mapbox engine.
6. A map marking strong interaction terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 5 when the computer program is executed.
7. A storage medium storing a computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 5.
CN202311598869.6A 2023-11-28 2023-11-28 Strong interaction method for map marking, terminal equipment and storage medium Pending CN117435111A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311598869.6A CN117435111A (en) 2023-11-28 2023-11-28 Strong interaction method for map marking, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311598869.6A CN117435111A (en) 2023-11-28 2023-11-28 Strong interaction method for map marking, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117435111A true CN117435111A (en) 2024-01-23

Family

ID=89555289

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311598869.6A Pending CN117435111A (en) 2023-11-28 2023-11-28 Strong interaction method for map marking, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117435111A (en)

Similar Documents

Publication Publication Date Title
US10635287B2 (en) Mapping application with interactive dynamic scale and smart zoom
DE112013002803B4 (en) Method, system and device for providing a three-dimensional transition animation for a change in a map view
KR101804602B1 (en) 3d layering of map metadata
EP3004803B1 (en) A method and apparatus for self-adaptively visualizing location based digital information
US20080198158A1 (en) 3D map display system, 3D map display method and display program
US20130321403A1 (en) System and method for highlighting a feature in a 3d map while preserving depth
US20110191014A1 (en) Mapping interface with higher zoom level inset map
US20130321397A1 (en) Methods and Apparatus for Rendering Labels Based on Occlusion Testing for Label Visibility
US9355484B2 (en) System and method of tile management
JP2013534656A (en) Adaptive and innovative mobile device street view
CN110427601B (en) Form processing method and device, intelligent interactive panel and storage medium
US20150170385A1 (en) Editing a feature within a map
EP2589933B1 (en) Navigation device, method of predicting a visibility of a triangular face in an electronic map view
US20150187098A1 (en) Method and apparatus for unobtrusively changing imagery supplementing a map display
KR102136855B1 (en) Method and apparatus for providing street view, and computer program for executing the method
CN108280154B (en) Method and device for displaying map annotation information, terminal and readable storage medium
JP5382924B2 (en) Polygon outline drawing method and apparatus
US20130346855A1 (en) Providing differentiated display of a map feature
CN112395375B (en) Map presentation method, terminal and computer readable storage medium
CN117435111A (en) Strong interaction method for map marking, terminal equipment and storage medium
JP2003344054A (en) Navigation apparatus, map display apparatus, and program
KR20120139047A (en) Method and apparatus for displaying of image data
CN114367113A (en) Method, apparatus, medium, and computer program product for editing virtual scene
CN113129406B (en) Data processing method and device and electronic equipment
CN112395827B (en) Tree structure drawing method and mobile terminal

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