A method, device and storage medium for displaying an electronic map

By displaying the boundaries of the target area in the electronic map display window, the problem that users cannot intuitively view the relationship between the target location and the target area is solved, and the user experience is improved.

CN116013144BActive Publication Date: 2025-05-06HANGZHOU HIKVISION SYST TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211675127.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2025-05-06
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

The existing electronic map cannot meet the user's need to view the location relationship between the target location and the target area, and the user experience is poor.

Method used

By receiving user instructions, at least a portion of the boundary of the first location and the target area are displayed in the electronic map display window according to the geographical location information of the target area and the first location, and the second location closest to the first location in the target area is located on at least a portion of the boundary.

Benefits of technology

Users can intuitively understand the location relationship between the first location and the target area, such as whether it is within the area, in-depth or far away, without manually deleting the planning path, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116013144B_ABST
    Figure CN116013144B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for displaying an electronic map, which relates to the field of electronic map technology and is used to display the positional relationship between a location and an area in an electronic map. The method includes: receiving a user instruction, the user instruction instructing to display the positional relationship between a first location and a target area in an electronic map display window; in response to the user instruction, displaying at least a portion of the boundary between the first location and the target area in the electronic map display window according to the geographical location information of the target area and the first location; the second location in the target area that is closest to the first location is located on at least a portion of the boundary.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic maps, and in particular to a method, device and storage medium for displaying an electronic map. Background Art

[0002] An electronic map is a visual map that is displayed on an electronic screen using computer technology, based on a map database, and through certain hardware or software. Electronic maps are the main way to express geographic data in GIS (Geographic Information System); with the rapid development of geographic information technology, electronic maps have been widely used in government planning, economic trade, tourist guides, satellite navigation and other fields.

[0003] In the electronic map, the user can view the user's current location, search for various places and locations, and view travel routes. For example, the user can enter the origin and destination in the electronic map, and then the electronic map will display multiple routes between the origin and the destination. The user can view the various travel modes (bus, subway, bicycle, etc.) for each route, the time required for each travel mode, the places passed by each route, etc.

[0004] However, users can only view the planned paths between locations in current electronic maps, which cannot meet other user needs and the user experience is not high. Therefore, how to display the location relationship between locations and regions in electronic maps is a problem that needs to be solved. Summary of the invention

[0005] The present application provides a method, device and storage medium for displaying an electronic map, which are used to display the positional relationship between places and areas in an electronic map.

[0006] In order to achieve the above technical objectives, this application adopts the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for displaying an electronic map, the method comprising:

[0008] receiving a user instruction, the user instruction instructing to display the position relationship between the first location and the target area in the electronic map display window;

[0009] In response to a user instruction, at least a portion of the boundary between the first location and the target area is displayed in the electronic map display window according to the geographic location information of the target area and the first location; the second location in the target area closest to the first location is located on at least a portion of the boundary.

[0010] The technical solution provided by the present application brings at least the following beneficial effects: based on the geographical location information of the first location and the second location closest to the first location in the target area, at least a portion of the boundary of the first location and the target area containing the second location is displayed in the electronic map display window, so that the user can clearly and intuitively understand the positional relationship between the first location and the target area in the electronic map display window, such as the first location is in the target area, and the degree to which the first location penetrates into the target area, or the first location is outside the target area, and the degree to which the first location is far from the target area. The planned path between the first location and the target area is not displayed in the electronic map. When the user only wants to view the positional relationship between the first location and the target area, the user does not need to manually delete the path, and the user experience is better.

[0011] In a possible implementation, based on the geographic location information of the target area and the first location, displaying at least a portion of the boundary of the first location and the target area in an electronic map display window includes: determining a second location on the boundary of the target area that is closest to the first location based on the geographic location information of the target area and the first location; determining a to-be-displayed area including the first location and at least a portion of the boundary based on the geographic location information of the first location and the second location; and displaying the to-be-displayed area in the electronic map display window. In this way, it can be ensured that at least a portion of the boundary of the first location and the target area can be displayed in the electronic map display window, so that the user can know the positional relationship between the first location and the target area.

[0012] In a possible implementation, based on the geographic location information of the first location and the second location, determining the area to be displayed including the first location and at least a portion of the boundary includes: determining a candidate area based on the geographic location information of the first location and the second location, the first location and the second location are located at the boundary of the candidate area; expanding the candidate area to obtain the area to be displayed, the candidate area is located within the area to be displayed and the boundary of the candidate area does not overlap with the boundary of the area to be displayed. In this way, the electronic device can display the first location and at least a portion of the boundary of the target area including the second location without obstruction, so that the user can clearly understand the positional relationship between the first location and the target area, thereby improving the user experience.

[0013] In a possible implementation, the geographic location information includes longitude and latitude; when the longitude and latitude of the first location are different from those of the second location, determining the candidate area according to the geographic location information of the first location and the second location includes: determining the rectangular area with the first location and the second location as diagonal points of the rectangular area, and using the rectangular area as the candidate area. In this way, since the shape of the electronic map window that can be displayed by most electronic devices is a rectangle, determining the rectangular candidate area according to the first location and the second location can present a better display effect, thereby improving the user experience.

[0014] In a possible implementation, determining a to-be-displayed area including the first location and at least a portion of the boundary according to geographic location information of a first location and a second location includes: determining the real distance between the first location and the second location according to the geographic location information of the first location and the second location; determining a target zoom level from a plurality of zoom levels preset in an electronic map display window according to the real distance between the first location and the second location; the zoom level represents the proportional relationship between the map distance between two points in the electronic map display window and the real distance between the two points; taking the midpoint of the line connecting the first location and the second location as the center point of the to-be-displayed area, determining the to-be-displayed area according to the target zoom level and the size of the electronic map display window, the shape of the to-be-displayed area matches the shape of the electronic map display window, and the area of ​​the to-be-displayed area is equal to the area after the electronic map display window is scaled according to the target zoom level. In this way, the electronic device calculates the real distance between the first location and the second location according to the geographic location information of the second location closest to the first location in the target area, and then determines the target zoom level from a plurality of preset zoom levels, taking the midpoint of the line connecting the first location and the second location as the center point of the to-be-displayed area, and determining the to-be-displayed area according to the target zoom level. In this way, at least a portion of the boundary between the first location and the target area including the second location can be completely displayed in the electronic map display window, so that the user can clearly perceive the positional relationship between the first location and the target area.

[0015] In a possible implementation, when the first location is located on at least a portion of the boundary, the first location and at least a portion of the boundary of the target area are displayed in the electronic map display window according to the geographical location information of the target area and the first location, including: taking the first location as the center point of the area to be displayed, determining the area to be displayed, and matching the shape of the area to be displayed with the shape of the electronic map display window; and displaying the area to be displayed in the electronic map display window. In this way, since the first location is located on at least a portion of the boundary, when the first location is taken as the center point of the area to be displayed, not only the first location can be displayed, but also the target area, the boundary of the target area, and a portion of the content outside the target area can be displayed, so that the user can clearly and intuitively understand the positional relationship between the first location and the target area.

[0016] In a second aspect, the present application provides an electronic map display device, which includes modules for executing the method described in the first aspect or any possible design mode of the first aspect.

[0017] In a third aspect, the present application provides an electronic map display device, comprising: one or more processors; one or more memories; wherein the one or more memories are used to store computer program codes, the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the electronic map display device executes any one of the electronic map display methods provided in the first aspect above.

[0018] In a fourth aspect, the present application provides a computer-readable storage medium storing computer execution instructions. When the computer execution instructions are executed on a computer, the computer executes any one of the electronic map display methods provided in the first aspect.

[0019] In a fifth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are executed on a display device of an electronic map, the display device of the electronic map executes the method for displaying an electronic map as described in the first aspect and any possible design thereof.

[0020] For the specific description of the second to fifth aspects and their various implementations in the present application, reference may be made to the detailed description in the first aspect and its various implementations; and for the beneficial effects of the second to fifth aspects and their various implementations, reference may be made to the beneficial effects analysis in the first aspect and its various implementations, which will not be repeated here.

[0021] These and other aspects of the present application will become more apparent from the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1A schematic diagram of an electronic map display scene of a related technology provided in an embodiment of the present application Figure 1 ;

[0023] Figure 2 A schematic diagram of an electronic map display scene of a related technology provided in an embodiment of the present application Figure 2 ;

[0024] Figure 3 A schematic diagram of an electronic map display scene of a related technology provided in an embodiment of the present application Figure 3 ;

[0025] Figure 4 A schematic diagram of an electronic map display scene of a related technology provided in an embodiment of the present application Figure 4 ;

[0026] Figure 5 A schematic diagram of an electronic map display scene of a related technology provided in an embodiment of the present application Figure 5 ;

[0027] Figure 6 A schematic diagram of an electronic map display scene of a related technology provided in an embodiment of the present application Figure 6 ;

[0028] Figure 7 A schematic diagram of an electronic map display scene of a related technology provided in an embodiment of the present application Figure 7 ;

[0029] Figure 8 A schematic diagram of the structure of an electronic map display system applicable to an electronic map display method provided in an embodiment of the present application;

[0030] Fig. 9 A schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0031] Fig.10 A method for displaying an electronic map provided in an embodiment of the present application Figure 1 ;

[0032] Fig.11 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 1 ;

[0033] Fig.12 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 2 ;

[0034] Fig.13 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 3 ;

[0035] Fig.14 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 4 ;

[0036] Fig.15 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 5 ;

[0037] Fig.16 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 6 ;

[0038] Fig.17 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 7 ;

[0039] Fig.18 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 8 ;

[0040] Fig.19 A method for displaying an electronic map provided in an embodiment of the present application Figure 2 ;

[0041] Fig. 20 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 9 ;

[0042] Fig.21 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 10 ;

[0043] Fig. 22 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 10 one;

[0044] Fig.23 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 10 two;

[0045] Fig.24 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 10 three;

[0046] Fig.25 Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 10 Four;

[0047] Fig.26Schematic diagram of an application scenario of a method for displaying an electronic map provided in an embodiment of the present application Figure 10 five;

[0048] Fig. 27 A schematic diagram of the structure of an electronic map display device provided in an embodiment of the present application;

[0049] Fig.28 A schematic diagram of the structure of another electronic map display device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. The terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present application, unless otherwise specified, "multiple" means two or more.

[0052] To facilitate understanding, the basic concepts of some terms or technologies involved in the embodiments of the present application are first briefly introduced and explained.

[0053] Electronic map, also known as digital map, is a map that is stored and accessed digitally using computer technology. Electronic maps generally use vector graphics to store information, and the map scale can be enlarged, reduced or rotated without affecting the display effect.

[0054] The electronic map display window refers to the area on the display screen of an electronic device used to display an electronic map.

[0055] Place, that is, location, such as address, entertainment venue, positioning location, etc.

[0056] Map distance refers to the length of a line segment on an electronic map. For example, if the length of line segment AB on an electronic map is measured to be 10 cm, then the map distance of line segment AB is 10 cm.

[0057] Real distance refers to the actual distance of a line segment on an electronic map in real space. For example, on an electronic map with a scale of 3000:1, if the length of line segment AB is 10cm, then the real distance of line segment AB in real space is 300m.

[0058] The zoom level is used to represent the proportional relationship between the map distance between two points in the electronic map display window and the real distance between the two points. For example, the zoom level can be a scale. When the scale of an electronic map is 3000:1, it means that the ratio of the map distance between the two points in the electronic map display window represented by the zoom ratio corresponding to this scale and the real distance between the two points is 1:3000.

[0059] The above is an introduction to some concepts involved in the embodiments of the present application, which will not be repeated below.

[0060] Currently, users can search for various places and locations on electronic maps, and can also search for travel routes through maps. For example, users can enter the origin and destination on the electronic map to view information such as travel methods (such as bus, self-driving, electric car, bicycle, walking, etc.), places along the way, time required, etc. between the origin and destination.

