CN104063158A - Vector map drawing method and device - Google Patents

Vector map drawing method and device Download PDF

Info

Publication number
CN104063158A
CN104063158A CN201410247332.XA CN201410247332A CN104063158A CN 104063158 A CN104063158 A CN 104063158A CN 201410247332 A CN201410247332 A CN 201410247332A CN 104063158 A CN104063158 A CN 104063158A
Authority
CN
China
Prior art keywords
region
longitude
latitude
map
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410247332.XA
Other languages
Chinese (zh)
Inventor
刘红锁
张家骥
张毅
张云英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dongjin Aerospace Technology Co Ltd
Original Assignee
Beijing Dongjin Aerospace Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dongjin Aerospace Technology Co Ltd filed Critical Beijing Dongjin Aerospace Technology Co Ltd
Priority to CN201410247332.XA priority Critical patent/CN104063158A/en
Publication of CN104063158A publication Critical patent/CN104063158A/en
Pending legal-status Critical Current

Links

Landscapes

  • Instructional Devices (AREA)

Abstract

The invention discloses a vector map drawing method and device. The vector map drawing method comprises the following steps: after a vector map is displayed on a display screen, the vector map is refreshed periodically if a mouse drag instruction is received; the process of refreshing the vector map in one cycle is that the scopes of latitude and longitude of an area to be displayed are determined according to the present mouse coordinates; after the vector map of the area to be displayed is extracted from the vector map of a to-be-drawn area stored in a first cache, the vector map in a second cache is covered, and the extracted vector map is displayed according to the vector map in the second cache; after a mouse drag end instruction is received, the scopes of latitude and longitude of the to-be-drawn area are determined again according to the scopes of latitude and longitude of the area displayed at present, and the vector map in the first cache is updated after the vector map of the to-be-drawn area determined again is drawn. In the technical scheme provided by the invention, when a map is dragged by a mouse, the vector map of the to-be-drawn area is extracted, so that the vector map can be continuously displayed without blinking.

Description

