CN112486476A - Map generation method, map generation device, storage medium and computer equipment - Google Patents

Map generation method, map generation device, storage medium and computer equipment Download PDF

Info

Publication number
CN112486476A
CN112486476A CN202011469135.4A CN202011469135A CN112486476A CN 112486476 A CN112486476 A CN 112486476A CN 202011469135 A CN202011469135 A CN 202011469135A CN 112486476 A CN112486476 A CN 112486476A
Authority
CN
China
Prior art keywords
map
layer
project
service data
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011469135.4A
Other languages
Chinese (zh)
Inventor
于洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202011469135.4A priority Critical patent/CN112486476A/en
Publication of CN112486476A publication Critical patent/CN112486476A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse

Abstract

The invention discloses a map generation method, a map generation device, a storage medium and computer equipment, relates to the technical field of information, and mainly aims to separate a logic code and a service code of a map function in a project, so that the logic code or the service code of the map function can be maintained at a later stage, the reusability of a map function component is improved, and the project development period is shortened. The method comprises the following steps: acquiring an operation instruction to be executed in a target project running state; calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project; reading service data required by the operation of the target project; and generating and outputting the project map based on the image layers and the service data. The invention also relates to the technical field of block chains, and each layer in the invention can be stored in the block chain.

Description

Map generation method, map generation device, storage medium and computer equipment
Technical Field
The present invention relates to the field of information technology, and in particular, to a map generation method, apparatus, storage medium, and computer device.
Background
The map function is directed against human life and is undoubtedly provided a lot of convenience at present, has made things convenient for people's trip, and locate function, inquiry function have etc. especially to the environmental protection project, the map has also become indispensable functional module, and the wide application is in a plurality of projects of PC and APP, and the development cost and the maintenance cost in later stage of project can be reduced to one set of reasonable standardized map creation flow.
The inventor of the application finds in research that the map function is mostly interwoven with business logic in a project. However, the method can cause the logic code of the map function to be seriously coupled with the business code, so that the developed code is excessively long and unclear, the development difficulty is increased, the maintenance of the logic code or the business code at the later stage is inconvenient, meanwhile, the reusability of the developed map function is poor, the map function is not easy to be transplanted to other projects, and the project development efficiency is influenced.
Disclosure of Invention
The invention provides a map generation method, a map generation device, a storage medium and computer equipment, which are mainly characterized in that a logic code of a map function in a project can be separated from a service code, so that the logic code or the service code of the map function can be maintained at a later stage conveniently, the reusability of a map function component is improved, and the project development period is shortened.
According to a first aspect of the present invention, there is provided a map generation method, including:
acquiring an operation instruction to be executed in a target project running state;
calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project;
reading service data required by the operation of the target project;
and generating and outputting the project map based on the image layers and the service data.
According to a second aspect of the present invention, there is provided a map generating apparatus, comprising:
the acquisition unit is used for acquiring an operation instruction to be executed in the running state of the target project;
the loading unit is used for calling a preset map function component to load each map layer of a project map to be generated according to the operation instruction, wherein the project map is a component of the target project;
the reading unit is used for reading the service data required by the operation of the target project;
and the generating unit is used for generating and outputting the project map based on the layers and the service data.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring an operation instruction to be executed in a target project running state;
calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project;
reading service data required by the operation of the target project;
and generating and outputting the project map based on the image layers and the service data.
According to a fourth aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the program:
acquiring an operation instruction to be executed in a target project running state;
calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project;
reading service data required by the operation of the target project;
and generating and outputting the project map based on the image layers and the service data.
Compared with the current mode of interweaving the map function and the business logic together in the project, the map generation method, the map generation device, the storage medium and the computer equipment can acquire the operation instruction to be executed in the running state of the target project; calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project; meanwhile, reading the service data required by the operation of the target project; and finally, generating and outputting the project map based on the map layers and the service data, so that the separation of the map function logic codes and the service codes is thoroughly realized by creating the preset map functional component, the logic codes or the service codes of the map function can be maintained conveniently at the later stage, the reusability of the preset map functional component is improved, the preset map functional component can be transplanted to other projects conveniently, the development period of the projects is shortened, and the development efficiency of the projects is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a map generation method provided by an embodiment of the invention;
FIG. 2 is a flow chart of another map generation method provided by the embodiment of the invention;
FIG. 3 is a map diagram illustrating an environmental protection project provided by an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a map generating apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another map generating apparatus provided in the embodiment of the present invention;
fig. 6 shows a physical structure diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Currently, most of the map functions are interleaved with business logic in a project. However, the method can cause the logic code of the map function to be seriously coupled with the business code, so that the developed code is excessively long and unclear, the development difficulty is increased, the maintenance of the logic code or the business code at the later stage is inconvenient, meanwhile, the reusability of the developed map function is poor, the map function is not easy to be transplanted to other projects, and the project development efficiency is influenced.
In order to solve the above problem, an embodiment of the present invention provides a map generation method, as shown in fig. 1, the method includes:
101. and acquiring an operation instruction to be executed in the running state of the target item.
Wherein, the target project is a project which needs to be displayed by a map, such as an environmental protection project, the operation instruction to be executed is an operation instruction which calls a preset map function component, for example, the preset map function component is introduced by calling an import function, for the embodiment of the invention, in order to overcome the defect that the logic code of the map function is coupled with the service code in the prior art, the embodiment of the invention independently encapsulates the function in the map creating process and creates the preset map function component, thereby realizing the separation of the logic code and the service code of the map function, facilitating the maintenance of the logic code and the service code of the map function in the later period, facilitating the transplantation of the preset map function component to various projects, improving the reusability of the preset map function component, shortening the development period of the project, the embodiment of the invention is mainly suitable for the project destination generation, the execution subject of the present embodiment is an apparatus or device capable of generating a project map. Specifically, in the process of executing the target project service code hot map. jsx, a preset map function component map.support.js is called, and specifically, the preset map function component map.support.js is introduced by calling an import function.
102. And calling a preset map function component according to the operation instruction to load each map layer of the project map to be generated.
The project map is a component of the target project, the preset map function component is a component independent of a project method, the preset map function component can be transplanted to other projects for use, and the project map to be generated is a map which needs to be displayed in the project, for example, a map in an environment-friendly project can display river colors in different areas.
For the embodiment of the present invention, before creating a project map by using a preset map function component, the preset map function component needs to be constructed, specifically, a maputility folder is predefined, a method of an arcgis API is written in the maputility folder, the method of the arcgis API is arranged into different js files according to different functions of moving a layer operation, drawing a pattern, creating a layer, and the like, integrated application of APIs in the maputility is defined in map.
Further, before the map is drawn by using the preset map function component, each map layer involved in the map drawing process needs to be specified in advance, and the method specifically includes: the MAP LAYER mapping method comprises a basic LAYER and an auxiliary LAYER, wherein the auxiliary LAYER specifically comprises a drawn functional LAYER and other LAYERs which can be operated by a user, URL addresses corresponding to all LAYERs involved in the MAP drawing process are written in a const.js configuration file, namely all the LAYERs involved can be specified in the const.js file, for example, { URL: GIS _ LAYER _ URL.DEPT _ COLOR _ MAP, title: "v _ depth _ base LAYER" };
{URL:GIS_LAYER_URL.FLOW_COLOR_MAP,title:“v_flow_baseLayer”}。
in addition, in order to obtain the base layer and the auxiliary layer, the method further includes: drawing the basic map layer and the functional map layer, storing the basic map layer and the functional map layer in a server, and configuring a resource locator corresponding to the basic map layer and a resource locator corresponding to the functional map layer in a preset configuration file, that is, the basic map layer and the functional map layer can be generated in advance by gis teams according to business requirements and placed in a remote server, based on which, the step 102 specifically includes: and loading the basic layer and the functional layer by utilizing the map functional component according to the resource locator corresponding to the basic layer and the resource locator corresponding to the functional layer. It should be noted that the embodiment of the present invention also relates to the technical field of a block chain, and the base layer and the auxiliary layer in the embodiment of the present invention may be stored in the block chain.
Further, in order to set the relevant information of each layer involved in the configuration file, the method further includes: and respectively configuring basic information, drawing information and longitude and latitude information of different areas in each layer, wherein the related information is information of the different areas in the layers, and specifically comprises the basic information, the drawing information and the longitude and latitude information of the different areas, the basic information comprises names, areas and other information of the different areas, the drawing information comprises contents such as colors and drawing lines to be filled in the areas of the areas, and the longitude and latitude information comprises longitude information and latitude information corresponding to the different areas, namely the specific positions of the different areas can be determined through the longitude information and the latitude information. On this basis, step 102 specifically includes: and the map functional component loads each layer according to the basic information, the drawing information and the longitude and latitude information of different areas in each layer.
Further, after the relevant information corresponding to the basic map layer and the auxiliary map layer is configured, in the process of executing a service code hot map.jsx, calling a preset map function component map.support.js, specifically, introducing the preset map function component map.support.js by calling an import function, firstly calling an initialization function init to load each map layer, wherein the initialization function init comprises three parameters, the first is a map layer identifier, a map space can be created according to the map layer identifier, namely, determining a position in a page to load each map layer specifically according to the map layer identifier, and creating a map; the second parameter is a callback function related to the service, specifically written in the service code, and the service data can be obtained according to the callback function so as to perform corresponding drawing in the layer according to the service data; the third parameter is a method used by the self-defined service logic, and is deleted according to the corresponding service. Therefore, each pre-designated layer can be loaded through the initialization function init in the preset map function component, and corresponding service data can be obtained.
103. And reading the service data required by the operation of the target project.
For the embodiment of the present invention, in order to perform drawing on a corresponding map layer according to the service data, the service data needs to be obtained in advance, specifically, a callback function related to the service may be determined according to a second parameter in an initialization function of a preset map function component, and written in a service code, and the service data may be obtained according to the callback function, so that corresponding drawing is performed in the map layer according to the service data.
104. And generating and outputting the project map based on the image layers and the service data.
The project map is a map to be shown in a project, for example, a map showing river colors in different areas in an environment-friendly project. For the embodiment of the present invention, after each layer is loaded, and service data is acquired, drawing may be performed on an auxiliary layer according to service requirements, and specifically, a point rendering function, a line rendering function, and a surface rendering function in a preset map function component are called during drawing, but specifically, in which area of the auxiliary layer, what pattern is drawn and what color is displayed are drawn, and the above contents may be matched in a service code according to the service requirements, where the point rendering function, the line rendering function, and the surface rendering function each include two functions, which are a layer parameter and a service data parameter, a layer to be drawn can be determined according to the layer parameter, and service data applied during drawing can be determined according to the service data parameter. Meanwhile, the size and format of the drawing graph can be specified in the service code, and if the size and format are not specified, the drawing graph can be generated according to default values. Therefore, according to each loaded layer and service data, a point, line and surface rendering function is called to draw in the corresponding auxiliary layer, the drawn layer and the layer which is not drawn are subjected to superposition processing, and a project map is generated and output.
Compared with the mode of interweaving the map function and the business logic together in the project at present, the map generation method provided by the embodiment of the invention can acquire the operation instruction to be executed in the running state of the target project; calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project; meanwhile, reading the service data required by the operation of the target project; and finally, generating and outputting the project map based on the map layers and the service data, so that the separation of the map function logic codes and the service codes is thoroughly realized by creating the preset map functional component, the logic codes or the service codes of the map function can be maintained conveniently at the later stage, the reusability of the preset map functional component is improved, the preset map functional component can be transplanted to other projects conveniently, the development period of the projects is shortened, and the development efficiency of the projects is improved.
Further, in order to better explain the process of generating the project map, as a refinement and extension of the foregoing embodiment, another map generating method is provided in an embodiment of the present invention, as shown in fig. 2, where the method includes:
201. and acquiring an operation instruction to be executed in the running state of the target item.
The target project is a project which needs to be subjected to map display, for example, an environmental protection project, the operation instruction to be executed is an operation instruction for calling a preset map function component, specifically, in the process of executing a target project service code hotspot map.
202. And calling an initialization function in the map functional component to load each layer in a page according to the operation instruction.
For the embodiment of the present invention, before loading each layer by using the initialization function of the preset map function component, each layer related to creating the project map needs to be specified in the const.js configuration file in advance, specifically, a URL address corresponding to the related layer is specified in the configuration file, so as to load each layer from the remote server according to the URL address corresponding to each layer, after the layers involved in creating the map are specified, the relevant information of each layer needs to be configured, the related information specifically comprises basic information, drawing information and longitude and latitude information of different areas in the map layer, wherein the basic information comprises names, areas and other information of the different areas, the drawing information comprises contents such as colors and drawing lines to be filled in the areas of the areas, and the longitude and latitude information comprises longitude information and latitude information corresponding to the different areas, namely the specific positions of the different areas can be determined through the longitude information and the latitude information. For example, the basic information of a certain area in the layer is Name: "Futian area", area: 73.2883201077, respectively; the drawing information is: color { r:255, g:255, b:255, a:0.1}, outline: { width:12, style: "solid", color: Array (4) }; the latitude and longitude information is: xmax:114.556896, xmin:113.988896, ymax:22.590896 and ymin: 22.502.
Further, after the configuration of the image related information is completed, acquiring identification information of each layer, and calling an initialization function in a preset map function component to load each layer in a page, where the identification information of a layer may be a layer ID, and in order to load each specified layer, step 202 specifically includes: acquiring identification information corresponding to each image layer, and determining position information of each image layer in the page according to the identification information; and calling an initialization function in the map functional component to load each layer in a page based on the position information. The initialization function init comprises three parameters, wherein the first parameter is identification information of a map layer, a map space can be created according to the identification information of the map layer, namely, the position of each map layer in a page is determined to be loaded according to the identification information, and a map is created; the second parameter is a callback function related to the service, specifically written in the service code, and the service data can be obtained according to the callback function so as to perform corresponding drawing in the layer according to the service data; the third parameter is a method used by the self-defined service logic, and is deleted according to the corresponding service.
In the process of loading each layer, a mapping relationship between identification information of different layers and different areas of a page is defined in a service code, according to the obtained identification information of the layer, a display area of the layer in the page, that is, position information, for example, layer 11 and layer 32 both correspond to display area 1 in the page, and further, based on the determined position information of the layer in the page, the layer is loaded, so that each layer can be loaded to a corresponding area in the page, and a map space is created.
203. And determining a preset service data callback function corresponding to the target project, and acquiring service data required by the operation of the target project by using the preset service data callback function.
In the embodiment of the present invention, when the initialization function is used to load the basic layer and the auxiliary layer, the preset service data callback function defined in the service code is also determined, and corresponding service data can be obtained through the preset service data callback function, so as to perform layer drawing in the auxiliary layer according to the service data, and meet service requirements, for example, map page. { pointClick, maplickother, isFitExtent: true } is a self-defined service logic, and can be deleted in a service code according to the service. Therefore, the service data of the project can be acquired through the preset service data callback function, so that corresponding drawing is performed in each loaded map layer according to the service data, and a project map is generated.
204. And acquiring the layer parameters and the service data parameters.
The layer parameters are used for designating a target layer to be drawn in each layer, the service data parameters are service data sources and are used for designating target service data in the acquired service data, so that after the layer parameters and the service data parameters are acquired, the target layer to be drawn and the utilized target service data are determined, and a preset drawing function is called to draw on the target layer.
205. And calling a preset drawing function to draw and output the project map based on the layer parameters, the service data parameters, the layers and the service data.
For the embodiment of the present invention, in order to draw the project map, step 205 specifically includes: determining a target layer to be drawn in each layer according to the layer parameters; determining target service data to be utilized in the service data according to the service data parameters; calling a preset drawing function to draw on the target layer according to the target service data to obtain a drawn target layer; and superposing the drawn target map layer and other non-drawn map layers to generate and output the project map.
The preset drawing function specifically includes a preset point rendering function, a preset line rendering function and a preset surface rendering function, where the preset point rendering function, the preset line rendering function and the preset surface rendering function all include two parameters, which are a layer parameter and a service data parameter, respectively, the layer parameter is used to specify a target layer to be drawn in each layer, the service data parameter is a service data source and is used to specify target service data in the obtained service data, and after the target layer to be drawn and the target service data used are determined, the preset drawing function is called to draw on the target layer, for example, the preset point rendering function mapupport.
Meanwhile, in the process of drawing by using the preset point rendering function, the preset line rendering function and the preset surface rendering function respectively, if the size and format of the picture are specified, the picture may be generated according to a default value if the size and format of the picture are not specified, for example, the length and width of the picture are set to 50 respectively, specifically, the size and format of the picture may be set in a configuration file, and the generated picture may be added to the corresponding layer according to a second parameter (layer parameter) in the preset point rendering function, the preset line rendering function and the preset surface rendering function.
The drawing process of the graph in the embodiment of the invention is illustrated by taking a specific application scene as an example, but not limited to this, as shown in fig. 3, in the display map of the environmental protection project, the color of the river is drawn according to the actual water quality category, the actual water quality category changes along with time, the basic river map layer on the server cannot change the color along with the service, otherwise, the map layer cannot be popularized and applied, and the basic river map layer of the river cannot return all the flow directions of each river to be drawn by the service party, so that the basic map layer of the river is obtained from the server by combining the two data, only one color is provided on the basic map layer, the service data including the name of the river and the water quality category is obtained from the background service database, further, the matching rendering is performed by the service party according to different names of the river and water quality categories, that is how to perform the drawing specifically in different river areas, drawn in what style or presented in what color, the content may be set by the business party himself in the business code.
Furthermore, after the auxiliary layer is drawn, the different layers are overlaid to generate and output a display map, so that the display map can be seen in the page, thereby knowing that, in the embodiment of the present invention, all the contents related to the service are integrated into the service code, including the self-defined layer name in the service code, the preset map function component selects what layer is operated only according to the transmitted parameters, such as the identification information of the layer, the service data parameters, the layer parameters, and the like, the code related to the service is not specifically defined in the preset map function component, assuming that the layer name needs to be modified, only the layer name needs to be modified in the service code, and it is not necessary to consider whether the drawing of the map is affected, for example, the layer name is defined as the aloyer at the beginning, and the name of the map that cannot be seen when the method is called is mapup. Ready to change to river layer, then the MapSupport. renderRiver (data) can be done by only modifying the second parameter in the method call. Meanwhile, once the information on the server map layer is modified, the emphasis is only required to be placed in the mapUport.js, and because all the methods used in the service codes are called in the mapUport.js, the functions of the map are not touched, so that the separation of the map functional component and the service codes is completely realized, the map functional component or the service codes can be maintained at the later stage conveniently, and the reusability of the map functional component is improved.
Compared with the mode of interweaving the map function and the business logic together in the project at present, the map generation method provided by the embodiment of the invention can acquire the operation instruction to be executed in the running state of the target project; calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project; meanwhile, reading the service data required by the operation of the target project; and finally, generating and outputting the project map based on the map layers and the service data, so that the separation of the map function logic codes and the service codes is thoroughly realized by creating the preset map functional component, the logic codes or the service codes of the map function can be maintained conveniently at the later stage, the reusability of the preset map functional component is improved, the preset map functional component can be transplanted to other projects conveniently, the development period of the projects is shortened, and the development efficiency of the projects is improved.
Further, as a specific implementation of fig. 1, an embodiment of the present invention provides a map generating apparatus, as shown in fig. 4, the apparatus includes: an acquisition unit 31, a loading unit 32, a reading unit 33, and a generation unit 34.
The obtaining unit 31 may be configured to obtain an operation instruction to be executed in a target item running state. The acquiring unit 31 is a main functional module in the present apparatus that acquires an operation instruction to be executed in a target item running state.
The loading unit 32 may be configured to invoke a preset map function component according to the operation instruction to load each map layer of a project map to be generated, where the project map is a component of the target project. The loading unit 32 is a main function module, which is also a core module, in the device, and loads each layer of the project map to be generated by calling a preset map function component according to the operation instruction.
The reading unit 33 may be configured to read service data required by the target item. The reading unit 33 is a main functional module of the present apparatus for reading the service data required for the operation of the target item.
The generating unit 34 may be configured to generate and output the project map based on the image layers and the service data. The generating unit 34 is a main function module in the present apparatus that generates and outputs the project map based on the respective layers and the service data, and is also a core module.
For the embodiment of the present invention, as shown in fig. 5, in order to configure the basic information, the drawing information, and the dimension information of the unused area in each layer, the apparatus further includes: a configuration unit 35.
The configuration unit 35 may be configured to configure the basic information, the drawing information, and the longitude and latitude information of different areas in each layer respectively.
The loading unit 32 may be specifically configured to load each map layer by the map function component according to the basic information, the drawing information, and the longitude and latitude information of different areas in each map layer.
Further, in order to load each layer of the project map to be generated, the loading unit 32 may be specifically configured to call an initialization function in the map function component to load each layer in a page according to the operation instruction.
The reading unit 33 may be specifically configured to determine a preset service data callback function corresponding to the target item, and acquire service data required by the operation of the target item by using the preset service data callback function.
Further, to load each layer in a page, the loading unit 32 includes: a determination module 321 and a loading module 322.
The determining module 321 may be configured to obtain identification information corresponding to each image layer, and determine position information of each image layer in the page according to the identification information.
The loading module 322 may be configured to call an initialization function in the map function component to load each layer in a page based on the location information.
Further, to generate the project map, the generating unit 34 includes: an acquisition module 341 and a rendering module 342.
The obtaining module 341 may be configured to obtain layer parameters and service data parameters.
The drawing module 342 may be configured to call a preset drawing function to draw and output the project map based on the layer parameter, the service data parameter, each layer, and the service data.
Further, to draw the project map, the drawing module 342 includes: the device comprises a determining submodule, a drawing submodule and a generating submodule.
The determining submodule may be configured to determine, according to the layer parameter, a target layer to be drawn in each layer.
The determining submodule may be further configured to determine, according to the service data parameter, target service data to be utilized in the service data.
The drawing submodule may be configured to call a preset drawing function to draw on the target map layer according to the target service data, so as to obtain a drawn target map layer.
The generating sub-module may be configured to superimpose the drawn target layer and the other layers that are not drawn, generate the project map, and output the project map.
Further, in order to draw the basic layer and the functional layer, the apparatus further includes: the drawing unit 36 may be configured to draw the base layer and the function layer, store the base layer and the function layer in a server, and configure the resource locator corresponding to the base layer and the resource locator corresponding to the function layer in a preset configuration file.
The loading unit 32 may be further specifically configured to load the base layer and the function layer by using the map function component according to the resource locator corresponding to the base layer and the resource locator corresponding to the function layer.
It should be noted that other corresponding descriptions of the functional modules related to the map generating apparatus provided in the embodiment of the present invention may refer to the corresponding description of the method shown in fig. 1, and are not described herein again.
Based on the method shown in fig. 1, correspondingly, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the following steps: acquiring an operation instruction to be executed in a target project running state; calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project; reading service data required by the operation of the target project; and generating and outputting the project map based on the image layers and the service data.
Based on the above embodiments of the method shown in fig. 1 and the apparatus shown in fig. 4, an embodiment of the present invention further provides an entity structure diagram of a computer device, as shown in fig. 6, where the computer device includes: a processor 41, a memory 42, and a computer program stored on the memory 42 and executable on the processor, wherein the memory 42 and the processor 41 are both arranged on a bus 43 such that when the processor 41 executes the program, the following steps are performed: acquiring an operation instruction to be executed in a target project running state; calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project; reading service data required by the operation of the target project; and generating and outputting the project map based on the image layers and the service data.
By the technical scheme, the operation instruction to be executed can be acquired in the running state of the target project; calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project; meanwhile, reading the service data required by the operation of the target project; and finally, generating and outputting the project map based on the map layers and the service data, so that the separation of the map function logic codes and the service codes is thoroughly realized by creating the preset map functional component, the logic codes or the service codes of the map function can be maintained conveniently at the later stage, the reusability of the preset map functional component is improved, the preset map functional component can be transplanted to other projects conveniently, the development period of the projects is shortened, and the development efficiency of the projects is improved.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A map generation method, comprising:
acquiring an operation instruction to be executed in a target project running state;
calling a preset map function component according to the operation instruction to load each map layer of a project map to be generated, wherein the project map is a component of the target project;
reading service data required by the operation of the target project;
and generating and outputting the project map based on the image layers and the service data.
2. The method according to claim 1, wherein before the obtaining the operation instruction to be executed in the target item running state, the method further comprises:
respectively configuring basic information, drawing information and longitude and latitude information of different areas in each image layer;
the step of calling a preset map function component according to the operation instruction to load each map layer of the project map to be generated comprises the following steps:
and the map functional component loads each layer according to the basic information, the drawing information and the longitude and latitude information of different areas in each layer.
3. The method according to claim 1, wherein the calling a preset map function component according to the operation instruction loads each layer of the project map to be generated, and the method comprises the following steps:
calling an initialization function in the map functional component to load each layer in a page according to the operation instruction;
the reading of the service data required by the operation of the target project includes:
and determining a preset service data callback function corresponding to the target project, and acquiring service data required by the operation of the target project by using the preset service data callback function.
4. The method according to claim 3, wherein the calling an initialization function in the map functional component to load each layer in a page according to the operation instruction comprises:
acquiring identification information corresponding to each image layer, and determining position information of each image layer in the page according to the identification information;
and calling an initialization function in the map functional component to load each layer in a page based on the position information.
5. The method according to claim 1, wherein the generating and outputting the project map based on the respective image layers and the service data comprises:
acquiring layer parameters and service data parameters;
and calling a preset drawing function to draw and output the project map based on the layer parameters, the service data parameters, the layers and the service data.
6. The method according to claim 5, wherein the calling a preset mapping function to map the project map and output the project map based on the layer parameters, the service data parameters, the layers and the service data comprises:
determining a target layer to be drawn in each layer according to the layer parameters;
determining target service data to be utilized in the service data according to the service data parameters;
calling a preset drawing function to draw on the target layer according to the target service data to obtain a drawn target layer;
and superposing the drawn target map layer and other non-drawn map layers to generate and output the project map.
7. The method according to any one of claims 1 to 6, wherein each layer includes a base layer and a function layer, and before the obtaining of the operation instruction to be executed in the target item running state, the method further includes:
drawing the basic layer and the functional layer, storing the basic layer and the functional layer in a server, and configuring a resource locator corresponding to the basic layer and a resource locator corresponding to the functional layer in a preset configuration file;
the step of calling a preset map function component according to the operation instruction to load each map layer of the project map to be generated comprises the following steps:
and loading the basic layer and the functional layer by utilizing the map functional component according to the resource locator corresponding to the basic layer and the resource locator corresponding to the functional layer.
8. A map generation apparatus, comprising:
the acquisition unit is used for acquiring an operation instruction to be executed in the running state of the target project;
the loading unit is used for calling a preset map function component to load each map layer of a project map to be generated according to the operation instruction, wherein the project map is a component of the target project;
the reading unit is used for reading the service data required by the operation of the target project;
and the generating unit is used for generating and outputting the project map based on the layers and the service data.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
10. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 7 when executed by the processor.
CN202011469135.4A 2020-12-15 2020-12-15 Map generation method, map generation device, storage medium and computer equipment Pending CN112486476A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011469135.4A CN112486476A (en) 2020-12-15 2020-12-15 Map generation method, map generation device, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011469135.4A CN112486476A (en) 2020-12-15 2020-12-15 Map generation method, map generation device, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN112486476A true CN112486476A (en) 2021-03-12