[0061] However, existing electronic maps cannot meet the needs of users to view the positional relationship between the target location and the target area. Specifically, the electronic map on the electronic device can only respond to the route planning instructions input by the user, that is, instructions for planning the route from the target location to the target area, and when the user uses the electronic map on the electronic device to find the route from the target location to the target area, the electronic device often determines a recommended location in the target area, and then plans the route between the target location and the recommended location, and displays it in the electronic map display window. The user cannot intuitively see the positional relationship between the target location and the target area through the content displayed in the electronic map display window. The positional relationship here includes: when the target location is within the target area, the degree to which the target location is deep into the target area, and when the target location is outside the target area, the degree to which the target location is far away from the target area.

[0062] Take the user's current location as the target location, that is, the starting location, as an example. Figure 1As shown, when the starting point is outside the target area A and is far from the target area A, the target area A is displayed in the electronic map display window as a point. It can be seen that since the electronic map display window does not display the boundary of the target area A, the user cannot know the positional relationship between the starting point and the target area A, that is, the user cannot know the degree to which the starting point is far from the target area A.

[0063] Let's continue to take the user's current location as the target location, that is, the starting location, as an example. Figure 2 As shown, when the starting point is outside the target area A and is relatively close to the target area A, the electronic map display window displays the planned route between the starting point and a recommended location B in the target area A. In this case, although a portion of the boundary of the target area A is displayed in the electronic map display window, the user cannot intuitively feel the degree to which the starting point is far from the target area A, and the planned route cannot be deleted, which affects the user experience.

[0064] Or Figure 3 As shown, when the starting point is inside the target area A, the electronic map display window displays the planned route between the starting point and a recommended location B in the target area A. This method is essentially a point-to-point route planning. When the user does not need the route planned by the electronic map and only wants to view the positional relationship between the target location and the target area, the route planned by this method cannot be deleted, affecting the user experience. In addition, in this case, the electronic map display window may not display the boundary of the target area A, so the user cannot know the extent to which the starting point is deep into the target area A.

[0065] In some functions of electronic maps, such as Figure 4 As shown, the electronic map can determine whether the target location is within the target area and present the result to the user. However, this method can only show whether the target location is within the area, but cannot show the extent to which the target location is far away from or deep into the area.

[0066] For example, Figure 5 As shown, when locating a ship in a ship positioning system, only the specific position of the ship can be located, and the positional relationship between the ship and the mainland cannot be displayed.

[0067] In another example, in the electronic map display window, only a part of the area around the target location is displayed. Then, no matter the target location is within the target area or outside the target area, the following may appear: Figure 6 and Figure 7 In the situation shown, the boundary of the target area is not displayed in the electronic map display window, that is, the user cannot know the positional relationship between the target location and the target area.

[0068] Therefore, how to display the positional relationship between the target location and the target area in the electronic map display window is a problem that needs to be solved.

[0069] In this regard, an embodiment of the present application provides a method for displaying an electronic map, wherein the electronic map can respond to a user instruction input by a user indicating the positional relationship between a first location and a target area in an electronic map display window, and after receiving the user instruction indicating the positional relationship between the first location and the target area in the electronic map display window, at least a portion of the boundary between the first location and the target area is displayed in the electronic map display window according to the geographic location information of the target area and the first location, and the second location in the target area that is closest to the first location is located on at least a portion of the boundary. In this way, the user can see at least a portion of the boundary between the first location and the target area in the electronic map display window, and intuitively feel the positional relationship between the first location and the target area.

[0070] The electronic map display method provided in the present application can be executed by the electronic device 10. Specifically, the electronic device 10 can be installed with an electronic map application, and then can display an electronic map display window, and receive a user instruction input by a user in the electronic map display window, the user instruction instructing to display the positional relationship between the first location and the target area in the electronic map display window. In response to the user instruction, the electronic device 10 displays at least a portion of the boundary between the first location and the target area in the electronic map display window according to the geographical location information of the target area and the first location; the second location in the target area that is closest to the first location is located on at least a portion of the boundary.

[0071] In some embodiments, the electronic device 10 determines the second location on the boundary of the target area that is closest to the first location based on the geographic location information of the target area and the first location indicated by the user instruction, and then determines the area to be displayed including the first location and at least a portion of the boundary based on the geographic location information of the first location and the second location, and then displays the area to be displayed in the electronic map display window.

[0072] In other embodiments, the electronic map display method provided by the present application can also be applied to Figure 8The electronic map display system 1 shown. The electronic map display system 1 includes an electronic device 10 and a server 20. Specifically, the electronic device 10 receives a user instruction, and sends the first location and target area indicated by the user instruction to the server 20, and the server 20 receives the first location and target area sent by the electronic device 10. Then, the server 20 determines the second location in the target area that is closest to the first location, and determines the area to be displayed including the first location and at least a part of the boundary based on the geographic location information of the first location and the second location, and then sends the relevant information of the area to be displayed to the electronic device 10, so that the electronic device 10 displays the area to be displayed in the electronic map display window.

[0073] In some embodiments, the electronic device 10 may be equipped with a positioning device for determining the geographical location information of the first location and the target area indicated by the user instruction. The geographical location information determined by the positioning device includes at least longitude and latitude. For the first location, its geographical location information is the longitude and latitude data corresponding to the first location; for the target area, its geographical location information is the set of longitude and latitude data corresponding to several points on its boundary.

[0074] In other embodiments, the positioning device may exist independently of the electronic device 10, which is not limited in the embodiments of the present application. In the embodiment where the positioning device is independent of the electronic device 10, the positioning device may be connected to the electronic device 10 and / or the server 20 in a wired or wireless communication manner, and then send the determined geographic location information to the electronic device 10 and / or the server 20.

[0075] In the embodiment of the present application, the electronic device 10 may be any electronic map display device including a display module, such as a smart watch, a personal computer (PC), a notebook computer, a mobile device, a tablet computer, a laptop computer, etc. The embodiment of the present application does not limit the specific form of the electronic device 10.

[0076] The basic hardware structures of the electronic device 10 and the server 20 are similar, both of which include Fig. 9 The computing device shown in FIG. Figure 2 Taking the computing device shown as an example, the hardware structure of the electronic device 10 and the server 20 is introduced.

[0077] like Fig. 9 As shown, the computing device may include a processor 301, a memory 302, a communication interface 303, and a bus 304. The processor 301, the memory 302, and the communication interface 303 may be connected via a bus 304.

[0078] The processor 301 is the control center of the computing device, which can be a processor or a general term for multiple processing elements. For example, the processor 301 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.