Vector-map painting method and apparatus
Technical field
The present invention relates to software engineering, relate in particular to a kind of vector-map painting method and apparatus.
Background technology
Map vector has been widely used in the systems such as GIS (Geographic Information System, Geographic Information System), positioning system, navigational system.
When user utilizes mouse to pull to be presented at the map vector on screen, according to the track that pulls of user's mouse, a kind of method of drawing map vector comprises: according to mouse, in screen, pull the displacement of (pinning left button to unclamping left button), and the engineer's scale between screen and map vector, determine the longitude and latitude variable quantity of map vector; According to the longitude and latitude variable quantity of determining and the longitude and latitude scope that pulls front map vector, determine the longitude and latitude scope of the map vector after pulling; According to the map datum within the scope of the longitude and latitude of determining, draw out the map vector after pulling and show.
For example on screen, show map vector as shown in Figure 1, user pins left mouse button, and to screen lower right, (as shown in the arrow line in Fig. 1) pulls this map vector, before user unclamps left mouse button, the region of screen top and left wouldn't show map vector; User unclamps after mouse, and conventionally need to wait for a period of time (for example several milliseconds) just show the map vector after pulling; Easily cause user to produce screen pause, flicker or slack sensation, user's experience is not good.
According to the track that pulls of user's mouse, the another kind of method of drawing map vector is: when mouse (pinning left button does not discharge) in pulling process, periodically draw map vector.Particularly, this cycle is when start, and the longitude and latitude variable quantity of the map vector in this cycle is determined in the position according to mouse in screen, and the engineer's scale between screen and map vector; According to the longitude and latitude scope of the longitude and latitude variable quantity in this cycle of determining and the map vector in last cycle, determine the longitude and latitude scope of the map vector in this cycle; According to the map datum within the scope of the longitude and latitude of the map vector in this cycle, draw out the map vector in this cycle and show.Obviously, this method need to frequently refresh each element in map vector, is easy to cause map vector to produce flicker.In addition, this method operand is larger, when system resource is nervous, cannot draw out in time the map vector in each cycle, is also easy to cause user to produce screen pause, flicker or slack sensation, and user's experience is not good.
Therefore, be necessary to provide a kind of and pull in process at mouse, can continuously, flicker-freely show the vector-map painting method of map vector, to improve user's experience.
Summary of the invention
The embodiment of the present invention provides a kind of vector-map painting method and apparatus, to realize in the process that pulls map vector on screen, continuously, the demonstration map vector of flicker free.
According to an aspect of the present invention, provide a kind of vector-map painting method, having comprised:
On display screen, show after map vector, if the mouse receiving in described map vector pulls instruction, periodically on display screen, refresh map vector; Wherein, the process that refreshes map vector in one-period is: the longitude and latitude scope of determining region to be shown according to current mouse coordinates; And extract after the map vector in region to be shown from be stored in the map vector of painting in advance region the first buffer memory, the map vector extracting is covered to the map vector in the second buffer memory, and show at described display screen according to the map vector in the second buffer memory;
Pull after END instruction receiving mouse, according to the longitude and latitude scope in the region of current demonstration on described display screen, redefine described longitude and latitude scope of painting in advance region, and draw painting in advance after the map vector in region of redefining, the map vector being stored in described the first buffer memory is upgraded.
Preferably, on described display screen, the region of current demonstration is specially rectangular area.
Preferably, described according to the longitude and latitude scope in the region of current demonstration on described display screen, redefine described longitude and latitude scope of painting in advance region, specifically comprise:
According to the longitude and latitude (x on four of the region of current demonstration on described display screen summits 1, y 1), (x 1, y 2), (x 2, y 1), (x 2, y 2), redefine out the described longitude and latitude (2x that paints in advance four summits in region 1-x 2, 2y 1-y 2), (2x 1-x 2, 2y 2-y 1), (2x 2-x 1, 2y 1-y 2), (2x 2-x 1, 2y 2-y 1);
Wherein, x 1, x 2represent respectively the minimum longitude in the region of described current demonstration, maximum longitude, y 1, y 2represent respectively the minimum latitude in the region of described current demonstration, maximum latitude.
Further, show map vector on described display screen before, also comprise:
According to the latitude and longitude information that is about to show the viewing area of map vector in display screen, determine and paint in advance behind region, draw out the map vector of painting in advance region; And by the vector map storing of painting in advance region of drawing out in the first buffer memory; By the vector map storing of described viewing area in the second buffer memory.
Preferably, according to current mouse coordinates, determine the longitude and latitude scope in region to be shown, specifically comprise:
Determine difference of longitude and difference of latitude between the place in last cycle mouse coordinates and the corresponding map vector of current mouse coordinates;
Using the difference of longitude of determining, difference of latitude difference of longitude, the difference of latitude between the viewing area in last cycle and the region to be shown in this cycle as map vector respectively;
According to difference of longitude and the difference of latitude between the region to be shown in the viewing area in last cycle and this cycle, and the longitude and latitude scope of the viewing area in last cycle, determine the longitude and latitude scope in the region to be shown in this cycle.
According to another aspect of the present invention, also provide a kind of vector-map painting device, having comprised:
Command analysis module, for pulling after instruction receiving map vector mouse shown on display screen, determines after described mouse pulls the related latitude and longitude information of instruction and exports;
Region to be shown determination module, for according to the latitude and longitude information of described command analysis module output, determines after the longitude and latitude scope in region to be shown, sends buffer update notice;
Buffer update module, be used for receiving after described buffer update notice, the longitude and latitude scope in the described region to be shown of determining according to described region to be shown determination module, from be stored in the map vector of painting in advance region the first buffer memory, extract after the map vector in region to be shown, the map vector extracting is covered to the map vector in the second buffer memory, and send area update notice;
Paint in advance area update module, be used for receiving after described area update notice, according to the longitude and latitude scope in the region of current demonstration on described display screen, redefine described longitude and latitude scope of painting in advance region, and draw painting in advance after the map vector in region of redefining, the map vector being stored in described the first buffer memory is upgraded;
Map vector display module, for showing at described display screen according to the map vector of the second buffer memory.
Preferably, on described display screen, the region of current demonstration is specially rectangular area.
Preferably, the described area update module of painting is in advance specifically for according to the longitude and latitude (x on four of the region of current demonstration on described display screen summits 1, y 1), (x 1, y 2), (x 2, y 1), (x 2, y 2), redefine out the described longitude and latitude (2x that paints in advance four summits in region 1-x 2, 2y 1-y 2), (2x 1-x 2, 2y 2-y 1), (2x 2-x 1, 2y 1-y 2), (2x 2-x 1, 2y 2-y 1); Wherein, x 1, x 2represent respectively the minimum longitude in the region of described current demonstration, maximum longitude, y 1, y 2represent respectively the minimum latitude in the region of described current demonstration, maximum latitude.
Further, described vector-map painting device, also comprises:
Paint in advance area update module also for when described device starts, according to the latitude and longitude information that is about to show the viewing area of map vector in display screen, determine and paint in advance behind region, draw out the map vector of painting in advance region; And by the vector map storing of painting in advance region of drawing out in the first buffer memory; By the vector map storing of described viewing area in the second buffer memory.
In the technical scheme of the embodiment of the present invention, mouse is the region to be shown in once towing process on display screen, all falls in scope of painting in advance region of the present invention; And the pre-rendered map vector that goes out to paint in advance region of vector-map painting device; Make in mouse drag process, the map vector that vector-map painting device can periodically extract region to be shown shows; And receiving before next mouse pulls instruction, complete in time the renewal to the map vector of painting in advance region in the first buffer memory; Thereby can, so that continuously, glisteningly do not show map vector in display screen, can improve user's experience.
Accompanying drawing explanation
Fig. 1 is existing map vector schematic diagram;
Fig. 2 a is the process flow diagram of the method for the pre-rendered vector map storing that goes out to paint in advance region of the vector-map painting device of the embodiment of the present invention in buffer memory;
Fig. 2 b is the schematic diagram in He Yuhui region, viewing area of the rectangle of the embodiment of the present invention;
Fig. 3 a is the process flow diagram that the vector-map painting device of the embodiment of the present invention can periodically show the method that refreshes map vector;
Fig. 3 b, Fig. 3 c, Fig. 3 d are respectively in the viewing area in the last cycle of the embodiment of the present invention, the schematic diagram that mouse carries out forceps horizontal pulling respectively, vertically pulls and pull along rectangular display area diagonal line;
Fig. 4 is the process flow diagram that the vector-map painting device of the embodiment of the present invention upgrades the method for the map vector of drawing area in the first buffer memory;
Fig. 5 is the internal truss frame structure schematic diagram of the vector-map painting device of the embodiment of the present invention.
Embodiment
For making object of the present invention, technical scheme and advantage clearer, referring to accompanying drawing and enumerate preferred embodiment, the present invention is described in more detail.Yet, it should be noted that, many details of listing in instructions are only used to make reader to have a thorough understanding to one or more aspects of the present invention, even if do not have these specific details also can realize these aspects of the present invention.
The terms such as " module " used in this application, " system " are intended to comprise the entity relevant to computing machine, such as but not limited to hardware, firmware, combination thereof, software or executory software.For example, module can be, but be not limited in: the thread of the process of moving on processor, processor, object, executable program, execution, program and/or computing machine.For instance, the application program of moving on computing equipment and this computing equipment can be modules.One or more modules can be positioned at an executory process and/or thread.
The present inventor considers, can be in buffer memory the pre-stored whole map vector of painting in advance region that comprises viewing area; For example, this size of painting in advance region can be 9 times of viewing area size.When user pulls the map vector in the region of current demonstration, just needn't calculate temporarily, draw the map vector outside the region of current demonstration, and directly from the map vector of painting in advance region of buffer memory, extract, show.Like this, at the mouse of map vector, pull in process, just there will not be the map vector causing because calculated amount is large to show problem slow and flicker that cause.Thereby, at the mouse of map vector, pull in process, be to user's visual sense, the part that map is pulled out can be continuously, flicker-freely show.
And, after this mouse drag finishes, repaint in time the whole map vector of painting in advance region in the region that comprises current demonstration, and be updated in buffer memory, directly to show in upper once mouse pulls process.
Below in conjunction with accompanying drawing, describe technical scheme of the present invention in detail.
After the vector-map painting device of the embodiment of the present invention (being vector-map painting software) operation, show map vector on display screen before, can the pre-rendered vector map storing that goes out to paint in advance region in buffer memory, idiographic flow as shown in Figure 2 a, comprises the steps:
S201: vector-map painting device, according to the latitude and longitude information that is about to show the viewing area of map vector in display screen, is determined and painted in advance region.
Particularly, vector-map painting device is about to show after the latitude and longitude information of viewing area of map vector, according to viewing area, determines and paint in advance region in determining display screen.Wherein, paint in advance region and can comprise viewing area, and the extended area of viewing area periphery.
Conventionally, the viewing area that shows map vector in display screen is rectangular area; As shown in Figure 2 b, if the longitude and latitude on four summits of the viewing area of rectangle is respectively (u 1, v 1), (u 1, v 2), (u 2, v 1), (u 2, v 2), can be according to the latitude and longitude information of viewing area, the longitude and latitude of determining four summits of painting in advance region of rectangle is respectively (2u 1-u 2, 2v 1-v 2), (2u 1-u 2, 2v 2-v 1), (2u 2-u 1, 2v 1-v 2), (2u 2-u 1, 2v 2-v 1).Wherein, u 1, u 2represent respectively the minimum longitude of the viewing area of rectangle, maximum longitude, v 1, v 2represent respectively the minimum latitude of the viewing area of rectangle, maximum latitude.Certainly, those skilled in the art also can adopt other method that the relation between Yu Yuhui region, viewing area is set, such as, Wei Yuhui region, viewing area middle position also can be set, the area ratio in Yu Yuhui region, viewing area is 1:n, and wherein, n is more than or equal to 9 natural number.
S202: vector-map painting device is drawn out the map vector of painting in advance region, and by the vector map storing of painting in advance region of drawing out in the first buffer memory.
Particularly, for what determine longitude and latitude scope, paint in advance region, how to draw out the method that the map vector of painting in advance region can adopt prior art, be well known to those skilled in the art, repeat no more herein.
S203: vector-map painting device shows the map vector of painting in advance the viewing area in region on display screen.
Particularly, vector-map painting device in the second buffer memory, and shows the vector map storing of painting in advance the viewing area in region according to the map vector in the second buffer memory.
On display screen, show after map vector, if user pins left mouse button in the map vector showing, vector-map painting device confirms that the mouse receiving in map vector pulls instruction; Before left mouse button is unclamped, vector-map painting device can be periodically (such as every 1/60s, i.e. frequency 60Hz), constantly show and refresh map vector; In one-period, refresh the flow process of the method that shows map vector as shown in Figure 3 a, comprise the steps:
S301: vector-map painting device is determined the longitude and latitude scope in region to be shown according to current mouse coordinates.
Particularly, vector-map painting device is determined the latitude and longitude information of current mouse coordinates in map vector; And according to last cycle mouse coordinates the latitude and longitude information in map vector, determine difference of longitude and difference of latitude between the place in last cycle mouse coordinates and the corresponding map vector of current mouse coordinates; Using the difference of longitude of determining, difference of latitude difference of longitude, the difference of latitude between the viewing area in last cycle and the region to be shown in this cycle as map vector respectively; Afterwards, according to difference of longitude and the difference of latitude between the region to be shown in the viewing area in last cycle and this cycle, and the longitude and latitude scope of the viewing area in last cycle, determine the longitude and latitude scope in the region to be shown in this cycle.Wherein, the proportional sizes in the region to be shown in this cycle, shape are identical with proportional sizes, the shape of the viewing area in last cycle respectively.In other words, the region to be shown in this cycle can be obtained by displacement by the viewing area in last cycle, this displacement with mouse coordinates the displacement within this cycle corresponding.
Take as shown in Figure 2 b paint in advance region as example, for convenience of describing, by painting in advance the subregion of eight rectangles in the extended area in region, be labeled as respectively 1-8 region.Fig. 3 b-3d represents that respectively mouse shows in the viewing area in last cycle of map vector at display screen, carries out respectively forceps horizontal pulling, vertically pulls and pull along the diagonal line of the viewing area of rectangle.As shown in Figure 3 b, if mouse pulls to left hand edge from the right hand edge of the viewing area in last cycle of map vector, the longitude and latitude scope that can determine the region to be shown in this cycle drops within the scope of the viewing area in last cycle and the longitude and latitude in No. 5 regions.As shown in Figure 3 c, if mouse pulls to lower limb from the coboundary of the viewing area in last cycle of map vector, the longitude and latitude scope that can determine the region to be shown in this cycle drops within the scope of the viewing area in last cycle and the longitude and latitude in No. 2 regions.As shown in Figure 3 d, if mouse from the upper right corner of the viewing area in last cycle of map vector left inferior horn pull, the longitude and latitude scope that can determine the region to be shown in this cycle drops within the scope of the longitude and latitude in the viewing area in last cycle, No. 2 regions, No. 3 regions and No. 5 regions.
S302: vector-map painting device shows at display screen extract the map vector in region to be shown from be stored in the map vector of painting in advance region the first buffer memory after.
Particularly, vector-map painting device is from being stored in the map vector of painting in advance region the first buffer memory, extract after the map vector in region to be shown in this cycle of determining in step S301, the map vector extracting is covered to the map vector having stored in the second buffer memory, and show at display screen according to the map vector in the second buffer memory.
As shown in Figure 2 b, the viewing area that mouse pulls (process of for example, unclamping left mouse button from pressing left mouse button moving to) rectangle is before positioned at the central authorities of painting in advance region of rectangle; And each diagonal line for painting in advance in region, becomes three equal parts equal in length by this diagonal division, be positioned at middle equal portions of this diagonal line and be the diagonal line that mouse pulls previous viewing area.And mouse pulls cornerwise length of previous viewing area, be the ultimate range that mouse can pull in this viewing area; Obviously, at a mouse, pull in process, region to be shown can not exceed the scope of painting in advance region.
Obviously, from the mouse coordinates in last cycle, be displaced to the process of current mouse coordinates, vector-map painting device is without instant computing, drafting map vector, directly from buffer memory, painting in advance the map vector that extracts the region to be shown in this cycle in the map vector in region shows, the time of saved calculating, drawing map vector, avoid occurring that map vector shows problem slow and that cause glimmering.
What afterwards, vector-map painting device carried out next cycle refreshes demonstration map vector.
When user unclamps left mouse button, vector-map painting device confirms that receiving mouse pulls END instruction, and end period ground refreshes demonstration map vector.Afterwards, the flow process that vector-map painting device upgrades the method for the map vector of drawing area in the first buffer memory as shown in Figure 4, comprises the steps:
S401: vector-map painting device, according to the longitude and latitude scope in the region of current demonstration on display screen, redefines the longitude and latitude scope of painting in advance region.
Particularly, vector-map painting device is determined the longitude and latitude scope in the region of current demonstration on display screen; According to (being before periodic refresh shows map vector) before receiving mouse drag instruction, the longitude and latitude scope of the viewing area of the map vector showing on display screen, determine after the displacement between the viewing area before the region of current demonstration and mouse drag, redefine out the current longitude and latitude scope of painting in advance region with together with the longitude and latitude scope of drawing area before mouse drag.
For example, the region that shows current demonstration in map vector in display screen is rectangular area, and the longitude and latitude on its four summits can be respectively (x 1, y 1), (x 1, y 2), (x 2, y 1), (x 2, y 2); The longitude and latitude that can redefine out four summits of painting in advance region is respectively (2x 1-x 2, 2y 1-y 2), (2x 1-x 2, 2y 2-y 1), (2x 2-x 1, 2y 1-y 2), (2x 2-x 1, 2y 2-y 1).Wherein, x 1, x 2represent respectively the minimum longitude in the region of current demonstration in map vector, maximum longitude, y 1, y 2represent respectively the minimum latitude in the region of current demonstration in map vector, maximum latitude.
S402: vector-map painting device is drawn painting in advance after the map vector in region of redefining, and the map vector being stored in the first buffer memory is upgraded.
Particularly, vector-map painting device, according to the longitude and latitude scope of painting in advance region redefining out, is drawn the map vector of painting in advance region redefining out; For what determine longitude and latitude scope, paint in advance region, how to draw out the method that the map vector of painting in advance region can adopt prior art, be well known to those skilled in the art, repeat no more herein.Afterwards, by the map vector of painting in advance region repainting, cover and be stored in the map vector in the first buffer memory.
Preferably, vector-map painting device can be divided into after a plurality of subregions painting in advance region, the map vector of parallel drawing all subregion.
Obviously, in the second buffer memory, store the map vector in the region of current demonstration on display screen, vector-map painting device upgrades the map vector of the drawing area in the first buffer memory, and the data in the second buffer memory, without impact, are not therefore affected to the map vector of current demonstration on display screen; That is to say, at vector-map painting device, upgrade in the map vector process of the drawing area in the first buffer memory, the map vector being presented on display screen remains unchanged, and can not produce flicker.
In practical operation, vector-map painting device can, receiving before next mouse pulls instruction, complete the renewal to the map vector of painting in advance region in the first buffer memory in time.When receiving next mouse and pull instruction, vector-map painting device is the process step of repeating step S301-S302 and step S401-S402, the map vector that makes display screen can be continuously, glisteningly do not show.
Method based on above-mentioned drafting map vector, the internal truss frame structure schematic diagram of the vector-map painting device of the embodiment of the present invention as shown in Figure 5, comprising: command analysis module 501, region to be shown determination module 502, buffer update module 503, paint area update module 504 and map vector display module 505 in advance.
Command analysis module 501, for pulling after instruction receiving map vector mouse shown on display screen, is determined after mouse pulls the related latitude and longitude information of instruction and is exported.
Region to be shown determination module 502, for according to the latitude and longitude information of command analysis module 501 outputs, is determined after the longitude and latitude scope in region to be shown, sends buffer update notice.
Buffer update module 503 is for receiving after the buffer update notice of region to be shown determination module 502 transmissions, the longitude and latitude scope in the region to be shown of determining according to region to be shown determination module 502, from be stored in the map vector of painting in advance region the first buffer memory, extract after the map vector in region to be shown, the map vector extracting is covered to the map vector in the second buffer memory, and send area update notice.
Paint in advance area update module 504 for when vector-map painting device starts, according to the latitude and longitude information that is about to show the viewing area of map vector in display screen, determine and paint in advance behind region, draw out the map vector of painting in advance region; And by the vector map storing of painting in advance region of drawing out in the first buffer memory; By the vector map storing of this viewing area in the second buffer memory; And, paint in advance area update module 504 after receiving the area update notice of buffer update module 503 transmissions, according to the longitude and latitude scope in the region of current demonstration on display screen, redefine the longitude and latitude scope of painting in advance region, and draw painting in advance after the map vector in region of redefining, the map vector being stored in the first buffer memory is upgraded.Paint in advance area update module 504 specifically for according to the longitude and latitude (x on four of the region of current demonstration on display screen summits 1, y 1), (x 1, y 2), (x 2, y 1), (x 2, y 2), redefine out the longitude and latitude (2x on four summits of painting in advance region 1-x 2, 2y 1-y 2), (2x 1-x 2, 2y 2-y 1), (2x 2-x 1, 2y 1-y 2), (2x 2-x 1, 2y 2-y 1); Wherein, x 1, x 2represent respectively the minimum longitude of the map vector in the region of current demonstration on display screen, maximum longitude, y 1, y 2represent respectively the minimum latitude of the map vector in the region of current demonstration on display screen, maximum latitude.
Map vector display module 505 is for showing at display screen according to the map vector of the second buffer memory.
As shown from the above technical solution, mouse is the region to be shown in once towing process on display screen, all falls in scope of painting in advance region of the present invention; And the pre-rendered map vector that goes out to paint in advance region of vector-map painting device; Make in mouse drag process, the map vector that vector-map painting device can periodically extract region to be shown shows; And receiving before next mouse pulls instruction, complete in time the renewal to the map vector of painting in advance region in the first buffer memory; Thereby can, so that continuously, glisteningly do not show map vector in display screen, can improve user's experience.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, this program can be stored in a computer read/write memory medium, as: ROM/RAM, magnetic disc, CD etc.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (9)

