Map architecture design method, device, terminal device and storage medium

By encapsulating and parameterizing map classes, two-dimensional map classes and three-dimensional map classes in GIS projects, the problem of low development efficiency of GIS projects is solved, and more efficient development and maintenance is achieved.

CN119691087BActive Publication Date: 2025-05-30LAY-OUT PLANNING CONSULTANTS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510192354.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-05-30
Estimated Expiration
2045-02-21

AI Technical Summary

Technical Problem

The existing GIS framework code needs to be recompiled when developing existing GIS projects, resulting in waste of human and material resources and low development efficiency.

Method used

By creating and encapsulating map classes, creating and encapsulating two-dimensional map classes and three-dimensional map classes in map classes, and configuring its subclasses parameters, implementing architecture-level encapsulation and subclass encapsulation.

Benefits of technology

It improves the development efficiency of GIS projects and enables developers to develop and maintain GIS projects more quickly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691087B_ABST
    Figure CN119691087B_ABST
Patent Text Reader

Abstract

This application is applicable to the field of computer technology, and provides a method, apparatus, terminal device and storage medium for map architecture design. Among them, the method includes: creating and encapsulating a map class; in the map class, creating and encapsulating a two-dimensional map class and a three-dimensional map class; creating a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class; performing parameter configuration on the first subclass and the second subclass. By encapsulating the two-dimensional map class and the three-dimensional map class at the architecture level, and also encapsulating the commonly used subclasses in the two-dimensional map class and the three-dimensional map class, the embodiments of this application are beneficial for developers to efficiently develop GIS projects and improve the efficiency of project development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer technology, and particularly relates to a method, device, terminal device, and storage medium for map architecture design. Background Art

[0002] In recent years, due to its functions such as spatial analysis, data integration, and visualization, the Geographic Information System (GIS) has been widely used in various fields of society. However, every time a new GIS project needs to be developed, it is necessary to recompile the GIS framework code, which is likely to consume a large amount of human and material resources, and the development efficiency is relatively low. Summary of the Invention

[0003] In view of this, embodiments of this application provide a method, device, terminal device, and storage medium for map architecture design to improve the development efficiency of GIS projects.

[0004] The first aspect of the embodiments of this application provides a method for map architecture design, and the method for map architecture design includes:

[0005] Create and encapsulate a map class;

[0006] In the map class, create and encapsulate a two-dimensional map class and a three-dimensional map class;

[0007] Create a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class;

[0008] Configure parameters for the first subclass and the second subclass.

[0009] In one embodiment, before creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class, it includes:

[0010] In the map class, create a map base map class;

[0011] In the map base map class, create and encapsulate a two-dimensional map base map class and a three-dimensional map base map class.

[0012] In one embodiment, creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class includes:

[0013] Based on the two-dimensional map class, create a first layer management class; wherein, the first layer management class is used to manage the vector data of the two-dimensional map class;

[0014] Based on the three-dimensional map class, create a second layer management class; wherein, the second layer management class is used to manage the vector data of the three-dimensional map class.

[0015] In one embodiment, creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class further includes:

[0016] Based on the two-dimensional map class, creating a first GeoJson class and a first tile class respectively; wherein, the first GeoJson class is used to manage the WFS data of the two-dimensional map, and the first tile class is used to manage the tile data of the two-dimensional map;

[0017] Based on the three-dimensional map class, creating a second GeoJson class and a second tile class respectively; wherein, the second GeoJson class is used to manage the WFS data of the three-dimensional map, and the second tile class is used to manage the tile data of the three-dimensional map.

[0018] In one embodiment, creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class further includes:

[0019] Based on the first GeoJson class of the two-dimensional map class, creating a first point class, a first line class, a first surface class, a first text class, a first icon class, a first white film class, a first heat map class, and a first aggregation class of the two-dimensional map respectively;

[0020] Based on the second GeoJson class of the three-dimensional map class, creating a second point class, a second line class, a second surface class, a second text class, a second icon class, a second white film class, a second heat map class, and a second aggregation class of the three-dimensional map respectively.

[0021] In one embodiment, creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class further includes:

[0022] Based on the two-dimensional map class, creating a first map tool class, a first model class, and a first legend class respectively;

[0023] Based on the three-dimensional map class, creating a second map tool class, a second model class, a 3dtiles class, and a second legend class respectively.

[0024] In one embodiment, parameter configuration of the first subclass and the second subclass includes:

[0025] Based on the second configuration objects of the point class, line class, surface class, text class, icon class, white film class, and heat map class passed in, performing parameter configuration on the first point class, first line class, first surface class, first text class, first icon class, first white film class, first heat map class, first aggregation class, and the second point class, second line class, second surface class, second text class, second icon class, second white film class, second heat map class, second aggregation class respectively;

[0026] Based on a third configuration object of the incoming map tool class, model class, and legend class, parameter configurations are respectively performed on the first map tool class, first model class, first legend class, the second map tool class, second model class, and second legend class.

[0027] In one embodiment, before creating and encapsulating the two-dimensional map class and three-dimensional map class in the map class, it further includes:

[0028] Based on the incoming first configuration object, parameter configuration is performed on the map class; wherein, the first configuration object includes a container DIV for loading the map.

[0029] According to the container DIV, a first container DIV for loading the two-dimensional map and a second container DIV for loading the three-dimensional map are created.

[0030] The third aspect of the embodiments of the present application provides a map architecture design device, including:

[0031] A first creation module, configured to create and encapsulate a map class;

[0032] A second creation module, configured to create and encapsulate a two-dimensional map class and a three-dimensional map class in the map class;

[0033] A third creation module, configured to create a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class;

[0034] A parameter configuration module, configured to perform parameter configuration on the first subclass and the second subclass.

[0035] The third aspect of the embodiments of the present application provides a terminal 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, the steps of the map architecture design method described in the first aspect of the embodiments of the present application are implemented.

[0036] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the map architecture design method described in the first aspect of the embodiments of the present application are implemented.

[0037] The map architecture design method provided in the first aspect of the embodiments of the present application creates and encapsulates a map class; in the map class, a two-dimensional map class and a three-dimensional map class are created and encapsulated; a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class are created; and the first subclass and the second subclass are configured with parameters. In this way, by encapsulating the two-dimensional map class and the three-dimensional map class at the architecture level and also encapsulating the common subclasses of the two-dimensional map class and the three-dimensional map class, it is beneficial for developers to efficiently develop GIS projects and improve the development efficiency of GIS projects.

[0038] It can be understood that the beneficial effects of the second to fourth aspects above can be referred to the relevant descriptions in the first aspect above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0040] Figure 1 is a schematic flowchart of a map architecture design method provided by an embodiment of the present application;

[0041] Figure 2 is a schematic diagram of a map class provided by an embodiment of the present application;

[0042] Figure 3 is a schematic structural diagram of a map architecture design device provided by an embodiment of the present application;

[0043] Figure 4 is a schematic structural diagram of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0044] In the following description, specific details such as specific system structures and technologies are proposed for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0045] It should also be understood that the term "and / or" as used in the specification and claims of the present application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0046] In addition, in the description of the specification and the appended claims of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be construed as indicating or implying relative importance.

[0047] The reference to "one embodiment" or "some embodiments" etc. described in the specification of the present application means that a specific feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, the statements "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "comprise", "include", "have" and their variants all mean "including but not limited to", unless otherwise specifically emphasized in another way. "A plurality" means "two" or "more than two".

[0048] In recent years, GIS has been widely applied in various fields of society. For example, in the field of urban planning, GIS is used to plan urban infrastructure, transportation networks, public facilities, etc.; in the field of environmental protection, GIS is used to monitor and manage environmental resources and conduct ecological impact assessments; in the field of disaster management, GIS is used to analyze disaster risks and plan emergency response routes; in the field of natural resource management, GIS is used to manage forests, water resources, mineral resources, etc.; in the field of business analysis, GIS is used to analyze market potential, determine retail store locations, and conduct customer segmentation; in the field of transportation and logistics, GIS is used to plan the best routes and optimize distribution processes, etc.; in the field of public health, GIS is used to monitor disease transmission and plan medical facilities.

[0049] However, every time a new GIS project needs to be developed, it is necessary to recompile the GIS framework code, which easily consumes a large amount of human and material resources and has a low development efficiency.

[0050] Therefore, the embodiment of the present application provides a method for designing a map architecture. By creating and encapsulating a map class; in the map class, creating and encapsulating a two-dimensional map class and a three-dimensional map class; creating a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class; and performing parameter configuration on the first subclass and the second subclass. The present application encapsulates the two-dimensional map class and the three-dimensional map class at the architecture level and also encapsulates the commonly used subclasses of the two-dimensional map class and the three-dimensional map class accordingly, which is beneficial for developers to develop GIS projects efficiently and improves the development efficiency of GIS projects.

[0051] Embodiment 1

[0052] As Figure 1As shown, the map architecture design method provided by the embodiments of the present application includes the following steps S1 to S4:

[0053] Step S1: Create and encapsulate a map class, and proceed to step S2.

[0054] In an application, a basic map class can be created and encapsulated to manage map-related functions. In this map class, various attributes (such as a list of locations, geographical information, etc.) and methods (such as adding a location, finding a location, calculating distance, etc.) can be included to facilitate the operation of map data. For example, a map class created and encapsulated in this step can be represented as LayoutMap, which is just an example here and not limited.

[0055] In one embodiment, before entering step S2, it further includes:

[0056] Based on the incoming first configuration object, configure the parameters of the map class; wherein, the first configuration object includes a container DIV for loading the map;

[0057] According to the container DIV, create a first container DIV for loading a 2D map and a second container DIV for loading a 3D map.

[0058] In an application, when the map class is instantiated, the basic attributes of the map class can be initialized by passing the first configuration object to the constructor. For example, when passing the options object (the first configuration object) {id: the container DIV for map loading, center: the initialization center point, pitch: the top-down angle, bearing: the deflection angle, zoom: the level, type: 2d / 3d} to the constructor of the map class LayoutMap.