[0079] As an embodiment, the processor 301 may include one or more CPUs, such as Fig. 9 CPU 0 and CPU 1 are shown in .

[0080] The memory 302 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0081] In a possible implementation, the memory 302 may exist independently of the processor 301, and the memory 302 may be connected to the processor 301 via a bus 304 to store instructions or program codes. When the processor 301 calls and executes the instructions or program codes stored in the memory 302, the map matching method provided in the embodiment of the present application can be implemented.

[0082] In the embodiment of the present application, for the electronic device 10 and the server 20, the software programs stored in the memory 302 are different, and the electronic device 10 and the server 20 implement different functions. The functions performed by each device will be described in conjunction with the following flowchart.

[0083] In another possible implementation, the memory 302 may also be integrated with the processor 301 .

[0084] The communication interface 303 is used for connecting the computing device to other devices through a communication network, and the communication network may be Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 303 may include a receiving unit for receiving data and a sending unit for sending data.

[0085] The bus 304 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0086] It should be pointed out that Fig. 9 The structure shown in the figure does not constitute a limitation on the computing device, except Fig. 9 In addition to the components shown, the computing device may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0087] The following is a detailed description of the implementation of the embodiment of the present application in conjunction with the accompanying drawings. The electronic map display method provided in the embodiment of the present application can be applied to different electronic map display scenarios. For example, a user checks the positional relationship between the current location and areas such as a school, room, and community, and the alarm system determines whether the capture location of an important person is far from a preset area. The present application does not specifically limit the application scenario of the electronic map display method.

[0088] The electronic map display method provided in the embodiment of the present application can be executed by an electronic device 10. For example, the electronic device 10 can be a smart watch, a mobile phone, a tablet computer, etc. The electronic device 10 is taken as an example of a mobile phone.

[0089] like Fig.10 As shown, the embodiment of the present application provides a method for displaying an electronic map, the method comprising the following steps:

[0090] S101: Receive a user instruction, where the user instruction instructs to display a positional relationship between a first location and a target area in an electronic map display window.

[0091] In some embodiments, the user instruction is an operation in which the user inputs the first location and the target area.

[0092] In some embodiments, the first location may be a location input by the user in the electronic map display window, and may be the user's address, a location that the user wants to go to, etc.

[0093] In some embodiments, the user instruction may be an operation input by the user in the electronic map display window to view the positional relationship between the first location and the target area. Fig.11 As shown, the user's mobile phone has an electronic map APP installed on it. The user enters the first location as point A and the target area as city B in the input box of the electronic map APP, and clicks the "View Location Relationship" control, which triggers the mobile phone to display the corresponding electronic map content in the electronic map display window.

[0094] In some embodiments, the user instruction may also be a voice instruction issued by the user to the electronic device. For example, the user says "open the electronic map APP to view the location relationship between point A and city B", thereby triggering the mobile phone to display the corresponding electronic map content in the electronic map display window.

[0095] S102: In response to a user instruction, display at least a portion of a boundary between the first location and the target area in an electronic map display window according to geographic location information of the target area and the first location.

[0096] The second location in the target area that is closest to the first location is located on at least a portion of the boundary.

[0097] In some embodiments, the electronic device determines the second location on the boundary of the target area that is closest to the first location based on the geographic location information of the target area and the first location, and then determines the area to be displayed including the first location and at least a portion of the boundary based on the geographic location information of the first location and the second location, and then displays the area to be displayed in the electronic map display window. In this way, it can be ensured that the first location and at least a portion of the boundary of the target area can be displayed in the electronic map display window, so that the user can know the positional relationship between the first location and the target area.

[0098] In some embodiments, the electronic device may calculate the distance between each location in the target area and the first location based on the geographic location information of each location in the target area, and further determine the second location in the target area that is closest to the first location.

[0099] In some embodiments, the electronic device determines a candidate area based on the geographic location information of the first location and the second location, and then expands the candidate area to obtain the area to be displayed. The first location and the second location are located at the boundary of the candidate area, the candidate area is located within the area to be displayed, and the boundary of the candidate area does not overlap with the boundary of the area to be displayed. In this way, the electronic device can display at least a portion of the boundary of the first location and the target area including the second location without obstruction, so that the user can clearly understand the positional relationship between the first location and the target area, thereby improving the user experience.

[0100] In some embodiments, the geographic location information includes longitude and latitude. When the longitude and latitude of the first location are different from those of the second location, the electronic device determines the rectangular area with the first location and the second location as diagonal points of the rectangular area, and uses the rectangular area as the candidate area. Since the shape of the electronic map window that can be displayed by most electronic devices is a rectangle, determining the rectangular candidate area based on the first location and the second location can present a better display effect, thereby improving the user experience.

[0101] In some embodiments, the electronic device determines the rectangular area with the first location and the second location as the diagonal points of the rectangular area. It can be specifically implemented as follows: the maximum longitude, maximum latitude, minimum longitude and minimum latitude are determined from the longitude and latitude of the first location and the second location, the location corresponding to the maximum longitude and maximum latitude is determined as the first vertex, the location corresponding to the maximum longitude and minimum latitude is determined as the second vertex, the location corresponding to the minimum longitude and minimum latitude is determined as the third vertex, and the location corresponding to the minimum longitude and maximum latitude is determined as the fourth vertex, to obtain a rectangular area with the first vertex, the second vertex, the third vertex and the fourth vertex as four vertices.

[0102] In some embodiments, the electronic device expands the candidate area to obtain the area to be displayed, which can be specifically implemented as follows: taking the sum of the maximum longitude and the longitude variable as the first longitude, taking the difference between the minimum longitude and the longitude variable as the second longitude, taking the sum of the maximum latitude and the latitude variable as the first latitude, taking the difference between the minimum latitude and the latitude variable as the second latitude, determining the location corresponding to the first longitude and the first latitude as the fifth vertex, determining the location corresponding to the first longitude and the second latitude as the sixth vertex, determining the location corresponding to the second longitude and the second latitude as the seventh vertex, and determining the location corresponding to the second longitude and the first latitude as the eighth vertex, and obtaining the area to be displayed with the fifth vertex, the sixth vertex, the seventh vertex, and the eighth vertex as the four vertices. Among them, the longitude variable is the product of the difference between the maximum longitude and the minimum longitude and the first preset enlargement ratio, and the latitude variable is the product of the difference between the maximum latitude and the minimum latitude and the second preset enlargement ratio.