1. a vector-map painting method, is characterized in that, comprising:
On display screen, show after map vector, if the mouse receiving in described map vector pulls instruction, periodically on display screen, refresh map vector; Wherein, the process that refreshes map vector in one-period is: the longitude and latitude scope of determining region to be shown according to current mouse coordinates; And extract after the map vector in region to be shown from be stored in the map vector of painting in advance region the first buffer memory, the map vector extracting is covered to the map vector in the second buffer memory, and show at described display screen according to the map vector in the second buffer memory;
Pull after END instruction receiving mouse, according to the longitude and latitude scope in the region of current demonstration on described display screen, redefine described longitude and latitude scope of painting in advance region, and draw painting in advance after the map vector in region of redefining, the map vector being stored in described the first buffer memory is upgraded.
2. the method for claim 1, is characterized in that, on described display screen, the region of current demonstration is specially rectangular area.
3. method as claimed in claim 2, is characterized in that, described according to the longitude and latitude scope in the region of current demonstration on described display screen, redefines described longitude and latitude scope of painting in advance region, specifically comprises:
According to the longitude and latitude (x on four of the region of current demonstration on described display screen summits 1, y 1), (x 1, y 2), (x 2, y 1), (x 2, y 2), redefine out the described longitude and latitude (2x that paints in advance four summits in region 1-x 2, 2y 1-y 2), (2x 1-x 2, 2y 2-y 1), (2x 2-x 1, 2y 1-y 2), (2x 2-x 1, 2y 2-y 1);
Wherein, x 1, x 2represent respectively the minimum longitude in the region of described current demonstration, maximum longitude, y 1, y 2represent respectively the minimum latitude in the region of described current demonstration, maximum latitude.
4. the method as described in as arbitrary in claim 1-3, is characterized in that, before showing map vector, also comprises on described display screen:
According to the latitude and longitude information that is about to show the viewing area of map vector in display screen, determine and paint in advance behind region, draw out the map vector of painting in advance region; And by the vector map storing of painting in advance region of drawing out in the first buffer memory; By the vector map storing of described viewing area in the second buffer memory.
5. the method as described in as arbitrary in claim 1-3, is characterized in that, determines the longitude and latitude scope in region to be shown according to current mouse coordinates, specifically comprises:
Determine difference of longitude and difference of latitude between the place in last cycle mouse coordinates and the corresponding map vector of current mouse coordinates;
Using the difference of longitude of determining, difference of latitude difference of longitude, the difference of latitude between the viewing area in last cycle and the region to be shown in this cycle as map vector respectively;
According to difference of longitude and the difference of latitude between the region to be shown in the viewing area in last cycle and this cycle, and the longitude and latitude scope of the viewing area in last cycle, determine the longitude and latitude scope in the region to be shown in this cycle.
6. a vector-map painting device, is characterized in that, comprising:
Command analysis module, for pulling after instruction receiving map vector mouse shown on display screen, determines after described mouse pulls the related latitude and longitude information of instruction and exports;
Region to be shown determination module, for according to the latitude and longitude information of described command analysis module output, determines after the longitude and latitude scope in region to be shown, sends buffer update notice;
Buffer update module, be used for receiving after described buffer update notice, the longitude and latitude scope in the described region to be shown of determining according to described region to be shown determination module, from be stored in the map vector of painting in advance region the first buffer memory, extract after the map vector in region to be shown, the map vector extracting is covered to the map vector in the second buffer memory, and send area update notice;
Paint in advance area update module, be used for receiving after described area update notice, according to the longitude and latitude scope in the region of current demonstration on described display screen, redefine described longitude and latitude scope of painting in advance region, and draw painting in advance after the map vector in region of redefining, the map vector being stored in described the first buffer memory is upgraded;
Map vector display module, for showing at described display screen according to the map vector of the second buffer memory.
7. device as claimed in claim 6, is characterized in that, on described display screen, the region of current demonstration is specially rectangular area.
8. device as claimed in claim 7, is characterized in that,
The described area update module of painting is in advance specifically for according to the longitude and latitude (x on four of the region of current demonstration on described display screen summits 1, y 1), (x 1, y 2), (x 2, y 1), (x 2, y 2), redefine out the described longitude and latitude (2x that paints in advance four summits in region 1-x 2, 2y 1-y 2), (2x 1-x 2, 2y 2-y 1), (2x 2-x 1, 2y 1-y 2), (2x 2-x 1, 2y 2-y 1); Wherein, x 1, x 2represent respectively the minimum longitude in the region of described current demonstration, maximum longitude, y 1, y 2represent respectively the minimum latitude in the region of described current demonstration, maximum latitude.
9. the device as described in as arbitrary in claim 6-8, is characterized in that, also comprises:
Paint in advance area update module also for when described device starts, according to the latitude and longitude information that is about to show the viewing area of map vector in display screen, determine and paint in advance behind region, draw out the map vector of painting in advance region; And by the vector map storing of painting in advance region of drawing out in the first buffer memory; By the vector map storing of described viewing area in the second buffer memory.
CN201410247332.XA 2014-06-05 2014-06-05 Vector map drawing method and device Pending CN104063158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410247332.XA CN104063158A (en) 2014-06-05 2014-06-05 Vector map drawing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410247332.XA CN104063158A (en) 2014-06-05 2014-06-05 Vector map drawing method and device

