Method and device for checking the relationship between a click position and a transport card area

By drawing the boundary lines of the transit card area on the terminal device and determining the click location, the problem of users being unable to independently select the transit card area is solved, improving user experience and accuracy.

CN116382537BActive Publication Date: 2026-04-21SHENZHEN SNOWBALL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN SNOWBALL TECHNOLOGY CO LTD
Filing Date
2023-03-08
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, users cannot independently select transportation card areas on the map, resulting in a reduced user experience.

Method used

By obtaining the closed boundary line of the transportation card area, the boundary line is drawn using the terminal device's API, and the click location is determined. The number of intersections between the ray and the boundary line is used to determine the area to which the click location belongs, and the corresponding area is highlighted.

Benefits of technology

This allows users to actively select transportation card areas on the map, improving the user experience and enhancing the accuracy of transportation card usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116382537B_ABST
    Figure CN116382537B_ABST
Patent Text Reader

Abstract

The present specification discloses a method and device for confirming the relationship between the click position and the traffic card area. First, the direction involved by each traffic card area is obtained, and the boundary line of the closed area of each traffic card area in the terminal device map is determined according to each traffic card area. Then, the click position of the user can be determined according to the position of the terminal device interface being touched, and the number of intersection points of the ray and each boundary line is determined by taking the click position as the starting point and making a ray in any direction. For each closed area, if the number of intersection points of the ray and the boundary line of the closed area is odd, it is determined that the click position is located in the closed area, and the closed area is displayed to the user; if the number of intersection points of the ray and the boundary line of the closed area is even, it is determined that the click position is not located in the closed area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This manual relates to the field of computer technology, and in particular to a method and device for confirming the relationship between a clicked location and a transit card area. Background Technology

[0002] In daily life, different transit card zones are often different. In order for users to use the corresponding transit card in the transit card zone, it is necessary to show users each transit card zone.

[0003] Currently, the main way to display transportation cards to users is to show them the card after they select it. While this shows the coverage area of ​​the transportation card, it does not allow users to independently choose locations on the map for transportation, thus reducing the user experience.

[0004] Therefore, how to enable users to actively select transportation locations on the map to improve the user experience is an urgent problem to be solved. Summary of the Invention

[0005] This manual provides a method and device for confirming the relationship between the clicked location and the transportation card area, in order to partially solve the technical problem of how to enable users to actively select transportation locations on the map in order to improve the user experience.

[0006] The following technical solution is adopted in this specification:

[0007] This manual provides a method for confirming the relationship between the clicked location and the transit card area, including:

[0008] Obtain each transportation card area, and based on each transportation card area, determine the boundary line of the closed area of ​​each transportation card area in the terminal device map;

[0009] Based on the location where the terminal device interface is touched, the user's click location is determined, and a ray is drawn from the click location in any direction to determine the number of intersections between the ray and the boundary lines of each closed area.

[0010] For each closed region, if the number of intersections between the ray and the boundary line of the closed region is odd, then the clicked position is determined to be within the closed region, and the closed region is displayed to the user; if the number of intersections between the ray and the boundary line of the closed region is even, then the clicked position is determined not to be within the closed region.

[0011] Optionally, based on each transportation card area, the boundary line of the closed area in the terminal device map is determined, specifically including:

[0012] Based on each transportation card area, obtain the edge path of each transportation card area;

[0013] The edge paths are drawn on the terminal device map using the Canvas API in the terminal device to determine the boundary lines of the closed areas of each transportation card area on the terminal device map.

[0014] Optionally, the boundary lines of the closed areas of each transportation card zone in the terminal device map are determined, specifically including:

[0015] Using different rendering colors, the closed areas of each transportation card zone in the terminal device map are rendered with different colors.

[0016] Optionally, the user's click location is determined based on the location where the terminal device interface is touched, specifically including:

[0017] By using the Touch API in the terminal device, the location where the terminal device interface was touched is obtained, thereby determining the user's click location.

[0018] Optionally, the closed region is displayed to the user, specifically including:

[0019] The closed area where the clicked location is located is set as a highlighted area to show the closed area to the user.

[0020] Optionally, starting from the clicked position, a ray is drawn in any direction to determine the number of intersections between the ray and the boundary line, specifically including:

[0021] Establish a coordinate system with any point on the terminal device interface as the origin;

[0022] Determine the coordinates of the clicked position, and determine the ray equation for a ray drawn from the clicked position in any direction;

[0023] Determine the boundary equation of the boundary line, and then determine the number of intersections between the ray and the boundary line using the ray equation and the boundary equation.

[0024] Optionally, a ray can be drawn from the clicked position in any direction, specifically including:

[0025] Starting from the clicked location, draw a ray eastward along the map on the terminal device.

[0026] This manual provides a device for confirming the relationship between the clicked location and the transit card area, including:

[0027] The acquisition module is used to acquire each transportation card area and, based on each transportation card area, determine the boundary line of the closed area of ​​each transportation card area in the terminal device map;

[0028] The determination module is used to determine the user's click position based on the position where the terminal device interface is touched, and to determine the number of intersections between the ray and the boundary line by drawing a ray in any direction from the click position.

[0029] The display module is used to determine that the clicked position is located within the closed area if the number of intersections between the ray and the boundary line of the closed area is odd, and to display the closed area to the user.

[0030] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for confirming the relationship between the clicked location and the transit card area described above.

[0031] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for confirming the relationship between the clicked location and the transit card area.

[0032] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:

[0033] The method for confirming the relationship between the click location and the transit card area provided in this manual first obtains the location of each transit card area. Based on each transit card area, the boundary line of the closed area on the terminal device map is determined. Then, based on the touch location on the terminal device interface, the user's click location is determined. Starting from the click location, a ray is drawn in any direction, and the number of intersections between the ray and each boundary line is determined. For each closed area, if the number of intersections between the ray and the boundary line of that closed area is odd, the click location is determined to be within that closed area, and the closed area is displayed to the user. If the number of intersections is even, the click location is determined not to be within that closed area.

[0034] As can be seen from the above method, users can determine which transit card area their clicked location falls within by clicking on the map on their terminal device. This allows users to actively click on the map to display transit card areas, improving the user experience. Furthermore, because different transit card areas are identified separately, it is possible to determine whether there are any enclaves within a particular transit card area, thus improving the accuracy of transit card usage. Attached Figure Description

[0035] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0036] Figure 1 This is a flowchart illustrating a method for confirming the relationship between a click location and a transportation card area, as provided in this manual.

[0037] Figure 2 This is an example diagram of a transportation card usage area provided in this instruction manual;

[0038] Figure 3 This is a schematic diagram illustrating the intersection of a ray and the boundary line of a closed region, as provided in this specification.

[0039] Figure 4 This is a schematic diagram of a device for confirming the relationship between a click location and a transportation card area, as provided in this specification.

[0040] Figure 5 This specification provides a corresponding Figure 1 A schematic diagram of an electronic device. Detailed Implementation

[0041] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0042] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0043] Figure 1 This is a flowchart illustrating a method for confirming the relationship between a click location and a transportation card area, as provided in this manual, including the following steps:

[0044] S101: Obtain each transportation card area, and determine the boundary line of the closed area of ​​each transportation card area in the terminal device map based on each transportation card area.

[0045] As can be seen from the above description, the core innovation of the method for confirming the relationship between the click location and the transportation card area provided in this manual is that the terminal device identifies the location clicked by the user and displays the transportation card area involved at the click location to the user. Therefore, in this manual, the subject implementing the method for confirming the relationship between the click location and the transportation card area can be a terminal device such as a mobile phone, tablet computer, desktop computer, or laptop computer used by the operator. For ease of description, the terminal device is used as the subject implementing the method for confirming the relationship between the click location and the transportation card area provided in this manual.

[0046] First, the terminal device can acquire the regions of each transit card and, based on these regions, determine the boundary lines of closed areas within the terminal device's map. In practical applications, each transit card has its corresponding usage range, such as... Figure 2 This is an example diagram of a transportation card usage area provided in this specification. Figure 2 If you are traveling within a closed curve, your transportation card is valid; if you are traveling outside the closed curve, your transportation card is not valid and you will need to use another transportation card. Also, if... Figure 2 As shown, the closed curve is the boundary line of the closed area represented by the transportation card area in the terminal device map.

[0047] In this specification, in order to reduce memory consumption, the application programming interface (API) of the terminal device's Canvas can be used to draw the boundary lines of each transportation card area on the terminal device's map, thereby determining the boundary lines of the closed areas of each transportation card area on the terminal device's map.

[0048] Meanwhile, in order to help users better distinguish the closed areas of different transportation cards, the terminal device can use different rendering colors to render the closed areas of each transportation card in the terminal device map as different colors.

[0049] S102: Based on the location where the terminal device interface is touched, determine the user's click location, and starting from the click location, draw a ray in any direction to determine the number of intersections between the ray and the boundary lines of each closed area.

[0050] After acquiring the boundary lines of each transportation card area, the terminal device responds to user touches on the terminal device's interface by obtaining the touch location and thus determining the user's click location. In practical applications, to reduce the terminal device's memory usage, the terminal device can utilize Touch-related APIs to obtain the touch location and thus determine the user's click location.