[0103] For example, Fig.12As shown, the first location is outside the target area, the longitude of the first location is 117.75, and the latitude is 40.50, the longitude of the second location is 116.65, and the latitude is 39.98, then it can be determined that the maximum longitude is 117.75, the minimum longitude is 116.65, the maximum latitude is 40.50, and the minimum latitude is 39.98, and then it can be determined that the longitude of the first vertex is 117.75 and the latitude is 40.50, the longitude of the second vertex is 117.75 and the latitude is 39.98, the longitude of the third vertex is 116.65 and the latitude is 39.98, and the longitude of the fourth vertex is 116.65 and the latitude is 40.50, so that a rectangular area with the first vertex, the second vertex, the third vertex and the fourth vertex as four vertices can be obtained.

[0104] Next, based on Fig.12 ,like Fig.13 As shown, assuming that the first preset enlargement ratio and the second preset enlargement ratio are both 0.25, the longitude of the first location is 117.75, the latitude is 40.50, the longitude of the second location is 116.65, and the latitude is 39.98, then the longitude variable is (117.75-116.65)×0.25=0.275, and the latitude variable is (40.50-39.98)×0.25=0.13, and then it can be determined that the first longitude is 118.025 and the second longitude is 116 .375, the first latitude is 40.63, the second latitude is 39.85, then the longitude of the fifth vertex is 118.025, the latitude is 40.63, the longitude of the sixth vertex is 118.025, the latitude is 39.85, the longitude of the seventh vertex is 116.375, the latitude is 39.85, the longitude of the eighth vertex is 116.375, the latitude is 40.63, so that the area to be displayed with the fifth vertex, the sixth vertex, the seventh vertex, and the eighth vertex as the four vertices can be obtained. The display effect of this area to be displayed in the electronic map display window can be as follows Fig.14 shown.

[0105] Another example, such as Fig.15 As shown, the first location is within the target area, the longitude of the first location is 116.53, and the latitude is 39.92, the longitude of the second location is 116.45, and the latitude is 39.96, then it can be determined that the maximum longitude is 116.53, the minimum longitude is 116.65, the maximum latitude is 40.50, and the minimum latitude is 39.98, and then it can be determined that the longitude of the first vertex is 116.53 and the latitude is 39.96, the longitude of the second vertex is 116.53 and the latitude is 39.92, the longitude of the third vertex is 116.45 and the latitude is 39.92, and the longitude of the fourth vertex is 116.45 and the latitude is 39.96, so that a rectangular area with the first vertex, the second vertex, the third vertex and the fourth vertex as four vertices can be obtained.

[0106] Next, based on Fig.15 ,like Fig.16 As shown, assuming that the first preset enlargement ratio and the second preset enlargement ratio are both 0.25, the longitude of the first location is 116.53, the latitude is 39.92, and the longitude of the second location is 116.45, the latitude is 39.96, then the longitude variable is (116.53-116.45)×0.25=0.02, and the latitude variable is (39.96-39.92)×0.25=0.01, and then it can be determined that the first longitude is 116.55, the second longitude is 116.55, and the second longitude is 116.45. 6.43, the first latitude is 39.97, the second latitude is 39.91, then the longitude of the fifth vertex is 116.55, the latitude is 39.97, the longitude of the sixth vertex is 116.55, the latitude is 39.91, the longitude of the seventh vertex is 116.43, the latitude is 39.91, the longitude of the eighth vertex is 116.43, the latitude is 39.97, so that the area to be displayed with the fifth vertex, the sixth vertex, the seventh vertex, and the eighth vertex as the four vertices can be obtained. The display effect of this area to be displayed in the electronic map display window can be as follows Fig.17 shown.

[0107] In this way, the electronic device can accurately determine the rectangular candidate area based on the longitude and latitude of the first location and the second location, and then obtain the enlarged candidate area according to the first preset enlargement ratio and the second preset enlargement ratio, that is, the area to be displayed, so that at least a portion of the boundary of the first location and the target area containing the second location can be displayed in the electronic map display window without being blocked. When the first location is in the target area, the user can view the first location and a portion of the boundary of the target area from the electronic map display window, so as to know the degree to which the first location is deep into the target area. When the first location is outside the target area, the user can also view the first location and a portion of the boundary of the target area from the electronic map display window, so as to know the degree to which the first location is far from the target area. Therefore, whether the first location is in the target area or outside the target area, the display method of the electronic map provided by the embodiment of the present application can display the positional relationship between the first location and the target area in the electronic map display window, presenting a better display effect and bringing a better user experience.

[0108] In some embodiments, the first preset enlargement ratio and the second preset enlargement ratio may be determined by the developer of the electronic map according to the display effect of multiple experiments, or may be set by the user, or may be determined by the electronic device according to the size of the electronic map display window. For example, if the aspect ratio of the electronic map display window is 2:1, the actual distance between the longitude of the first location and the second location is 1500m, and the actual distance between the latitude of the first location and the second location is 1000m, then the electronic device may determine that the first preset enlargement ratio is 0.3 and the second preset enlargement ratio is 0.1, so that the aspect ratio of the area to be displayed obtained after the rectangular area is enlarged according to the first preset enlargement ratio and the second preset enlargement ratio is also 2:1.

[0109] Fig.10 The technical solution shown brings at least the following beneficial effects: the electronic device displays at least a portion of the boundary of the first location and the target area including the second location in the electronic map display window according to the geographic location information of the first location and the second location closest to the first location in the target area, so that the user can clearly and intuitively understand the positional relationship between the first location and the target area in the electronic map display window, such as the first location is within the target area, and the degree to which the first location penetrates into the target area, or the first location is outside the target area, and the degree to which the first location is far from the target area. The planned path between the first location and the target area is not displayed in the electronic map. When the user only wants to view the positional relationship between the first location and the target area, the user does not need to manually delete the path, and the user experience is better.

