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

By configuring the architecture level of map classes, two-dimensional map classes and three-dimensional map classes in GIS projects, the problem of recompiling the GIS framework code in GIS project development is solved, and development efficiency is improved.

CN119691087AActive Publication Date: 2025-03-25LAY-OUT PLANNING CONSULTANTS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510192354.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-03-25
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 to achieve architectural level encapsulation.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691087A_ABST
    Figure CN119691087A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of computers, and provides a map architecture design method and device, terminal equipment and a storage medium, and the method comprises the steps: creating and packaging a map class; in the map classes, creating and packaging 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. According to the embodiment of the invention, the two-dimensional map class and the three-dimensional map class are subjected to architecture-level packaging, and common subclasses in the two-dimensional map class and the three-dimensional map class are also subjected to corresponding packaging, so that a developer can efficiently develop a GIS project, and the project development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a map architecture design method, apparatus, terminal device and storage medium. Background Art

[0002] In recent years, Geographic Information System (GIS) has been widely used in various fields of society due to its spatial analysis, data integration, visualization and other functions. However, every time a new GIS project needs to be developed, the GIS framework code needs to be recompiled, which easily consumes a lot of manpower and material resources, and has low development efficiency. Summary of the invention

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

[0004] A first aspect of an embodiment of the present application provides a map architecture design method, the map architecture design method comprising: 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; Parameter configuration is performed on the first subclass and the second subclass.

[0005] In one embodiment, before creating the first subclass of the two-dimensional map class and the second subclass of the three-dimensional map class, the steps include: In the map class, create a map basemap class; In the map base map class, a two-dimensional map base map class and a three-dimensional map base map class are created and encapsulated.

[0006] In one embodiment, the 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, a second layer management class is created; wherein the second layer management class is used to manage the vector data of the three-dimensional map class.

[0007] In one embodiment, the creating 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.

[0008] In one embodiment, the creating 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.

[0009] In one embodiment, the creating 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.

[0010] In one embodiment, 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.

[0011] In one embodiment, in the map class, before creating and encapsulating the two-dimensional map class and the three-dimensional map class, the method further 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.

[0012] A third aspect of an embodiment of the present application provides a map architecture design device, including: The first creation module is used to create and encapsulate the map class; A second creation module is used to create and encapsulate a two-dimensional map class and a three-dimensional map class in the map class; A third creation module, used to create a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class; A parameter configuration module is used to perform parameter configuration on the first subclass and the second subclass.

[0013] A third aspect of an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the map architecture design method as described in the first aspect of the embodiment of the present application are implemented.

[0014] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein 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 as described in the first aspect of the embodiment of the present application are implemented.

[0015] The first aspect of the embodiment of the present application provides a map architecture design method, which creates and encapsulates a map class; creates and encapsulates a two-dimensional map class and a three-dimensional map class in the map class; creates a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class; and configures parameters for the first subclass and the second subclass. In this way, by encapsulating the two-dimensional map class and the three-dimensional map class at the architecture level and correspondingly encapsulating the commonly used 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 efficiency of GIS project development.

[0016] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 It is a flowchart of a map architecture design method provided in an embodiment of the present application; Figure 2 is a schematic diagram of a map type provided in an embodiment of the present application; Figure 3 It is a structural schematic diagram of a map architecture design device provided in an embodiment of the present application; Figure 4 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may 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 prevent unnecessary details from obstructing the description of the present application.

[0020] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

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

[0022] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some 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 other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. "Multiple" means "two" or "more than two".

[0023] In recent years, GIS has been widely used 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 perform customer segmentation; in the field of transportation and logistics, GIS is used to plan optimal routes and optimize distribution processes, etc.; in the field of public health, GIS is used to monitor the spread of diseases and plan medical facilities, etc.

[0024] However, every time a new GIS project needs to be developed, the GIS framework code needs to be recompiled, which easily consumes a lot of manpower and material resources and has low development efficiency.

[0025] Therefore, the embodiment of the present application provides a map architecture design method, 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 configuring parameters for 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 conducive to developers to efficiently develop GIS projects and improve the efficiency of GIS project development.

[0026] Embodiment 1 like Figure 1 As shown, the map architecture design method provided in the embodiment of the present application includes the following steps S1 to S4: Step S1, create and encapsulate the map class, and proceed to step S2.