[0051] After obtaining the user's click location, the terminal device can draw a ray in any direction from the click location and determine the number of intersections between the ray and the boundary lines of each closed area.

[0052] Specifically, the terminal device can establish a coordinate system with any point on the terminal device interface as the origin, determine the coordinates of the clicked position in this coordinate system, and simultaneously determine the ray equation for drawing a ray from the clicked position in any direction. The terminal device can then determine the boundary equations of the boundary lines of each traffic card area, and use the ray equation and boundary equations to determine the number of intersection points between the ray and the boundary lines. Of course, in practical applications, the direction of the ray drawn from the clicked position can be east on the terminal device's map.

[0053] S103: For each closed region, if the number of intersections between the ray and the boundary line of the closed region is odd, then the clicked position is determined to be within the closed region, and the closed region is displayed to the user; if the number of intersections between the ray and the boundary line of the closed region is even, then the clicked position is determined not to be within the closed region.

[0054] After determining the number of intersections between the ray and the boundary lines of each closed region, the terminal device, for each closed region, determines that the click location is within that closed region if the number of intersections is odd. Figure 3 This specification provides a schematic diagram of the intersection of a ray and the boundary line of a closed region, as shown below. Figure 3 As shown by ray A, if ray A intersects the closed region a at 1 point, it means that the clicked position A is located within the closed region a. It should be noted that if this closed region contains enclaves, then... Figure 3 As shown, the number of intersections between ray B and the closed region b is 3, which means that the click position of B is located within the closed region b.

[0055] If the terminal device determines that the number of intersections between the ray and the boundary line of the closed region is even, then it determines that the clicked location is not within the closed region. Figure 3 As shown, if the C-ray intersects the closed region c at 2 points, it means the C-ray is not located within the closed region c. Similarly, if the closed region contains an enclave, then... Figure 3 As shown, the number of intersections between ray D and the closed region d is 4, indicating that the click location D is not located within the closed region d. It should be noted that when the click location is located in an area overlapping with a traffic area, such as... Figure 3 If position E is located within both closed regions f and g, then the number of intersections between ray E and both closed regions f and g is 1, indicating that the clicked position E is simultaneously located within both closed regions f and g.

[0056] When a terminal device determines that the clicked location is within a closed area, in order to make the user see the scope of the closed area more clearly, the closed area can be highlighted to show the closed area to the user.

[0057] The following describes an embodiment of the method for confirming the relationship between the click location and the transportation card area provided in this manual.

[0058] First, the terminal device acquires the boundaries of each transit card area and draws the boundary lines of the closed areas corresponding to each transit card area on the terminal device map using the APIs involved in the Canvas in the terminal device.

[0059] Then, the terminal device can respond to the user touching the terminal device map. Based on the location of the touch on the terminal device interface, the user's click location is determined through the Touch API of the terminal device. Starting from the click location, a ray is drawn in the due east direction of the terminal device map, and the number of intersections between the ray and the boundary lines of each closed area is determined.

[0060] For each closed region, if the number of intersections between the ray and the boundary line of the closed region is odd, then the clicked position is determined to be within the closed region, and the closed region is set as a highlighted region to be displayed to the user.

[0061] As can be seen from the above method, users can determine which transit card area their clicked location falls within by clicking on the map on their terminal device. This allows users to actively click on the map to display transit card areas, improving the user experience. Furthermore, because different transit card areas are identified separately, it's possible to determine whether enclaves exist within a particular transit card area, improving the accuracy of transit card usage. Additionally, since only the terminal device's own API is used, without needing to bridge the phone's system, the terminal device's memory usage is reduced.

[0062] The above describes a method for confirming the relationship between a click location and a transit card area, provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding device for confirming the relationship between a click location and a transit card area, such as... Figure 4 As shown.

[0063] Figure 4 A schematic diagram of a device for confirming the relationship between a click location and a transit card area, as provided in this specification, includes:

[0064] The acquisition module 401 is used to acquire each transportation card area and, based on each transportation card area, determine the boundary line of the closed area of ​​each transportation card area in the terminal device map;

[0065] The determining module 402 is used to determine the user's click position based on the position where the terminal device interface is touched, and to determine the number of intersections between the ray and the boundary line by drawing a ray in any direction from the click position.

[0066] The display module 403 is used to determine that the clicked position is located within the closed area if the number of intersections between the ray and the boundary line of the closed area is odd for each closed area, and to display the closed area to the user.