[0110] In some embodiments, the electronic device can also expand the candidate area by extending the line connecting the first location and the second location toward the opposite end to obtain the area to be displayed. For example, at the first location point A and the second location point B, the line segment AB is extended according to a preset extension ratio to obtain the line segment AC, and the line segment BA is extended to obtain the line segment BD. Then, a rectangular area is made with the line segment CD as the diagonal line, and this rectangular area is the area to be displayed obtained by expanding the candidate area.

[0111] In some embodiments, when the display window of the electronic map is not rectangular, the candidate area and the area to be displayed may not be rectangular. For example, if the electronic device is a smart watch with a circular surface, when viewing the electronic map through the smart watch, the display window of the electronic map is circular, and the electronic device determines the circular candidate area and the area to be displayed.

[0112] In some embodiments, when the first location and the second location have the same longitude or latitude, the electronic device determines the candidate area based on the geographic location information of the first location and the second location. This can be specifically implemented as follows: the rectangular area is determined with the first location and the second location being the midpoints of two relative boundaries of the rectangular area, and the rectangular area is used as the candidate area.

[0113] For example, assuming that the longitude of the first location is x1 and the latitude is y1, and the longitude of the second location is x1 and the latitude is y2, and the actual distance between point A and point B is determined to be L, and the aspect ratio of the electronic map display window is 2:1, then the aspect ratio of the rectangular area is also 2:1. When point A and point B are located on the two long sides of the rectangular area, the rectangular area is as follows: Fig.18 As shown in (a) of the figure, the length of the rectangular area is 2L and the width is L. When point A and point B are located on the two short sides of the rectangular area, the rectangular area is as follows: Fig.18 As shown in (b), the length of the rectangular area is L and the width is 0.5 L. When the latitudes of the first location A and the second location B are the same, the method for determining the rectangular area is the same as the above determination method, which will not be repeated.

[0114] In this way, even if the longitude or latitude of the first location and the second location are the same, the electronic device can determine a rectangular candidate area according to the longitude and latitude of the first location and the second location, and then can completely display the candidate area in the electronic map display window.

[0115] In some embodiments, Fig.19 As shown, the electronic device determines the area to be displayed including the first location and at least a portion of the boundary according to the geographic location information of the first location and the second location, which can also be implemented as the following steps:

[0116] S201. Determine a real distance between the first location and the second location based on geographic location information of the first location and the second location.

[0117] For example, assuming that the longitude of the first location is x1 and the latitude is y1, and the longitude of the second location is x2 and the latitude is y2, the distance can be calculated according to the distance calculation formula d=R×cos -1 [cos(y1)×cos(y2)×cos(x1-x2)+sin(y1)×sin(y2)] calculates the real distance between the first location and the second location. R represents the radius of the earth.

[0118] S202: Determine a target zoom level from a plurality of zoom levels preset in the electronic map display window according to the actual distance between the first location and the second location.

[0119] The zoom level represents the proportional relationship between the map distance between two points in the electronic map display window and the real distance between the two points.

[0120] In some embodiments, the electronic device determines the target zoom level from multiple zoom levels preset in the electronic map display window based on the actual distance between the first location and the second location. This can be specifically implemented as follows: based on the size of the electronic map display window, multiple area sizes of the electronic map display window corresponding to the multiple zoom levels are determined, and then based on the actual distance between the first location and the second location and the multiple area sizes, one of the zoom levels corresponding to the area that can fully display the first location and the second location is determined as the target zoom level.

[0121] Exemplarily, the preset multiple zoom levels may be as shown in Table 1. Assuming that there are 930 pixels on the hypotenuse of the electronic map display window, according to Table 1, the actual distance corresponding to 930 pixels in the 16th zoom level is 2000m, the actual distance corresponding to 930 pixels in the 17th zoom level is 1000m, and the actual distance corresponding to 930 pixels in the 18th zoom level is 500m. Assuming that the actual distance between the first location and the second location is 750m, any zoom level before the 18th zoom level may be determined as the target zoom level.

[0122] Table 1 Correspondence between preset zoom level, map distance and real distance

[0123]

[0124]

[0125] In this way, the electronic device determines the real distances corresponding to different zoom levels one by one, and determines the zoom level corresponding to the area that can fully display the first location and the second location as the target zoom level, so that when the electronic device displays the area to be displayed in the electronic map display window according to the target zoom level, it can fully display at least a portion of the boundary of the first location and the target area including the second location.

[0126] In some embodiments, when there are multiple zoom levels that can be used as the target zoom level, the electronic device determines the zoom level at which the real distance corresponding to the electronic map display window is closest to the real distance between the first location and the second location as the target zoom level. For example, assuming that there are 930 pixels on the hypotenuse of the electronic map display window, according to Table 1, the real distance corresponding to 930 pixels in the sixteenth zoom level is 2000m, the real distance corresponding to the seventeenth zoom level is 1000m, and the real distance corresponding to the eighteenth zoom level is 500m. Assuming that the real distance between the first location and the second location is 750m, the real distance corresponding to the electronic map display window in multiple zoom levels is greater than 750m and the closest to 750m is 1000m, then the target zoom level can be determined to be the seventeenth zoom level.

[0127] S203: Taking the midpoint of the line connecting the first location and the second location as the center point of the area to be displayed, and determining the area to be displayed according to the target zoom level and the size of the electronic map display window.

[0128] The shape of the area to be displayed matches the shape of the electronic map display window, and the area of ​​the area to be displayed is equal to the area of ​​the electronic map display window after scaling according to the target scaling level.

[0129] For example, Fig. 20 As shown in FIG. 1 , the first location A is outside the target area, the longitude of A is x1, the latitude is y1, and the longitude of the second location B is x2, the latitude is y2, then the midpoint C between A and B and the real distance between A and B can be determined. Assuming that the real distance between A and B is 750m, and the target zoom level determined by the electronic device based on the above Table 1 is the seventeenth zoom level, the area to be displayed can be as follows: Fig.21 As shown, the display effect of the area to be displayed in the electronic map display window can be as follows Fig. 22 shown.

[0130] Another example, such as Fig.23 As shown in FIG. 1 , the first location A is within the target area, the longitude of A is x1, the latitude is y1, and the longitude of the second location B is x2, the latitude is y2, then the midpoint C between A and B and the real distance between A and B can be determined. Assuming that the real distance between A and B is 750m, and the target zoom level determined by the electronic device based on the above Table 1 is the seventeenth zoom level, the area to be displayed can be as follows: Fig.24 As shown, the display effect of the area to be displayed in the electronic map display window can be as follows Fig.25 shown.

[0131] Fig.19 The technical solution shown brings at least the following beneficial effects: the electronic device calculates the real distance between the first location and the second location according to the geographical location information of the first location and the second location in the target area that is closest to the first location, and then determines the target zoom level from the preset multiple zoom levels, takes the midpoint of the line connecting the first location and the second location as the center point of the area to be displayed, and determines the area to be displayed according to the target zoom level. In this way, at least a part of the boundary of the first location and the target area including the second location can be completely displayed in the electronic map display window, so that the user can clearly perceive the positional relationship between the first location and the target area.

[0132] In some embodiments, when the first location is located on at least a portion of the boundary, step S102 can be specifically implemented as follows: using the first location as the center point of the area to be displayed, determining the area to be displayed, and then displaying the area to be displayed in the electronic map display window, wherein the shape of the area to be displayed matches the shape of the electronic map display window.

[0133] For example, if the electronic map display window is circular, then when the first location is located on at least a portion of the boundary, the electronic device can use the first location as the center and a preset radius to draw a circle, and the determined circular area is the area to be displayed. The preset radius can be set by the user or by the developer of the electronic map, and this embodiment of the application does not limit this.

[0134] In this way, since the first location is located on at least a portion of the boundary, when the first location is used as the center point of the area to be displayed, not only the first location can be displayed, but also the target area, the boundary of the target area, and a portion of the content outside the target area can be displayed, so that the user can clearly and intuitively understand the positional relationship between the first location and the target area.

[0135] In some embodiments, the electronic device may also identify the second location in the electronic map display window, and / or identify the real distance between the first location and the second location.

[0136] For example, Fig.26 As shown, in the electronic map display window, the first location is point A, the second location closest to point A in the target area is point B, and the actual distance between point A and point B is 750m.

[0137] In this way, the user can know more clearly in the electronic map display window the distance of the first location from the target area or the distance of the first location into the target area, which can improve the user's usage experience.

[0138] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of the method. In order to achieve the above functions, it includes hardware structures and / or software modules corresponding to the execution of each function. It should be easy to realize that the technical goals in this field are combined with the units and algorithm steps of each example described in the embodiments disclosed in this article, and the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical goals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0139] like Fig. 27As shown, the embodiment of the present application also provides an electronic map display device, which is used in the electronic map display method shown in the above method embodiment. The electronic map display device 400 includes: a receiving module 401, a display module 402 and a processing module 403.

[0140] The receiving module 401 is used to receive a user instruction, which indicates that the positional relationship between the first location and the target area is displayed in the electronic map display window. The display module 402 is used to respond to the user instruction and display at least a portion of the boundary between the first location and the target area in the electronic map display window according to the geographical location information of the target area and the first location; the second location in the target area that is closest to the first location is located on at least a portion of the boundary.

[0141] In one possible implementation, the processing module 403 is used to determine the second location on the boundary of the target area that is closest to the first location based on the geographic location information of the target area and the first location; the processing module 403 is also used to determine the area to be displayed including the first location and at least a portion of the boundary based on the geographic location information of the first location and the second location; the display module 402 is specifically used to display the area to be displayed in the electronic map display window.

[0142] In another possible implementation, the processing module 403 is specifically used to: determine a candidate area based on the geographic location information of the first location and the second location, and the first location and the second location are located at the boundary of the candidate area; expand the candidate area to obtain the area to be displayed, and the candidate area is located within the area to be displayed and the boundary of the candidate area does not overlap with the boundary of the area to be displayed.

[0143] In another possible implementation, the geographic location information includes longitude and latitude; the processing module 403 is specifically configured to determine the rectangular area with the first location and the second location as diagonal points of the rectangular area, and use the rectangular area as the candidate area.

[0144] In another possible implementation, the processing module 403 is specifically used to: determine the actual distance between the first location and the second location based on the geographic location information of the first location and the second location; determine the target zoom level from multiple zoom levels preset in the electronic map display window based on the actual distance between the first location and the second location; the zoom level represents the proportional relationship between the map distance between two points in the electronic map display window and the actual distance between the two points; take the midpoint of the line connecting the first location and the second location as the center point of the area to be displayed, and determine the area to be displayed based on the target zoom level and the size of the electronic map display window, the shape of the area to be displayed matches the shape of the electronic map display window, and the area of ​​the area to be displayed is equal to the area after the electronic map display window is scaled according to the target zoom level.

[0145] In another possible implementation, when the first location is located on at least a portion of the boundary, the processing module 403 is specifically used to determine the area to be displayed using the first location as the center point of the area to be displayed, and the shape of the area to be displayed matches the shape of the electronic map display window; the display module 402 is specifically used to display the area to be displayed in the electronic map display window.

[0146] It should be noted that Fig. 27 The division of modules in the example is schematic and is only a logical function division. There may be other division methods in actual implementation. For example, two or more functions may be integrated into one processing module. The above integrated modules may be implemented in the form of hardware or software function modules.

[0147] Another embodiment of the present application further provides an electronic map display device, such as Fig.28 As shown, the electronic map display device 500 includes a memory 501 and a processor 502; the memory 501 and the processor 502 are coupled; the memory 501 is used to store computer program codes, and the computer program codes include computer instructions. When the processor 502 executes the computer instructions, the electronic map display device 500 executes the various steps executed by the electronic map display device in the method flow shown in the above method embodiment.

[0148] In actual implementation, the receiving module 401, the display module 402 and the processing module 403 can be composed of Fig.28 The processor 502 shown is implemented by calling the computer program code in the memory 501. The specific execution process can refer to the description of the electronic map display method part above, which will not be repeated here.

[0149] Another embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a display device of an electronic map, the display device of the electronic map executes each step executed by the display device of the electronic map in the method flow shown in the above method embodiment.

[0150] Another embodiment of the present application also provides a computer system, which is applied to a display device of an electronic map. The computer system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from a memory of the display device of the electronic map and send the signal to the processor, wherein the signal includes a computer instruction stored in the memory. When the processor of the display device of the electronic map executes the computer instruction, the display device of the electronic map executes each step performed by the display device of the electronic map in the method flow shown in the above method embodiment.

[0151] In another embodiment of the present application, a computer program product is also provided. The computer program product includes computer instructions. When the computer instructions are executed on the display device of the electronic map, the display device of the electronic map executes each step executed by the display device of the electronic map in the method flow shown in the above method embodiment.

[0152] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer execution instruction is loaded and executed on the computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instruction can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by the computer or a data storage device such as a server, data center, etc. that contains one or more servers that can be integrated with the medium. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), etc.

[0153] The above is only a specific implementation of the present application. Those skilled in the art may conceive of changes or substitutions based on the specific implementation provided by the present application, which should all be included in the protection scope of the present application.

Claims

1. A method for displaying an electronic map, characterized in that: include: receiving a user instruction, wherein the user instruction instructs displaying a positional relationship between a first location and a target area in an electronic map display window; In response to the user instruction, displaying at least a portion of a boundary between the first location and the target area in the electronic map display window according to the geographical location information of the target area and the first location; a second location in the target area that is closest to the first location is located on the at least a portion of the boundary; The step of displaying at least a portion of a boundary between the first location and the target area in the electronic map display window according to the geographical location information of the target area and the first location includes: Determine, according to the geographical location information of the target area and the first location, a second location on the boundary of the target area that is closest to the first location; Determining, according to the geographic location information of the first location and the second location, an area to be displayed including the first location and the at least a portion of the boundary; The area to be displayed is displayed in the electronic map display window.

2. The display method according to claim 1, characterized in that: The determining, based on the geographical location information of the first location and the second location, a to-be-displayed area including the first location and the at least a portion of the boundary includes: Determine a candidate area according to the geographic location information of the first location and the second location, wherein the first location and the second location are located at a boundary of the candidate area; The candidate area is enlarged to obtain the area to be displayed, wherein the candidate area is located within the area to be displayed and a boundary of the candidate area does not overlap with a boundary of the area to be displayed.

3. The display method according to claim 2, characterized in that: The geographical location information includes longitude and latitude; In a case where the first location and the second location have different longitudes and different latitudes, determining the candidate area according to the geographic location information of the first location and the second location includes: The first location and the second location are used as diagonal points of a rectangular area, the rectangular area is determined, and the rectangular area is used as the candidate area.

4. The display method according to claim 1, characterized in that: The determining, based on the geographical location information of the first location and the second location, a to-be-displayed area including the first location and the at least a portion of the boundary includes: Determining a real distance between the first location and the second location according to the geographical location information of the first location and the second location; According to the real distance between the first location and the second location, a target zoom level is determined from a plurality of zoom levels preset in the electronic map display window; the zoom level represents a proportional relationship between a map distance between two points in the electronic map display window and a real distance between the two points; Taking the midpoint of the line connecting the first location and the second location as the center point of the area to be displayed, the area to be displayed is determined according to the target zoom level and the size of the electronic map display window, the shape of the area to be displayed matches the shape of the electronic map display window, and the area of ​​the area to be displayed is equal to the area after the electronic map display window is scaled according to the target zoom level.

5. The display method according to claim 1, characterized in that: In a case where the first location is located on the at least a portion of the boundary, displaying the first location and at least a portion of the boundary of the target area in the electronic map display window according to the geographical location information of the target area and the first location, further includes: Taking the first location as the center point of the area to be displayed, determining the area to be displayed, wherein the shape of the area to be displayed matches the shape of the electronic map display window; The area to be displayed is displayed in the electronic map display window.

6. An electronic map display device, characterized in that: include: A receiving module, configured to receive a user instruction, wherein the user instruction instructs to display a positional relationship between the first location and the target area in the electronic map display window; A display module is used for displaying at least a portion of a boundary between the first location and the target area in the electronic map display window in response to the user instruction and according to the geographical location information of the target area and the first location; a second location in the target area that is closest to the first location is located on the at least a portion of the boundary; A processing module is used to determine a second location on the boundary of the target area that is closest to the first location based on the geographic location information of the target area and the first location; the processing module is also used to determine an area to be displayed including the first location and at least a portion of the boundary based on the geographic location information of the first location and the second location; and the display module is specifically used to display the area to be displayed in the electronic map display window.

7. The display device according to claim 6, characterized in that: The processing module is specifically used to: determine a candidate area according to the geographical location information of the first location and the second location, the first location and the second location are located at the boundary of the candidate area; Expanding the candidate area to obtain the area to be displayed, wherein the candidate area is located in the area to be displayed and a boundary of the candidate area does not overlap with a boundary of the area to be displayed; The geographical location information includes longitude and latitude; the processing module is specifically used to determine the rectangular area with the first location and the second location as diagonal points of the rectangular area, and use the rectangular area as the candidate area; The processing module is specifically used to: determine the real distance between the first location and the second location according to the geographical location information of the first location and the second location; determine the target zoom level from multiple zoom levels preset in the electronic map display window according to the real distance between the first location and the second location; The zoom level represents the proportional relationship between the map distance between two points in the electronic map display window and the real distance between the two points; the midpoint of the line connecting the first location and the second location is used as the center point of the area to be displayed, and the area to be displayed is determined according to the target zoom level and the size of the electronic map display window, the shape of the area to be displayed matches the shape of the electronic map display window, and the area of ​​the area to be displayed is equal to the area after the electronic map display window is scaled according to the target zoom level; In the case where the first location is located on at least a portion of the boundary, the processing module is specifically used to determine the area to be displayed using the first location as the center point of the area to be displayed, and the shape of the area to be displayed matches the shape of the electronic map display window; the display module is specifically used to display the area to be displayed in the electronic map display window.

8. An electronic map display device, characterized in that: include: one or more processors; one or more memories; Wherein, the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic map display device executes the electronic map display method described in any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed on a computer, the computer is enabled to execute the method for displaying an electronic map according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Position determination method, device and equipment and storage medium

    CN112115219A

  • Method and device for adapting target area to display area by zooming, medium and equipment

    CN115145673A