Family

ID=74916362

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011469135.4A Pending CN112486476A (en) 2020-12-15 2020-12-15 Map generation method, map generation device, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN112486476A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116610319A (en) * 2023-06-06 2023-08-18 北京捷泰云际信息技术有限公司 Method and system for constructing map application based on low-code platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419705A (en) * 2011-09-30 2012-04-18 广州杰赛科技股份有限公司 Method and device for generating and managing Web geographic information system (GIS) client control
CN103559009A (en) * 2013-10-30 2014-02-05 浙江省公众信息产业有限公司 Geographic information terminal and geographic information presentation method
KR20140019623A (en) * 2012-08-06 2014-02-17 인크로스 주식회사 An integrated platform for authoring web applications and the authoring method thereof
CN104599324A (en) * 2015-02-06 2015-05-06 浪潮集团有限公司 Map data loading method and map data loading device based on GIS (geographic information system) platform
CN106126294A (en) * 2016-06-29 2016-11-16 泰华智慧产业集团股份有限公司 Map based on flex technology accesses operation plug-in unit and generates method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102419705A (en) * 2011-09-30 2012-04-18 广州杰赛科技股份有限公司 Method and device for generating and managing Web geographic information system (GIS) client control
KR20140019623A (en) * 2012-08-06 2014-02-17 인크로스 주식회사 An integrated platform for authoring web applications and the authoring method thereof
CN103559009A (en) * 2013-10-30 2014-02-05 浙江省公众信息产业有限公司 Geographic information terminal and geographic information presentation method
CN104599324A (en) * 2015-02-06 2015-05-06 浪潮集团有限公司 Map data loading method and map data loading device based on GIS (geographic information system) platform
CN106126294A (en) * 2016-06-29 2016-11-16 泰华智慧产业集团股份有限公司 Map based on flex technology accesses operation plug-in unit and generates method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116610319A (en) * 2023-06-06 2023-08-18 北京捷泰云际信息技术有限公司 Method and system for constructing map application based on low-code platform