[0059] Then, two DIVs are created respectively according to the container DIV for loading the map, namely the first container DIV and the second container DIV. Among them, the id of the first container DIV is options.id + '3d', and the id of the second container DIV is options.id + '2d'.

[0060] Step S2: In the map class, create and encapsulate a 2D map class and a 3D map class, and proceed to step S3.

[0061] In an application, when creating instance objects of the 2D map class and the 3D map class inside the constructor or method of the map class, the 2D map class can be created and encapsulated using mapbox, and the 3D map class can be created and encapsulated using ceisum. Or the 2D map class and the 3D map class can be created and encapsulated through other technologies or platforms, which is not limited here.

[0062] For example, the encapsulated 2D map class can be represented as MapboxMap, and the encapsulated 3D map class can be represented as CesiumMap.

[0063] In the application, when creating instances of the 2D map class and the 3D map class, by automatically calling the constructor, it can be used to initialize the basic properties of the map, such as setting the default map style, initializing the position of the map center point, setting the zoom level of the map, etc.

[0064] In the application, if the positioning type type of the map class is 2d, it is necessary to hide the first container DIV of options.id + '3d', and instantiate MapboxMap, receive it with this.mapboxMap and assign it to this.currMap, so as to access and operate on the 2D map object through the mapboxMap property and the currMap property later; if the positioning type type of the map class is 3d, it is necessary to hide the second container DIV of options.id + '2d', and instantiate CesiumMap, receive it with this.cesiumMap and assign it to this.currMap, so as to access and operate on the 3D map object through the cesiumMap property and the currMap property later.

[0065] In the application, if the current positioning type type is 2d and it is necessary to convert the positioning type type to 3d, the map level can be obtained through getZoom(), the resolution can be obtained through zoom, and according to the resolution, the radian of the center point, the level Zoom, the distance range from the center point to the camera can be obtained. The center point center can be directly obtained through the getCenter() method, the deflection angle pitch can be directly obtained through the getBearing() method, and the horizontal angle bearing can be directly obtained through the getBearing() method respectively. Finally, set the view linkage, set the camera to the center point and adjust the camera direction viewer.camera.setView({destination:Cesium.Cartesian3.fromDegrees(center[0], center[1], 0), orientaion:{pitch:-pitch, heading:360 + bearing, roll:0}}), and move the camera backward by a distance of range along the reverse direction of the view viewer.camera.moveBackward(range).

[0066] In an application, when the current positioning type "type" is 3D and it needs to be converted to 2D, it is the reverse of the above conversion. The resolution can be obtained through the camera height, and then the zoom level can be obtained from the resolution. The longitude and latitude can be converted from the center point of the canvas, and the deflection angle and horizontal angle can be obtained from the camera, thus realizing the conversion from 3D to 2D.

[0067] In one embodiment, before step S3, it further includes:

[0068] In the map class, create a map base map class;

[0069] In the map base map class, create and encapsulate a 2D map base map class and a 3D map base map class.

[0070] In an application, by creating a general map base map class, the same code logic can be reused in multiple projects, reducing repetitive work.

[0071] In an application, in Cesium, the UrlTemplateImageryProvider class can be used to create a 3D map base map class, and in Mapbox, a 2D map base map class can be created using raster layers or prefabricated styles encoding. Then, the prefabricated map base maps (Tianditu, electronic images published by Arcgis, terrain, map base style built by Mapbox Studio) are placed in the map base map class BottomLayer so that after the map is initialized, the user can control operations such as loading, deleting, switching, and adjusting the order of the map base maps through the BottomLayer instance according to the situation.

[0072] Step S3: Create a first subclass of the 2D map class and a second subclass of the 3D map class, and proceed to step S4.

[0073] In an application, a first subclass of the 2D map class can be created based on Mapbox, and a second subclass of the 3D map class can be created based on Cesium. See the following relevant descriptions for details.

[0074] In one embodiment, step S3 specifically includes:

[0075] Based on the 2D map class, create a first layer management class; wherein, the first layer management class is used to manage the vector data of the 2D map class;

[0076] Based on the 3D map class, create a second layer management class; wherein, the second layer management class is used to manage the vector data of the 3D map class.

[0077] In the application, after creating the first layer management class based on Mapbox and the second layer management class based on Cesium, every time vector data is added or deleted, corresponding addition and deletion of vector data should also be performed in the layer management. For example, when adding a data layer of the GeoJson class, the marker order index needs to be added to the this.vectorResourceList array; when adding a data layer of the tile class, the marker order index needs to be added to the this.imgResourceList array; by modifying the index and executing the resetVectorIndex method (for the GeoJson class) or the resetImgIndex method (for the tile class), the upper and lower layer order of the layers can be adjusted.

[0078] In the application, in the map class LayoutMap, when switching the map base map, through the def algorithm, the vectorResourceList in the instance of the first layer management class ResourceManage and the imgResourceList array in the instance of the second layer management class ResourceManage can be compared one by one. If there is a new addition, the corresponding new layer is executed; if there is a deletion, the corresponding layer deletion is executed. Regarding the order issue, by modifying the index and executing the resetVectorIndex method (for the GeoJson class) or the resetImgIndex method (for the tile class), the order of the layers can be adjusted.