Publications (1)

Publication Number Publication Date
CN104063158A true CN104063158A (en) 2014-09-24

Family

ID=51550895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410247332.XA Pending CN104063158A (en) 2014-06-05 2014-06-05 Vector map drawing method and device

Country Status (1)

Country Link
CN (1) CN104063158A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669998A (en) * 2018-11-05 2019-04-23 武汉中地数码科技有限公司 The geographical big data method for visualizing and system drawn based on progressive transmission increment
CN111199512A (en) * 2019-12-24 2020-05-26 远光软件股份有限公司 SVG vector graphics adjusting method, SVG vector graphics adjusting device, storage medium and terminal
CN115880447A (en) * 2022-09-27 2023-03-31 北京华如科技股份有限公司 Drawing method and device for simulation situation entity military standard

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6163749A (en) * 1998-06-05 2000-12-19 Navigation Technologies Corp. Method and system for scrolling a map display in a navigation application
CN101493331A (en) * 2008-01-23 2009-07-29 厦门雅迅网络股份有限公司 Map vector data displaying method in network navigation of mobile phone
CN102436669A (en) * 2011-10-13 2012-05-02 中国民用航空总局第二研究所 Two-dimensional vector map drawing method
CN102819671A (en) * 2012-07-25 2012-12-12 深圳市网信联动技术有限公司 Method for carrying out data analysis by combining map
CN103605462A (en) * 2013-11-21 2014-02-26 广东威创视讯科技股份有限公司 Map image displaying method and controller

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6163749A (en) * 1998-06-05 2000-12-19 Navigation Technologies Corp. Method and system for scrolling a map display in a navigation application
CN101493331A (en) * 2008-01-23 2009-07-29 厦门雅迅网络股份有限公司 Map vector data displaying method in network navigation of mobile phone
CN102436669A (en) * 2011-10-13 2012-05-02 中国民用航空总局第二研究所 Two-dimensional vector map drawing method
CN102819671A (en) * 2012-07-25 2012-12-12 深圳市网信联动技术有限公司 Method for carrying out data analysis by combining map
CN103605462A (en) * 2013-11-21 2014-02-26 广东威创视讯科技股份有限公司 Map image displaying method and controller

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
黄振: "《基于WebGIS的电信资源系统性能优化研究与应用》", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109669998A (en) * 2018-11-05 2019-04-23 武汉中地数码科技有限公司 The geographical big data method for visualizing and system drawn based on progressive transmission increment
CN111199512A (en) * 2019-12-24 2020-05-26 远光软件股份有限公司 SVG vector graphics adjusting method, SVG vector graphics adjusting device, storage medium and terminal
CN111199512B (en) * 2019-12-24 2023-08-15 远光软件股份有限公司 SVG vector graphic adjustment method, SVG vector graphic adjustment device, storage medium and SVG vector graphic adjustment terminal
CN115880447A (en) * 2022-09-27 2023-03-31 北京华如科技股份有限公司 Drawing method and device for simulation situation entity military standard

Similar Documents

Publication Publication Date Title
US10042469B2 (en) Methods and apparatus for reducing perceived pen-to-ink latency on touchpad devices
CN105405159A (en) Handwriting display method and device
CN104112425A (en) Display device and driving method thereof
CN103176075B (en) Touch panel testing method
CN105378432A (en) System and method for attitude correction
CN101763234B (en) Method and device for simulating various screen resolutions
CN101872586A (en) Minimizing of pen stroke capture stand-by period
US20230028598A1 (en) Image processing method and apparatus
CN110069191B (en) Terminal-based image dragging deformation implementation method and device
CN103258505A (en) Electronic ink screen refreshing method and corresponding electronic device thereof
CN104063158A (en) Vector map drawing method and device
CN110706675A (en) Information display method and device
CN104385920B (en) Realization method of pointer type virtual instrument panel
CN108089858B (en) Method and device for creating visual interface
CN106339158A (en) Dynamic display method and device for static images based on large data
CN103020888A (en) Image translation updating display method and system
JP2023533108A (en) Method, apparatus, device and storage medium for generating road labels
CN105468227B (en) Information displaying method and device in a kind of webpage
CN109254717B (en) Handwriting guide method and device for tablet, tablet and storage medium
CN108279962B (en) Method and device for creating visual data display interface
CN103310741A (en) Display method of electronic ink screen and electronic equipment
CN103064644A (en) Image display method, graphics card and electronic equipment
CN104794134A (en) Chinese character display method and device
CN114442845A (en) Writing track rendering method and device, writing screen equipment and storage medium
CN105528362B (en) Table loading display method and display device thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20140924

RJ01 Rejection of invention patent application after publication