[0067] Optionally, the acquisition module 401 is specifically used to acquire the edge path of each transportation card area according to each transportation card area; and to draw the edge path on the terminal device map through the API involved in the Canvas in the terminal device, so as to determine the boundary line of the closed area of ​​each transportation card area on the terminal device map.

[0068] Optionally, the acquisition module 401 is specifically used to render the closed areas of each traffic card area in the terminal device map with different colors using different rendering colors.

[0069] Optionally, the determining module 402 is specifically used to obtain the location where the terminal device interface is touched through the Touch API in the terminal device, thereby determining the user's click location.

[0070] Optionally, the display module 403 is specifically used to set the closed area where the clicked position is located as a highlighted area to display the closed area to the user.

[0071] Optionally, the determining module 402 is specifically used to: establish a coordinate system with any point on the terminal device interface as the origin; determine the coordinates of the clicked position and determine the ray equation of a ray drawn from the clicked position in any direction; determine the boundary equation of the boundary line, so as to determine the number of intersections between the ray and the boundary line through the ray equation and the boundary equation.

[0072] Optionally, the determining module 402 is specifically used to draw a ray from the clicked position in the east direction on the terminal device map.

[0073] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 The provided method for confirming the relationship between the clicked location and the transportation card area.

[0074] This instruction manual also provides Figure 5 One of the corresponding Figure 1 A schematic diagram of the structure of an electronic device. (e.g.) Figure 5 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile storage into memory and then runs it to achieve the above-mentioned functions. Figure 1 The method for confirming the relationship between the clicked location and the transportation card area is described above. Of course, besides software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices.

[0075] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Controller (PLC) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLC, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0076] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0077] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0078] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware.

[0079] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0080] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0081] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0082] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0083] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0084] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0085] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0086] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0087] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0088] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0089] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0090] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A method for confirming the relationship between a clicked location and a transportation card area, characterized in that, include: The process involves obtaining each transit card area and determining the boundary line of the closed area of ​​each transit card area in the terminal device map, including: obtaining the edge path of each transit card area; drawing the edge path in the terminal device map using the API involved in the Canvas in the terminal device to determine the boundary line of the closed area of ​​each transit card area in the terminal device map; and rendering the closed area of ​​each transit card area in the terminal device map with different colors using different rendering colors. Based on the location where the terminal device interface is touched, the user's click location is determined, and a ray is drawn from the click location in any direction to determine the number of intersections between the ray and the boundary lines of each closed area. For each closed region, if the number of intersections between the ray and the boundary line of the closed region is odd, then the clicked position is determined to be within the closed region, and the closed region is displayed to the user; if the number of intersections between the ray and the boundary line of the closed region is even, then the clicked position is determined not to be within the closed region.

2. The method according to claim 1, characterized in that, Determining the user's click location based on the touch location on the terminal device interface specifically includes: By using the Touch API in the terminal device, the location where the terminal device interface was touched is obtained, thereby determining the user's click location.

3. The method according to claim 1, characterized in that, Showing the closed region to the user specifically includes: The closed area where the clicked location is located is set as a highlighted area to display the closed area to the user.

4. The method according to claim 1, characterized in that, Starting from the clicked position, draw a ray in any direction and determine the number of intersections between the ray and the boundary line, specifically including: Establish a coordinate system with any point on the terminal device interface as the origin; Determine the coordinates of the clicked position, and determine the equation of the ray drawn from the clicked position in any direction; Determine the boundary equation of the boundary line, and then determine the number of intersections between the ray and the boundary line using the ray equation and the boundary equation.

5. The method according to claim 1, characterized in that, Starting from the clicked position, draw a ray in any direction, specifically including: Starting from the clicked location, draw a ray eastward in the direction shown on the terminal device map.

6. A device for confirming the relationship between a click location and a transportation card area, characterized in that, include: The acquisition module is used to acquire each transportation card area and, based on each transportation card area, acquire the edge path of each transportation card area. Using the API involved in the Canvas in the terminal device, the edge path is drawn on the terminal device map to determine the boundary line of the closed area of ​​each traffic card area in the terminal device map; In addition, different rendering colors are used to render the closed areas of each transportation card area in the terminal device map as different colors; The determination module is used to determine the user's click position based on the position where the terminal device interface is touched, and to determine the number of intersections between the ray and the boundary line by drawing a ray in any direction from the click position. The display module is used to determine that the clicked position is located within the closed area if the number of intersections between the ray and the boundary line of the closed area is odd, and to display the closed area to the user.

7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 5.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Map display mark click area detection method and device and electronic equipment

    CN112083846A

  • Method and device for carrying out anomaly detection on longitude and latitude of equipment and storage medium

    CN114549625A