CN113821737B - Map rendering method, device, equipment and storage medium for single page application - Google Patents

Map rendering method, device, equipment and storage medium for single page application Download PDF

Info

Publication number
CN113821737B
CN113821737B CN202111155213.8A CN202111155213A CN113821737B CN 113821737 B CN113821737 B CN 113821737B CN 202111155213 A CN202111155213 A CN 202111155213A CN 113821737 B CN113821737 B CN 113821737B
Authority
CN
China
Prior art keywords
task
rendering
downloading
page application
map
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.)
Active
Application number
CN202111155213.8A
Other languages
Chinese (zh)
Other versions
CN113821737A (en
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 Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202111155213.8A priority Critical patent/CN113821737B/en
Publication of CN113821737A publication Critical patent/CN113821737A/en
Application granted granted Critical
Publication of CN113821737B publication Critical patent/CN113821737B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • 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/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Remote Sensing (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to artificial intelligence, and provides a map rendering method, device, equipment and storage medium for single page application, wherein the method determines whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application; if not, determining whether a first downloading task corresponding to the single-page application exists in a preset downloading task list; and if the first download task exists, waiting for execution of the first download task until the first download task is completed, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application. According to the method and the device, the mode that one calling interface processes the plurality of rendering tasks is downloaded to replace the mode that the plurality of calling interfaces process the plurality of rendering tasks in the prior art, the problem that the map rendering fails due to the fact that the downloading request of the calling interface is interrupted is avoided, the map rendering effect of single-page application is improved, and user experience is improved.

Description

Map rendering method, device, equipment and storage medium for single page application
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a map rendering method, apparatus, device and computer readable storage medium for single page application.
Background
A Single Page Application (SPA) refers to Single Page webApplication, i.e., an application that has only one web page, which is a web application that loads a single html (HyperText Markup Language ) page and dynamically updates the page as the user interacts with the application. Wherein, the single page jump only refreshes local resources, and common resources (such as js, css, etc.) in the single page application only need to be loaded once.
Currently, when a single-page application calls a map application (such as a Goldmap or a hundred-degree map) to render a plurality of maps in a page, a call interface of the map application is downloaded (i.e. loaded) for each rendering task, and the map application is called through the call interface downloaded respectively to process the corresponding rendering task. Therefore, when one rendering task downloads the calling interface, the downloading request of the calling interface of the other rendering task is easily interrupted, so that partial map rendering fails, for example, when a user applies for car insurance claims in a single page application, related software is called to render a plurality of maps such as the position of a surveyor and the navigation track of a trailer, only the position of the surveyor can be rendered, but the navigation track of the trailer cannot be rendered. Therefore, how to solve the problem that the map rendering effect of the single-page application is poor due to partial map rendering failure when the map application is called by the existing single-page application to render a plurality of maps becomes the technical problem to be solved at present.
Disclosure of Invention
The invention mainly aims to provide a map rendering method, device and equipment for single-page application and a computer readable storage medium, and aims to solve the technical problem that the map rendering effect of the existing single-page application is poor.
In order to achieve the above object, the present invention provides a map rendering method for a single page application, the map rendering method for a single page application including the steps of: when a map calling instruction sent by a single page application is received, determining whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application; if the calling interface does not exist in the storage area, determining whether a first downloading task corresponding to the single page application exists in a preset downloading task list; and if the first downloading task exists in the downloading task list, waiting for the execution of the first downloading task until the first downloading task is completed, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application.
In addition, to achieve the above object, the present invention also provides a map rendering apparatus for a single page application, including: the calling interface determining module is used for determining whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application when a map calling instruction sent by the single page application is received; the download task confirmation module is used for determining whether a first download task corresponding to the single page application exists in a preset download task list if the calling interface does not exist in the storage area; and the first task processing module is used for waiting for executing the first downloading task if the first downloading task exists in the downloading task list, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application until the first downloading task is completed.
In addition, in order to achieve the above object, the present invention also provides a map rendering apparatus for a single-page application, which includes a processor, a memory, and a map rendering program for a single-page application stored on the memory and executable by the processor, wherein the map rendering program for a single-page application, when executed by the processor, implements the steps of the map rendering method for a single-page application as described above.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a map rendering program of a single-page application, wherein the map rendering program of the single-page application, when executed by a processor, implements the steps of the map rendering method of the single-page application as described above.
The invention provides a map rendering method of a single page application, which is characterized in that when a map calling instruction sent by the single page application is received, whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application is determined; if the calling interface does not exist in the storage area, determining whether a first downloading task corresponding to the single page application exists in a preset downloading task list; and if the first downloading task exists in the downloading task list, waiting for the execution of the first downloading task until the first downloading task is completed, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application. By means of the method, the system and the device, aiming at a plurality of rendering tasks in the single-page application, only one downloading request of the calling interface is sent, and the mode of processing the plurality of rendering tasks by downloading one calling interface is replaced by the mode of processing the plurality of rendering tasks by downloading the plurality of calling interfaces, so that the problem that partial map rendering fails in the single-page application caused by interruption of the downloading request of the calling interface of one rendering task is avoided, the map rendering effect of the single-page application is improved, user experience is improved, and the technical problem that the map rendering effect of the existing single-page application is poor is solved.
Drawings
Fig. 1 is a schematic hardware structure of a map rendering device for a single page application according to an embodiment of the present invention;
FIG. 2 is a flowchart of a map rendering method for a single page application according to a first embodiment of the present invention;
FIG. 3 is a flowchart of a second embodiment of a map rendering method for single page applications of the present invention;
FIG. 4 is a flowchart of a map rendering method for a single page application according to a third embodiment of the present invention;
fig. 5 is a schematic functional block diagram of a map rendering device according to a first embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The map rendering method of the single page application related to the embodiment of the invention is mainly applied to map rendering equipment of the single page application, and the map rendering equipment of the single page application can be equipment with display and processing functions such as a PC, a portable computer, a mobile terminal and the like.
Referring to fig. 1, fig. 1 is a schematic hardware structure of a map rendering apparatus of a single page application according to an embodiment of the present invention. In an embodiment of the present invention, the map rendering device of the single page application may include a processor 1001 (e.g., CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communications between these components; the user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface); the memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory, and the memory 1005 may alternatively be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the hardware architecture shown in fig. 1 does not constitute a limitation of a map rendering device for a single page application, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components.
With continued reference to fig. 1, the memory 1005 of fig. 1, which is a type of computer-readable storage medium, may include an operating system, a network communication module, and a map rendering program for a single page application.
In fig. 1, the network communication module is mainly used for connecting with a server and performing data communication with the server; and the processor 1001 may call a map rendering program of the single page application stored in the memory 1005 and execute the map rendering method of the single page application provided by the embodiment of the present invention.
The embodiment of the invention provides a map rendering method for single-page application.
Referring to fig. 2, fig. 2 is a flowchart of a map rendering method for a single page application according to a first embodiment of the present invention.
In this embodiment, the map rendering method of the single page application is applied to a processor or a program for monitoring map call of each page application, and the map rendering method of the single page application includes the following steps:
step S10, when a map calling instruction sent by a single page application is received, determining whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application;
when the current single-page application renders a plurality of maps, the calling interfaces of the map application are respectively downloaded (i.e. loaded) for each rendering task, and when the success of the downloading of the calling interfaces which are respectively downloaded is monitored, the map application is called through the calling interfaces which are respectively downloaded to process the rendering tasks. However, when the previous rendering task downloads the calling interface, the previous rendering task is easily interrupted by the request of the next rendering task downloading the calling interface, so that the previous rendering task cannot monitor the successful downloading of the calling interface, and the rendering of the previous rendering task fails, and the map rendering corresponding to the rendering task fails.
According to the invention, the mode of processing the plurality of rendering tasks by downloading one calling interface is replaced by the mode of processing the plurality of rendering tasks by the plurality of calling interfaces, so that the problem of poor rendering effect of the single-page application map caused by interruption of the downloading request of the calling interface of one rendering task is avoided.
In this embodiment, when a map call instruction of a map application sent by a single page application is detected, it is first detected whether a downloaded call interface of the map application exists in a storage area corresponding to the single page application (for example, a file storing data corresponding to the target page application), and if the downloaded call interface exists, the downloaded call interface is not required to be repeatedly downloaded, and the downloaded call interface is directly called to sequentially process a plurality of rendering tasks.
In an exemplary embodiment, the determining whether the call interface corresponding to the map application exists in the storage area corresponding to the single page application specifically includes:
in the memory area, it is determined whether there is an interface identification of the call interface or a variable identification for storing a global variable of the call interface.
In this embodiment, when downloading the call interface is completed, a global variable AMap is defined in a storage area of the single page application, and is used to store the call interface of the map application. Therefore, when determining whether the downloaded call interface exists in the storage area, the interface identifier of the call interface can be searched in the storage area, the variable identifier of the global variable can also be searched in the storage area, and if the interface identifier of the call interface exists in the storage area or the variable identifier of the global variable for storing the call interface exists in the storage area, the downloaded call interface exists in the storage area. And if the interface identifier of the calling interface does not exist in the storage area, the variable identifier for storing the global variable of the calling interface does not exist, namely the downloaded calling interface does not exist in the storage area.
Step S20, if the calling interface does not exist in the storage area, determining whether a first downloading task corresponding to the single page application exists or not based on a downloading task identifier in a preset downloading task list;
in this embodiment, before downloading the map call interface, a script element needs to be created for each download task, and a corresponding Identifier (ID) is set for the script element corresponding to each download task. By the method, a corresponding download task identifier (script element ID) is set for each page application corresponding download task, and download data of the page application is recorded through a download task table. The download task list is a record list of download tasks corresponding to the map calling interface, namely, the download tasks corresponding to each page application of the calling interface and the download task identifiers corresponding to each download task are recorded; the download task table may also be a record table of download tasks corresponding to each page application, that is, record each call interface downloaded by each page application and each download task identifier corresponding to each download task of each call interface downloaded by each page application.
Specifically, if the downloaded call interface does not exist in the storage area, the identification of the download task of the call interface is further downloaded based on the single page application, the identification is searched in the download task list, and if the identification exists in the download task list, the interface download task (first download task) in the current existing download is indicated.
And step S30, if the first download task exists in the download task list, waiting for execution of the first download task until the first download task is completed, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application.
In this embodiment, when the first download task exists in the download task list, it is not necessary to repeatedly trigger a download request of the calling interface, wait for execution of the first download task in the download, and call the calling interface to sequentially process a plurality of rendering tasks when the first download task completes the download of the calling interface. Therefore, when the single page application does not have a call interface for completing downloading, whether the single page application has an interface downloading task in downloading is further judged, and if so, execution of the downloading task in downloading is waited until the execution is completed.
Further, the step S30 specifically includes:
if the first downloading task exists in the downloading task list, acquiring downloading time corresponding to the first downloading task;
and when the downloading time does not exceed a preset time threshold, generating and displaying prompt information in map calling interface downloading, waiting for execution of the first downloading task, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application until the first downloading task is completed.
In this embodiment, if the first download task exists in the download task list, the download task list indicates that the single page application has sent a download request corresponding to the call interface. That is, in order to avoid abnormal downloading of the calling interface caused by overtime of the downloading task, the downloading time of the downloading task is monitored, for example, the downloading time corresponding to each downloading task is detected according to a preset time interval, if the downloading time does not exceed a preset time threshold, the first downloading task is indicated to be abnormal, and the generated and displayed map calls the prompt information in the interface downloading, so that the user is prevented from repeatedly triggering the downloading instruction, the user experience is improved, and the user is facilitated to know the map rendering progress.
Further, if the first download task exists in the download task list, after obtaining the download time corresponding to the first download task, the method further includes:
when the downloading time exceeds a preset time threshold, interrupting the first downloading task, sending a downloading request through a preset map downloading public component, generating a third downloading task of the single page application downloading the calling interface, and adding a corresponding downloading task identifier to the third downloading task;
and waiting for the execution of the third downloading task until the third downloading task finishes downloading, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application.
In this embodiment, when the download time exceeds a preset time threshold, it indicates that the first download task is abnormal, interrupts the abnormal download task (first download task), and then invokes a preset map download public component (a component for downloading a call interface of a map application) to resend a request for downloading the call interface to a server, that is, newly create a download task (a third download task), and add a corresponding identifier to the third download task, so as to search for the third download task based on a download task identifier of the third download task.
Specifically, in order to increase maintainability of the map rendering program, a logic code (such as the map rendering application program) for performing rendering task processing by calling the map application based on the existing single page application is extracted, and the logic code downloaded by the calling interface is packaged into a map downloading common component for sending a downloading request to perform calling interface downloading, and the map downloading common component is used as a preset map downloading common component.
The step of calling the downloaded call interface to process the plurality of rendering tasks in the single page application specifically includes:
acquiring each map rendering task, and adding each map rendering task to a rendering task queue;
acquiring a rendering task in the rendering task queue as a target rendering task, calling the calling interface, and processing the target rendering task based on rendering data corresponding to the target rendering task;
acquiring the next rendering task in the rendering task queue as the target rendering task, and executing: and calling the calling interface, and processing the target rendering task based on rendering data corresponding to the target rendering task until all rendering tasks in the rendering task queue are completed.
In this embodiment, a plurality of map rendering tasks are added to a rendering task queue, and the downloading of the calling interfaces is monitored to complete or the currently downloaded calling interfaces are detected, and each rendering task in the rendering task queue is sequentially processed through the calling interfaces. A global variable array initampaaray is predefined and used as the rendering task queue for storing a plurality of rendering tasks.
Specifically, a rendering task in the rendering task queue is firstly obtained and used as a target rendering task, the calling interface is called, and the map of the corresponding area in the single page application is rendered according to the rendering data corresponding to the target rendering task, so that the processing of the target rendering task is completed. And then acquiring the next rendering task in the rendering task queue as an updated target rendering task, and calling the calling interface to sequentially finish the processing of each rendering task in the rendering task queue.
In a specific embodiment, when processing of a rendering task is completed, a corresponding rendering completion identifier is added to the completed rendering task, so that the processed rendering task and the unprocessed rendering task can be distinguished conveniently.
The embodiment provides a map rendering method of a single-page application, which is used for determining whether a calling interface corresponding to the map application exists in a storage area corresponding to the single-page application when a map calling instruction sent by the single-page application is received; if the calling interface does not exist in the storage area, determining whether a first downloading task corresponding to the single page application exists in a preset downloading task list; and if the first downloading task exists in the downloading task list, waiting for the execution of the first downloading task until the first downloading task is completed, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application. By means of the mode, the method and the device for processing the single-page application aim at the multiple rendering tasks in the single-page application, only one downloading request of the calling interface is sent, the mode that the multiple rendering tasks are processed by downloading one calling interface is replaced by the mode that the multiple rendering tasks are processed by downloading the multiple calling interfaces, the problem that partial map rendering fails in the single-page application due to the fact that the downloading request of the calling interface of one rendering task is interrupted is avoided, map rendering effect of the single-page application is improved, user experience is improved, and the technical problem that the map rendering effect of the existing single-page application is poor is solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a map rendering method according to a second embodiment of the present invention.
Based on the embodiment shown in fig. 2, in this embodiment, after step S20, the method further includes:
step S40, if the first download task does not exist in the download task list, a download request is sent through a preset map download public component, a second download task of the call interface is generated for downloading the single page application, and a corresponding download task identifier is added to the second download task;
and step S50, when the second downloading task is detected to finish downloading, the downloaded calling interface is called to process a plurality of rendering tasks in the single-page application.
In this embodiment, if the first download task does not exist in the download task list, that is, there is no call interface for completing the download at present, and there is no download task in the download, then a request for downloading the call interface is sent to the server through a preset map download public component, a download task (second download task) of a single page application download call interface is newly created, and a corresponding download task identifier is added to the second download task. And then, the downloaded calling interface is called to process a plurality of rendering tasks.
Therefore, when the single page application does not have a call interface with finished downloading, whether the single page application has an interface downloading task in downloading is further judged, if the single page application does not have the interface downloading task, an interface downloading task is newly built, and the downloading call interface processes a plurality of rendering tasks. Therefore, repeated downloading of the calling interface is avoided, not only is the downloading task interrupted avoided, but also resource waste caused by repeated downloading of the calling interface is avoided.
Referring to fig. 4, fig. 4 is a flowchart of a map rendering method of a single page application according to a third embodiment of the present invention.
Based on the embodiment shown in fig. 3, in this embodiment, after step S10, the method further includes:
step S60, if the calling interface exists in the storage area, calling the calling interface to process a plurality of rendering tasks in the single page application, so as to avoid repeated downloading of the calling interface.
In this embodiment, if the calling interface exists in the storage area corresponding to the single-page application, the map application is directly called by the calling interface to sequentially process a plurality of rendering tasks, so that rendering of each area map in the single-application page is completed, repeated downloading of the calling interface is avoided, and resource waste is reduced.
In addition, the embodiment of the invention also provides a map rendering device for single-page application.
Referring to fig. 5, fig. 5 is a schematic functional block diagram of a map rendering device according to a first embodiment of the present invention.
In this embodiment, the map rendering apparatus for single page application includes:
the calling interface determining module 10 is configured to determine, when receiving a map calling instruction sent by a single page application, whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application;
the download task confirmation module 20 is configured to determine, if the calling interface does not exist in the storage area, whether a first download task corresponding to the single page application exists in a preset download task list;
and the first task processing module 30 is configured to wait for execution of the first download task if the first download task exists in the download task list, and call the downloaded call interface to process a plurality of rendering tasks in the single page application until the first download task is completed.
Further, the map rendering apparatus of the single page application further includes:
the download task generating module is used for generating a second download task of the call interface for downloading the single page application through a preset map download public component if the first download task does not exist in the download task list, and adding a corresponding download task identifier to the second download task;
and the second task processing module is used for calling the downloaded calling interface to process a plurality of rendering tasks in the single-page application when the second downloading task is detected to finish downloading.
Further, the map rendering apparatus of the single page application further includes:
and the third task processing module is used for calling the calling interface to process a plurality of rendering tasks in the single page application if the calling interface exists in the storage area so as to avoid repeated downloading of the calling interface.
Further, the first task processing module 30 specifically includes:
the downloading time acquisition unit is used for acquiring the downloading time corresponding to the first downloading task if the first downloading task exists in the downloading task list;
and the first task processing unit is used for generating and displaying prompt information in map calling interface downloading when the downloading time does not exceed a preset time threshold, waiting for the execution of the first downloading task, and calling the downloaded calling interface to process a plurality of rendering tasks in the single-page application until the first downloading task is completed.
Further, the first task processing module 30 specifically further includes:
the download task generating unit is used for interrupting the first download task when the download time exceeds a preset time threshold, sending a download request through a preset map download public component, generating a third download task for downloading the call interface by the single page application, and adding a corresponding download task identifier to the third download task;
and the second task processing unit is used for waiting for the execution of the third downloading task until the third downloading task finishes downloading, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application.
Further, the first task processing unit 30 specifically further includes:
the rendering task acquisition subunit is used for acquiring each map rendering task and adding each map rendering task to a rendering task queue;
the rendering task processing subunit is used for acquiring a rendering task in the rendering task queue as a target rendering task, calling the calling interface and processing the target rendering task based on rendering data corresponding to the target rendering task;
a rendering task updating subunit, configured to obtain a next rendering task in the rendering task queue, as the target rendering task, and execute: and calling the calling interface, and processing the target rendering task based on rendering data corresponding to the target rendering task until all rendering tasks in the rendering task queue are completed.
Further, the call interface determining module 10 is further configured to:
in the memory area, it is determined whether there is an interface identification of the call interface or a variable identification for storing a global variable of the call interface.
The modules in the map rendering device of the single-page application correspond to the steps in the map rendering method embodiment of the single-page application, and the functions and implementation processes of the modules are not described in detail herein.
In addition, the embodiment of the invention also provides a computer readable storage medium.
The computer readable storage medium of the present invention stores a map rendering program of a single page application, wherein the map rendering program of the single page application, when executed by a processor, implements the steps of the map rendering method of the single page application as described above.
The method implemented when the map rendering program of the single page application is executed may refer to various embodiments of the map rendering method of the single page application of the present invention, which are not described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The subject application is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. The map rendering method for the single-page application is characterized by comprising the following steps of:
when a map calling instruction sent by a single page application is received, determining whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application;
if the calling interface does not exist in the storage area, determining whether a first downloading task corresponding to the single-page application exists or not based on a downloading task identifier in a preset downloading task list;
if the first downloading task exists in the downloading task list, waiting for the execution of the first downloading task until the first downloading task is completed, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application;
if the first download task exists in the download task list, waiting for execution of the first download task until the first download task is completed, and calling the downloaded call interface to process a plurality of rendering tasks in the single page application specifically includes:
if the first downloading task exists in the downloading task list, acquiring downloading time corresponding to the first downloading task;
when the downloading time does not exceed a preset time threshold, generating and displaying prompt information in map calling interface downloading, waiting for execution of the first downloading task, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application until the first downloading task is completed;
the step of calling the downloaded call interface to process the rendering tasks in the single page application specifically includes:
acquiring each map rendering task, and adding each map rendering task to a rendering task queue;
acquiring a rendering task in the rendering task queue as a target rendering task, calling the calling interface, and processing the target rendering task based on rendering data corresponding to the target rendering task;
acquiring the next rendering task in the rendering task queue as the target rendering task, and executing: and calling the calling interface, and processing the target rendering task based on rendering data corresponding to the target rendering task until all rendering tasks in the rendering task queue are completed.
2. The map rendering method of a single page application according to claim 1, wherein if the calling interface does not exist in the storage area, after the step of determining whether the first download task corresponding to the single page application exists based on the download task identifier in the preset download task list, the method further comprises:
if the first downloading task does not exist in the downloading task list, a downloading request is sent through a preset map downloading public component, a second downloading task of the calling interface is generated for downloading the single page application, and a corresponding downloading task identifier is added to the second downloading task;
and when the second downloading task is detected to finish downloading, the downloaded calling interface is called to process a plurality of rendering tasks in the single-page application.
3. The map rendering method of a single page application according to claim 2, wherein when receiving a map call instruction sent by the single page application, after the step of determining whether there is a call interface corresponding to the map application in the storage area corresponding to the single page application, the method further comprises:
and if the calling interface exists in the storage area, calling the calling interface to process a plurality of rendering tasks in the single page application so as to avoid repeated downloading of the calling interface.
4. The map rendering method of a single page application according to claim 1, wherein after the step of obtaining the download time corresponding to the first download task if the first download task exists in the download task list, further comprises:
when the downloading time exceeds a preset time threshold, interrupting the first downloading task, sending a downloading request through a preset map downloading public component, generating a third downloading task of the single page application downloading the calling interface, and adding a corresponding downloading task identifier to the third downloading task;
and waiting for the execution of the third downloading task until the third downloading task finishes downloading, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application.
5. The map rendering method of a single page application according to any one of claims 1 to 4, wherein the step of determining whether there is a call interface corresponding to the map application in the storage area corresponding to the single page application specifically includes:
in the memory area, it is determined whether there is an interface identification of the call interface or a variable identification for storing a global variable of the call interface.
6. A map rendering device for a single page application, characterized in that the map rendering device for a single page application is used for realizing the map rendering method for a single page application according to any one of claims 1 to 5, the map rendering device for a single page application comprising:
the calling interface determining module is used for determining whether a calling interface corresponding to the map application exists in a storage area corresponding to the single page application when a map calling instruction sent by the single page application is received;
the download task confirmation module is used for determining whether a first download task corresponding to the single page application exists in a preset download task list if the calling interface does not exist in the storage area;
and the first task processing module is used for waiting for executing the first downloading task if the first downloading task exists in the downloading task list, and calling the downloaded calling interface to process a plurality of rendering tasks in the single page application until the first downloading task is completed.
7. A map rendering device of a single page application, characterized in that the map rendering device of a single page application comprises a processor, a memory, and a map rendering program of a single page application stored on the memory and executable by the processor, wherein the map rendering program of a single page application, when executed by the processor, implements the steps of the map rendering method of a single page application as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, on which a map rendering program of a single-page application is stored, wherein the map rendering program of the single-page application, when executed by a processor, implements the steps of the map rendering method of the single-page application as claimed in any one of claims 1 to 5.
CN202111155213.8A 2021-09-29 2021-09-29 Map rendering method, device, equipment and storage medium for single page application Active CN113821737B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111155213.8A CN113821737B (en) 2021-09-29 2021-09-29 Map rendering method, device, equipment and storage medium for single page application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111155213.8A CN113821737B (en) 2021-09-29 2021-09-29 Map rendering method, device, equipment and storage medium for single page application

Publications (2)

Publication Number Publication Date
CN113821737A CN113821737A (en) 2021-12-21
CN113821737B true CN113821737B (en) 2024-02-06

Family

ID=78915920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111155213.8A Active CN113821737B (en) 2021-09-29 2021-09-29 Map rendering method, device, equipment and storage medium for single page application

Country Status (1)

Country Link
CN (1) CN113821737B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111950A (en) * 2013-04-19 2014-10-22 腾讯科技(深圳)有限公司 Webpage image loading method and webpage image loading device
CN105243100A (en) * 2015-09-17 2016-01-13 百度在线网络技术(北京)有限公司 Map rendering method, and method and apparatus for providing rendering target information
CN109684574A (en) * 2018-08-20 2019-04-26 平安普惠企业管理有限公司 Page loading method, device, equipment and storage medium
CN109710716A (en) * 2018-12-24 2019-05-03 成都四方伟业软件股份有限公司 Map smoothness rendering method, terminal device and computer readable storage medium
CN110647597A (en) * 2018-06-11 2020-01-03 百度在线网络技术(北京)有限公司 Rendering method and device of electronic map
CN112231609A (en) * 2020-10-30 2021-01-15 深圳物讯科技有限公司 Method, device and storage medium for rapidly rendering map based on WebGIS map

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090150795A1 (en) * 2007-12-11 2009-06-11 Microsoft Corporation Object model and user interface for reusable map web part

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104111950A (en) * 2013-04-19 2014-10-22 腾讯科技(深圳)有限公司 Webpage image loading method and webpage image loading device
CN105243100A (en) * 2015-09-17 2016-01-13 百度在线网络技术(北京)有限公司 Map rendering method, and method and apparatus for providing rendering target information
CN110647597A (en) * 2018-06-11 2020-01-03 百度在线网络技术(北京)有限公司 Rendering method and device of electronic map
CN109684574A (en) * 2018-08-20 2019-04-26 平安普惠企业管理有限公司 Page loading method, device, equipment and storage medium
CN109710716A (en) * 2018-12-24 2019-05-03 成都四方伟业软件股份有限公司 Map smoothness rendering method, terminal device and computer readable storage medium
CN112231609A (en) * 2020-10-30 2021-01-15 深圳物讯科技有限公司 Method, device and storage medium for rapidly rendering map based on WebGIS map

Also Published As

Publication number Publication date
CN113821737A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
CN107515764B (en) Application page opening method, terminal and computer readable storage medium
CN109558320B (en) System testing method, device, system, equipment and computer readable storage medium
CN108388988B (en) Block chain-based collaborative office method, system and computer-readable storage medium
CN107015801B (en) Webpage display method and application terminal
CN108197024B (en) Embedded browser debugging method, debugging terminal and computer readable storage medium
CN107908487B (en) Task control management method, device and equipment and computer readable storage medium
EP2866158A1 (en) Method for reader to provide service, reader, terminal and computer storage medium
CN110267215B (en) Data detection method, equipment and storage medium
CN111475390A (en) Log collection system deployment method, device, equipment and storage medium
CN112035114A (en) Page rollback method, device, equipment and medium
CN110502263B (en) Upgrade package manufacturing method, system and computer readable storage medium
KR101689984B1 (en) Programmable controller, programmable controller system, and execute error information creation method
CN108804120B (en) Page construction method, device, equipment and storage medium
CN113821737B (en) Map rendering method, device, equipment and storage medium for single page application
KR20160032653A (en) Method and apparatus for ranking candiate character and method and device for inputting character
CN112083925A (en) Data acquisition method, device, equipment and storage medium based on H5 page development
CN107391132B (en) Method, device and equipment for target App to execute preset action
CN111078571B (en) Test method for analog response, terminal equipment and computer readable storage medium
CN116150536A (en) Page returning method, device, equipment and medium
US20130332568A1 (en) Method of data processing by a navigation module
CN113867756A (en) Software upgrading method, terminal equipment and readable storage medium
CN115454472A (en) Remote upgrading problem solving method, device, equipment and readable storage medium
CN109284097B (en) Method, device, system and storage medium for realizing complex data analysis
CN108961351B (en) Method, device, system and storage medium for realizing fractal graph drawing through compression
CN111324491A (en) Program bug fixing method and device and computer readable 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
GR01 Patent grant
GR01 Patent grant