Summary of the invention
The object of the present invention is to provide a kind of multistage Map Switch method, apparatus, equipment and computer-readable storage mediums
Matter, to solve the problems, such as that Map Switch method response speed under no net environment is slow, user experience is poor.
In order to solve the above technical problems, the present invention provides a kind of multistage Map Switch method, it is applied to web Centralized Monitoring and leads
Domain, comprising:
The regional code of region unique attribute value is represented for the setting of each map area in advance, and is preset to current position
The regional code of graph region carries out the map stack of stacking;
When monitoring the first predeterminable event, the next stage regional code in current map region is obtained, and is judged describedly
It whether there is the next stage regional code in figure stack, if it is not, then by the next stage regional code stacking, and according to described
Next stage regional code loads corresponding map, completes from higher level's map to the switching of junior's map;
When monitoring the second predeterminable event, upper level regional code is obtained from the map stack and deletes the map
The corresponding regional code in current map region in stack loads corresponding map according to the upper level regional code, completes under
Switching of the grade map to higher level's map.
Optionally, after in the judgement map stack with the presence or absence of the next stage regional code further include:
If there are when the next stage regional code in the map stack, without processing.
Optionally, first predeterminable event is the single-click operation event executed to default monitoring region;Described second is pre-
If event is the double click operation event executed to the default monitoring region.
Optionally, map file uses json file format.
Optionally, map uses echart offline map.
The present invention also provides a kind of multistage Map Switch devices, are applied to web Centralized Monitoring field, comprising:
Presetting module, for the regional code of region unique attribute value to be represented for the setting of each map area in advance, and it is pre-
The map stack that regional code to current map region carries out stacking is first set;
First switching module, for obtaining the next stage region in current map region when monitoring the first predeterminable event
Coding, and judge with the presence or absence of the next stage regional code in the map stack, if it is not, then the next stage region is compiled
Code stacking, and corresponding map is loaded according to the next stage regional code, it completes from higher level's map to the switching of junior's map;
Second switching module, for obtaining upper level region from the map stack when monitoring the second predeterminable event
The corresponding regional code in current map region in the map stack is encoded and deletes, according to upper level regional code load pair
The map answered is completed from junior's map to the switching of higher level's map.
Optionally, first switching module is also used to: with the presence or absence of described next in the judgement map stack
After grade regional code, if there are when the next stage regional code in the map stack, without processing.
Optionally, first predeterminable event is the single-click operation event executed to default monitoring region;Described second is pre-
If event is the double click operation event executed to the default monitoring region.
The present invention also provides a kind of multistage Map Switch equipment, comprising:
Memory, for storing computer program;
Processor realizes the step of any of the above-described kind of multistage Map Switch method when for executing the computer program
Suddenly.
The present invention also provides a kind of computer readable storage medium, meter is stored on the computer readable storage medium
Calculation machine program, the computer program realize the step of any of the above-described kind of multistage Map Switch method when being executed by processor
Suddenly.
Multistage Map Switch method provided by the present invention, is applied to web Centralized Monitoring field, is in advance each map area
The regional code for representing region unique attribute value is arranged in domain, and presets the regional code to current map region and carry out stacking
Map stack;When monitoring the first predeterminable event, the next stage regional code in current map region is obtained, and judges map stack
In whether there is next stage regional code, if it is not, then adding by next stage regional code stacking, and according to next stage regional code
Corresponding map is carried, is completed from higher level's map to the switching of junior's map;When monitoring the second predeterminable event, from map stack
It obtains upper level regional code and deletes the corresponding regional code in current map region in map stack, according to upper level regional code
Corresponding map is loaded, is completed from junior's map to the switching of higher level's map.The application is applied to web Centralized Monitoring software, can
In the environment of being deployed in no network, can read fastly, accurately switch map content, intuitively show different area equipments
Operating condition farthest promotes the experience of user.In addition, present invention also provides a kind of with the more of above-mentioned technological merit
Grade Map Switch device, equipment and computer readable storage medium.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, shall fall within the protection scope of the present invention.
A kind of flow chart of specific embodiment of multistage Map Switch method provided by the present invention was as shown in Figure 1, should
Method is applied to web Centralized Monitoring field, specifically includes:
Step S101: the regional code of region unique attribute value is represented for the setting of each map area in advance, and is set in advance
Set the map stack that the regional code to current map region carries out stacking;
Corresponding regional code is set for each map area in advance, which can represent region unique attribute
Value, concrete form can be configured according to the actual situation, can show corresponding map area according to different regional codes
Domain.It is real using stack last in, first out principle in addition, the application introduces data stecture stack in the handoff procedure of map content
The accurate switching of existing map content, can theoretically support the switching of 10 grades of map contents.
Step S102: when monitoring the first predeterminable event, the next stage regional code in current map region is obtained, and is sentenced
Break with the presence or absence of the next stage regional code in the map stack, if it is not, then by the next stage regional code stacking, and
Corresponding map is loaded according to the next stage regional code, is completed from higher level's map to the switching of junior's map;
Step S103: when monitoring the second predeterminable event, upper level regional code is obtained from the map stack and is deleted
Except the corresponding regional code in current map region in the map stack, correspondingly according to upper level regional code load
Figure is completed from junior's map to the switching of higher level's map.
Wherein, the first predeterminable event is the single-click operation event executed to default monitoring region;Second predeterminable event
For the double click operation event executed to the default monitoring region, other trigger actions can also be used certainly, this is not influenced
Realization of the invention.Specifically, the operation that click and double-click can be executed using mouse, so that graph region switches over over the ground
Process operation is simpler, quick, and the user experience is improved.
Specifically, map file can use json file format, fast excellent of, switch speed short with transmission delay
Point.
Map can use echart offline map in the embodiment of the present application, overcome the prior art in no network environment
Under, the problem of map server API can not be loaded.Setting in this way, so that switching method provided herein can
Enough offline uses, can also use, the scope of application is wider in the environment for having net.
Multistage Map Switch method provided by the present invention, is applied to web Centralized Monitoring field, is in advance each map area
The regional code for representing region unique attribute value is arranged in domain, and presets the regional code to current map region and carry out stacking
Map stack;When monitoring the first predeterminable event, the next stage regional code in current map region is obtained, and judges map stack
In whether there is next stage regional code, if it is not, then adding by next stage regional code stacking, and according to next stage regional code
Corresponding map is carried, is completed from higher level's map to the switching of junior's map;When monitoring the second predeterminable event, from map stack
It obtains upper level regional code and deletes the corresponding regional code in current map region in map stack, according to upper level regional code
Corresponding map is loaded, is completed from junior's map to the switching of higher level's map.The application is applied to web Centralized Monitoring software, can
In the environment of being deployed in no network, can read fastly, accurately switch map content, intuitively show different area equipments
Operating condition farthest promotes the experience of user.
It is below the single-click operation event executed to default monitoring region with the first predeterminable event;Second predeterminable event is pair
For the double click operation event that the default monitoring region executes, to multistage Map Switch method provided by the present invention carry out into
One step elaborates, another specific embodiment schematic diagram of reference Fig. 2 multistage Map Switch method provided by the present invention,
This method clicks/double click event by monitoring users operation mouse, to realize the switching between multistage map.The process is specifically wrapped
It includes:
When listening to single-click operation, the current next stage regional code for obtaining current map region is obtained, and judge institute
It states in map stack with the presence or absence of the next stage regional code;If it is, without processing;If it is not, then by described next
Grade regional code stacking, and corresponding map is loaded according to the next stage regional code, with completing from higher level map to junior
The switching of figure.
When listening to double click operation, from acquisition upper level regional code in the map stack and delete in the map stack
The corresponding regional code in current map region loads corresponding map according to the upper level regional code, completes from junior
Scheme the switching of higher level's map.
The present embodiment is clicked by monitoring in real time and double-click movement is completed from higher level when user carries out click action
Scheme the switching of junior's map;When user carries out double-click movement, complete from junior's map to the switching of higher level's map.Entire mistake
Journey quickly, accurately, and does not need to switch the button of map in page setup, does not need other additional operations, very convenient use
The use at family.
Multistage Map Switch device provided in an embodiment of the present invention is introduced below, multistage map described below is cut
Changing device can correspond to each other reference with above-described multistage Map Switch method.
Fig. 3 is the structural block diagram of multistage Map Switch device provided in an embodiment of the present invention, referring to Fig. 3 multistage Map Switch
Device may include:
Presetting module 100, for the regional code of region unique attribute value to be represented for the setting of each map area in advance, and
Preset the map stack that the regional code to current map region carries out stacking;
First switching module 200, for obtaining the next stage area in current map region when monitoring the first predeterminable event
Domain coding, and judge with the presence or absence of the next stage regional code in the map stack, if it is not, then by the next stage region
Stacking is encoded, and corresponding map is loaded according to the next stage regional code, completes cutting from higher level's map to junior's map
It changes;
Second switching module 300, for obtaining upper level area from the map stack when monitoring the second predeterminable event
Domain encodes and deletes the corresponding regional code in current map region in the map stack, is loaded according to the upper level regional code
Corresponding map is completed from junior's map to the switching of higher level's map.
The multistage Map Switch device of the present embodiment is for realizing multistage Map Switch method above-mentioned, therefore multistage map
The embodiment part of the visible multistage Map Switch method hereinbefore of specific embodiment in switching device, for example, default mould
Block 100, the first switching module 200, the second switching module 300 are respectively used to realize step in above-mentioned multistage Map Switch method
S101, S102, S103, so, specific embodiment is referred to the description of corresponding various pieces embodiment, herein no longer
It repeats.
Specifically, first switching module is also used to: with the presence or absence of described next in the judgement map stack
After grade regional code, if there are when the next stage regional code in the map stack, without processing.
Wherein, first predeterminable event is the single-click operation event executed to default monitoring region;Described second is default
Event is the double click operation event executed to the default monitoring region.
Multistage Map Switch device provided by the present invention, is applied to web Centralized Monitoring field, is in advance each map area
The regional code for representing region unique attribute value is arranged in domain, and presets the regional code to current map region and carry out stacking
Map stack;When monitoring the first predeterminable event, the next stage regional code in current map region is obtained, and judges map stack
In whether there is next stage regional code, if it is not, then adding by next stage regional code stacking, and according to next stage regional code
Corresponding map is carried, is completed from higher level's map to the switching of junior's map;When monitoring the second predeterminable event, from map stack
It obtains upper level regional code and deletes the corresponding regional code in current map region in map stack, according to upper level regional code
Corresponding map is loaded, is completed from junior's map to the switching of higher level's map.The application is applied to web Centralized Monitoring software, can
In the environment of being deployed in no network, can read fastly, accurately switch map content, intuitively show different area equipments
Operating condition farthest promotes the experience of user.
In addition, the present invention also provides a kind of multistage Map Switch equipment, comprising:
Memory, for storing computer program;
Processor realizes the step of any of the above-described kind of multistage Map Switch method when for executing the computer program
Suddenly.
On the other hand, the present invention also provides a kind of computer readable storage medium, the computer readable storage mediums
On be stored with computer program, the computer program realizes any of the above-described kind of multistage Map Switch when being executed by processor
The step of method.
To sum up, multistage Map Switch method, apparatus, equipment and computer readable storage medium provided by the present invention,
Applied to web Centralized Monitoring software, can be deployed in the environment of no network, can read fastly, accurately switch map content,
It intuitively shows the operating condition of different area equipments, farthest promotes the experience of user.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with it is other
The difference of embodiment, same or similar part may refer to each other between each embodiment.For being filled disclosed in embodiment
For setting, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part
Explanation.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Above to multistage Map Switch method, apparatus, equipment and computer readable storage medium provided by the present invention
It is described in detail.Used herein a specific example illustrates the principle and implementation of the invention, the above reality
The explanation for applying example is merely used to help understand method and its core concept of the invention.It should be pointed out that for the art
For those of ordinary skill, without departing from the principle of the present invention, can with several improvements and modifications are made to the present invention,
These improvements and modifications also fall within the scope of protection of the claims of the present invention.