Similar Documents

Publication Publication Date Title
CN111552473B (en) Application processing method, device and equipment
US7428542B1 (en) Method and system for combining nodes into a mega-node
CN112559667B (en) Map editor, map engine, map editing system, map editing method, and storage medium
CN111221522A (en) Automatic code generation method of front-end and back-end separation architecture for government intensive application development
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN111190519A (en) File and control processing method, device, equipment and storage medium thereof
CN116466935A (en) Template processing method, device, computer equipment and storage medium
CN112486476A (en) Map generation method, map generation device, storage medium and computer equipment
CN110674205B (en) Single table query method, device, terminal and readable storage medium
CN107179920A (en) Network engine starts method and device
CN105701854A (en) 3D rendering method and device and engine
CN109636346A (en) A kind of document handling method and ERP client
CN109445780B (en) Method and equipment for editing styles
CN103488380A (en) Method and device for displaying information
CN108874495B (en) Theme resource conversion method and device and electronic equipment
CN114185522A (en) Page theme customizing method and device, electronic equipment and storage medium
CN115049755A (en) Picture generation method, device, equipment and storage medium
CN112764802A (en) Business logic customization method and device, electronic equipment and storage medium
CN114018243A (en) Map data processing method, device, equipment and storage medium
CN109145263B (en) Document processing method and device and computer readable storage medium
CN112434004A (en) Data migration method and device for heterogeneous system, computer equipment and storage medium
KR100349677B1 (en) Component-based open gis apparatus
CN109948123A (en) A kind of image combining method and device
CN115495469B (en) Method and device for updating chart file and electronic equipment
CN110995806B (en) Resource state conversion method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination