A method for transferring WebGIS information to network collaborative office software
By introducing the Connector and CommandService SDK of collaborative office software into the GIS system, real-time transmission of WebGIS information to the network collaborative office software is realized, solving the problem that GIS data cannot achieve real-time interaction with external systems in the existing technology, and improving application scenarios and user experience.
Patent Information
- Application Number
- CN202510011932.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2045-01-06
AI Technical Summary
In the existing method of transmitting WebGIS information to network collaborative office software, the API service process is to interact across systems through HTTP, and real-time performance is not guaranteed, resulting in real-time interaction between GIS data and external systems, and the application scenarios are limited.
By introducing and initializing the Connector of the collaborative office software in the GIS system, establishing a long connection between the GIS system and the collaborative office software, importing the SDK of the Connector and CommandService, adding the entry point for the document editing function to the user interface of the GIS system, using the Connector to call the callCommand method of the CommandService to trigger interaction with the collaborative office software, real-time data transmission and processing are realized.
Real-time transmission of WebGIS information to network collaborative office software is realized, the real-time interaction between GIS data and external systems is improved, application scenarios are expanded, and user experience and work efficiency are improved.
Smart Images

Figure CN119415588B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geographic information system technology, and in particular to a method for transmitting WebGIS information to network collaborative office software. Background Art
[0002] With the development of computer technology, the application scope of computer graphics and geographic information system (GIS) is becoming wider and wider. These technologies play an important role in urban planning, construction management, agricultural climate zoning, air pollution monitoring and management, road traffic management, earthquake disaster and loss estimation, medical care, military and other fields.
[0003] In GIS (Geographic Information System), line and surface data structures are important components for describing geospatial data. These data structures help us represent and store geographic phenomena in a digital way, so as to perform various spatial analyses and operations. Line data structures are used to represent linear features in geographic space, such as roads, rivers, transmission lines, etc. Line data usually consists of a series of ordered points (called vertices or nodes) connected by line segments to form a continuous path. Surface data structures are used to represent surface features in geographic space, such as lakes, administrative districts, forests, etc. Surface data usually consists of a closed area surrounded by a series of line segments (called boundaries). Surface data can be polygonal (composed of straight line segments) or curvilinear (composed of curved line segments).
[0004] The production of point and surface data requires an editing and generation process. The edited data and products can be queried through the API (Application Programming Interface) and returned in structured and unstructured forms to serve different external systems.
[0005] In the existing method of transmitting WebGIS information to network collaborative office software, the service process of API is to interact across systems in the form of HTTP, and the real-time performance is not guaranteed, so the purpose of real-time interaction between GIS data and external systems in the process cannot be achieved, resulting in limited application scenarios. In summary, a method of transmitting WebGIS information to network collaborative office software is provided. Summary of the invention
[0006] The purpose of the present invention is to provide a method for transmitting WebGIS information to network collaborative office software, so as to solve the problem proposed in the above background technology that in the existing method for transmitting WebGIS information to network collaborative office software, the service process of API is to interact across systems in the form of HTTP, and the real-time performance is not guaranteed. The specific steps of the service process of API are: first, clarify the URL, request method, necessary parameters and identity authentication information (such as API key) of the relevant GIS business service API; second, use the HTTP framework (such as Python's requests library) provided by the collaborative office software to send HTTP requests; third, after obtaining GIS data through HTTP requests, the collaborative office software performs local operations; finally, due to the working principle of HTTP, after obtaining the request data, the connection between the client (collaborative office software) and the server (GIS system) is closed. When there is no new request, the server will not actively send data to the client, and the client (collaborative office software) cannot perceive the changes of the server (GIS) (such as when GIS real-time mapping and other time-series businesses are carried out, the GIS end data will continue to change. Therefore, the purpose of real-time interaction between GIS data and external systems in the process cannot be achieved, resulting in the problem of limited application scenarios.
[0007] To achieve the above object, the present invention provides a method for transmitting WebGIS information to network collaborative office software, comprising the following steps:
[0008] S1. Establish a long connection between the GIS system and the collaborative office software by introducing and initializing the Connector of the collaborative office software in the GIS system;
[0009] S2. Import the SDK of Connector and CommandService into the WebGIS system;
[0010] S3. Add an entry point for document editing functions in the user interface of the GIS system;
[0011] S4. When the user completes the plotting, a plotting completion event is triggered. The GIS system calls the callCommand method of CommandService through Connector to trigger the interaction with the collaborative office software, which is used to start the interactive session between the system and the document data.
[0012] S5. Check and process incoming information in collaborative office software;
[0013] S6. After confirming that the content processing is complete, the collaborative office software save method is called. The document editing service monitors the document completion work and collects and forwards the modified content to DocumentServer. DocumentServer completes the file change (troubleshooting).
[0014] As a further improvement of the technical solution, in S1, the installation and configuration need to set up the development environment according to the project requirements, and ensure that the development environment supports integration with collaborative office software;
[0015] Among them, the development environment includes the selection of programming languages, frameworks, databases, dependencies, and tools;
[0016] Combined with business needs, Connector provides a series of built-in business extension methods to expand specific business. The main extension methods include:
[0017] attachEvent - add an event listener;
[0018] callCommand - sends data back to the editor;
[0019] connect - connects the connector to the editor;
[0020] detachEvent - removes an event listener;
[0021] disconnect - disconnects the connector from the editor;
[0022] executeMethod - executes some editor method using the connector;
[0023] callCommand – is the function used to send data back to the editor;
[0024] The connector sends structured data that can be inserted into the generated document file (formatted paragraphs, tables, text sections, separate words, etc.). Here, it is necessary to implement the callCommand method in the Connector to transmit the data after the GIS mapping event in text form to the collaborative office software. CallCommand first introduces the transmission event callback command tool CommandService and connects this scenario in series.
[0025] As a further improvement of this technical solution, in S2, the specific steps of importing the SDK of Connector and CommandService are:
[0026] S2.1. Determine the GIS system framework, using Cesium as the 2D and 3D WebGIS terminal;
[0027] S2.2. Identify the common objects that Cesium needs to interact with;
[0028] S2.3. Determine the package of network office collaboration software introduced by Cesium and import it.
[0029] As a further improvement of the technical solution, in S2.2, the commonly used objects include:
[0030] Point: represents a point in geographic space; customize its appearance by setting its location, color, and size attributes; often used to mark city locations and places;
[0031] Line: represents a line or path in geographic space; consists of multiple points, each with its own location; customize its appearance by setting the line's color, width, and style attributes; used to draw aircraft routes and roads;
[0032] Face: represents a polygonal area in geographic space, consisting of multiple points and a center point; its appearance can be customized by setting the face color, border color, and transparency properties; it is used to represent geographic areas and administrative regions.
[0033] As a further improvement of the technical solution, in S3, the specific steps of adding an entry point for the document editing function are:
[0034] S3.1. Determine the data flow connection direction;
[0035] S3.2, determine the event triggered by the data stream push process;
[0036] S3.3. Write event-triggered data processing functions to meet display requirements in the GIS system;
[0037] S3.4. When an event is triggered, the function is called, and the function pushes the data stream to the collaborative office software through the Connector;
[0038] Among them, the entry point of the document editing function is marked and completed according to business needs, and the text content is obtained after the event is triggered. After the content is obtained, the method of sending it to the collaborative office software through the callCommand of CommandService provides an entry point for GIS information transmission for the document editing function.
[0039] As a further improvement of the present technical solution, in S3.2, the triggered events include: camera events, screen events, keyboard events, scene rendering events, timeline binding events, and monitoring events triggered by other changes.
[0040] Among them, the camera event: CameraChanged: triggered when the camera changes.
[0041] CameraMoveStart: Triggered when the camera starts moving.
[0042] CameraMoveEnd: Triggered when the camera stops moving.
[0043] Screen events: The Screen Space Event Handler handles events related to mouse and keyboard input. For example, you can listen to the left button, right button, wheel events, and mouse movement events of the mouse. Cesium has designed relevant APIs for these events.
[0044] Keyboard events: Used with the keyboard modifier type (KeyboardEventModifier) in the screen space event handler for events related to keyboard input. These keyboard modifiers cannot be used alone and need to be used in conjunction with mouse input events.
[0045] Scene rendering event: ScenePreRender: triggered before scene rendering.
[0046] Scene.PostRender: Triggered after scene rendering is completed.
[0047] scenePreUpdate: Triggered before the scene is updated.
[0048] Timeline binding event: ViewerClockonTick: triggered every time the clock ticks (that is, the time is updated).
[0049] ViewerClockonStop: Triggered when the clock stops.
[0050] Listening events triggered by other changes: Depending on your specific needs, many other objects and properties in Cesium also support event listening. For example, when the properties of an entity change, you can listen to the changed event of the entity.
[0051] As a further improvement of the technical solution, in S3.3, the specific steps of writing the event-triggered data processing function are as follows:
[0052] S3.21, first instantiate the relevant classes of Cesium;
[0053] S3.22, then register the event processing function, use the de-jitter technology to optimize the calling frequency of the event processing function, and introduce a cache variable lastDrawData to store the last plotting data;
[0054] S3.23. Use the AddeventListener method to register an event handling function;
[0055] S3.24. When the event is triggered, the sendDataToOffice function is introduced to use async / await for asynchronous processing to ensure that the operation of sending data does not block the main thread. Cesium will automatically call the registered event processing function.
[0056] As a further improvement of the technical solution, in S4, the specific steps of triggering the interaction with the collaborative office software are:
[0057] S4.1, Transmit WebGIS information to the collaborative office software carrier. Assuming that the user has marked points in the WebGIS system, these points are points with certain business attributes. These points are transmitted to the office software carrier through events, and the event interaction logic is integrated;
[0058] S4.2. The transmission operation of S4.1 will call the CallCommand method, triggering the interaction between the Connector and the event, and transmitting the WebGIS mapping information to the collaborative office software carrier.
[0059] As a further improvement of the present technical solution, in S5, after the WebGIS information is transmitted to the collaborative office software carrier, the collaborative office software is further processed according to the editing and operation of the specific carrier.
[0060] As a further improvement of the technical solution, in S6, the collaborative office software saving method is called to communicate with the DocumentServer in real time to update the document content in real time during the editing process.
[0061] Compared with the prior art, the present invention has the following beneficial effects:
[0062] 1. This method of transmitting WebGIS information to network collaborative office software simplifies the development complexity through SDK integration, allowing the WebGIS system to directly call the Connector function without writing all interface codes from scratch, improving development efficiency and system scalability. By adding an entry point for the document editing function in the user interface of the GIS system, the user experience is improved. Users can quickly start document editing without leaving the GIS system interface, making the workflow more coherent, reducing interruptions caused by switching applications, and improving work efficiency.
[0063] 2. In this method of transmitting WebGIS information to network collaborative office software, the GIS system triggers the interaction with the collaborative office software through the Connector, achieving seamless connection, intuitive and simple user operation, and lowering the threshold for use. By instantly responding to user operation requests, the immediacy and fluency of interaction are improved. After confirming that the content has been processed, the collaborative office software save method is called. The document editing service monitors the completion of the document work and collects and forwards the modified content to DocumentServer. DocumentServer completes the file change (troubleshooting), realizing real-time synchronization of data, ensuring that the latest changes to the document can be immediately saved and reflected to all collaborative members, and improving the efficiency of team collaboration and data consistency. The real-time communication mechanism reduces the need for manual saving and refreshing, and keeps the information up to date. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 is a flow chart of the overall method of the present invention;
[0065] Figure 2 A diagram showing a specific method for handling data conflicts. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] Example: See Figure 1-2 As shown, this embodiment provides a method for transmitting WebGIS information to network collaborative office software, including the following steps:
[0068] S1. Establish a long connection between the GIS system and the collaborative office software by introducing and initializing the Connector of the collaborative office software in the GIS system;
[0069] In this embodiment, installation and configuration require setting up a development environment according to project requirements, and ensuring that the development environment supports integration with collaborative office software (Office-like);
[0070] Among them, the development environment includes the selection of programming languages, frameworks, databases, dependencies, and tools;
[0071] Combined with business needs, Connector provides a series of built-in business extension methods to expand specific business. The main extension methods include:
[0072] attachEvent - add an event listener;
[0073] callCommand - sends data back to the editor;
[0074] connect - connects the connector to the editor;
[0075] detachEvent - removes an event listener;
[0076] disconnect - disconnects the connector from the editor;
[0077] executeMethod - executes some editor method using the connector;
[0078] callCommand – is the function used to send data back to the editor;
[0079] The connector sends structured data that can be inserted into the generated document file (formatted paragraphs, tables, text sections, separate words, etc.). Here, it is necessary to implement the callCommand method in the Connector to transmit the data after the GIS mapping event in text form to the collaborative office software. CallCommand first introduces the transmission event callback command tool CommandService and connects this scenario in series.
[0080] S2. Import the SDK of Connector and CommandService into the WebGIS system;
[0081] In this embodiment, the specific steps for importing the SDK of Connector and CommandService are:
[0082] S2.1. Determine the GIS system framework, using Cesium as the 2D and 3D WebGIS terminal;
[0083] S2.2. Identify the common objects that Cesium needs to interact with;
[0084] In this embodiment, commonly used objects include:
[0085] Point: represents a point in geographic space; customize its appearance by setting its location, color, and size attributes; often used to mark city locations and places;
[0086] Specifically, the description of the point is updated as a point in GIS can be used to represent a specific geographic location, such as a city, building, GPS location point, etc. In GIS spatial analysis: points can be used as the basic unit of analysis to calculate spatial relationships such as distance, direction, density, etc. In GIS data visualization: points can be used to mark specific locations on the map to help users intuitively understand spatial distribution and patterns;
[0087] Line: represents a line or path in geographic space; consists of multiple points, each with its own location; customize its appearance by setting the line's color, width, and style attributes; used to draw aircraft routes and roads;
[0088] Face: represents a polygonal area in geographic space, consisting of multiple points and a center point; its appearance can be customized by setting the face color, border color, and transparency properties; it is used to represent geographic areas and administrative regions.
[0089] Specifically, the collaborative office software is bound to the GIS dynamic real-time interactive service through the developed plug-in. GIS is the server side and the graphics side (the operation form of GIS), and the collaborative office software is the client side and the text side (the final presentation form of data). Select the GIS service that requires real-time text interaction (for example: GIS mapping).
[0090] S2.3. Determine the package of network office collaboration software introduced by Cesium and import it.
[0091] S3. Add an entry point for document editing functions in the user interface of the GIS system;
[0092] In this embodiment, the specific steps of adding an entry point for the document editing function are:
[0093] S3.1. Determine the data flow connection direction;
[0094] S3.2, determine the event triggered by the data stream push process;
[0095] In this embodiment, the triggered events include: camera events, screen events, keyboard events, scene rendering events, timeline binding events, and monitoring events triggered by other changes.
[0096] Among them, the camera event: CameraChanged: triggered when the camera changes.
[0097] CameraMoveStart: Triggered when the camera starts moving.
[0098] CameraMoveEnd: Triggered when the camera stops moving.
[0099] Screen events: The Screen Space Event Handler handles events related to mouse and keyboard input. For example, you can listen to the left button, right button, wheel events, and mouse movement events of the mouse. Cesium has designed relevant APIs for these events.
[0100] Keyboard events: Used with the keyboard modifier type (KeyboardEventModifier) in the screen space event handler for events related to keyboard input. These keyboard modifiers cannot be used alone and need to be used in conjunction with mouse input events.
[0101] Scene rendering event: ScenePreRender: triggered before scene rendering.
[0102] Scene.PostRender: Triggered after scene rendering is completed.
[0103] scenePreUpdate: Triggered before the scene is updated.
[0104] Timeline binding event: ViewerClockonTick: triggered every time the clock ticks (that is, the time is updated).
[0105] ViewerClockonStop: Triggered when the clock stops.
[0106] Listening events triggered by other changes: Depending on your specific needs, many other objects and properties in Cesium also support event listening. For example, when the properties of an entity change, you can listen to the changed event of the entity.
[0107] Specifically, in the real-time interaction design of GIS and collaborative office systems, by implementing optimization measures such as event de-jittering, throttling, and asynchronous processing, we can effectively avoid UI freezes and slow responses, and ensure the stability and response speed of the system when a large number of users operate and data changes; at the same time, by using event propagation mechanisms and data consistency assurance strategies, we can achieve efficient collaboration and data synchronization between multiple events, providing users with a smooth and accurate collaborative work experience. This not only improves work efficiency, but also provides strong technical support for remote teamwork.
[0108] S3.3. Write event-triggered data processing functions to meet display requirements in the GIS system;
[0109] In this embodiment, the specific steps of writing an event-triggered data processing function are as follows:
[0110] S3.21, first instantiate the relevant classes of Cesium;
[0111] S3.22, then register the event processing function, use the de-jitter technology to optimize the calling frequency of the event processing function, and introduce a cache variable lastDrawData to store the last plotting data;
[0112] Specifically, each time an event is triggered, first check whether there is new data to be sent. If there is no new data, return directly to avoid unnecessary data processing and network requests.
[0113] S3.23. Use the AddeventListener method to register an event handling function;
[0114] S3.24. When the event is triggered, the sendDataToOffice function is introduced to use async / await for asynchronous processing to ensure that the operation of sending data does not block the main thread. Cesium will automatically call the registered event processing function.
[0115] Specifically, the implementation process is:
[0116] / / Import necessary libraries
[0117] import Cesium from 'cesium';
[0118] import { debounce, throttle} from 'lodash'; / / Import lodash's debounce and throttle functions
[0119] / / Instantiate Cesium related classes
[0120] const viewer = new Cesium.Viewer('cesiumContainer');
[0121] const handler = new Cesium.ScreenSpaceEventHandler(viewer.canvas);
[0122] / / Import the SDK of Connector and CommandService
[0123] import Connector from 'connector-sdk';
[0124] import CommandService from 'command-service-sdk';
[0125] / / Initialize Connector and CommandService
[0126] const connector = new Connector();
[0127] const commandService = new CommandService(connector);
[0128] / / Introduce cache variables
[0129] let lastDrawData = null;
[0130] / / Define event handling functions and use de-jittering technology to optimize the calling frequency
[0131] const handleMapEvent = debounce(async (event) => {
[0132] console.log('Map event triggered:', event);
[0133] / / Get plotting data
[0134] const drawData = getDrawData();
[0135] / / Check if the data has changed
[0136] if (!isDataChanged(drawData)) {
[0137] console.log('No new data to send.');
[0138] return;
[0139] }
[0140] / / Process data asynchronously
[0141] await sendDataToOffice(drawData);
[0142] / / Update the cache
[0143] updateCache(drawData);
[0144] }, 300); / / Debounce delay 300 milliseconds
[0145] / / Register event processing function to listen for left-click events
[0146] handler.setInputAction(handleMapEvent, Cesium.ScreenSpaceEventType.LEFT_CLICK);
[0147] / / Auxiliary function: Get plotting data
[0148] function getDrawData() {
[0149] return {
[0150] points: viewer.entities.values.filter(entity =>entity.position).map(entity => ({
[0151] position: entity.position.getValue(),
[0152] name: entity.name || 'Point',
[0153] color: entity.point.color.getValue()
[0154] })),
[0155] lines: viewer.entities.values.filter(entity =>entity.polyline).map(entity => ({
[0156] positions: entity.polyline.positions.getValue(),
[0157] name: entity.name || 'Line',
[0158] color: entity.polyline.material.color.getValue()
[0159] })),
[0160] polygons: viewer.entities.values.filter(entity =>entity.polygon).map(entity => ({
[0161] hierarchy: entity.polygon.hierarchy.getValue().positions,
[0162] name: entity.name || 'Polygon',
[0163] color: entity.polygon.material.color.getValue()
[0164] }))
[0165] };
[0166] }
[0167] / / Auxiliary function: check if data has changed
[0168] function isDataChanged(newData) {
[0169] / / Simple deep comparison, you can use lodash's _.isEqual for more precise comparison
[0170] return !JSON.stringify(newData) === JSON.stringify(lastDrawData);
[0171] }
[0172] / / Auxiliary function: update cache
[0173] function updateCache(data) {
[0174] lastDrawData = data;
[0175] / / Auxiliary function: send data to collaborative office software
[0176] async function sendDataToOffice(data) {
[0177] try {
[0178] / / Send data using Connector and CommandService
[0179] await commandService.callCommand('updateDocument', data);
[0180] console.log('Data sent to office successfully');
[0181] } catch (error) {
[0182] console.error('Error sending data to office:', error);
[0183] }
[0184] }
[0185] S3.4. When an event is triggered, the function is called, and the function pushes the data stream to the collaborative office software through the Connector;
[0186] Among them, the entry point of the document editing function is marked and completed according to business needs, and the text content is obtained after the event is triggered. After the content is obtained, the method of sending it to the collaborative office software through the callCommand of CommandService provides an entry point for GIS information transmission for the document editing function.
[0187] S4. When the user completes the mapping, a mapping completion event is triggered (for example, when the user clicks a certain location on the map, a click event can be triggered, and the click event can be bound to the callCommand method to process and transmit the point information. In this way, the name and coordinates of the point can be displayed immediately in the collaborative office software. Another example is that when the user zooms the map, a zoom event can be triggered, and the zoom event can be bound to the callCommand method to process and transmit the current scale. In this way, the scale or elevation and other related GIS information can be displayed immediately in the collaborative office software.), the GIS system calls the callCommand method of CommandService through Connector (Connector supports automatically determining the maximum number of connections based on the browser version: for example, Chrome and Firefox limit the number of WebSocket connections for each domain name to 6, and the limit of Safari's WebSocket connection number may be different, but usually the limit for each browser instance is about 10) to trigger the interaction with the collaborative office software, which is used to start the system and document data interaction session;
[0188] Specifically, the specific method for handling data conflicts that does not involve the conflict resolution mechanism here is:
[0189] (1) User 1 and User 2 open the same document in the document editor, that is, they use the same documentkey when opening the file;
[0190] (2) User 1 makes changes to the open document;
[0191] (3) The document editor (Browser1) sends the changes made by user 1 to the document editing service (DocumentServer).
[0192] (4) The Document Server sends the changes made by User 1 to User 2’s document editor (Browser2).
[0193] (5) User 2 can now see the changes.
[0194] In this embodiment, the specific steps of triggering the interaction with the collaborative office software are:
[0195] S4.1, transfer WebGIS information to the collaborative office software carrier. Assuming that the user has marked points in the WebGIS system, these points are points with certain business attributes. These points are transferred to the office software carrier through events, and the event interaction logic is integrated;
[0196] S4.2. The transmission operation of S4.1 will call the CallCommand method, triggering the interaction between the Connector and the event, and transmitting the WebGIS mapping information to the collaborative office software carrier.
[0197] S5. Check and process incoming information in collaborative office software;
[0198] In this embodiment, after the WebGIS information is transmitted to the collaborative office software carrier, the collaborative office software is further processed according to the editing and operation of the specific carrier.
[0199] S6. After confirming that the content processing is complete, the collaborative office software save method is called. The document editing service monitors the document completion and collects and forwards the modified content to DocumentServer. DocumentServer completes the file change.
[0200] In this embodiment, the collaborative office software saving method is called to communicate with the DocumentServer in real time to update the document content in real time during the editing process.
[0201] Specifically, the implementation steps are:
[0202] Keep one copy on the user side and one copy on the service side;
[0203] When the user completes editing or reaches the automatic save time, the local counter is updated and compared with the service side.
[0204] When the server compares the client count value and finds that it is less than the server count value, the server will push the latest content to the corresponding client. After the push result is successfully received, the server counter will increase by 1.
[0205] The server pushes the updated counter value to the server, and the client overwrites the local value with the server's count value.
[0206] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited by the above embodiments, and the above embodiments and descriptions are only preferred examples of the present invention, and are not intended to limit the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, and these changes and improvements all fall within the scope of the present invention to be protected.
Claims
1. A method for transmitting WebGIS information to network collaborative office software, characterized in that: The following steps are involved: S1. Establish a long connection between the GIS system and the collaborative office software by introducing and initializing the Connector of the collaborative office software in the GIS system; S2. Import the SDK of Connector and CommandService into the WebGIS system; S3. Add an entry point for document editing functions in the user interface of the GIS system; S4. When the user completes the plotting, a plotting completion event is triggered. The GIS system calls the callCommand method of CommandService through Connector to trigger the interaction with the collaborative office software, which is used to start the interactive session between the system and the document data. S5. Check and process incoming information in collaborative office software; S6. After confirming that the content processing is complete, the collaborative office software save method is called. The document editing service monitors the document completion and collects and forwards the modified content to DocumentServer. DocumentServer completes the file change. In S1, the installation and configuration need to set up the development environment according to the project requirements and ensure that the development environment supports integration with collaborative office software; Among them, the development environment includes the selection of programming languages, frameworks, databases, dependencies, and tools; Combined with business needs, Connector provides a series of built-in business extension methods to expand specific business. The main extension methods include: attachEvent - add an event listener; callCommand - sends data back to the editor; connect - connects the connector to the editor; detachEvent - removes an event listener; disconnect - disconnects the connector from the editor; executeMethod - executes some editor method using the connector; callCommand – the function used to send data back to the editor; The connector sends structured data that can be inserted into the generated document file. By implementing the callCommand method in Connector, the data after the GIS plotting event is transmitted to the collaborative office software in text form. CallCommand first introduces the transmission event callback command tool CommandService and connects this scenario in series; In S3, the specific steps for adding an entry point for the document editing function are as follows: S3.
1. Determine the data flow connection direction; S3.2, determine the event triggered by the data stream push process; S3.
3. Write event-triggered data processing functions to meet display requirements in the GIS system; S3.
4. When an event is triggered, the function is called, and the function pushes the data stream to the collaborative office software through the Connector; Among them, the entry point of the document editing function is marked and completed according to business needs, and the text content is obtained after the event is triggered. After the content is obtained, the method of sending it to the collaborative office software through the callCommand of CommandService provides an entry point for GIS information transmission for the document editing function.
2. A method for transmitting WebGIS information to network collaborative office software according to claim 1, characterized in that: In S2, the specific steps for importing the Connector SDK and the CommandService SDK are as follows: S2.
1. Determine the GIS system framework, using Cesium as the 2D and 3D WebGIS terminal; S2.
2. Identify the common objects that Cesium needs to interact with; S2.
3. Determine the package that Cesium introduces into the network collaborative office software and import it.
3. A method for transmitting WebGIS information to network collaborative office software according to claim 2, characterized in that: In S2.2, commonly used objects include: Point: represents a point in geographic space; customize its appearance by setting its location, color, and size attributes; often used to mark city locations and places; Line: represents a line or path in geographic space; consists of multiple points, each with its own location; customize its appearance by setting the line's color, width, and style attributes; used to draw aircraft routes and roads; Face: represents a polygonal area in geographic space, consisting of multiple points and a center point; its appearance can be customized by setting the face color, border color, and transparency properties; it is used to represent geographic areas and administrative regions.
4. A method for transmitting WebGIS information to network collaborative office software according to claim 3, characterized in that: In S3.2, the triggered events include: camera events, screen events, keyboard events, scene rendering events, timeline binding events, and monitoring events triggered by other changes.
5. A method for transmitting WebGIS information to network collaborative office software according to claim 4, characterized in that: In S3.3, the specific steps for writing the event-triggered data processing function are as follows: S3.21, first instantiate the relevant classes of Cesium; S3.22, then register the event processing function, use the de-jitter technology to optimize the calling frequency of the event processing function, and introduce a cache variable lastDrawData to store the last plotting data; S3.
23. Use the AddeventListener method to register an event handling function; S3.
24. When the event is triggered, the sendDataToOffice function is introduced to use async / await for asynchronous processing to ensure that the operation of sending data does not block the main thread. Cesium will automatically call the registered event processing function.
6. A method for transmitting WebGIS information to network collaborative office software according to claim 5, characterized in that: In S4, the specific steps of triggering the interaction with the collaborative office software are: S4.1, Transmit WebGIS information to the collaborative office software carrier. Assuming that the user has marked points in the WebGIS system, these points are points with certain business attributes. These points are transmitted to the office software carrier through events, and the event interaction logic is integrated; S4.
2. The transmission operation of S4.1 will call the CallCommand method, triggering the interaction between the Connector and the event, and transmitting the WebGIS mapping information to the collaborative office software carrier.
7. A method for transmitting WebGIS information to network collaborative office software according to claim 6, characterized in that: In S5, after the WebGIS information is transmitted to the collaborative office software carrier, the collaborative office software is further processed according to the editing and operation of the specific carrier.
8. A method for transmitting WebGIS information to network collaborative office software according to claim 7, characterized in that: In S6, the collaborative office software saving method is called to communicate with the Document Server in real time, so as to update the document content in real time during the editing process.
Citation Information
Patent Citations
Map plotting control method and device
CN102402529A
Geospatial information real-time display method based on collaborative office software
CN118349618A