[0079] In one embodiment, step S3 specifically further includes:

[0080] Based on the two-dimensional map class, a first GeoJson class and a first tile class are respectively created; wherein, the first GeoJson class is used to manage the WFS data of the two-dimensional map, and the first tile class is used to manage the tile data of the two-dimensional map;

[0081] Based on the three-dimensional map class, a second GeoJson class and a second tile class are respectively created; wherein, the second GeoJson class is used to manage the WFS data of the three-dimensional map, and the second tile class is used to manage the tile data of the three-dimensional map.

[0082] In the application, WFS (Web Feature Service) is a standard protocol formulated by the Open Geospatial Consortium for publishing and accessing geographic vector data on the network. WFS allows client applications to query and retrieve geographic features from the server, and these features are usually geographic elements such as points and lines in vector format.

[0083] In the application, a first GeoJson class is created based on Mapbox. According to the incoming geoType parameter, the type of vector data class to be loaded is dynamically selected. According to the incoming options parameter, the corresponding vector data class is instantiated and loaded into the 2D map. A second GeoJson class is created based on Cesium. According to the incoming geoType parameter, the type of vector data class to be loaded is dynamically selected. According to the incoming options parameter, the corresponding vector data class is instantiated and loaded into the 3D map.

[0084] In the application, when creating the first tile class based on Mapbox, it can be encapsulated using Raste. When creating the second tile class based on Cesium, it can be encapsulated using WebMapServiceImageryProvider. The parameters passed into the above two tile classes Tile are the same, and the built-in attributes and methods are also the same. When loading the tile layer, an options object {url: tile address, width: tile width, height: tile height, format: format, opacity: transparency, filter: filter condition, id: layer id, bbox: tile service boundary, index: layer order, srs: coordinate system} is passed into the instantiated Tile, and the built-in attribute options is used to receive it in the Tiles constructor. There are methods such as moving the layer order, setting the index, filtering the layer, setting the transparency, setting the display / hide, adding, and deleting layers in the created tile class. When the user executes the built-in methods, the parameters corresponding to the built-in attribute this.options are also modified.

[0085] In one embodiment, step S3 specifically further includes:

[0086] Based on the first GeoJson class of the 2D map class, the first point class, the first line class, the first polygon class, the first text class, the first icon class, the first white film class, the first heat map class, and the first aggregation class of the 2D map are respectively created;

[0087] Based on the second GeoJson class of the 3D map class, the second point class, the second line class, the second polygon class, the second text class, the second icon class, the second white film class, the second heat map class, and the second aggregation class of the 3D map are respectively created.

[0088] In the application, when creating the first point class based on Mapbox, it can be encapsulated using a circle, and when creating the second point class based on Cesium, it can be encapsulated using the point in Entity. The parameters passed to the above two point classes Point are the same, and the built-in properties and methods are also the same; when loading the point class, an options object {geojson: data source, opacity: transparency, filter: filtering condition, id: layer id, index: layer order, width: width of the point, color: color of the point, lineWidth: color of the outer line, lineOpacity: transparency of the outer line} is passed to the instantiated Point, and the built-in property this.options is used to receive it in the Point constructor. There are methods for moving the layer order, setting the index, filtering the layer, setting the layer style, setting the layer to show or hide, adding or deleting layers, etc. in the created point class. When the user executes the built-in methods, the corresponding parameters of the built-in property this.options are also modified.

[0089] In the application, when creating the first line class based on Mapbox and the second line class based on Cesium, the parameters passed to these two line classes Polyline are the same, and the built-in properties and methods are also the same; when loading the line class, an options object {geojson: data source, index: layer order, id: layer, opacity: line transparency, lineWidth: line width, lineColor: line color, lineStyle: line style, offset: line offset in pixels, filter: filtering condition} is passed to the instantiated Polyline, and the built-in property this.options is used to receive it in the Polyline constructor. There are methods for moving the layer order, setting the index, filtering the layer, setting the layer style, setting the layer to show or hide, adding or deleting layers, etc. in the created line class. When the user executes the built-in methods, the corresponding parameters of the built-in property this.options are also modified.

