WebGIS business data storage method, system and computer-readable storage medium
By obtaining and saving business data from local JS files in WebGIS applications, the problem of insufficient user data security in WebGIS system is solved, and higher data storage security is achieved.
Patent Information
- Application Number
- CN202311215994.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2043-09-19
AI Technical Summary
In the existing WebGIS geographic information system, there is a risk of security and leakage when user data is stored on application servers.
By requesting the GIS server to obtain geographic information data and obtaining corresponding business data from the local JS file, displaying the user equipment distribution planning geographic information application in the WebGIS application web page, and saving business data to the local JS file in response to the data saving instruction middle.
It effectively improves the security of data storage and avoids the risk of user data leakage on application servers.
Smart Images

Figure CN117171796B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a storage method and system for WebGIS business data and a computer-readable storage medium. Background Art
[0002] WebGIS in the geographic information system uses a browser to display geographic information and business data, and has the advantages of data visualization, simple operation, low development and management costs, and convenient information sharing.
[0003] However, the current method of visualizing user data of WebGIS geographic information system on the browser side is usually: the browser obtains geographic information on the GIS server through HTTP protocol and displays it as a geographic information layer; obtains user data on the application server and displays it as a business service layer. The defect of the above method is that the business data (user data) stored on the application server involves security and leakage risks.
[0004] Based on this, it is necessary to provide a storage method for WebGIS business data to improve the security of data storage. Summary of the invention
[0005] In order to solve at least one of the technical problems mentioned above, the present invention provides a storage method and system for WebGIS business data and a computer-readable storage medium.
[0006] In a first aspect, a method for storing WebGIS business data is provided, comprising the following steps:
[0007] Request geographic information data from the GIS server and obtain corresponding business data from the local JS file;
[0008] Based on the geographic information data and the business data, displaying the user equipment distribution planning geographic information application in the WebGIS application webpage;
[0009] In response to the data saving instruction on the WebGIS application webpage, the current business data is saved in a local JS file.
[0010] In a possible implementation, the requesting the GIS server to obtain geographic information data includes:
[0011] Apply for geographic information service application key from GIS server;
[0012] A local WebGIS application webpage is created using the JS development interface and the application key, and geographic information data is displayed on the WebGIS application webpage.
[0013] In a possible implementation, the geographic information data includes geographic information and map controls;
[0014] The geographic information includes place names, buildings, terrain, administrative regions and road networks; the map controls include a scale bar, a zoom toolbar, an eagle eye view and distance measurement.
[0015] In a possible implementation, the business data is stored in JavaScript data format for invocation by a WebGIS application web page;
[0016] The business data includes the site name, geographical location, device type, device identification and planning description of the device; wherein the site name is recorded in JavaScript string format, the geographical location is recorded in the latitude and longitude format of the GIS server, and the planning description is recorded in JavaScript string format; the data of each device of the same type constitutes a JavaScript array; the device identification is recorded in JavaScript string format, and the content is the identification icon address; various types of device data constitute a JavaScript data group and are assigned to the JavaScript variable InstrumentData.
[0017] In one possible implementation, the business data is displayed in such a way that the WebGIS application webpage references the business data js file. In the WebGIS application webpage display initialization JavaScript code, the business data in the InstrumentData variable is displayed as a device type list, a site distribution layer, and a site details form.
[0018] In a possible implementation, the current business data is saved in a local JS file, including:
[0019] If the current business data is newly added business data, it is added and saved in a new local JS file;
[0020] If the current business data is business data modified based on the original business data, it is saved in a local JS file to overwrite the JS file corresponding to the original business data.
[0021] In a possible implementation, the current business data is saved in a local JS file, including:
[0022] Determining the type of browser used by the user through JavaScript code in the WebGIS application webpage;
[0023] If the browser type is Chome or Safari, use the FileReader object to save the business data as a JS file;
[0024] If the browser type is IE, the msSaveOrOpenBlob method of the navigator object is used to save the business data as a JS file.
[0025] In an embodiment of the present invention, through the above-mentioned possible implementation method, a request is made to a GIS server to obtain geographic information data, and corresponding business data is obtained from a local JS file; based on the geographic information data and the business data, a user device distribution planning geographic information application is displayed in a WebGIS application web page; in response to a data saving instruction on the WebGIS application web page, the current business data is saved in a local JS file, which can effectively improve the security of data storage.
[0026] In the second aspect, a WebGIS business data storage system is provided, including:
[0027] The data acquisition module is used to request geographic information data from the GIS server and obtain the corresponding business data from the local JS file;
[0028] A data display module, used to display the user equipment distribution planning geographic information application in the WebGIS application webpage based on the geographic information data and the business data;
[0029] The data storage module is used to respond to the data saving instruction on the WebGIS application web page and save the current business data into a local JS file.
[0030] In a third aspect, a WebGIS business data storage system is provided, including a user device and a GIS server;
[0031] The user device is used to request the GIS server to obtain geographic information data and obtain corresponding business data from the local JS file;
[0032] The GIS server is used to respond to the data request corresponding to the planning operation instruction of the user device and send the corresponding data to the user device;
[0033] The user device is used to display the user device distribution planning geographic information application in the WebGIS application webpage based on the geographic information data and the business data;
[0034] The user device is used to respond to the data saving instruction on the WebGIS application webpage and save the current business data into a local JS file.
[0035] In a fourth aspect, a computer-readable storage medium is provided, in which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the WebGIS business data storage method as described above.
[0036] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0038] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0039] Figure 1 A flowchart of a method for storing WebGIS business data provided in an embodiment of the present application;
[0040] Figure 2 A schematic diagram of the structure of a WebGIS business data storage system provided in an embodiment of the present application;
[0041] Figure 3 A schematic diagram of the structure of a WebGIS business data storage system provided in an embodiment of the present application;
[0042] Figure 4 A schematic diagram of the hardware structure of a WebGIS business data storage system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0044] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0045] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0046] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0047] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It should be understood by those skilled in the art that the present invention can be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present invention.
[0048] At present, the visualization method of user data of WebGIS geographic information system on the browser side is usually: the browser obtains geographic information on the GIS server through HTTP protocol and displays it as a geographic information layer; obtains user data on the application server and displays it as a business service layer. The defect of this method is that the business data (user data) stored on the application server involves security and leakage risks.
[0049] Based on this, there is a need to provide a WebGIS business data storage method to improve the security of data storage.
[0050] A GIS server is a server used to store, manage, and distribute geographic information data and services. GIS stands for Geographic Information System, which is a technology for organizing and analyzing geographic spatial data. The main functions of a GIS server are to store and manage spatial data and provide mapping and spatial analysis services over the Internet or an intranet.
[0051] GIS servers usually have the following characteristics:
[0052] Data storage: GIS servers can store various types of geospatial data, such as maps, satellite images, spatial vector data, etc. Data can be stored in specific formats, such as geographic databases, file systems, data services, etc.
[0053] Data management: GIS server provides management functions for geographic spatial data, including data organization, retrieval and update. Users can access and operate data through GIS server.
[0054] Data publishing: GIS servers can publish geospatial data to users in different forms, such as Web map services, geoprocessing services, etc. Users can access these services through the Internet or intranet, and use maps, query and analysis tools to operate and analyze spatial data.
[0055] Security: GIS servers usually have security control functions that can control permissions for data and services to ensure that only authorized users can access and use data.
[0056] Scalability: GIS server can be expanded as needed to adapt to GIS applications of different scales and requirements. It can support large-scale data storage and high concurrent access to ensure system performance and stability.
[0057] GIS servers are widely used in various fields, including urban planning, environmental protection, traffic management, agriculture, weather forecasting, etc. Through GIS servers, users can use geographic information data for spatial analysis, decision support, resource management and other tasks.
[0058] Local JS files refer to JavaScript files stored on the local computer. These files are usually independent script files that contain some JavaScript codes to achieve different functions and effects on web pages.
[0059] You can reference local JS files in HTML files by following the steps below:
[0060] Create a .js file on your local computer and write the JavaScript code you want to execute.
[0061] Use in your HTML file section or parts
[0062] <script src="yourlocalfile.js">< / script>
[0063] Make sure to set the correct file path. If your .js file is in the same directory as the HTML file, you only need to enter the file name. If the .js file is in a different directory, you need to provide the correct relative or absolute path.
[0064] Save and refresh the HTML file, and the JavaScript code in your local .js file will be executed.
[0065] It should be noted that when using local JS files, make sure that the spelling and capitalization of the file path and file name are correct, otherwise the reference will fail. In addition, you can also use a relative path or an absolute path to reference the JS file, and set it according to the specific file storage location.
[0066] See also Figure 1 , Figure 1 A flowchart of a method for storing WebGIS business data provided in an embodiment of the present application.
[0067] S10, requesting geographic information data from the GIS server, and obtaining corresponding business data from the local JS file.
[0068] In a possible implementation, the requesting the GIS server to obtain geographic information data includes:
[0069] Apply for geographic information service application key from GIS server;
[0070] A local WebGIS application webpage is created using the JS development interface and the application key, and geographic information data is displayed on the WebGIS application webpage.
[0071] In one possible implementation, the geographic information data includes geographic information and map controls; the geographic information includes place names, buildings, terrain, administrative regions and road networks; and the map controls include a scale, a zoom toolbar, an eagle-eye view and distance measurement.
[0072] In this implementation, apply for a geographic information service application key from a third-party geographic information platform, use the JS development interface and application key of the third-party geographic information platform to create a local WebGIS application web page, open the local web page on the browser, and display the geographic information of the third-party platform.
[0073] Furthermore, the geographic information that can be applied to the equipment distribution planning business by the third-party geographic information platform includes: place names, buildings, terrain, administrative regions and road networks; the map controls that can be applied to the equipment distribution planning business include: scale, zoom toolbar, eagle eye view, and distance measurement. When creating a local WebGIS application webpage, write JavaScript code to call the corresponding third-party geographic information platform JS interface and use the geographic information and map controls mentioned above.
[0074] In a possible implementation, the business data is stored in JavaScript data format for invocation by a WebGIS application web page;
[0075] The business data includes the site name, geographical location, device type, device identification and planning description of the device; wherein the site name is recorded in JavaScript string format, the geographical location is recorded in the latitude and longitude format of the GIS server, and the planning description is recorded in JavaScript string format; the data of each device of the same type constitutes a JavaScript array; the device identification is recorded in JavaScript string format, and the content is the identification icon address; various types of device data constitute a JavaScript data group and are assigned to the JavaScript variable InstrumentData.
[0076] In one possible implementation, the business data is displayed in such a way that the WebGIS application webpage references the business data js file. In the WebGIS application webpage display initialization JavaScript code, the business data in the InstrumentData variable is displayed as a device type list, a site distribution layer, and a site details form.
[0077] In this implementation, the business data js file format is as follows:
[0078]
[0079]
[0080] The business data display method is that the WebGIS application web page references the business data js file, and displays the business data in the InstrumentData variable as a device type list, site distribution layer, and site details form in the web page display initialization JavaScript code.
[0081] Furthermore, the device type types array in the InstrumentData variable is displayed as a list of device types. The tname in the types array element is displayed as the type name in the list, and the icon is displayed as the type icon. The stations array in the types array element is displayed as a station distribution map, where each element of the stations array is displayed as a point marker (Maker) of a third-party geographic information platform, the position in the element is converted into the coordinates of the point marker, and the icon in the upper layer is displayed as the icon of the point marker.
[0082] When you click on a point mark, the corresponding site detailed information form is displayed. In the form, the site name is sname, the site location is position, and the planning description is plan.
[0083] Add, delete, and modify business data. To add equipment planning, click on the equipment type list, select the equipment type to be added to the planning site, and then click the mouse on the planning location on the map. The system will then add a blank point mark of the equipment type at the clicked location and display a blank site details form, where the longitude and latitude input boxes have been filled with longitude and latitude coordinate values. After the user enters the complete site information, click the Add button to complete the operation. For deletion and modification operations, the user clicks the Delete or Modify button in the Site Details form after selecting the equipment point mark to complete the operation.
[0084] S20. Based on the geographic information data and the business data, display the user equipment distribution planning geographic information application in the WebGIS application webpage.
[0085] In this implementation, geographic information data and business data are obtained. Use a WebGIS development framework or library, such as Leaflet or OpenLayers, to create a map container for displaying a map. Load the acquired geographic information data into the map. You can use GeoJSON or WMS services to add geographic information data to a map layer. These data can be the location coordinates of a user's device, area boundaries, and so on. According to the needs of the business data, associate the business data with the geographic information data. For example, you can add color identification or other map symbols to devices on the map based on the business data to display the status or properties of the device.
[0086] Add interactive functions based on user needs. For example, you can add interactive functions such as zooming, panning, and clicking on device icons to obtain detailed information to provide a user-friendly map operation and data viewing experience.
[0087] Add other components and controls, such as search boxes, legends, layer switching tools, etc., according to the layout and needs of the map.
[0088] Finally, the WebGIS application web page is deployed on the web server for users to access and use.
[0089] It should be noted that the frameworks and libraries mentioned above are just a few examples. You can choose the appropriate development tools according to your needs. At the same time, for loading and displaying geographic information data, you can also consider using the API of map service providers, such as Google Maps API or Mapbox API.
[0090] S30. Respond to the data saving instruction on the WebGIS application webpage and save the current business data into a local JS file.
[0091] In a possible implementation, the current business data is saved in a local JS file, including:
[0092] If the current business data is newly added business data, it is added and saved in a new local JS file;
[0093] If the current business data is business data modified based on the original business data, it is saved in a local JS file to overwrite the JS file corresponding to the original business data.
[0094] In a possible implementation, the current business data is saved in a local JS file, including:
[0095] Determining the type of browser used by the user through JavaScript code in the WebGIS application webpage;
[0096] If the browser type is Chome or Safari, use the FileReader object to save the business data as a JS file;
[0097] If the browser type is IE, the msSaveOrOpenBlob method of the navigator object is used to save the business data as a JS file.
[0098] In this implementation, first, get the current business data. Use the file operation API in JavaScript, such as the File API or the Blob API, to create a new file object or file stream. Convert the business data into a string format. You can use the JSON.stringify() method to convert the data object into a JSON string. Write the business data string into the newly created file object. Finally, use the local file operation API to save the file object to a local JS file. You can use APIs such as FileWriter or XMLHttpRequest to save the file to a specified location.
[0099] It should be noted that in a browser environment, due to security and privacy restrictions, JavaScript cannot directly save files locally on the client side. The function of saving files locally requires active user operations or the browser's download function.
[0100] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0101] The method of the embodiment of the present application is described in detail above, and the system of the embodiment of the present application is provided below.
[0102] See also Figure 2 , Figure 2 A schematic diagram of the structure of a WebGIS business data storage system provided in an embodiment of the present application.
[0103] In the second aspect, a WebGIS business data storage system is provided, including:
[0104] The data acquisition module 100 is used to request geographic information data from the GIS server and obtain corresponding business data from the local JS file;
[0105] The data display module 200 is used to display the user equipment distribution planning geographic information application in the WebGIS application webpage based on the geographic information data and the business data;
[0106] The data storage module 300 is used to respond to the data saving instruction on the WebGIS application webpage and save the current business data into a local JS file.
[0107] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0108] See also Figure 3 , Figure 3 A schematic diagram of the structure of a WebGIS business data storage system provided in an embodiment of the present application.
[0109] In a third aspect, a WebGIS business data storage system is provided, including a user device 10 and a GIS server 20;
[0110] The user device 10 is used to request the GIS server 20 to obtain geographic information data and obtain corresponding business data from a local JS file;
[0111] The GIS server 20 is used to respond to the data request corresponding to the planning operation instruction of the user device 10 and send the corresponding data to the user device 10;
[0112] The user device 10 is used to display the user device distribution planning geographic information application in the WebGIS application webpage based on the geographic information data and the business data;
[0113] The user device 10 is used to respond to the data saving instruction on the WebGIS application webpage and save the current business data into a local JS file.
[0114] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0115] In a fourth aspect, the present application also provides a processor, which is used to execute a method as described in any possible implementation manner.
[0116] In a fifth aspect, the present application also provides an electronic device, comprising: a processor, a sending device, an input device, an output device and a memory, wherein the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method as described in any possible implementation manner.
[0117] In a sixth aspect, a computer-readable storage medium is provided, in which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed by a processor of an electronic device, the processor executes the WebGIS business data storage method as described above.
[0118] Seventh, see Figure 4 , Figure 4 A schematic diagram of the hardware structure of a WebGIS business data storage system provided in an embodiment of the present application.
[0119] The automated test device 2 includes a processor 21, a memory 24, an input device 22, and an output device 23. The processor 21, the memory 24, the input device 22, and the output device 23 are coupled via a connector, and the connector includes various interfaces, transmission lines, or buses, etc., which are not limited in the embodiments of the present application. It should be understood that in each embodiment of the present application, coupling refers to mutual connection in a specific manner, including direct connection or indirect connection through other devices, for example, through various interfaces, transmission lines, buses, etc.
[0120] The processor 21 may be one or more graphics processing units (GPUs). When the processor 21 is a GPU, the GPU may be a single-core GPU or a multi-core GPU. Optionally, the processor 21 may be a processor group consisting of multiple GPUs, and the multiple processors are coupled to each other via one or more buses. Optionally, the processor may also be other types of processors, etc., which are not limited in the embodiments of the present application.
[0121] The memory 24 can be used to store computer program instructions and various computer program codes including the program code for executing the program code of the present application. Optionally, the memory includes but is not limited to random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or portable read-only memory (CD-ROM), which is used for related instructions and data.
[0122] The input device 22 is used to input data and / or signals, and the output device 23 is used to output data and / or signals. The output device 23 and the input device 22 may be independent devices or an integrated device.
[0123] It is understandable that in the embodiment of the present application, the memory 24 can not only be used to store related instructions, and the embodiment of the present application does not limit the specific data stored in the memory.
[0124] Understandably, Figure 4 Only a simplified design of the hardware structure is shown. In practical applications, the hardware structure may also include other necessary components, including but not limited to any number of input / output devices, processors, memories, etc., and all video analysis devices that can implement the embodiments of the present application are within the scope of protection of the present application.
[0125] Those of ordinary skill in the art will appreciate that the units 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.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those skilled in the art can also clearly understand that the descriptions of the various embodiments of the present application have different focuses. For the convenience and brevity of description, the same or similar parts may not be repeated in different embodiments. Therefore, for parts not described or not described in detail in a certain embodiment, refer to the records of other embodiments.
[0127] In the several embodiments provided in the present application, it should be understood that the disclosed systems, 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 units is only a logical function division. There may be other division methods in actual implementation, such as multiple units 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 units, which can be electrical, mechanical or other forms.
[0128] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0130] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).
[0131] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: read-only memory (ROM) or random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
Claims
1. A method for storing WebGIS business data, characterized in that: The steps include: Request geographic information data from the GIS server and obtain corresponding business data from the local JS file; Based on the geographic information data and the business data, displaying the user equipment distribution planning geographic information application in the WebGIS application webpage; In response to the data saving instruction on the WebGIS application webpage, the current business data is saved in a local JS file, including: if the current business data is newly added business data, it is added and saved in a local new JS file; If the current business data is business data modified based on the original business data, it is saved in a local JS file to overwrite the JS file corresponding to the original business data; in the WebGIS application web page, the type of browser used by the user is determined by JavaScript code; if the browser type is Chome or Safari, the FileReader object is used to save the business data as a JS file; if the browser type is IE, the msSaveOrOpenBlob method of the navigator object is used to save the business data as a JS file.
2. The method for storing WebGIS business data according to claim 1, characterized in that: The requesting the GIS server to obtain geographic information data includes: Apply for geographic information service application key from GIS server; A local WebGIS application webpage is created using the JS development interface and the application key, and geographic information data is displayed on the WebGIS application webpage.
3. The method for storing WebGIS business data according to claim 2, characterized in that: The geographic information data includes geographic information and map controls; The geographic information includes place names, buildings, terrain, administrative regions and road networks; the map controls include a scale bar, a zoom toolbar, an eagle eye view and distance measurement.
4. The method for storing WebGIS business data according to claim 1, characterized in that: The business data is stored in JavaScript data format for calling by WebGIS application web pages; The business data includes the site name, geographical location, device type, device identification and planning instructions of the device; wherein the site name is recorded in JavaScript string format, the geographical location is recorded in the latitude and longitude format of the GIS server, and the planning instructions are recorded in JavaScript string format; the data of each device of the same type constitutes a JavaScript array; the device identification is recorded in JavaScript string format, and the content is the identification icon address; various types of device data constitute a JavaScript data group and are assigned to the JavaScript variable InstrumentData.
5. The method for storing WebGIS business data according to claim 4, characterized in that: The business data is displayed in a manner that the WebGIS application webpage references the business data js file. In the WebGIS application webpage display initialization JavaScript code, the business data in the InstrumentData variable is displayed as a device type list, a site distribution layer and a site detailed information form.
6. A WebGIS business data storage system, characterized in that: include: The data acquisition module is used to request geographic information data from the GIS server and obtain the corresponding business data from the local JS file; A data display module, used to display the user equipment distribution planning geographic information application in the WebGIS application webpage based on the geographic information data and the business data; The data storage module is used to respond to the data saving instruction on the WebGIS application webpage and save the current business data into a local JS file, including: if the current business data is newly added business data, then add and save it into a local new JS file; If the current business data is business data modified based on the original business data, it is saved in a local JS file to overwrite the JS file corresponding to the original business data; in the WebGIS application web page, the type of browser used by the user is determined by JavaScript code; if the browser type is Chome or Safari, the FileReader object is used to save the business data as a JS file; if the browser type is IE, the msSaveOrOpenBlob method of the navigator object is used to save the business data as a JS file.
7. A WebGIS business data storage system, characterized in that: Includes user equipment and GIS server; The user device is used to request the GIS server to obtain geographic information data and obtain corresponding business data from the local JS file; The GIS server is used to respond to the data request corresponding to the planning operation instruction of the user device and send the corresponding data to the user device; The user device is used to display the user device distribution planning geographic information application in the WebGIS application webpage based on the geographic information data and the business data; The user device is used to respond to the data saving instruction on the WebGIS application webpage and save the current business data into a local JS file, including: if the current business data is newly added business data, adding and saving it into a local new JS file; If the current business data is business data modified based on the original business data, it is saved in a local JS file to overwrite the JS file corresponding to the original business data; in the WebGIS application web page, the type of browser used by the user is determined by JavaScript code; if the browser type is Chome or Safari, the FileReader object is used to save the business data as a JS file; if the browser type is IE, the msSaveOrOpenBlob method of the navigator object is used to save the business data as a JS file.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor of an electronic device, the processor executes the WebGIS business data storage method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Shopping mall visual rental management method and system based on building construction information model
CN107833105A