[0027] In the application, a basic map class can be created and encapsulated to manage map-related functions. In the map class, various attributes (such as a list of locations, geographic information, etc.) and methods (such as adding locations, finding locations, calculating distances, 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 and not a limitation.

[0028] In one embodiment, before entering step S2, the method further 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.

[0029] In the application, when the map class is instantiated, the basic properties of the map class can be initialized by passing the first configuration object to the constructor. For example, in the constructor of the map class LayoutMap, pass the options object (first configuration object) {id: container DIV where the map is loaded, center: initialization center point, pitch: overlooking angle, bearing: deflection angle, zoom: level, type: 2d / 3d}.

[0030] Then, two DIVs are created according to the container DIV used to load the map, namely the first container DIV and the second container DIV, wherein the id of the first container DIV is options.id+'3d', and the id of the second container DIV is options.id+'2d'.

[0031] Step S2: In the map class, create and encapsulate a two-dimensional map class and a three-dimensional map class, and proceed to step S3.

[0032] In an application, when creating instance objects of a 2D map class and a 3D map class within a constructor or method in a map class, you can use Mapbox to create and encapsulate a 2D map class, use Ceisum to create and encapsulate a 3D map class, or use other technologies or platforms to create and encapsulate a 2D map class and a 3D map class, which are not limited here.

[0033] For example, the encapsulated two-dimensional map class can be represented as MapboxMap, and the encapsulated three-dimensional map class can be represented as CesiumMap.

[0034] In an application, when creating instances of a 2D map class or a 3D map class, the constructor is automatically called to initialize the basic properties of the map, such as setting the default map style, initializing the location of the map center point, setting the map zoom level, etc.

[0035] In the application, if the positioning type of the map class is 2d, you need to hide the first container DIV of options.id+'3d', instantiate MapboxMap, receive it with this.mapboxMap and assign it to this.currMap, so that you can access and operate the two-dimensional map object through the mapboxMap attribute and currMap attribute later; if the positioning type of the map class is 3d, you need to hide the second container DIV of options.id+'2d', instantiate CesiumMap, receive it with this.cesiumMap and assign it to this.currMap, so that you can access and operate the three-dimensional map object through the cesiumMap attribute and currMap attribute later.

[0036] In the application, if the current positioning type is 2d, to convert the positioning type to 3d, you can get the map level through getZoom(), get the resolution through zoom, and calculate the distance range between the center point and the camera based on the resolution, the arc of the center point, and the level Zoom. 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. Finally, set the perspective 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), orientation:{pitch:-pitch, heading:360+bearing, roll:0}}), and move the camera in the opposite direction of the perspective by a distance range viewer.camera.moveBackward(range).

[0037] In the application, if the current positioning type is 3D, when converting the positioning type to 2D, it is the reverse of the above conversion. The resolution can be obtained through the camera height, and then the level Zoom is obtained through the resolution, which is converted to longitude and latitude through the center point of the canvas. The deflection angle and horizontal angle can be obtained through the camera, thereby realizing the conversion from 3D to 2D.

[0038] In one embodiment, before step S3, the method further includes: In the map class, create a map basemap class; In the map base map class, a two-dimensional map base map class and a three-dimensional map base map class are created and encapsulated.

[0039] In an application, by creating a common map basemap class, you can reuse the same code logic in multiple projects to reduce duplication of work.

[0040] In the application, in Cesium, you can use the UrlTemplateImageryProvider class to create a three-dimensional map basemap class, and in Mapbox, you can use the raster layer or pre-made styles code to create a two-dimensional map basemap class, and then put the pre-made map basemap (electronic images published by Tiandi Map and ArcGIS, terrain, and basemap styles built by Mapbox Studio) into the map basemap class BottomLayer, so that after the map is initialized, the user can control the loading, deletion, switching, and adjustment of the map basemap order through the BottomLayer instance according to the situation.

[0041] Step S3, create a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class, and proceed to step S4.

[0042] In the application, you can create the first subclass of the 2D map class based on Mapbox, and the second subclass of the 3D map class based on Cesium. See the following description for details.

[0043] In one embodiment, step S3 specifically 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, a second layer management class is created; wherein the second layer management class is used to manage the vector data of the three-dimensional map class.

[0044] In the application, 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, you must also add or delete vector data in the layer management accordingly. For example, when adding a data layer of the GeoJson class, you need to add the marker order index to the this.vectorResourceList array; when adding a data layer of the tile class, you need to add the marker order index to the this.imgResourceList array; by modifying the index and executing the resetVectorIndex method (of the geojson class) or the resetImgIndex method (of the tile class), you can adjust the hierarchical order of the layers.

[0045] In the application, in the map class LayoutMap, when switching the map base map, the def algorithm can be used to compare the vectorResourceList in the first layer management class ResourceManage instance and the imgResourceList array in the second layer management class ResourceManage instance one by one. If there is a new addition, the corresponding layer is added; if there is a deletion, the corresponding layer is deleted. As for the order problem, the order of the layers can be adjusted by modifying the index and executing the resetVectorIndex method (of the geojson class) or the resetImgIndex method (of the tile class).

[0046] In one embodiment, step S3 specifically 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.

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

[0048] In the application, the first GeoJson class is created based on mapbox, which type of vector data class is dynamically selected according to the passed geoType parameter, the corresponding vector data class is instantiated according to the passed options parameter, and loaded into the 2D map. The second GeoJson class is created based on cesium, which type of vector data class is dynamically selected according to the passed geoType parameter, the corresponding vector data class is instantiated according to the passed options parameter, and loaded into the 3D map.

[0049] In the application, when creating the first tile class based on mapbox, you can use raste to encapsulate it. When creating the second tile class based on cesium, you can use WebMapServiceImageryProvider to encapsulate it. The above two tile classes Tile have the same parameters passed in, and the same built-in properties and methods. When loading tile layers, pass the 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} to the instantiated Tile, and receive it with the built-in property options in the Tiles constructor. The created tile class has methods such as moving the layer order, setting the index, filtering the layer, setting the transparency, setting the display and hiding, adding and deleting layers. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0050] In one embodiment, step S3 specifically 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.

[0051] In the application, when creating the first point class based on mapbox, you can use circle to encapsulate it, and when creating the second point class based on cesium, you can use point in Entity to encapsulate it. The parameters passed in 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, pass the options object {geojson: data source, opacity: transparency, filter: filter condition, id: layer id, index: layer order, width: point width color: point color, lineWidth: outer line color, lineOpacity: outer line transparency} to the instantiated Point, and receive it with the built-in property this.options in the Point constructor. The created point class has methods such as moving layer order, setting index, filtering layer, setting layer style, setting layer display and hiding, adding and deleting layers, etc. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0052] In the application, when creating the first line class based on Mapbox and the second line class based on Cesium, the parameters passed in to the two line classes Polyline are the same, and the built-in properties and methods are also the same; when loading the line class, pass the 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 pixels, filter: filter condition} to the instantiated Polyline, and receive it with the built-in property this.options in the Polyline constructor. The created line class has methods such as moving the layer order, setting the index method, filtering the layer method, setting the layer style method, setting the layer display and hiding, adding and deleting layers, etc. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0053] In the application, when creating the first face class based on mapbox and the second face class based on cesium, the parameters passed in to the two face classes Polygon are the same, and the built-in properties and methods are also the same; when loading the face class, pass the options object {geojson: data source, index: layer order, id: layer, opacity: face transparency, lineWidth: face boundary line width, lineColor: face boundary line color, lineStyle: face boundary line style, lineOpcity: line transparency, filter: filter condition} to the instantiated Polygon, and receive it with the built-in property this.options in the Polygon constructor. The created face class has methods such as moving layer order, setting index, filtering layer, setting layer style, setting layer display and hiding, adding and deleting layers, etc. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0054] 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 class Labels are the same, and the built-in properties and methods are also the same; when loading the text class, pass the options object {geojson: data source, index: layer order, id: layer, field: field of the displayed layer, textOverlap: collision detection, color: font color, fontSize: font size, bgColor: background color, offset: offset, opacity: transparency, filter: filter condition} to the instantiated Label, and receive it with the built-in property this.options in the Label constructor. The created text class has methods such as moving the layer order, setting the index method, filtering the layer method, setting the layer style method, setting the layer display and hiding, adding and deleting layers, etc. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0055] 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 two icon classes Billboard are the same, and the built-in properties and methods are also the same; when loading the icon class, pass the options object {geojson: data source, index: layer order, id: layer, width: icon width, height: icon height, imgOverLap: whether to support collision test, url: icon, offset: offset, opacity: transparency, filter: filter condition} to the instantiated Billboard, and receive it with the built-in property this.options in the Billboard constructor. The created icon class has methods such as moving layer order, setting index, filtering layers, setting layer style, setting layer display and hiding, adding and deleting layers, etc. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0056] 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 two white film classes CubePolygon are the same, and the built-in properties and methods are also the same; when loading the white film class, pass the options object {geojson: data source, index: layer order, id: layer, height: white film height, baseHeight: base height, color: white film color, opacity: transparency, filter: filter condition} to the instantiated CubePolygon, and receive it with the built-in property this.options in the CubePolygon constructor. The created white film class has methods such as moving layer order, setting index, filtering layer, setting layer style, setting layer display and hiding, adding and deleting layers, etc. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0057] 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 in to the two heat map classes HeatMap are the same, and the built-in properties and methods are also the same; when loading the heat map class, pass the options object {geojson: data source, radius: hot spot radius, scale: blur scale, colorRange: heat map color value range, opacity: transparency, filter: filter condition} to the instantiated HeatMap, and receive it with the built-in property this.options in the HeatMap constructor. When the user executes the built-in method, the parameters corresponding to the built-in property this.options are also modified.

[0058] 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.

[0059] In one embodiment, step S3 specifically 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.

[0060] 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).

[0061] 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.

[0062] 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.

[0063] In the application, create a 3dtiles class based on Cesium and construct a 3D bounding box. Through matrix transformation, you can rotate, displace, scale and other operations on the objects loaded by 3dtiles.

[0064] Step S4: performing parameter configuration on the first subclass and the second subclass.

[0065] In the 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, thereby ensuring that the configurations of the same subclasses in different map classes are the same.

[0066] In one embodiment, step S4 specifically 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.

[0067] In the application, when loading the first point class or the second point class, pass the options object (i.e. the second configuration object) {geojson: data source, opacity: transparency, filter: filter condition, id: layer id, index: layer order, width: point width color: point color, lineWidth: outer line color, lineOpacity: outer line transparency} to the instantiated Point, and receive it using the built-in property this.options in the Point constructor.

[0068] In the application, when loading the first line class or the second line class, pass the options object (that is, 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 pixels, filter: filter condition} to the instantiated Polyline and receive it using the built-in property this.options in the Polyline constructor.

[0069] In the application, when loading the first or second face class, pass the options object {geojson: data source, index: layer order, id: layer, opacity: face transparency, lineWidth: face border width, lineColor: face border color, lineStyle: face border style, lineOpcity: line transparency, filter: filter condition} to the instantiated Polygon, and receive it with the built-in property this.options in the Polygon constructor. When loading the text class, pass the options object {geojson: data source, index: layer order, id: layer, field: field of the display layer, textOverlap: collision detection, color: font color, fontSize: font size, bgColor: background color, offset: offset, opacity: transparency, filter: filter condition} to the instantiated Label, and receive it with the built-in property this.options in the Label constructor.

[0070] In the application, when loading the first icon class or the second icon class, pass the options object {geojson: data source, index: layer order, id: layer, width: icon width, height: icon height, imgOverLap: whether to support collision test, url: icon, offset: offset, opacity: transparency, filter: filter condition} to the instantiated Billboard and receive it with the built-in property this.options in the Billboard constructor.

[0071] In the application, when loading the first white film class or the second white film class, pass the options object {geojson: data source, index: layer order, id: layer, height: white film height, baseHeight: base height, color: white film color, opacity: transparency, filter: filter condition} to the instantiated CubePolygon, and receive it with the built-in property this.options in the CubePolygon constructor.

[0072] In the application, when loading the first heat map class or the second heat map class, pass the options object {geojson: data source, radius: hot spot radius, scale: blur scale, colorRange: heat map color value range, opacity: transparency, filter: filter condition} to the instantiated HeatMap, and receive it with the built-in property this.options in the HeatMap constructor.

[0073] 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.

[0074] 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.

[0075] 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.

[0076] 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.

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

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

[0079] 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.

[0080] 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.

[0081] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0082] Embodiment 2 The present application also provides a map architecture design device for executing the method steps in the above map architecture design method embodiment. The device can be a virtual appliance in a terminal device, which is run by a processor of the terminal device, or it can be the terminal device itself.

[0083] like Figure 3 As shown, the map architecture design device 100 provided in the embodiment of the present application includes: The first creation module 101 is used to create and encapsulate a map class; The second creation module 102 is used to create and encapsulate a two-dimensional map class and a three-dimensional map class in the map class; The third creation module 103 is used to create a first subclass of the two-dimensional map class and a second subclass of the three-dimensional map class; The parameter configuration module 104 is used to configure parameters of the first subclass and the second subclass.

[0084] In one embodiment, the map architecture design apparatus 100 further includes a fourth creation module 105, which is used to: In the map class, create a map basemap class; In the map base map class, a two-dimensional map base map class and a three-dimensional map base map class are created and encapsulated.

[0085] In one embodiment, the third creation module 103 is further configured to: 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, a second layer management class is created; wherein the second layer management class is used to manage the vector data of the three-dimensional map class.

[0086] In one embodiment, the third creation module 103 is further configured to: 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.

[0087] In one embodiment, the third creation module 103 is further configured to: 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.

[0088] In one embodiment, the third creation module 103 is further configured to: 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.

[0089] In one embodiment, the parameter configuration module 104 is further configured to: 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.

[0090] In one embodiment, the map architecture design apparatus 100 further includes a map class configuration module 106 for: 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.

[0091] Embodiment 3 like Figure 4 As shown, the embodiment of the present application further provides a terminal device 200, including: at least one processor 201 ( Figure 4 Only one processor is shown in the figure), 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.

[0092] In the application, the terminal device may include but is not limited to a processor, a memory, Figure 4 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as human-computer interaction devices, input and output devices, network access devices, etc. The network access device may include a communication module for the terminal device to communicate with the user terminal.

[0093] In applications, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) 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). A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0094] In applications, the memory may be an internal storage unit of a terminal device in some embodiments, such as 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, such as 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 an internal storage unit and an external storage device of the terminal device. The memory is used to store operating systems, applications, boot loaders, data, and other programs, such as program codes of computer programs. The memory may also be used to temporarily store data that has been output or is to be output.

[0095] In the application, the communication module can be set as any device that can directly or indirectly communicate with the user terminal over a long distance by wire or wireless communication according to actual needs. For example, the communication module can provide communication solutions including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth, Zigbee, mobile communication networks, global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to network devices. The communication module can include an antenna, which can have only one array element or an antenna array including multiple array elements. The communication module can receive electromagnetic waves through the antenna, frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor. The communication module can also receive the signal to be sent from the processor, frequency modulate and amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0096] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0097] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiment can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules. In addition, the specific names of the functional modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0098] The embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0099] An embodiment of the present 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 above-mentioned various method embodiments.

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

[0101] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

[0103] In the embodiments provided in the present 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 only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

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

[0105] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present 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; Parameter configuration is performed on the first subclass and the second subclass.

2. The map architecture design method according to claim 1, characterized in that: 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, a two-dimensional map base map class and a three-dimensional map base map class are created and encapsulated.

3. The map architecture design method according to claim 2, characterized in that: 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, a second layer management class is created; wherein the second layer management class is used to manage the vector data of the three-dimensional map class.

4. The map architecture design method according to claim 3, wherein: 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.

5. The map architecture design method according to claim 4, 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.

6. The map architecture design method according to claim 5, 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.

7. The map architecture design method according to claim 6, 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.

8. The map architecture design method according to any one of claims 1 to 7, 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.

9. 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 8 are implemented.

10. 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 8 are implemented.

Citation Information

Patent Citations

  • GIS-based three-dimensional management platform construction method, system and device and medium

    CN110246220A

  • Construction method of universal WebGIS development client and use method of universal WebGIS development client

    CN112711407A

  • Three-dimensional model generation method, three-dimensional graph rendering method, three-dimensional model generation device, three-dimensional graph rendering device and equipment

    CN115830200A

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

    CN117523129A

  • Method and apparatus for slicing three-dimensional vector data of three-dimensional vector map, and electronic device

    WO2022089018A1