[0090] In the application, when creating the first polygon class based on Mapbox and the second polygon class based on Cesium, the parameters passed to the two polygon classes Polygon are the same, and the built-in properties and methods are also the same. When loading the polygon class, an options object {geojson: data source, index: layer order, id: layer, opacity: polygon transparency, lineWidth: width of the polygon's boundary line, lineColor: color of the polygon's boundary line, lineStyle: style of the polygon's boundary line, lineOpacity: transparency of the line, filter: filtering condition} is passed to the instantiated Polygon, and the built-in property this.options is used to receive it in the Polygon constructor. There are methods for moving the layer order, setting the index, filtering the layer, setting the layer style, setting the layer to be shown or hidden, adding or deleting layers, etc. in the created polygon class. When the user executes the built-in methods, the corresponding parameters of the built-in property this.options are also modified.

[0091] In the application, when creating the first text class based on Mapbox and the second text class based on Cesium, the parameters passed to the two text classes Label are the same, and the built-in properties and methods are also the same. When loading the text class, an options object {geojson: data source, index: layer order, id: layer, field: field for displaying the layer, textOverlap: whether to perform collision detection, color: font color, fontSize: font size, bgColor: background color, offset: offset, opacity: transparency, filter: filtering condition} is passed to the instantiated Label, and the built-in property this.options is used to receive it in the Label constructor. There are methods for moving the layer order, setting the index, filtering the layer, setting the layer style, setting the layer to be shown or hidden, adding or deleting layers, etc. in the created text class. When the user executes the built-in methods, the corresponding parameters of the built-in property this.options are also modified.

[0092] In the application, when creating the first icon class based on Mapbox and the second icon class based on Cesium, the parameters passed to the Billboard of these two icon classes are the same, and the built-in properties and methods are also the same. When loading the icon class, an options object {geojson: data source, index: layer order, id: layer, width: icon width, height: icon height, imgOverLap: whether collision testing is supported, url: icon, offset: offset, opacity: transparency, filter: filtering condition} is passed to the instantiated Billboard, and the built-in property this.options is used to receive it in the Billboard constructor. There are methods for moving the layer order, setting the index, filtering the layer, setting the layer style, setting the layer to be shown or hidden, adding or deleting layers, etc. in the created icon class. When the user executes the built-in methods, the parameters corresponding to the built-in property this.options are also modified.

[0093] In the application, when creating the first white film class based on Mapbox and the second white film class based on Cesium, the parameters passed to the CubePolygon of these two white film classes are the same, and the built-in properties and methods are also the same. When loading the white film class, an options object {geojson: data source, index: layer order, id: layer, height: white film height, baseHeight: reference height, color: white film color, opacity: transparency, filter: filtering condition} is passed to the instantiated CubePolygon, and the built-in property this.options is used to receive it in the CubePolygon constructor. There are methods for moving the layer order, setting the index, filtering the layer, setting the layer style, setting the layer to be shown or hidden, adding or deleting layers, etc. in the created white film class. When the user executes the built-in methods, the parameters corresponding to the built-in property this.options are also modified.

[0094] In the application, when creating the first heat map class based on Mapbox and the second heat map class based on Cesium, the parameters passed to the HeatMap of these two heat map classes are the same, and the built-in properties and methods are also the same. When loading the heat map class, an options object {geojson: data source, radius: hotspot radius, scale: blur scale, colorRange: heat map color value range, opacity: transparency, filter: filtering condition} is passed to the instantiated HeatMap, and the built-in property this.options is used to receive it in the HeatMap constructor. When the user executes the built-in methods, the parameters corresponding to the built-in property this.options are also modified.

[0095] In the application, when creating the first aggregation class based on Mapbox and the second aggregation class based on Cesium, the parameters passed to the two aggregation classes are the same, and the built-in properties and methods are also the same; when loading the aggregation class, pass the options object {geojson: data source, url: icon of the aggregation class, distance: aggregation distance} to the instantiated Aggregation, and receive it with the built-in property this.options in the Aggregation constructor. When the user executes the built-in method, the corresponding parameters of the built-in property this.options are also modified.

[0096] In one embodiment, step S3 specifically further includes:

[0097] Based on the two-dimensional map class, create a first map tool class, a first model class and a first legend class respectively;

[0098] Based on the three-dimensional map class, a second map tool class, a second model class, a 3dtiles class and a second legend class are created respectively.

[0099] In the application, when the first map tool class is created based on Mapbox and the second map tool class is created based on Cesium, these two tool classes MapTool contain a scale (displaying the map zoom ratio), a zoom in button (zooming in on a certain area of ​​the map), a zoom out button (reducing the map area), a full screen button (displaying the map in full screen), a base map loading button (clicking the map loading button to display the map list, switching the map to execute the base map switching method of the BottomLayer class), a two- and three-dimensional switching button (executing the map switching method in the LayoutMap class), a compass (displaying the direction), and a perspective restore button (restored to the initialized position).

[0100] In the application, when creating the first model class based on Mapbox and the second model class based on Cesium, instantiate the custom type in Mapbox and load the model with the help of three.js or deck.gl plug-in. Cesium is loaded through the model in entity.

[0101] In the application, create the first legend class based on Mapbox and the second model class based on Cesium, and mount them to their respective map classes. You can load the layer according to the layer management class ResourceManage of each map class and dynamically display different layer legends.

[0102] In an application, a 3DTiles class is created according to Cesium, a three-dimensional bounding box is constructed, and through matrix transformation, operations such as rotation, displacement, and scaling can be performed on the objects loaded by 3DTiles.

[0103] Step S4: Configure parameters for the first subclass and the second subclass.

[0104] In an application, for different subclasses, the two-dimensional map class and the three-dimensional map class can be configured with parameters based on the same data, so as to ensure that the configurations of the same subclasses in different map classes are the same.

[0105] In one embodiment, step S4 specifically includes:

[0106] Based on the second configuration objects of the incoming point class, line class, surface class, text class, icon class, white film class, and heat map class, respectively configure parameters for the first point class, first line class, first surface class, first text class, first icon class, first white film class, first heat map class, first aggregation class, and the second point class, second line class, second surface class, second text class, second icon class, second white film class, second heat map class, second aggregation class;

[0107] Based on the third configuration objects of the incoming map tool class, model class, and legend class, respectively configure parameters for the first map tool class, first model class, first legend class, and the second map tool class, second model class, second legend class.

[0108] In an application, when loading the first point class or the second point class, an options object (i.e., the second configuration object) {geojson: data source, opacity: transparency, filter: filtering condition, id: layer id, index: layer order, width: width of the point, color: color of the point, lineWidth: color of the outer line, lineOpacity: transparency of the outer line} is passed to the instantiated Point, and is received by the built-in property this.options in the Point constructor.

[0109] In an application, when loading the first line class or the second line class, an options object (i.e., the second configuration object) {geojson: data source, index: layer order, id: layer, opacity: line transparency, lineWidth: line width, lineColor: line color, lineStyle: line style, offset: line offset in pixels, filter: filtering condition} is passed to the instantiated Polyline, and is received by the built-in property this.options in the Polyline constructor.

[0110] In the application, when loading the first face class or the second face class, an options object {geojson: data source, index: layer order, id: layer, opacity: face transparency, lineWidth: width of the face's boundary line, lineColor: color of the face's boundary line, lineStyle: style of the face's boundary line, lineOpcity: transparency of the line, filter: filtering condition} is passed to the instantiated Polygon and received by the built-in property this.options in the Polygon constructor. When loading the text class, an options object {geojson: data source, index: layer order, id: layer, field: field for displaying the layer, textOverlap: whether to perform collision detection, color: font color, fontSize: font size, bgColor: background color, offset: offset, opacity: transparency, filter: filtering condition} is passed to the instantiated Label and received by the built-in property this.options in the Label constructor.

[0111] In the application, when loading the first icon class or the second icon class, an options object {geojson: data source, index: layer order, id: layer, width: icon width, height: icon height, imgOverLap: whether to support collision testing, url: icon, offset: offset, opacity: transparency, filter: filtering condition} is passed to the instantiated Billboard and received by the built-in property this.options in the Billboard constructor.

[0112] In the application, when loading the first white film class or the second white film class, an options object {geojson: data source, index: layer order, id: layer, height: white film height, baseHeight: reference height, color: white film color, opacity: transparency, filter: filtering condition} is passed to the instantiated CubePolygon and received by the built-in property this.options in the CubePolygon constructor.

[0113] In the application, when loading the first heat map class or the second heat map class, an options object {geojson: data source, radius: hotspot radius, scale: blur scale, colorRange: heat map color value range, opacity: transparency, filter: filtering condition} is passed to the instantiated HeatMap and received by the built-in property this.options in the HeatMap constructor.

[0114] In the application, when loading the first or second aggregation class, pass the options object {geojson: data source, url: icon of the aggregation class, distance: aggregation distance} to the instantiated Aggregation, and receive it with the built-in property this.options in the Aggregation constructor.

[0115] In the application, when the first map tool class or the second map tool class is loaded, the scale, zoom in button, zoom out button, full screen button, base map loading button, 2D and 3D switching button, compass, perspective restore button, etc. are configured accordingly.

[0116] In the application, the first model class can be loaded by using the three.js or deck.gl plug-in; the second model class can be loaded through the model in the entity.

[0117] In the application, the first legend class is mounted to the two-dimensional map class, and the layer situation can be loaded according to the layer management class ResourceManage of the two-dimensional map class, and different layer legends can be dynamically displayed; the second model class is mounted to the two-dimensional map class, and the layer situation can be loaded according to the layer management class ResourceManage of the three-dimensional map class, and different layer legends can be dynamically displayed.

[0118] In the application, you can use matrix transformation to rotate, displace, scale, and perform other operations on objects loaded by 3dtiles.

[0119] In the application, a structure of the map class created by this application is as follows Figure 2 shown.

[0120] In the application, the two-dimensional and three-dimensional maps designed by the map architecture design method provided by the embodiment of the present application can be used independently. When the two-dimensional and three-dimensional perspectives are switched back and forth, the scene perspective can be restored synchronously. When the map type is switched, the basic vector type is compared and processed through the layer management class, so that the vector layer of the map after switching is consistent with the vector layer of the map before switching, which is more convenient to use. In addition, the designed two-dimensional map supports perspective tilt, can load white film, and can also load obj, gltf, glb and other format models, and supports some 3D services.

[0121] This application encapsulates two-dimensional and three-dimensional maps and various commonly used subclasses. For different GIS projects, two-dimensional maps and three-dimensional maps can be used separately, or two-dimensional and three-dimensional maps can be used in combination, so that non-GIS-based front-end development can be used quickly, which is beneficial to the efficiency of GIS project development.

[0122] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not imply the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0123] Embodiment 2

[0124] The embodiment of the present application further provides a map architecture design device for executing the method steps in the above method embodiment of the map architecture design method. The device may be a virtual appliance in a terminal device, run by a processor of the terminal device, or the terminal device itself.

[0125] As Figure 3 shown, the map architecture design device 100 provided by the embodiment of the present application includes:

[0126] A first creation module 101, configured to create and encapsulate a map class;

[0127] A second creation module 102, configured to create and encapsulate a two-dimensional map class and a three-dimensional map class in the map class;

[0128] A third creation module 103, configured to create a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class;

[0129] A parameter configuration module 104, configured to perform parameter configuration on the first subclass and the second subclass.

[0130] In one embodiment, the map architecture design device 100 further includes a fourth creation module 105, configured to:

[0131] Create a map base map class in the map class;

[0132] Create and encapsulate a two-dimensional map base map class and a three-dimensional map base map class in the map base map class.

[0133] In one embodiment, the third creation module 103 is specifically further configured to:

[0134] Create a first layer management class based on the two-dimensional map class; wherein, the first layer management class is used to manage the vector data of the two-dimensional map class;

[0135] Create a second layer management class based on the three-dimensional map class; wherein, the second layer management class is used to manage the vector data of the three-dimensional map class.

[0136] In one embodiment, the third creation module 103 is specifically further configured to:

[0137] Based on the two-dimensional map class, create a first GeoJson class and a first tile class respectively; wherein, the first GeoJson class is used to manage the WFS data of the two-dimensional map, and the first tile class is used to manage the tile data of the two-dimensional map;

[0138] Based on the three-dimensional map class, create a second GeoJson class and a second tile class respectively; wherein, the second GeoJson class is used to manage the WFS data of the three-dimensional map, and the second tile class is used to manage the tile data of the three-dimensional map.

[0139] In one embodiment, the third creation module 103 is further specifically configured to:

[0140] Based on the first GeoJson class of the two-dimensional map class, create a first point class, a first line class, a first surface class, a first text class, a first icon class, a first white film class, a first heat map class, and a first aggregation class of the two-dimensional map respectively;

[0141] Based on the second GeoJson class of the three-dimensional map class, create a second point class, a second line class, a second surface class, a second text class, a second icon class, a second white film class, a second heat map class, and a second aggregation class of the three-dimensional map respectively.

[0142] In one embodiment, the third creation module 103 is further specifically configured to:

[0143] Based on the two-dimensional map class, create a first map tool class, a first model class, and a first legend class respectively;

[0144] Based on the three-dimensional map class, create a second map tool class, a second model class, a 3dtiles class, and a second legend class respectively.

[0145] In one embodiment, the parameter configuration module 104 is further specifically configured to:

[0146] Based on the second configuration objects of the incoming point class, line class, surface class, text class, icon class, white film class, and heat map class, perform parameter configuration on the first point class, the first line class, the first surface class, the first text class, the first icon class, the first white film class, the first heat map class, the first aggregation class, and the second point class, the second line class, the second surface class, the second text class, the second icon class, the second white film class, the second heat map class, and the second aggregation class respectively;

[0147] Based on the third configuration objects of the incoming map tool class, model class, and legend class, perform parameter configuration on the first map tool class, the first model class, the first legend class, and the second map tool class, the second model class, and the second legend class respectively.

[0148] In one embodiment, the map architecture design device 100 further includes a map class configuration module 106, which is configured to:

[0149] Configure parameters of the map class based on the incoming first configuration object; wherein, the first configuration object includes a container DIV for loading the map.

[0150] Create a first container DIV for loading a 2D map and a second container DIV for loading a 3D map according to the container DIV.

[0151] Embodiment Three

[0152] As Figure 4 shown, an embodiment of the present application further provides a terminal device 200, including: at least one processor 201 ( Figure 4 only one processor is shown), a memory 202, and a computer program 203 stored in the memory 202 and executable on at least one processor 201. When the processor 201 executes the computer program 203, the steps in the above-mentioned method embodiments are implemented.

[0153] In applications, the terminal device may include, but is not limited to, a processor and a memory. Figure 4 These are only examples of the terminal device and do not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, a human-computer interaction device, an input / output device, a network access device, etc. The network access device may include a communication module for the terminal device to communicate with a user terminal.

[0154] In applications, the processor may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. For example, the processor may be a timing controller (TCON). The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.

[0155] In an application, the memory may be an internal storage unit of a terminal device in some embodiments. For example, it can be a hard disk or memory of the terminal device. In other embodiments, the memory may also be an external storage device of the terminal device. For example, it can be a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. equipped on the terminal device. The memory may also include both the internal storage unit and the external storage device of the terminal device. The memory is used to store an operating system, application programs, a Boot Loader, data, and other programs, such as program codes of computer programs. The memory can also be used to temporarily store data that has been output or will be output.

[0156] In an application, the communication module can be set as any device capable of directly or indirectly performing long-distance wired or wireless communication with a user terminal according to actual needs. For example, the communication module can provide communication solutions applied on network devices, including Wireless Local Area Networks (WLANs) (such as Wi-Fi networks), Bluetooth, Zigbee, mobile communication networks, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), etc. The communication module can include an antenna, and the antenna can have only one element or can be an antenna array including multiple elements. The communication module can receive electromagnetic waves through the antenna, perform frequency modulation and filtering processing on the electromagnetic wave signals, and send the processed signals to the processor. The communication module can also receive signals to be sent from the processor, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna for radiation.

