CN110415315B - Method, device, terminal and storage medium for touch drawing map area - Google Patents

Method, device, terminal and storage medium for touch drawing map area Download PDF

Info

Publication number
CN110415315B
CN110415315B CN201910569363.XA CN201910569363A CN110415315B CN 110415315 B CN110415315 B CN 110415315B CN 201910569363 A CN201910569363 A CN 201910569363A CN 110415315 B CN110415315 B CN 110415315B
Authority
CN
China
Prior art keywords
touch
line segment
touch track
point position
track
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
CN201910569363.XA
Other languages
Chinese (zh)
Other versions
CN110415315A (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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN201910569363.XA priority Critical patent/CN110415315B/en
Publication of CN110415315A publication Critical patent/CN110415315A/en
Application granted granted Critical
Publication of CN110415315B publication Critical patent/CN110415315B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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
    • G06F3/0488Interaction 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 using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • G06F3/04883Interaction 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 using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/80Creating or modifying a manually drawn or painted image using a manual input device, e.g. mouse, light pen, direction keys on keyboard

Landscapes

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

Abstract

The invention provides a method, a device, a terminal and a storage medium for touch drawing of a map area, wherein the method comprises the following steps: when a touch drawing instruction is received, monitoring a touch track of a user, and recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track; converting the touch information data into a plurality of longitude and latitude coordinates; displaying the longitude and latitude coordinates on the electronic map, and closing the point positions corresponding to the longitude and latitude coordinates to obtain a drawn map area. When the touch information data is recorded, only the start point position and the end point position of the line segment are required to be recorded, and all the point positions in the whole touch track are not required to be recorded, so that the recorded data volume and the converted data volume are reduced, and the drawing efficiency of the map area is improved.

Description

Method, device, terminal and storage medium for touch drawing map area
Technical Field
The present invention relates to the field of electronic map technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for touch mapping a map area.
Background
In the prior art, when a user touches and draws a map area, a pixel point set of all pixel points of the user hand-drawn area is collected, and all pixel points in the pixel point set are converted into longitude and latitude information and displayed on an electronic map.
Because the pixel point set of the hand-painted area is a huge data set, the collection and the processing are inconvenient, and when the pixel point set is converted into longitude and latitude information, all pixel points in the pixel point set need to be converted, the converted data volume is large, the processing time is long, and the drawing efficiency of the map area is low.
Disclosure of Invention
In view of the foregoing, embodiments of the present invention have been made to provide a method, apparatus, terminal, and storage medium for touch rendering a map area that overcomes or at least partially solves the foregoing problems.
According to a first aspect of the present invention, there is provided a method of touch mapping a map area, comprising:
when a touch drawing instruction is received, monitoring a touch track of a user, and recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track;
converting the touch information data into a plurality of longitude and latitude coordinates;
displaying the longitude and latitude coordinates on the electronic map, and closing the point positions corresponding to the longitude and latitude coordinates to obtain a drawn map area.
Optionally, the monitoring the touch track of the user, and recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track includes:
when the touch track of a user is monitored, identifying line segments and curve segments in the touch track;
recording the starting point positions and the ending point positions of the line segments, converting the curve segments into a plurality of line segments, and respectively recording the starting point positions and the ending point positions of the line segments according to the sequence to obtain the touch information data of the touch track.
Optionally, when the touch drawing instruction is received, monitoring a touch track of a user, and recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track, where the method includes:
when a touch drawing instruction is received, adding a gesture monitoring view on the electronic map;
when the gesture monitoring view monitors the touch track of the user, recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track.
Optionally, after recording the start point position and the end point position corresponding to the line segment in the touch track as the touch information data of the touch track, the method further includes:
closing the ending point and the starting point of the touch track to obtain a closed line segment;
and determining a user drawing graph according to the closed line segment and the touch track, and displaying the user drawing graph on the gesture monitoring view.
Optionally, after obtaining the drawn map area, the method further includes:
the gesture monitoring view is removed.
Optionally, the gesture monitoring view is a transparent view, and a display size of the gesture monitoring view is the same as a display size of the electronic map.
Optionally, before converting the touch information data into the plurality of longitude and latitude coordinates, the method further includes:
and storing the touch information data into a two-dimensional array.
Optionally, after storing the touch information data in the two-dimensional array, the method further includes:
when receiving a revocation instruction, determining a line segment to be revoked according to a revocation starting point and a revocation ending point in the revocation instruction;
and deleting the starting point position and the ending point position corresponding to the line segment to be revoked from the two-dimensional array according to the line segment to be revoked.
Optionally, after deleting the start point location and the end point location corresponding to the line segment to be revoked from the two-dimensional array, the method further includes:
and when a redrawing instruction is received, monitoring a redrawing touch track of a user, and inserting a starting point position and a terminating point position corresponding to a line segment in the redrawing touch track into positions corresponding to the withdrawn line segment in the two-dimensional array.
According to a second aspect of the present invention, there is provided an apparatus for touch mapping a map area, comprising:
the data recording module is used for monitoring the touch track of a user when a touch drawing instruction is received, and recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track;
the data conversion module is used for converting the touch information data into a plurality of longitude and latitude coordinates;
and the map region drawing module is used for displaying the longitude and latitude coordinates on the electronic map, closing the point positions corresponding to the longitude and latitude coordinates and obtaining a drawn map region.
Optionally, the data recording module includes:
the line segment identification unit is used for identifying line segments and curve segments in the touch track when the touch track of the user is monitored;
the data recording unit is used for recording the starting point position and the ending point position of the line segment, converting the curve segment into a plurality of line segments, and respectively recording the starting point position and the ending point position of the line segments according to the sequence to obtain the touch information data of the touch track.
Optionally, the data recording module includes:
the monitoring view adding unit is used for adding a gesture monitoring view on the electronic map when a touch drawing instruction is received;
and the touch track monitoring unit is used for recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track when the touch track of the user is monitored through the gesture monitoring view.
Optionally, the method further comprises:
the closing module is used for closing the ending point and the starting point of the touch track to obtain a closed line segment;
and the drawing graph display module is used for determining a user drawing graph according to the closed line segment and the touch track and displaying the user drawing graph on the gesture monitoring view.
Optionally, the method further comprises:
and the monitoring view removing module is used for removing the gesture monitoring view.
Optionally, the gesture monitoring view is a transparent view, and a display size of the gesture monitoring view is the same as a display size of the electronic map.
Optionally, the method further comprises:
and the data storage module is used for storing the touch information data into a two-dimensional array.
Optionally, the method further comprises:
the device comprises a to-be-revoked line segment determining module, a to-be-revoked line segment determining module and a to-be-revoked line segment determining module, wherein the to-be-revoked line segment determining module is used for determining a to-be-revoked line segment according to a revocation starting point and a revocation ending point in a revocation instruction when receiving the revocation instruction;
and the line segment withdrawal module is used for deleting the starting point position and the ending point position corresponding to the line segment to be withdrawn from the two-dimensional array according to the line segment to be withdrawn.
Optionally, the method further comprises:
and the redrawing module is used for monitoring the redrawing touch track of the user when receiving the redrawing instruction, and inserting the initial point position and the termination point position corresponding to the line segment in the redrawing touch track into the position corresponding to the withdrawn line segment in the two-dimensional array.
According to a third aspect of the present invention, there is provided a terminal comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the method of touch mapping a map area as described in the first aspect.
According to a fourth aspect of the present invention there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method of touch mapping a map area as described in the first aspect.
According to the method, the device, the terminal and the storage medium for drawing the map area by touching, when a touch drawing instruction is received, the touch track of a user is monitored, the initial point and the end point corresponding to the line segment in the touch track are recorded and used as touch information data of the touch track, the touch information data are converted into a plurality of longitude and latitude coordinates, the longitude and latitude coordinates are displayed on an electronic map, the point corresponding to the longitude and latitude coordinates is closed, and the drawn map area is obtained.
The foregoing description is only an overview of the present invention, and is intended to be implemented in accordance with the teachings of the present invention in order that the same may be more clearly understood and to make the same and other objects, features and advantages of the present invention more readily apparent.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention.
FIG. 1 is a flow chart of steps of a method for touch mapping a map area according to an embodiment of the present invention;
FIG. 2 is an exemplary diagram of drawing graphics in an embodiment of the invention;
FIG. 3 is a flowchart of the steps of a method for touch mapping a map area according to an embodiment of the present invention;
FIG. 4 is a flowchart of the steps of a method for touch mapping a map area according to an embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for touch mapping a map area according to an embodiment of the present invention;
fig. 6 is a block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
Fig. 1 is a flowchart of steps of a method for touch mapping a map area according to an embodiment of the present invention, where the method may be applied to a terminal, as shown in fig. 1, and the method may include:
step 101, monitoring a touch track of a user when a touch drawing instruction is received, and recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track.
When the user draws the map area through the touch sliding gesture, the touch track of the touch sliding gesture can be split into a plurality of line segments connected in front-back mode.
When the trigger button is detected to be clicked by a user, the touch drawing instruction is determined to be received, at this time, the existing gesture operation of the electronic map can be forbidden, the touch track of the user is monitored, when the touch information data of the touch track is recorded, the starting point position and the ending point position of each line segment in the touch track can be recorded according to the drawing sequence of the touch track, and the point position between the starting point position and the ending point position in the same line segment is not recorded, so that the recorded data quantity is reduced, and the conversion speed when the subsequent conversion is changed into longitude and latitude coordinates can be improved.
In the two adjacent line segments, the termination point of the former line segment and the start point of the latter line segment are the same point, so that the drawing graph formed by each line segment in the touch track is a closed graph.
In a specific embodiment, the monitoring the touch track of the user, and recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track includes:
when the touch track of a user is monitored, identifying line segments and curve segments in the touch track;
recording the starting point positions and the ending point positions of the line segments, converting the curve segments into a plurality of line segments, and respectively recording the starting point positions and the ending point positions of the line segments according to the sequence to obtain the touch information data of the touch track.
When the touch track of the user is monitored, whether the touch points in the touch track are positioned on the same straight line or not can be identified by utilizing a callback mode of the system, so that the line segments and the curve segments in the touch track are identified. For a line segment, only the starting point position and the ending point position of the line segment need to be recorded. And for the curve segment, the curve segment can be realized by a plurality of line segments according to the radian of the curve, namely, the curve segment is cut, the intersection point of two adjacent cut lines is used as the termination point of the former line segment and the start point of the latter line segment, and each cut line and the intersection point thereof form a plurality of line segments, so that the curve segment is converted into a plurality of interconnected line segments. When the data is recorded, only the starting point position and the ending point position of each line segment are required to be recorded, so that the recorded data volume is reduced.
When converting a curve segment into a straight line segment, determining an intersection point of two adjacent straight lines according to whether adjacent touch points in the curve segment are positioned on the same straight line or not, and taking the intersection point as a termination point of a previous line segment and a start point of a next line segment if the adjacent touch points are not positioned on the same straight line.
Taking the drawing graph in fig. 2 as an example, the drawing graph in fig. 2 is a graph of a region drawn by a user, and then the touch points a to B are line segments, only two points are recorded and connected, the touch points a to C are line segments, only two points are recorded and connected, the touch points B to C are curve segments, cutting lines are formed on the curve segments, the intersection points of the cutting lines are recorded, and then the intersection points are connected in sequence, so that the graph drawn by the user is obtained.
And step 102, converting the touch information data into a plurality of longitude and latitude coordinates.
And converting the recorded touch information data into longitude and latitude coordinates required for electronic map display by using a function. Because the recorded touch information data is only the initial point and the final point of the line segment in the touch track, when the touch information data is converted into longitude and latitude coordinates, only the recorded point is required to be converted, and the converted data quantity is reduced.
It should be noted that, the step 102 may be started after the step 101 is performed, or the step 102 and the step 101 may be performed in parallel, that is, after the start point and the end point of a line segment are obtained, the obtained point location may be converted into longitude and latitude coordinates, so as to increase the processing speed.
And 103, displaying the longitude and latitude coordinates on the electronic map, and closing the point positions corresponding to the longitude and latitude coordinates to obtain a drawn map area.
Displaying the converted longitude and latitude coordinates on an electronic map, and closing the points corresponding to the longitude and latitude coordinates back and forth, wherein the graph drawn by the user is displayed on the electronic map at the moment, so that the map area drawn by the user through touch is obtained.
The embodiment of the invention realizes that in the electronic equipment of an operation system such as an IOS (input/output) and the like, a specific graph (regular or irregular) area is defined in the electronic map by utilizing gestures such as touch and swipe, so that the drawing area can be displayed in the electronic map and can be sent to a server, the server can conveniently search and screen the drawing area for data, and the server can record the drawing area and be used for LBS (Location Based Service, location-based service). Or after the map area is drawn, more flexible functions can be realized on the map area, such as hiding the map area according to a user instruction.
According to the method for drawing the map region by touching, when the touch drawing instruction is received, the touch track of a user is monitored, the initial point position and the end point position corresponding to the line segment in the touch track are recorded and used as touch information data of the touch track, the touch information data are converted into a plurality of longitude and latitude coordinates, the longitude and latitude coordinates are displayed on the electronic map, the point positions corresponding to the longitude and latitude coordinates are closed, and the drawn map region is obtained.
Fig. 3 is a flowchart of steps of a method for touch mapping a map area according to an embodiment of the present invention, where the method may be applied to a terminal, as shown in fig. 3, and the method may include:
step 301, adding a gesture monitoring view on the electronic map when a touch drawing instruction is received.
The gesture monitoring view is a mask view, preferably a transparent view, that is, the gesture monitoring view is preferably a transparent mask view, so that the gesture monitoring view is not perceived by a user. The display size of the gesture monitoring view is the same as that of the electronic map, so that touch information data can be accurately recorded, and the point on the transparent monitoring view can be more conveniently converted into longitude and latitude coordinates on the electronic map without correction operation. If the display size of the gesture monitoring view is the same as the display size of the electronic map, a correction operation is required.
A trigger button can be provided on the display interface of the electronic map, when the trigger button is detected to be clicked by a user, the touch drawing instruction is determined to be received, and then a gesture monitoring view is added on the electronic map.
Step 302, when the gesture monitoring view monitors the touch track of the user, recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track.
The touch track of the user is monitored through the gesture monitoring view, so that the touch signal is isolated from the electronic map, the conflict between the direct operation of the user on the electronic map and the existing gesture operation of the electronic map is avoided, and the user experience is improved.
Step 303, converting the touch information data into a plurality of longitude and latitude coordinates.
And 304, displaying the longitude and latitude coordinates on the electronic map, and closing the point positions corresponding to the longitude and latitude coordinates to obtain a drawn map area.
According to the method for drawing the map region by touching, when the touch drawing instruction is received, the gesture monitoring view is added to the electronic map, when the touch track of the user is monitored through the gesture monitoring view, the starting point position and the ending point position corresponding to the line segment in the touch track are recorded and used as touch information data of the touch track, the touch information data are converted into a plurality of longitude and latitude coordinates, the longitude and latitude coordinates are displayed on the electronic map, the points corresponding to the longitude and latitude coordinates are closed, the drawn map region is obtained, the touch signal is isolated from the electronic map through the gesture monitoring view, the conflict between the operation of the user on the electronic map and the existing gesture operation of the electronic map is avoided, and the user experience is improved.
On the basis of the above technical solution, after recording the start point and the end point corresponding to the line segment in the touch track as the touch information data of the touch track, the method further includes:
closing the ending point and the starting point of the touch track to obtain a closed line segment;
and determining a user drawing graph according to the closed line segment and the touch track, and displaying the user drawing graph on the gesture monitoring view.
When the gesture monitoring view monitors that a user starts touching the screen, the initial touch point is taken as a starting point of the touch track, when the user's finger is monitored to leave the screen, the touch point when the finger leaves the screen is determined to be a termination point of the touch track, and a straight line is used for connecting the termination point and the starting point, so that a closed line segment is obtained. The touch track and the closed line segment form a user drawing graph, and the user drawing graph is displayed on the gesture monitoring view, so that the complete user drawing graph can be displayed, a user can intuitively know a map area to be drawn, and user experience is improved.
On the basis of the technical scheme, after the drawn map area is obtained, the method further comprises the following steps: the gesture monitoring view is removed. After the map area is drawn, the gesture monitoring view is removed in time, so that an operation signal of a user on the electronic map can be received, and a response is given in time.
Fig. 4 is a flowchart illustrating steps of a method for touch mapping a map area according to an embodiment of the present invention, where the embodiment may cancel a part of a track that has been mapped and redraw a corresponding track based on the above embodiment. As shown in fig. 4, the method may include:
step 401, monitoring a touch track of a user when a touch drawing instruction is received, and recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track.
And step 402, storing the touch information data into a two-dimensional array.
And storing touch information data through the two-dimensional array, namely storing the starting point position and the ending point position of each line segment in the touch track.
Step 403, when receiving the revocation instruction, determining a line segment to be revoked according to the revocation start point and the revocation end point in the revocation instruction.
A cancel button may be provided on the map area rendering interface for receiving a cancel instruction from the user. When the user finger is monitored to leave the screen and the leaving time is within the preset time, if the user is detected to click the revocation button, a revocation instruction is received, the starting point of the last line segment can be determined according to the revocation instruction, and the revocation ending point is the ending point of the last line segment. Or when the user finger is monitored to leave the screen and the leaving time is within the preset time, if the user is detected to click the revocation button, the user can be prompted to give the revocation start point and the revocation end point through touching, so that a revocation instruction comprising the revocation start point and the revocation end point is received, the line segment between the revocation start point and the revocation end point is determined to be the line segment to be revoked, and the line segment to be revoked can be one or more line segments.
And step 404, deleting the starting point position and the ending point position corresponding to the line segment to be revoked from the two-dimensional array according to the line segment to be revoked.
And step 405, monitoring a redrawn touch track of a user when a redrawing instruction is received, and inserting a start point position and a stop point position corresponding to a line segment in the redrawn touch track into positions corresponding to the line segment withdrawn in the two-dimensional array.
After the line segment designated by the user is withdrawn, the user can redraw the line segment between the withdrawal starting point and the withdrawal ending point, when the sliding gesture starting from the withdrawal starting point is monitored, a redrawing instruction is determined to be received, the redrawing touch track of the user is monitored, the starting point corresponding to one or more line segments in the redrawing touch track is determined to be the termination point, and the starting point and the termination point of each line segment are inserted into the positions corresponding to the withdrawn line segment in the two-dimensional array.
Step 406, converting the touch information data into a plurality of longitude and latitude coordinates.
And when the time that the finger of the user leaves the screen is monitored to reach the preset time, converting the touch information data into a plurality of longitude and latitude coordinates.
And step 407, displaying the longitude and latitude coordinates on the electronic map, and closing the point positions corresponding to the longitude and latitude coordinates to obtain a drawn map area.
According to the method for touch map region drawing, the touch information data are stored in the two-dimensional array, the line segment to be withdrawn can be determined according to the withdrawal starting point and the withdrawal ending point in the withdrawal instruction, the starting point and the ending point corresponding to the line segment to be withdrawn are deleted from the two-dimensional array, the starting point and the ending point corresponding to the line segment can be inserted into the positions corresponding to the withdrawn line segment in the two-dimensional array according to the touch track drawn again by the user, so that the user can correct the drawing graph conveniently, and user experience is improved.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
Fig. 5 is a block diagram of a device for touch mapping a map area according to an embodiment of the present invention, where the device for touch mapping a map area may be applied to a terminal, as shown in fig. 5, and the device for touch mapping a map area may include:
the data recording module 501 is configured to monitor a touch track of a user when a touch drawing instruction is received, and record a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track;
the data conversion module 502 is configured to convert the touch information data into a plurality of longitude and latitude coordinates;
and the map region drawing module 503 is configured to display the longitude and latitude coordinates on the electronic map, and close the points corresponding to the longitude and latitude coordinates to obtain a drawn map region.
Optionally, the data recording module includes:
the line segment identification unit is used for identifying line segments and curve segments in the touch track when the touch track of the user is monitored;
the data recording unit is used for recording the starting point position and the ending point position of the line segment, converting the curve segment into a plurality of line segments, and respectively recording the starting point position and the ending point position of the line segments according to the sequence to obtain the touch information data of the touch track.
Optionally, the data recording module includes:
the monitoring view adding unit is used for adding a gesture monitoring view on the electronic map when a touch drawing instruction is received;
and the touch track monitoring unit is used for recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track when the touch track of the user is monitored through the gesture monitoring view.
Optionally, the method further comprises:
the closing module is used for closing the ending point and the starting point of the touch track to obtain a closed line segment;
and the drawing graph display module is used for determining a user drawing graph according to the closed line segment and the touch track and displaying the user drawing graph on the gesture monitoring view.
Optionally, the method further comprises:
and the monitoring view removing module is used for removing the gesture monitoring view.
Optionally, the gesture monitoring view is a transparent view, and a display size of the gesture monitoring view is the same as a display size of the electronic map.
Optionally, the method further comprises:
and the data storage module is used for storing the touch information data into a two-dimensional array.
Optionally, the method further comprises:
the device comprises a to-be-revoked line segment determining module, a to-be-revoked line segment determining module and a to-be-revoked line segment determining module, wherein the to-be-revoked line segment determining module is used for determining a to-be-revoked line segment according to a revocation starting point and a revocation ending point in a revocation instruction when receiving the revocation instruction;
and the line segment withdrawal module is used for deleting the starting point position and the ending point position corresponding to the line segment to be withdrawn from the two-dimensional array according to the line segment to be withdrawn.
Optionally, the method further comprises:
and the redrawing module is used for monitoring the redrawing touch track of the user when receiving the redrawing instruction, and inserting the initial point position and the termination point position corresponding to the line segment in the redrawing touch track into the position corresponding to the withdrawn line segment in the two-dimensional array.
According to the device for drawing the map region by touching, when a touch drawing instruction is received through the data recording module, the touch track of a user is monitored, the initial point position and the end point position corresponding to the line segment in the touch track are recorded, the data conversion module converts the touch information data into a plurality of longitude and latitude coordinates as touch information data of the touch track, the map region drawing module displays the longitude and latitude coordinates on an electronic map, the point positions corresponding to the longitude and latitude coordinates are closed, and the drawn map region is obtained.
Fig. 6 is a block diagram of a terminal according to an embodiment of the present invention. As shown in fig. 6, the terminal 600 may include one or more processors 601 and one or more memories 602 connected to the processors 601. The terminal 600 may also include an input interface 603 and an output interface 604 for communicating with another device or system. Program code executed by the CPU of the processor 601 may be stored in the memory 602.
The processor 601 in the terminal 600 invokes the program code stored in the memory 602 to perform the method of touch mapping a map area in the above-described embodiment.
The processor is a control center of the terminal and provides a processing device for executing instructions, performing interrupt operations, providing timing functions and various other functions. The processor may be a single core (single CPU) processor or a multi-core (multi-CPU) processor. Unless otherwise stated, components such as processors or memories described as being used to perform a task may be implemented as general-purpose components that are temporarily used to perform the task at a given time, or as special-purpose components that are specifically manufactured to perform the task. The term "processor" as used herein refers to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
The elements in the server may be connected to each other by a bus, such as one of a data bus, an address bus, a control bus, an expansion bus, and a local bus, or any combination thereof.
According to an embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, the storage medium may be a Read-Only Memory (ROM), or readable and writable, such as a hard disk, a flash Memory. The computer program when executed by a processor implements the method of touch mapping a map area of the previous embodiment.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The method, the device, the terminal and the storage medium for touch map area drawing provided by the invention are described in detail, and specific examples are applied to illustrate the principles and the implementation modes of the invention, and the description of the above examples is only used for helping to understand the method and the core ideas of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (18)

1. A method of touch mapping a map area, comprising:
when a touch drawing instruction is received, monitoring a touch track of a user, and recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track;
converting the touch information data into a plurality of longitude and latitude coordinates;
displaying the longitude and latitude coordinates on an electronic map, and closing the point positions corresponding to the longitude and latitude coordinates to obtain a drawn map area;
the monitoring of the touch track of the user, recording the initial point position and the end point position corresponding to the line segment in the touch track as the touch information data of the touch track, and the method comprises the following steps:
when the touch track of a user is monitored, identifying line segments and curve segments in the touch track comprises the following steps: identifying whether touch points in the track are positioned on the same straight line or not through a system callback mode, and determining a line segment and a curve segment in the touch track;
recording the starting point positions and the ending point positions of the line segments, converting the curve segments into a plurality of line segments, and respectively recording the starting point positions and the ending point positions of the line segments according to the sequence to obtain the touch information data of the touch track.
2. The method according to claim 1, wherein when the touch drawing command is received, monitoring a touch track of a user, and recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track, including:
when a touch drawing instruction is received, adding a gesture monitoring view on the electronic map;
when the gesture monitoring view monitors the touch track of the user, recording a start point position and an end point position corresponding to a line segment in the touch track as touch information data of the touch track.
3. The method according to claim 2, further comprising, after recording a start point and an end point corresponding to a line segment in the touch trajectory as the touch information data of the touch trajectory:
closing the ending point and the starting point of the touch track to obtain a closed line segment;
and determining a user drawing graph according to the closed line segment and the touch track, and displaying the user drawing graph on the gesture monitoring view.
4. The method of claim 2, further comprising, after obtaining the mapped region:
the gesture monitoring view is removed.
5. The method of claim 2, wherein the gesture monitoring view is a transparent view, and wherein a display size of the gesture monitoring view is the same as a display size of the electronic map.
6. The method of claim 1, further comprising, prior to converting the touch information data into the plurality of latitude and longitude coordinates:
and storing the touch information data into a two-dimensional array.
7. The method of claim 6, further comprising, after storing the touch information data in a two-dimensional array:
when receiving a revocation instruction, determining a line segment to be revoked according to a revocation starting point and a revocation ending point in the revocation instruction;
and deleting the starting point position and the ending point position corresponding to the line segment to be revoked from the two-dimensional array according to the line segment to be revoked.
8. The method of claim 7, further comprising, after deleting the start point location and the end point location corresponding to the line segment to be revoked from the two-dimensional array:
and when a redrawing instruction is received, monitoring a redrawing touch track of a user, and inserting a starting point position and a terminating point position corresponding to a line segment in the redrawing touch track into positions corresponding to the withdrawn line segment in the two-dimensional array.
9. An apparatus for touch mapping a map area, comprising:
the data recording module is used for monitoring the touch track of a user when a touch drawing instruction is received, and recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track;
the data conversion module is used for converting the touch information data into a plurality of longitude and latitude coordinates;
the map region drawing module is used for displaying the longitude and latitude coordinates on the electronic map, closing the points corresponding to the longitude and latitude coordinates and obtaining a drawn map region;
the data recording module comprises:
the line segment identification unit is used for identifying line segments and curve segments in the touch track when the touch track of the user is monitored, and comprises the following steps: identifying whether touch points in the track are positioned on the same straight line or not through a system callback mode, and determining a line segment and a curve segment in the touch track;
the data recording unit is used for recording the starting point position and the ending point position of the line segment, converting the curve segment into a plurality of line segments, and respectively recording the starting point position and the ending point position of the line segments according to the sequence to obtain the touch information data of the touch track.
10. The apparatus of claim 9, wherein the data recording module comprises:
the monitoring view adding unit is used for adding a gesture monitoring view on the electronic map when a touch drawing instruction is received;
and the touch track monitoring unit is used for recording a start point position and a stop point position corresponding to a line segment in the touch track as touch information data of the touch track when the touch track of the user is monitored through the gesture monitoring view.
11. The apparatus as recited in claim 10, further comprising:
the closing module is used for closing the ending point and the starting point of the touch track to obtain a closed line segment;
and the drawing graph display module is used for determining a user drawing graph according to the closed line segment and the touch track and displaying the user drawing graph on the gesture monitoring view.
12. The apparatus as recited in claim 10, further comprising:
and the monitoring view removing module is used for removing the gesture monitoring view.
13. The apparatus of claim 10, wherein the gesture monitoring view is a transparent view, and wherein a display size of the gesture monitoring view is the same as a display size of the electronic map.
14. The apparatus as recited in claim 9, further comprising:
and the data storage module is used for storing the touch information data into a two-dimensional array.
15. The apparatus as recited in claim 14, further comprising:
the device comprises a to-be-revoked line segment determining module, a to-be-revoked line segment determining module and a to-be-revoked line segment determining module, wherein the to-be-revoked line segment determining module is used for determining a to-be-revoked line segment according to a revocation starting point and a revocation ending point in a revocation instruction when receiving the revocation instruction;
and the line segment withdrawal module is used for deleting the starting point position and the ending point position corresponding to the line segment to be withdrawn from the two-dimensional array according to the line segment to be withdrawn.
16. The apparatus as recited in claim 15, further comprising:
and the redrawing module is used for monitoring the redrawing touch track of the user when receiving the redrawing instruction, and inserting the initial point position and the termination point position corresponding to the line segment in the redrawing touch track into the position corresponding to the withdrawn line segment in the two-dimensional array.
17. A terminal, comprising: a processor, a memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the method of touch mapping a map area as claimed in any one of claims 1 to 8.
18. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the method of touch mapping a map area according to any of claims 1-8.
CN201910569363.XA 2019-06-27 2019-06-27 Method, device, terminal and storage medium for touch drawing map area Active CN110415315B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910569363.XA CN110415315B (en) 2019-06-27 2019-06-27 Method, device, terminal and storage medium for touch drawing map area

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910569363.XA CN110415315B (en) 2019-06-27 2019-06-27 Method, device, terminal and storage medium for touch drawing map area

Publications (2)

Publication Number Publication Date
CN110415315A CN110415315A (en) 2019-11-05
CN110415315B true CN110415315B (en) 2023-12-26

Family

ID=68359965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910569363.XA Active CN110415315B (en) 2019-06-27 2019-06-27 Method, device, terminal and storage medium for touch drawing map area

Country Status (1)

Country Link
CN (1) CN110415315B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111080732B (en) * 2019-11-12 2023-09-22 望海康信(北京)科技股份公司 Method and system for forming virtual map
CN111429549B (en) * 2020-03-02 2023-08-01 北京梧桐车联科技有限责任公司 Route image generation method, device and storage medium
CN113157330A (en) * 2021-01-13 2021-07-23 惠州Tcl移动通信有限公司 Method, device and storage medium for drawing graph on map layer
CN115480654A (en) * 2021-05-29 2022-12-16 华为技术有限公司 Line backspacing method of input panel and related device
CN113720337B (en) * 2021-08-20 2024-06-07 珠海格力电器股份有限公司 Map editing method and device of sweeping robot, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103791912A (en) * 2012-10-30 2014-05-14 大陆汽车投资(上海)有限公司 Navigation path planning device supporting hand-painted path
CN105425966A (en) * 2015-12-14 2016-03-23 珠海全志科技股份有限公司 Gesture control method and device based on Android system
CN106197445A (en) * 2016-06-30 2016-12-07 百度在线网络技术(北京)有限公司 A kind of method and device of route planning
CN107239216A (en) * 2016-03-28 2017-10-10 北大方正集团有限公司 Drawing modification method and apparatus based on touch-screen
CN107369198A (en) * 2017-08-05 2017-11-21 中山大学 A kind of more broken line method for drafting for ARCGIS Web maps
CN108108091A (en) * 2017-11-28 2018-06-01 贵阳语玩科技有限公司 The refreshing display methods and system of sliding trace

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103791912A (en) * 2012-10-30 2014-05-14 大陆汽车投资(上海)有限公司 Navigation path planning device supporting hand-painted path
CN105425966A (en) * 2015-12-14 2016-03-23 珠海全志科技股份有限公司 Gesture control method and device based on Android system
CN107239216A (en) * 2016-03-28 2017-10-10 北大方正集团有限公司 Drawing modification method and apparatus based on touch-screen
CN106197445A (en) * 2016-06-30 2016-12-07 百度在线网络技术(北京)有限公司 A kind of method and device of route planning
CN107369198A (en) * 2017-08-05 2017-11-21 中山大学 A kind of more broken line method for drafting for ARCGIS Web maps
CN108108091A (en) * 2017-11-28 2018-06-01 贵阳语玩科技有限公司 The refreshing display methods and system of sliding trace

Also Published As

Publication number Publication date
CN110415315A (en) 2019-11-05

Similar Documents

Publication Publication Date Title
CN110415315B (en) Method, device, terminal and storage medium for touch drawing map area
US11262895B2 (en) Screen capturing method and apparatus
US8291350B1 (en) Gesture-based metadata display
US20170277380A1 (en) Icon Control Method and Terminal
US20150082242A1 (en) Providing Context Menu Based on Predicted Commands
JP6756079B2 (en) Artificial intelligence-based ternary check method, equipment and computer program
CN106095261B (en) Method and device for adding notes to electronic equipment
EP2891041B1 (en) User interface apparatus in a user terminal and method for supporting the same
US9009613B2 (en) System to overlay application help on a mobile device
WO2017107654A1 (en) Method and device for displaying page entry icon
WO2017032307A1 (en) File folder merging method and device
US20160275095A1 (en) Electronic device, method and storage medium
EP3017277B1 (en) Handle bar route extension
US20160062601A1 (en) Electronic device with touch screen and method for moving application functional interface
CN110850982B (en) AR-based man-machine interaction learning method, system, equipment and storage medium
US8521791B2 (en) Electronic device and file management method
CN106951168B (en) Word processing method and mobile terminal
WO2016173307A1 (en) Message copying method and device, and smart terminal
WO2014059093A1 (en) Object placement within graphical user interface
CN107291564B (en) Information copying and pasting method and device and electronic equipment
CN103941957A (en) Method and device for deleting content of user equipment and user equipment
KR101969583B1 (en) Method for management content, apparatus and computer readable recording medium thereof
CN108415656B (en) Display control method, device, medium and electronic equipment in virtual scene
WO2023036168A1 (en) Page switching method and apparatus, and device and storage medium
CN112346678B (en) Method, device, equipment and storage medium for displaying article information

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