Map data visualization method and device, electronic equipment and storage medium
By building a general map data visualization framework and interface extension classes, the high development and maintenance costs of iOS applications supporting multiple map types have been solved, achieving the effect of simplifying the development process and reducing costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN XIAOAN INFORMATION TECH CO LTD
- Filing Date
- 2022-10-21
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, when iOS applications support multiple map types, the development and maintenance costs are high, resulting in long development cycles and difficult maintenance.
By adopting a general map data visualization framework, and by building a general map view class and corresponding interface extension classes for each map type, and using general data structures and protocols, visualization operations for multiple map types can be realized, simplifying the development process and reducing costs.
By using a general map data visualization framework, it is possible to simplify the development process and reduce development and maintenance costs by only developing corresponding interface extensions when adding map types.
Smart Images

Figure CN115757666B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a map data visualization method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, with the widespread use of electronic maps in applications, and given the variety of types of electronic maps, if an iOS application needs to support multiple map types, it is necessary to develop a complete set of visualization operations for each map type during development. This incurs significant development costs, leads to long development cycles, affects development progress, and is also detrimental to later maintenance, resulting in substantial maintenance costs. Summary of the Invention
[0003] This invention provides a map data visualization method, apparatus, electronic device, and storage medium to address the shortcomings of high development and maintenance costs in existing technologies when applications support multiple map types.
[0004] This invention provides a map data visualization method, comprising:
[0005] A general map data visualization framework is defined and the current map type is set; the general map data visualization framework is adapted to map data visualization methods for various map types;
[0006] Based on the general map data visualization framework, the system receives the visualization type and visualization data from the front-end visualization request, applies the visualization type, the visualization data, and the general data structure to determine the general structure data, and uses the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface; the visualization interface is determined based on the general interface protocol and the visualization type.
[0007] According to a map data visualization method provided by the present invention, the general map data visualization framework includes: a general map view class and interface extension classes corresponding to each map type;
[0008] The method based on the general map data visualization framework receives the visualization type and visualization data from the front-end visualization request, applies the visualization type, the visualization data, and the general data structure to determine the general structure data, and uses the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface, including:
[0009] Based on the request interface in the general map view class, the visualization type and visualization data passed in by the front-end visualization request are received; and the mapping relationship between the visualization type and the general data structure is applied to encapsulate the visualization data into the general structure data;
[0010] Based on the execution interface in the general map view class, the interface extension class of the current map type is determined by applying the current map type and the interface extension classes corresponding to each map type; and the visualization interface in the interface extension class of the current map type is determined by applying the visualization type.
[0011] Based on the visualization interface in the interface extension class of the current map type, the general structure data is converted into map operation data of the current map type, and the map library corresponding to the current map type is applied to determine the visualization operation process. The visualization operation process is executed with the map operation data as parameters, and the execution result is visualized on the map interface.
[0012] According to a map data visualization method provided by the present invention, the step of setting the current map type includes:
[0013] Receive the map type selected by the user on the front end;
[0014] Based on the map type setting interface in the general map view class, the current map type is set to the map type selected by the front end.
[0015] According to a map data visualization method provided by the present invention, the visualization types include: marker type, polygon area type, distance type, and route planning type.
[0016] The present invention also provides a map data visualization method, comprising:
[0017] Receive the map type input from the front end and set the current map type in the general map data visualization framework to the map type input;
[0018] The system receives visualization requests sent from the front end, parses the requests to obtain visualization types and visualization data, and, based on the general map data visualization framework, applies the visualization type, the visualization data, and the general data structure to determine general structure data. Using the general structure data as parameters, it executes the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface. The visualization interface is determined based on the general interface protocol and the visualization type.
[0019] The present invention also provides a map data visualization device, comprising:
[0020] The determination module is used to determine a general map data visualization framework and set the current map type; the general map data visualization framework is compatible with map data visualization methods for various map types.
[0021] The visualization module is used to receive the visualization type and visualization data passed in from the front-end visualization request based on the general map data visualization framework, apply the visualization type, the visualization data and the general data structure to determine the general structure data, and use the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualize the execution result on the map interface; the visualization interface is determined based on the general interface protocol and the visualization type.
[0022] The present invention also provides a map data visualization device, comprising:
[0023] The map setting module is used to receive the map type input from the front end and set the current map type in the general map data visualization framework to the map type mentioned above.
[0024] The visualization operation module is used to receive visualization requests sent by the front end, parse the visualization requests to obtain the visualization type and visualization data, and, based on the general map data visualization framework, apply the visualization type, the visualization data, and the general data structure to determine the general structure data. Using the general structure data as parameters, it executes the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface. The visualization interface is determined based on the general interface protocol and the visualization type.
[0025] 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, wherein the processor executes the program to implement the map data visualization method as described above.
[0026] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the map data visualization method as described above.
[0027] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the map data visualization method as described above.
[0028] The map data visualization method, apparatus, electronic device, and storage medium provided by this invention, through a general map data visualization framework, construct interface extensions for multiple map types using a general protocol and visualization type. This enables the visualization of map data of a given map type to be visualized simply by developing the corresponding interface extension within the general map data visualization framework when an additional map type needs to be added. This simplifies the development process and reduces development and maintenance costs. Attached Figure Description
[0029] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0030] Figure 1 This is one of the flowcharts illustrating the map data visualization method provided by the present invention;
[0031] Figure 2 This is a framework diagram of the general map data visualization framework provided by the present invention;
[0032] Figure 3 This is the second flowchart illustrating the map data visualization method provided by the present invention;
[0033] Figure 4 This is one of the structural schematic diagrams of the map data visualization device provided by the present invention;
[0034] Figure 5 This is the second schematic diagram of the structure of the map data visualization device provided by the present invention;
[0035] Figure 6 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0036] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.
[0037] In the description of the embodiments of the present invention, it should be noted that the terms "upper," "lower," "front," "rear," "left," and "right," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of the present invention. In addition, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0038] In the description of the embodiments of the present invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "connected" and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of the present invention based on the specific circumstances.
[0039] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0040] Currently, iOS applications need to support multiple map types. This requires building different map type visualization operation interfaces in the map view class according to the SDK (Software Development Kit) of each map type during development. This leads to high development costs, a lot of repetitive work, longer development cycles, and great difficulty in later maintenance, resulting in high maintenance costs.
[0041] Therefore, how to reduce the development and maintenance costs of applications that support visualization operations of multiple map types is a technical problem that urgently needs to be solved by those skilled in the art.
[0042] To address the aforementioned technical problems, embodiments of the present invention provide a map data visualization method. Figure 1 This is one of the flowcharts illustrating the map data visualization method provided by this invention. For example... Figure 1 As shown, the method includes:
[0043] Step 110: Determine the general map data visualization framework and set the current map type; the general map data visualization framework is compatible with map data visualization methods for various map types;
[0044] Step 120: Based on the general map data visualization framework, receive the visualization type and visualization data passed in from the front-end visualization request, apply the visualization type, visualization data and general data structure to determine the general structure data, and use the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualize the execution result on the map interface; the visualization interface is determined based on the general interface protocol and visualization type.
[0045] Considering that the same visualization operations are not universal across different map types, it is necessary to create separate map view classes for each map type and build visualization operation functions in each view class, resulting in a lot of repetitive development work. Therefore, this embodiment of the invention constructs a general map data visualization framework, uses a general data protocol to build visualization extension classes, and passes general data structures as parameters between extension classes and map view classes, thereby reducing development costs and program testing costs, and reducing program problems caused by repetitive development work.
[0046] Specifically, a general map data visualization framework that adapts to various map types is first constructed. Then, the current map type in the general map data visualization framework is set. When the visualization request interface in the general map data visualization framework is called, the visualization type and visualization data passed in from the front-end visualization request are received. According to the visualization type, the corresponding structure for the visualization type is found in the general data structure, and the visualization data is written into the structure to obtain the general structure data. Then, according to the current map type, the interface extension class for the current map type is determined, and the visualization interface in the interface extension class is determined according to the visualization type. The general structure data is passed into the visualization interface, the visualization interface is executed, and the execution result is visualized on the map interface.
[0047] It should be noted that visualizing the results on the map interface can be achieved by setting the visualization data in the visualization interface and then calling the masking layer interface or pop-up bubble window interface provided by the map library corresponding to the current map type. This embodiment of the invention does not limit this. The general map data visualization framework can include one or more map view classes. In the case of a single map view class, the map view class can call and execute the interface extension class corresponding to the current map type. In the case of multiple map view classes, a map view class management class can be constructed to create map view classes corresponding to the current map type, and the created map view classes can call the interface extension classes corresponding to the current map type.
[0048] Furthermore, the general map data visualization framework supports various map types, each with corresponding interface extension classes. These interface extension classes are iOS extension classes for custom map visualization interfaces. The visualization interfaces within these extension classes are determined based on the visualization type and general protocol proposed by the development requirements. The general protocol defines the interface name, interface parameters, number of parameters, and parameter types. The general data structure is used to convert the visualization data requested by the front end into a general structure data to satisfy the visualization interface built according to the general protocol and visualization class conventions. In other words, the input and output parameters of the same interface in each interface extension class are the same.
[0049] On the other hand, the current map type can be configured manually by the user, or it can be automatically determined based on the map type installed in the system. This embodiment of the invention does not impose any restrictions on this. Visualization types can include marker types, navigation types, polygon types, support types, or pin types, etc., and this embodiment of the invention does not impose any restrictions on this. Visualization data corresponds to the visualization type; that is, different visualization data will exist depending on the visualization type. For example, the visualization data corresponding to the pin type is coordinates, and the visualization data corresponding to the navigation type is the start and end points. This embodiment of the invention does not impose any restrictions on this. The general data structure is a structure type. Depending on the operational requirements of the visualization type, the general data structure can be one or more structures, and this embodiment of the invention does not impose any restrictions on this.
[0050] The map data visualization method provided in this invention uses a general map data visualization framework to build interface extensions for multiple map types with common protocols and visualization types. This allows for the visualization of map data of a specific map type when an additional map type needs to be added. This simplifies the development process and reduces development and maintenance costs.
[0051] Based on the above embodiments, the general map data visualization framework includes: a general map view class and interface extension classes corresponding to each map type. Step 120 includes:
[0052] Step 121: Based on the request interface in the general map view class, receive the visualization type and visualization data passed in from the front-end visualization request; and apply the mapping relationship between the visualization type and the general data structure to encapsulate the visualization data into general structure data.
[0053] Step 122: Based on the execution interface in the general map view class, apply the current map type and the corresponding interface extension classes of each map type to determine the interface extension class of the current map type; and apply the visualization type to determine the visualization interface in the interface extension class of the current map type.
[0054] Step 123: Based on the visualization interface in the interface extension class of the current map type, convert the general structure data into map operation data of the current map type, apply the map library corresponding to the current map type, determine the visualization operation process, execute the visualization operation process with the map operation data as parameters, and visualize the execution result on the map interface.
[0055] Considering that each map type in the general map data visualization framework uses a map view class and is managed by a map view class management class, some repetitive work still occurs, resulting in high development and maintenance costs. Therefore, this embodiment of the invention uses a general map view class in the general map data visualization framework and directly calls the corresponding interface extension class through the current map type, which further reduces redundant development and lowers development and maintenance costs.
[0056] Specifically, a request interface and an execution interface are first constructed in the general map data visualization framework. When a user initiates a visualization-type operation on the front end, the request interface in the general map view class is called. This request interface responds to the call request, receives the visualization type and visualization data passed in, and determines the data structure corresponding to the visualization type based on the mapping relationship between the visualization type and the general data structure. Then, the visualization data structure is transformed into the general structure data. Next, based on the execution structure in the general map view class, the interface extension class corresponding to each map type is searched for according to the current map type. The interface extension class corresponding to the current map type is obtained, and the visualization interface in the interface extension class of the current map type is obtained and called. This visualization interface transforms the general structure data into map operation data corresponding to the current map type, determines the visualization operation process of the current visualization interface based on the map library corresponding to the current map type, executes the visualization operation process, and visualizes the execution result on the map interface.
[0057] It should be noted that the mapping relationship between the visualization type and the visualization interface in the interface extension class can be hard-coded in the code, or it can be configured through a configuration file and then read at runtime. This embodiment of the invention does not impose any restrictions on this. The interface extension class of the map type will define the visualization interface corresponding to the visualization type, and use the development package provided by the map library corresponding to the map type to implement the functions of each visualization interface, so as to complete the visualization operation function at runtime. Figure 2 This is a framework diagram of the general map data visualization framework provided by this invention. For example... Figure 2 As shown, in the general map data visualization framework, the general MapView (the general map view class), the first map interface extension class, the second map interface extension class, the third map interface extension class, and the subsequent Nth map interface extension class all follow the visualization type and the general interface protocol to construct visualization interfaces. Each visualization interface is implemented based on its corresponding map library (the first map interface extension class corresponds to the first map library, the second map interface extension class corresponds to the second map library, the third map interface extension class corresponds to the third map library, and so on, the Nth map interface extension class corresponds to the Nth map library). At runtime, after the user triggers a visualization operation on the front end, the external execution interface provided by the general MapView is called. The execution interface determines the visualization interface based on the visualization type input through the interface protocol and the general data structure, and converts the visualization data into general structure data as parameters for the visualization interface. Simultaneously, based on the current map type, the visualization interface in the interface extension class corresponding to the current map type is executed. The visualization interface executes the interface in the map library corresponding to the current map type based on its implemented operation flow, and the execution result is visualized on the map interface.
[0058] Based on the above embodiments, step 110, setting the current map type, includes:
[0059] Step 111: Receive the map type selected by the user on the front end;
[0060] Step 112: Based on the map type setting interface in the general map view class, set the current map type to the map type selected by the front end.
[0061] Specifically, the general map view class has a map type setting interface. When the map type selected by the user on the front end is received, the map type setting interface is called to set the current map type to the map type selected on the front end.
[0062] It should be noted that users can select the map type from the front end through the map page, the configuration page, or, based on the map type set on the interface before the request, trigger the event for setting the current map type first, and then trigger the operation event for the visualization type. This embodiment of the invention does not impose any restrictions on this. Then, the setting event can be triggered directly after selection, or the setting button can be clicked after selection; this embodiment of the invention does not impose any restrictions on this either.
[0063] Furthermore, when setting the current map type in the map type setting interface, it can first determine whether the current map type is the same as the current map type. If they are different, then the current map type is set to the currently selected map type. This embodiment of the invention does not impose any restrictions on this. Moreover, after this is completed, an extension class of the current map type can be set in the map view class for synchronous updating when setting the current map type. Then, the interface extension class of the map type cached by the member variable can be directly used in the execution interface of the map view class to reduce the judgment part during execution and improve execution efficiency. This embodiment of the invention does not impose any restrictions on this.
[0064] Based on the above embodiments, the present invention provides a preferred embodiment, in which the visualization types include: marker type, polygon region type, distance type, and route planning type.
[0065] Figure 3 This is the second flowchart illustrating the map data visualization method provided by this invention. For example... Figure 3 As shown, the map data visualization method provided in this embodiment of the invention includes:
[0066] Step 310: Receive the map type input from the front end and set the current map type in the general map data visualization framework as the map type;
[0067] Step 320: Receive the visualization request sent by the front end, parse the visualization request to obtain the visualization type and visualization data, and based on the general map data visualization framework, apply the visualization type, visualization data and general data structure to determine the general structure data, and use the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualize the execution result on the map interface; the visualization interface is determined based on the general interface protocol and visualization type.
[0068] The map data visualization method, apparatus, electronic device, and storage medium provided by this invention, through a general map data visualization framework, construct interface extensions for multiple map types using a general protocol and visualization type. This enables the visualization of map data of a given map type to be visualized simply by developing the corresponding interface extension within the general map data visualization framework when an additional map type needs to be added. This simplifies the development process and reduces development and maintenance costs.
[0069] The map data visualization device provided by the present invention is described below. The map data visualization device described below and the map data visualization method described above can be referred to in correspondence.
[0070] Figure 4 This is one of the structural schematic diagrams of the map data visualization device provided by the present invention. For example... Figure 4 As shown, the map data visualization device provided in this embodiment of the invention includes: a determination module 410 and a visualization module 420.
[0071] in,
[0072] Module 410 is used to determine the general map data visualization framework and set the current map type; the general map data visualization framework is adapted to map data visualization methods for various map types;
[0073] The visualization module 420 is used to receive the visualization type and visualization data passed in from the front-end visualization request based on the general map data visualization framework. It applies the visualization type, visualization data and general data structure to determine the general structure data, and uses the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface. The visualization interface is determined based on the general interface protocol and visualization type.
[0074] The map data visualization device provided in this embodiment of the invention includes a determining module for determining a general map data visualization framework and setting the current map type; the general map data visualization framework is compatible with map data visualization methods for various map types; and a visualization module for receiving the visualization type and visualization data from a front-end visualization request based on the general map data visualization framework, applying the visualization type, visualization data, and general data structure to determine general structure data, and using the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizing the execution result on the map interface; the visualization interface is determined based on the general interface protocol and visualization type, which enables the visualization operation of the map type data to be visualized by simply developing the interface extension corresponding to the added map type in the general map data visualization framework when a map type needs to be added, thus simplifying the development process and reducing development and maintenance costs.
[0075] Based on any of the above embodiments, the visualization module 420 includes:
[0076] The request receiving submodule is used to receive the visualization type and visualization data passed in from the front-end visualization request based on the request interface in the general map view class; and to encapsulate the visualization data into general structure data by applying the mapping relationship between the visualization type and the general data structure.
[0077] The interface determination submodule is used to determine the interface extension class of the current map type based on the execution interface in the general map view class, applying the current map type and the corresponding interface extension classes of each map type; and applying the visualization type to determine the visualization interface in the interface extension class of the current map type.
[0078] The visualization submodule is used to extend the visualization interface in the interface extension class based on the current map type, convert the general structure data into map operation data of the current map type, apply the map library corresponding to the current map type, determine the visualization operation process, execute the visualization operation process with the map operation data as parameters, and visualize the execution result on the map interface.
[0079] Based on any of the above embodiments, the determining module 110 includes:
[0080] The receive type submodule is used to receive the map type selected by the user on the front end;
[0081] The Set Type submodule is used to set the current map type to the map type selected by the front end based on the map type setting interface in the general map view class.
[0082] Figure 5 This is the second structural schematic diagram of the map data visualization device provided by the present invention. For example... Figure 5 As shown, the map data visualization device provided in this embodiment of the invention includes: a map setting module 510 and a visualization operation module 520.
[0083] in,
[0084] The map setting module 510 is used to receive the map type input from the front end and set the current map type in the general map data visualization framework as the map type;
[0085] The visualization operation module 520 is used to receive visualization requests sent by the front end, parse the visualization requests, obtain the visualization type and visualization data, and, based on the general map data visualization framework, apply the visualization type, visualization data and general data structure to determine the general structure data, and use the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualize the execution result on the map interface; the visualization interface is determined based on the general interface protocol and visualization type.
[0086] The map data visualization device provided in this embodiment of the invention includes a map setting module for receiving map types input from the front end and setting the current map type in the general map data visualization framework as the map type; and a visualization operation module for receiving visualization requests sent from the front end, parsing the visualization requests to obtain visualization types and visualization data, and, based on the general map data visualization framework, applying the visualization type, visualization data, and general data structure to determine general structure data, and using the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizing the execution result on the map interface. The visualization interface is determined based on the general interface protocol and the visualization type, which realizes that when a map type needs to be added, only the interface extension corresponding to the added map type needs to be developed in the general map data visualization framework to realize the visualization operation of the map type data, simplifying the development process and reducing development and maintenance costs.
[0087] Figure 6 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 6As shown, the electronic device may include a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute map data visualization. This method includes: determining a general map data visualization framework and setting the current map type; adapting the general map data visualization framework to map data visualization methods for various map types; based on the general map data visualization framework, receiving the visualization type and visualization data from a front-end visualization request, applying the visualization type, visualization data, and a general data structure to determine general structure data, and using the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizing the execution result on the map interface; the visualization interface is determined based on the general interface protocol and the visualization type.
[0088] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform map data visualization provided by the methods described above. The method includes: determining a general map data visualization framework and setting the current map type; adapting the general map data visualization framework to map data visualization methods for various map types; based on the general map data visualization framework, receiving the visualization type and visualization data passed in from the front-end visualization request, applying the visualization type, visualization data, and general data structure to determine general structure data, and using the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizing the execution result on the map interface; the visualization interface is determined based on the general interface protocol and the visualization type.
[0090] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements map data visualization provided by the methods described above. The method includes: determining a general map data visualization framework and setting the current map type; adapting the general map data visualization framework to map data visualization methods for various map types; based on the general map data visualization framework, receiving the visualization type and visualization data passed from a front-end visualization request, applying the visualization type, visualization data, and a general data structure to determine general structure data, and using the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizing the execution result on the map interface; the visualization interface is determined based on the general interface protocol and the visualization type.
[0091] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for visualizing map data, characterized in that, include: Define the general map data visualization framework and set the current map type; The general map data visualization framework is compatible with map data visualization methods for various map types; Based on the general map data visualization framework, the visualization type and visualization data passed in from the front-end visualization request are received. The visualization type, the visualization data and the general data structure are applied to determine the general structure data. The general structure data is used as a parameter to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and the execution result is visualized on the map interface. The visualization interface is determined based on a general interface protocol and visualization type; The general map data visualization framework includes: a general map view class and interface extension classes corresponding to each map type; The method based on the general map data visualization framework receives the visualization type and visualization data from the front-end visualization request, applies the visualization type, the visualization data, and the general data structure to determine the general structure data, and uses the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface, including: Based on the request interface in the general map view class, the visualization type and visualization data passed in by the front-end visualization request are received; and the mapping relationship between the visualization type and the general data structure is applied to encapsulate the visualization data into the general structure data; Based on the execution interface in the general map view class, the interface extension class of the current map type is determined by applying the current map type and the interface extension classes corresponding to each map type; and the visualization interface in the interface extension class of the current map type is determined by applying the visualization type. Based on the visualization interface in the interface extension class of the current map type, the general structure data is converted into map operation data of the current map type, and the map library corresponding to the current map type is applied to determine the visualization operation process. The visualization operation process is executed with the map operation data as parameters, and the execution result is visualized on the map interface.
2. The map data visualization method according to claim 1, characterized in that, The steps for setting the current map type include: Receive the map type selected by the user on the front end; Based on the map type setting interface in the general map view class, the current map type is set to the map type selected by the front end.
3. The map data visualization method according to claim 1 or 2, characterized in that, The visualization types include: marker type, polygon region type, distance type, and route planning type.
4. A method for visualizing map data, characterized in that, include: Receive the map type input from the front end and set the current map type in the general map data visualization framework to the map type input; The system receives a visualization request sent from the front end, parses the visualization request to obtain the visualization type and visualization data, and, based on the general map data visualization framework, applies the visualization type, the visualization data and the general data structure to determine the general structure data. Using the general structure data as parameters, the system executes the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface. The visualization interface is determined based on a general interface protocol and visualization type; The general map data visualization framework includes: a general map view class and interface extension classes corresponding to each map type; The process, based on the general map data visualization framework, applies the visualization type, the visualization data, and the general data structure to determine the general structure data. Using this general structure data as parameters, it executes the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualizes the execution result on the map interface. This includes: Based on the request interface in the general map view class, the visualization type and visualization data passed in from the front-end visualization request are received; and the mapping relationship between the visualization type and the general data structure is applied to encapsulate the visualization data into the general structure data. Based on the execution interface in the general map view class, the interface extension class of the current map type is determined by applying the current map type and the interface extension classes corresponding to each map type; and the visualization interface in the interface extension class of the current map type is determined by applying the visualization type. Based on the visualization interface in the interface extension class of the current map type, the general structure data is converted into map operation data of the current map type, and the map library corresponding to the current map type is applied to determine the visualization operation process. The visualization operation process is executed with the map operation data as parameters, and the execution result is visualized on the map interface.
5. A map data visualization device, characterized in that, include: The determination module is used to determine the general map data visualization framework and set the current map type; The general map data visualization framework is compatible with map data visualization methods for various map types; The visualization module is used to receive the visualization type and visualization data passed in from the front-end visualization request based on the general map data visualization framework, apply the visualization type, the visualization data and the general data structure to determine the general structure data, and use the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualize the execution result on the map interface. The visualization interface is determined based on a general interface protocol and visualization type; The visualization module includes: The request receiving submodule is used to receive the visualization type and visualization data passed in from the front-end visualization request based on the request interface in the general map view class; and to encapsulate the visualization data into general structure data by applying the mapping relationship between the visualization type and the general data structure. The interface determination submodule is used to determine the interface extension class of the current map type based on the execution interface in the general map view class, applying the current map type and the corresponding interface extension classes of each map type; and applying the visualization type to determine the visualization interface in the interface extension class of the current map type. The visualization submodule is used to extend the visualization interface in the interface extension class based on the current map type, convert the general structure data into map operation data of the current map type, apply the map library corresponding to the current map type, determine the visualization operation process, execute the visualization operation process with the map operation data as parameters, and visualize the execution result on the map interface.
6. A map data visualization device, characterized in that, include: The map setting module is used to receive the map type input from the front end and set the current map type in the general map data visualization framework to the map type mentioned above. The visualization operation module is used to receive visualization requests sent by the front end, parse the visualization requests to obtain visualization type and visualization data, and based on the general map data visualization framework, apply the visualization type, the visualization data and the general data structure to determine the general structure data, and use the general structure data as parameters to execute the visualization interface corresponding to the visualization type in the interface extension class of the current map type, and visualize the execution result on the map interface. The visualization interface is determined based on a general interface protocol and visualization type; The general map data visualization framework includes: a general map view class and interface extension classes corresponding to each map type; The visualization operation module is specifically used for: Based on the request interface in the general map view class, the visualization type and visualization data passed in from the front-end visualization request are received; and the mapping relationship between the visualization type and the general data structure is applied to encapsulate the visualization data into the general structure data. Based on the execution interface in the general map view class, the interface extension class of the current map type is determined by applying the current map type and the interface extension classes corresponding to each map type; and the visualization interface in the interface extension class of the current map type is determined by applying the visualization type. Based on the visualization interface in the interface extension class of the current map type, the general structure data is converted into map operation data of the current map type, and the map library corresponding to the current map type is applied to determine the visualization operation process. The visualization operation process is executed with the map operation data as parameters, and the execution result is visualized on the map interface.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the map data visualization method as described in any one of claims 1 to 4.
8. 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, it implements the map data visualization method as described in any one of claims 1 to 4.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the map data visualization method as described in any one of claims 1 to 4.