Browser side map coincidence correction method, device, equipment, medium and product
By creating a map container on the browser side and adjusting the layer service using a bias correction algorithm, the problem of layer overlay display complexity in the existing technology is solved, efficient layer overlap state detection and adjustment is achieved, and processing efficiency is improved.
Patent Information
- Application Number
- CN202411094292.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-27
AI Technical Summary
When the prior art processes the overlay display of two layer services, it is necessary to analyze the map image data, resulting in increased processing complexity and the overlapping state of the layer cannot be achieved efficiently.
By creating a map container, monitoring layer services with a level of up, using bias correction algorithms to directly adjust the layer services to achieve overlapping states of layers, without the need to analyze the specific map image data of map objects in the layer service.
Improve processing efficiency, simplify the detection and adjustment process of layer overlay misalignment, avoid dynamic update analysis of image data, and reduce processing complexity.
Smart Images

Figure CN119202423A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of map processing technology, and in particular to a browser-side map coincidence correction method, device, equipment, medium and product. Background Art
[0002] In daily development, we often encounter the need to overlay two layer services.
[0003] At present, in the existing technology, for the overlay display of two layer services, map image data corresponding to the layer service is usually used to analyze the map image data, and the overlapping and superimposing conditions are determined based on the map image data analysis results. This method of analyzing map image data requires obtaining the map image data inside the layer, determining the layer overlapping conditions based on the analysis of the map image data, and then dynamically updating and analyzing the map image data based on the layer overlapping conditions, thereby increasing the processing complexity. Summary of the invention
[0004] The present invention provides a browser-side map overlap correction method, device, equipment, medium and product, which are used to solve the defect of the prior art that the overlap of layers is determined based on the analysis of map image data, and the map image data is dynamically updated and analyzed based on the overlap of layers, thereby increasing the processing complexity. By creating a map container, a layer service is directly added to two maps with overlapping layouts, and the layer service superposition misalignment is determined by monitoring the layer service in the map container at the upper level, and the layer service in the map container is directly offset and adjusted based on the correction algorithm, so that the layers are in an overlapped state, and there is no need to analyze the specific map image data of the map object in the layer service, thereby improving the processing efficiency.
[0005] The present invention provides a browser-side map overlap correction method, comprising the following steps.
[0006] A first map container and a second map container are created with overlapping layouts; the level of the second map container is set below the level of the first map container, and the first map container and the second map container have the same size and position.
[0007] A first map object is created in a first map container and a first layer service is added, and a second map object is created in a second map container and a second layer service is added; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system.
[0008] When it is determined that the first layer service and the second layer service are misaligned due to superposition, the second layer service is adjusted according to the first layer service and the correction algorithm to determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlapped state.
[0009] According to a browser-side map overlap correction method provided by the present invention, it is determined that a first layer service and a second layer service are superimposed and misaligned, including: binding an event process for a first map object; wherein the event process includes a second map state of a second map object; wherein the second map state represents basic map data of the second map object; monitoring the first map object based on the event process to determine whether the event process is triggered; when it is determined that the event process is triggered, determining that the first layer service and the second layer service are superimposed and misaligned according to the first map state and the second map state; wherein the first map state represents the basic map data of the first map object.
[0010] According to a browser-side map overlap correction method provided by the present invention, when it is determined that a first layer service and a second layer service are superimposed and misaligned, the second layer service is adjusted according to the first layer service and a correction algorithm to determine a map correction result of the browser-side map overlap correction, including: when it is determined that the first layer service and the second layer service are superimposed and misaligned, the change information of the first map state is determined according to the first layer service; based on the correction algorithm, the coordinate system of the change information is converted to determine the target information; the second layer service is adjusted according to the target information to determine the map correction result.
[0011] According to a browser-side map overlap correction method provided by the present invention, a first map state includes a first map center, a first zoom level, a first horizontal angle, and a first tilt angle; determining change information of the first map state according to a first layer service includes: determining whether the first map center, the first zoom level, the first horizontal angle, and the first tilt angle of the first map state have changed according to the first layer service; when it is determined that the first map center, the first zoom level, the first horizontal angle, and the first tilt angle have changed, determining the change information.
[0012] According to a browser-side map overlap correction method provided by the present invention, the map basic data of the second map object includes the second map center; when the change information of the first layer service is determined to be the first map center, based on the correction algorithm, the coordinate system of the change information is converted to determine the target information, including: obtaining the first map center coordinates of the first map object according to the first map center; based on the correction algorithm, converting the coordinate system of the first map center coordinates to determine the second map center coordinates; determining the second map center coordinates as the second map center of the second map state, and determining the second map center of the second map state as the target information.
[0013] According to a browser-side map overlap correction method provided by the present invention, a first map container and a second map container with overlapping layouts are created, including: receiving a creation instruction; and creating the first map container and the second map container with overlapping layouts based on the creation instruction.
[0014] The present invention also provides a browser-side map overlap correction device, comprising the following modules.
[0015] The container creation module is used to create a first map container and a second map container with overlapping layouts; the level of the second map container is set below the level of the first map container, and the first map container and the second map container have the same size and position.
[0016] The layer adding module is used to create a first map object in a first map container and add a first layer service, and to create a second map object in a second map container and add a second layer service; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system.
[0017] The map correction module is used to adjust the second layer service according to the first layer service and the correction algorithm when it is determined that the first layer service and the second layer service are superimposed and misaligned, and determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlap state.
[0018] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the above-mentioned browser-side map overlap correction methods is implemented.
[0019] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements any of the above-mentioned browser-side map overlap correction methods.
[0020] The present invention also provides a computer program product, including a computer program, which implements any of the above-mentioned browser-side map overlap correction methods when executed by a processor.
[0021] The browser-side map overlap correction method, device, equipment, medium and product provided by the present invention are as follows: a first map container and a second map container with overlapped layouts are created; the level of the second map container is set below the level of the first map container, and the sizes and positions of the first map container and the second map container are the same; a first map object is created in the first map container and a first layer service is added, and a second map object is created in the second map container and a second layer service is added; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system; when it is determined that the first layer service and the second layer service are superimposed and misaligned, the second layer service is adjusted according to the first layer service and a correction algorithm to determine a map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlapped state. The technical solution of the present invention is used to solve the defect of the prior art that the overlap of layers is determined based on the analysis of map image data, and the map image data is dynamically updated and analyzed based on the overlap of layers, thereby increasing the processing complexity. By creating a map container, a layer service is directly added to two maps with overlapping layouts. By monitoring the layer service in the map container at the upper level, the overlay misalignment of the layer service is determined, and the layer service in the map container is directly offset and adjusted based on the correction algorithm, so that the layers are in an overlapping state. There is no need to analyze the specific map image data of the map object in the layer service, thereby improving the processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 It is a flow chart of the browser-side map overlap correction method provided by the present invention.
[0024] Figure 2 It is a structural schematic diagram of the browser-side map overlap correction device provided by the present invention.
[0025] Figure 3It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Combine the following Figure 1 The present invention describes a browser-side map overlap correction method. The present invention describes a browser-side map overlap correction method that can be applied to browser-side map overlap correction. The execution subject of the method can be an electronic device or a browser-side map overlap correction device disposed in the electronic device. The browser-side map overlap correction device can be implemented by software, hardware, or a combination of the two. Figure 1 : is a flow chart of the browser-side map overlap correction method provided by the present invention, such as Figure 1 As shown, the method includes the following steps.
[0028] Step 101: Create a first map container and a second map container with overlapping layouts.
[0029] In this step, the level of the second map container is set below the level of the first map container, and the first map container and the second map container have the same size and position.
[0030] Specifically, a first map container and a second map container are added to the browser page layout, the layouts of the first map container and the second map container overlap, and Cascading Style Sheets (CCS) are written to make the sizes and positions of the first map container and the second map container (DIVision, DIV) the same, and the level of the second map container is set under the level of the first map container.
[0031] For example, two DIV layouts with identity documents (ID) as mapContainer1 and mapContainer2 are determined, and two DIV layouts with IDs of mapContainer1 and mapContainer2 are added to the browser page layout. CSS styles are written to make the two DIV layouts the same size and position, with mapContainer2 at the bottom and mapContaienr1 at the top (mapContainer2 will be blocked by mapContainer1, so subsequent event monitoring needs to monitor mapContainer1).
[0032] In a specific implementation, creating a first map container and a second map container with overlapping layouts includes: receiving a creation instruction; and creating the first map container and the second map container with overlapping layouts based on the creation instruction.
[0033] In this step, the creation instruction is an instruction created by the user based on demand, and the creation instruction includes parameter information for creating the first map container and the second map container. The parameter information may be, for example, width, height, position, left and top, etc. This embodiment does not limit this.
[0034] Specifically, a creation instruction is received, and the width, height, position, left part and top part of the first map container and the second map container are determined according to the creation instruction. Based on the parameter information such as the width, height, position, left part and top part, the first map container and the second map container with overlapping layout are created.
[0035] Exemplarily, the width may be, for example, 1000 pixels, the height may be, for example, 800 pixels, the position may be, for example, absolute positioning, the left may be, for example, 0 pixels, and the top may be, for example, 0 pixels, etc. This embodiment does not limit this.
[0036] Step 102: Create a first map object in the first map container and add a first layer service, and create a second map object in the second map container and add a second layer service.
[0037] In this step, the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system.
[0038] Specifically, after creating a first map container and a second map container with overlapping layouts, the level of the second map container is set below the level of the first map container, and then the first map object is created using an open source map engine, and a first layer service of a latitude and longitude projection coordinate system is added to the first map object; at the same time, a second map object is created, and a second layer service of a pre-set standard encrypted projection coordinate system is added to the second map object.
[0039] Exemplarily, the open source map engine may be, for example, the Map class of Openlayers, the first map object may be, for example, map1 (the first map container's ID is the DIV of mapContainer1), and the first layer service may be, for example, a layer service of the WGS84 Web Mercator projection coordinate system; the second map object may be, for example, map2 (the second map container's ID is the DIV of mapContainer2), and the first layer service may be, for example, a layer service of the GCJ02 Web Mercator projection coordinate system, which is not limited in this embodiment.
[0040] Step 103: When it is determined that the first layer service and the second layer service are misaligned due to superposition, the second layer service is adjusted according to the first layer service and the correction algorithm to determine a map correction result for map overlap correction on the browser side.
[0041] In this step, the map correction result is used to determine whether the first layer service and the second layer service are in an overlapping state.
[0042] Specifically, the first map state of the first layer service is monitored at all times, event processing is bound to the first map object, the time processing includes logic for setting the second map state of the second map object, and when the event processing is triggered, it is determined that the first map state has changed, and a correction algorithm is used to adjust the second map state of the second layer service according to the change of the first map state of the first layer service, determine the map correction result of the map overlap correction on the browser side, and determine whether the first layer service of the first map object and the second layer service of the second map object are in an overlap state based on the correction result.
[0043] Exemplarily, when it is determined that the map center of the first map state has changed, the coordinate system of the map center of the first map state is converted by a correction algorithm, so that the map center of the second map state of the second layer service is adjusted based on the converted coordinate system. For example, the coordinate mapCenter1 of the map center of the first map object map1 is obtained, mapCenter1 is converted to mapCenter2 of the gcj02 coordinate system, and then the map center of the second map object map2 is set to mapCenter2. At this time, it is equivalent to performing a coordinate conversion on all the covering objects on the second map object map2, so as to achieve the effect of layer overlap and superposition. Monitoring the map center realizes the coordinate offset, and further monitoring can be performed on other map states of the first map state, such as the zoom level, horizontal angle and pitch angle of the first map state, which is not limited in this embodiment.
[0044] Listening to other map states can further achieve the state where two layers are in overlap.
[0045] The advantage of this setting is that the misalignment of the first layer service and the second layer service can be adjusted directly in the overlapping first map container and the second map container through the correction algorithm, so as to achieve the effect of overlapping layers and realize the superposition of layers in different coordinate systems. There is no need to worry about the dynamic update of layer data, which improves processing efficiency.
[0046] In a specific implementation, determining that a first layer service and a second layer service are misaligned by overlapping includes: binding an event process to a first map object; wherein the event process includes a second map state of the second map object; wherein the second map state represents basic map data of the second map object; monitoring the first map object based on the event process to determine whether the event process is triggered; when it is determined that the event process is triggered, determining that the first layer service and the second layer service are misaligned by overlapping based on the first map state and the second map state; wherein the first map state represents the basic map data of the first map object.
[0047] Specifically, the first map object is on top and the second map object is on the bottom. An event process is bound to the first map object, and the first map object is monitored based on the event process to determine whether the event process is triggered. When it is determined that the event process is triggered, it is determined that the first map state of the first map object is changed, and it is determined that the first layer service and the second layer service are superimposed and misaligned according to the first map state and the second map state.
[0048] The advantage of this setting is that the first map object is always monitored, loaded on demand, and the overlay misalignment of the layers is determined in a timely manner.
[0049] In a specific implementation, when it is determined that the first layer service and the second layer service are superimposed and misaligned, the second layer service is adjusted according to the first layer service and the correction algorithm to determine the map correction result of the browser-side map overlap correction, including: when it is determined that the first layer service and the second layer service are superimposed and misaligned, the change information of the first map state is determined according to the first layer service; based on the correction algorithm, the coordinate system of the change information is converted to determine the target information; the second layer service is adjusted according to the target information to determine the map correction result.
[0050] In this step, the correction algorithm is used to correct the misalignment of the superposition.
[0051] Specifically, when it is determined that the first layer service and the second layer service are superimposed and misaligned, the change information of the first map state is determined according to the first layer service; based on the correction algorithm, the coordinate system of the change information is converted to determine the target information; the second layer service is adjusted according to the target information to determine the map correction result.
[0052] In a specific embodiment, the first map state includes a first map center, a first zoom level, a first horizontal angle, and a first tilt angle; determining the change information of the first map state according to the first layer service includes: determining whether the first map center, the first zoom level, the first horizontal angle, and the first tilt angle of the first map state have changed according to the first layer service; when it is determined that the first map center, the first zoom level, the first horizontal angle, and the first tilt angle have changed, determining the change information.
[0053] Specifically, the first layer service is monitored through event processing to determine whether the first map center, the first zoom level, the first horizontal angle, and the first tilt angle of the first map state have changed. When it is determined that the first map center, the first zoom level, the first horizontal angle, and the first tilt angle have changed, the change information is determined. The change information may be, for example, that the first map center has changed, which is not limited in this embodiment.
[0054] In a specific implementation, the map basic data of the second map object includes a second map center; when the change information of the first layer service is determined to be the first map center, based on a correction algorithm, the coordinate system of the change information is converted to determine the target information, including: obtaining the first map center coordinates of the first map object according to the first map center; based on the correction algorithm, converting the coordinate system of the first map center coordinates to determine the second map center coordinates; determining the second map center coordinates as the second map center of the second map state, and determining the second map center of the second map state as the target information.
[0055] In this step, the target information is information obtained by adjusting the coordinates of the center of the first map to the center of the second map state based on a correction algorithm.
[0056] Specifically, when the change information of the first layer service is determined to be the first map center, the first map center coordinates of the first map object are obtained according to the first map center; based on the correction algorithm, the coordinate system of the first map center coordinates is converted to determine the second map center coordinates; the second map center coordinates are determined to be the second map center of the second map state, and the second map center of the second map state is determined as the target information.
[0057] The browser-side map overlap correction method provided by the present invention is as follows: a first map container and a second map container with overlapped layouts are created; the level of the second map container is set below the level of the first map container, and the sizes and positions of the first map container and the second map container are the same; a first map object is created in the first map container and a first layer service is added, and a second map object is created in the second map container and a second layer service is added; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system; when it is determined that the first layer service and the second layer service are superimposed and misaligned, the second layer service is adjusted according to the first layer service and a correction algorithm to determine a map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlapped state. The technical solution of the present invention is used to solve the defect of the prior art that the overlap of layers is determined based on the analysis of map image data, and the map image data is dynamically updated and analyzed based on the overlap of layers, thereby increasing the processing complexity. By creating a map container, a layer service is directly added to two maps with overlapping layouts. By monitoring the layer service in the map container at the upper level, the overlay misalignment of the layer service is determined, and the layer service in the map container is directly offset and adjusted based on the correction algorithm, so that the layers are in an overlapping state. There is no need to analyze the specific map image data of the map object in the layer service, thereby improving the processing efficiency.
[0058] The following is a description of the browser-side map overlap correction device provided by the present invention. The browser-side map overlap correction device described below and the browser-side map overlap correction method described above can be referenced to each other.
[0059] Figure 2 is a schematic diagram of the structure of the browser-side map overlap correction device provided by the present invention, referring to Figure 2As shown, the browser-side map overlap correction device 200 includes: a container creation module 201, a layer adding module 202 and a map correction module 203.
[0060] The container creation module 201 is used to create a first map container and a second map container with overlapping layouts; the level of the second map container is set below the level of the first map container, and the first map container and the second map container have the same size and position.
[0061] The layer adding module 202 is used to create a first map object in a first map container and add a first layer service, and to create a second map object in a second map container and add a second layer service; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system.
[0062] The map correction module 203 is used to adjust the second layer service according to the first layer service and the correction algorithm when it is determined that the first layer service and the second layer service are superimposed and misaligned, and determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlap state.
[0063] In an exemplary embodiment, the device further includes: a misalignment determination module. The misalignment determination module is used to determine that the first layer service and the second layer service are misaligned when being superimposed.
[0064] In an example embodiment, the misalignment determination module is specifically used to: bind an event processing for a first map object; wherein the event processing includes a second map state of a second map object; wherein the second map state represents basic map data of the second map object; based on the event processing, monitoring the first map object to determine whether the event processing is triggered; when it is determined that the event processing is triggered, determining that a first layer service and a second layer service are misaligned according to the first map state and the second map state; wherein the first map state represents the basic map data of the first map object.
[0065] In an exemplary embodiment, the map correction module 203 is specifically used to: when it is determined that the first layer service and the second layer service are superimposed and misaligned, determine the change information of the first map state according to the first layer service; based on the correction algorithm, convert the coordinate system of the change information to determine the target information; adjust the second layer service according to the target information to determine the map correction result.
[0066] In an example embodiment, the first map state includes a first map center, a first zoom level, a first horizontal angle, and a first tilt angle.
[0067] In an exemplary embodiment, the map correction module 203 determines change information of the first map state according to the first layer service, and is specifically used to: determine whether the first map center, the first zoom level, the first horizontal angle and the first tilt angle of the first map state have changed according to the first layer service; when it is determined that the first map center, the first zoom level, the first horizontal angle and the first tilt angle have changed, determine the change information.
[0068] In an exemplary embodiment, the base map data of the second map object includes a second map center.
[0069] In an example embodiment, the map correction module 203, when determining that the change information of the first layer service is the first map center, converts the coordinate system of the change information based on a correction algorithm to determine the target information, and is specifically used to: obtain the first map center coordinates of the first map object according to the first map center; based on the correction algorithm, convert the coordinate system of the first map center coordinates to determine the second map center coordinates; determine the second map center coordinates as the second map center of the second map state, and determine the second map center of the second map state as the target information.
[0070] In an exemplary embodiment, the container creation module 201 is specifically configured to: receive a creation instruction; and create a first map container and a second map container with overlapping layouts based on the creation instruction.
[0071] The device of this embodiment can be used to execute the method of any embodiment in the embodiment of the browser-side map overlap correction method side. Its specific implementation process and technical effects are similar to those in the embodiment of the browser-side map overlap correction method side. For details, please refer to the detailed introduction in the embodiment of the browser-side map overlap correction method side, which will not be repeated here.
[0072] Figure 3 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 3As shown, the electronic device may include: a processor 310 , a communications interface 320 , a memory 330 and a communication bus 340 , wherein the processor 310 , the communications interface 320 , and the memory 330 communicate with each other via the communication bus 340 . The processor 310 can call the logic instructions in the memory 330 to execute the browser-side map overlap correction method, which includes: creating a first map container and a second map container with overlapping layouts; the level of the second map container is set below the level of the first map container, and the sizes and positions of the first map container and the second map container are the same; creating a first map object in the first map container and adding a first layer service, creating a second map object in the second map container and adding a second layer service; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system; when it is determined that the first layer service and the second layer service are superimposed and misaligned, adjusting the second layer service according to the first layer service and the correction algorithm to determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlapping state.
[0073] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0074] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the browser-side map overlap correction method provided by the above methods, the method including: creating a first map container and a second map container with overlapping layouts; the level of the second map container is set below the level of the first map container, and the size and position of the first map container and the second map container are the same; creating a first map object in the first map container and adding a first layer service, creating a second map object in the second map container and adding a second layer service; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system; when it is determined that the first layer service and the second layer service are superimposed and misaligned, the second layer service is adjusted according to the first layer service and the correction algorithm to determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlapping state.
[0075] On the other hand, the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the browser-side map overlap correction method provided by the above-mentioned methods, the method comprising: creating a first map container and a second map container with overlapping layouts; the level of the second map container is set below the level of the first map container, and the sizes and positions of the first map container and the second map container are the same; creating a first map object in the first map container and adding a first layer service, creating a second map object in the second map container and adding a second layer service; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system; when it is determined that the first layer service and the second layer service are superimposed and misaligned, the second layer service is adjusted according to the first layer service and the correction algorithm to determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlapping state.
[0076] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A browser-side map overlap correction method, characterized in that: include: Create a first map container and a second map container with overlapping layouts; The level of the second map container is set below the level of the first map container, and the first map container and the second map container have the same size and position; Create a first map object in the first map container and add a first layer service, and create a second map object in the second map container and add a second layer service; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system; When it is determined that the first layer service and the second layer service are superimposed and misaligned, the second layer service is adjusted according to the first layer service and the correction algorithm to determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlapped state.
2. The browser-side map overlap correction method according to claim 1, characterized in that: Determining that the first layer service and the second layer service are overlaid and misaligned includes: Binding an event process to the first map object; wherein the event process includes a second map state of the second map object; wherein the second map state represents basic map data of the second map object; Monitoring the first map object based on the event processing to determine whether the event processing is triggered; When it is determined that the event processing is triggered, it is determined that the first layer service and the second layer service are misaligned based on the first map state and the second map state; wherein the first map state represents basic map data of the first map object.
3. The browser-side map overlap correction method according to claim 1, characterized in that: When it is determined that the first layer service and the second layer service are misaligned due to superposition, the second layer service is adjusted according to the first layer service and the correction algorithm to determine a map correction result of the browser-side map overlap correction, including: When it is determined that the first layer service and the second layer service are misaligned, determining the change information of the first map state according to the first layer service; Based on the correction algorithm, the coordinate system of the change information is transformed to determine the target information; The second layer service is adjusted according to the target information to determine the map correction result.
4. The browser-side map overlap correction method according to claim 3, characterized in that: The first map state includes a first map center, a first zoom level, a first horizontal angle, and a first tilt angle; and determining the change information of the first map state according to the first layer service includes: determining, according to the first layer service, whether the first map center, the first zoom level, the first horizontal angle, and the first tilt angle of the first map state have changed; When it is determined that the first map center, the first zoom level, the first horizontal angle, and the first tilt angle have changed, the change information is determined.
5. The browser-side map overlap correction method according to claim 4, characterized in that: The map basic data of the second map object includes a second map center; when it is determined that the change information of the first layer service is the first map center, converting the coordinate system of the change information based on the correction algorithm to determine the target information includes: Acquire the first map center coordinates of the first map object according to the first map center; Based on the correction algorithm, the coordinate system of the first map center coordinates is converted to determine the second map center coordinates; The second map center coordinates are determined as the second map center of the second map state, and the second map center of the second map state is determined as the target information.
6. The browser-side map overlap correction method according to claim 1, characterized in that: The step of creating the first map container and the second map container with overlapping layouts includes: Receive creation instructions; The first map container and the second map container with overlapping layouts are created based on the creation instruction.
7. A browser-side map overlap correction device, characterized in that: include: A container creation module, used to create a first map container and a second map container with overlapping layouts; The level of the second map container is set below the level of the first map container, and the first map container and the second map container have the same size and position; A layer adding module, used to create a first map object in the first map container and add a first layer service, and to create a second map object in the second map container and add a second layer service; wherein the first map object is an object of the first map container, the second map object is an object of the second map container, the first layer service is a layer service of a latitude and longitude projection coordinate system, and the second layer service is a layer service of a preset standard encrypted projection coordinate system; A map correction module is used to adjust the second layer service according to the first layer service and the correction algorithm when it is determined that the first layer service and the second layer service are superimposed and misaligned, and determine the map correction result of the browser-side map overlap correction; wherein the map correction result is used to determine whether the first layer service and the second layer service are in an overlap state.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements the browser-side map overlap correction method as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the browser-side map overlap correction method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the browser-side map overlap correction method as described in any one of claims 1 to 6 is implemented.