[0157] It should be noted that for the content such as information interaction and execution process between the above-mentioned device / modules, since it is based on the same concept as the method embodiments of the present application, for its specific functions and the technical effects brought, reference can be specifically made to the method embodiment part, and details are not described herein again.

[0158] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. Each functional module in the embodiment can be integrated into a processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. In addition, the specific names of each functional module are only for the convenience of mutual distinction and do not limit the protection scope of this application. For the specific working process of the modules in the above system, reference can be made to the corresponding process in the foregoing method embodiment and will not be elaborated herein.

[0159] An embodiment of this application also provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.

[0160] An embodiment of this application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the foregoing method embodiments.

[0161] If the above integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above method embodiments of this application, a computer program can be used to instruct relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the terminal device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc.

[0162] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0163] Those of ordinary skill in the art will realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0164] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or modules can be in electrical, mechanical or other forms.

[0165] The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, they can be located in one place, or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0166] The above-described embodiments are only used to illustrate the technical solutions of this application, rather than to limit it; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included in the protection scope of this application.

Claims

1. A map architecture design method, characterized in that: include: Create and encapsulate the map class; In the map class, create and encapsulate a two-dimensional map class and a three-dimensional map class; Creating a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class; Performing parameter configuration on the first subclass and the second subclass; Before creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class, the method includes: In the map class, create a map basemap class; In the map base map class, create and encapsulate a two-dimensional map base map class and a three-dimensional map base map class, and reuse the same code logic in multiple projects by creating a common map base class; The step of creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class includes: Based on the two-dimensional map class, create a first layer management class; wherein the first layer management class is used to manage vector data of the two-dimensional map class; Based on the three-dimensional map class, create a second layer management class; wherein the second layer management class is used to manage the vector data of the three-dimensional map class; After creating the first layer management class based on Mapbox and the second layer management class based on Cesium, each time you add or delete vector data, add or delete vector data in the layer management accordingly; The configuring parameters of the first subclass and the second subclass includes: For different subclasses, the two-dimensional map class and the three-dimensional map class are configured with parameters based on the same data, thereby ensuring that the configurations of the same subclasses in different map classes are the same; The creating of the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class further includes: Based on the two-dimensional map class, a first GeoJson class and a first tile class are created respectively; wherein the first GeoJson class is used to manage the WFS data of the two-dimensional map, and the first tile class is used to manage the tile data of the two-dimensional map; Based on the three-dimensional map class, a second GeoJson class and a second tile class are created respectively; wherein the second GeoJson class is used to manage the WFS data of the three-dimensional map, and the second tile class is used to manage the tile data of the three-dimensional map.

2. The map architecture design method according to claim 1, characterized in that: The creating of the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class further includes: Based on the first GeoJson class of the two-dimensional map class, respectively create a first point class, a first line class, a first surface class, a first text class, a first icon class, a first white film class, a first heat map class and a first aggregation class of the two-dimensional map; Based on the second GeoJson class of the three-dimensional map class, a second point class, a second line class, a second surface class, a second text class, a second icon class, a second white film class, a second heat map class and a second aggregation class of the three-dimensional map are created respectively.

3. The map architecture design method according to claim 2, characterized in that: The creating of the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class further includes: Based on the two-dimensional map class, create a first map tool class, a first model class and a first legend class respectively; Based on the three-dimensional map class, a second map tool class, a second model class, a 3dtiles class and a second legend class are created respectively.

4. The map architecture design method according to claim 3, wherein: The configuring parameters of the first subclass and the second subclass includes: Based on the second configuration object of the passed-in point class, line class, surface class, text class, icon class, white film class and heat map class, respectively configure parameters for the first point class, the first line class, the first surface class, the first text class, the first icon class, the first white film class, the first heat map class, the first aggregation class and the second point class, the second line class, the second surface class, the second text class, the second icon class, the second white film class, the second heat map class, and the second aggregation class; Based on the third configuration object of the passed-in map tool class, model class and legend class, parameter configuration is performed on the first map tool class, first model class, first legend class and the second map tool class, second model class and second legend class respectively.

5. The map architecture design method according to any one of claims 1 to 4, characterized in that: In the map class, before creating and encapsulating the two-dimensional map class and the three-dimensional map class, it also includes: Based on the first configuration object passed in, the map class is configured with parameters; wherein the first configuration object includes a container DIV for loading the map; According to the container DIV, a first container DIV for loading a two-dimensional map and a second container DIV for loading a three-dimensional map are created.

6. A terminal 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 computer program, the steps of the map architecture design method according to any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the map architecture design method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • WebGL-based product characteristic three-dimensional model display method and device

    CN117523129A