Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Before the embodiment of the present invention is carried out explanation explained in detail, first to some nouns that the present embodiments relate to
Term explains.
SVG (Scalable Vector Graphics, scalable vector graphics), is based on extensible markup language (mark
The subset of quasi-generalized markup language), for describing a kind of graphical format of two-dimension vector graphics.It is formulated by World Wide Web Consortium,
It it is an open standard.SVG strictly defers to XML (Extensible Markup Language, extensible markup language) grammer,
And with the descriptive language of text formatting, picture material is described, therefore it is a kind of vector graphics lattice unrelated with image resolution ratio
Formula.User can arbitrarily scale SVG image and show, without destroying the definition of SVG image, details etc..And SVG image is at screen
Always edge clear on curtain, its definition is suitable for any screen resolution and print resolution.
JPEG (Joint Photographic Experts Group, joint image expert group) picture, with 24 face
Color stores single bitmap.JPEG is and platform-independent picture format, supports the compression of highest level, but this compression is to have
Loss.Approximate JPEG file support interlocks.
Canvas (container): be new in HTML5 (HyperText Markup Language 5, HTML)
The label increased, it is for generating image in real time at webpage, and can operate picture material.
Fig. 2 is the method flow diagram that a kind of bill that the embodiment of the present invention provides is exchanged.It should be noted that the present invention is real
Executing all maps in example all uses SVG form to draw.As a example by the scene being bought subway ticket by mobile terminal, see figure
2, the method flow that the embodiment of the present invention provides includes:
201, terminal is after the booking function on operation that user performs being detected, and presentation of bill exchanges the page.
In embodiments of the present invention, above-mentioned booking function can be arranged in other application as a pin function, this
This is the most specifically limited by bright embodiment.It is as a example by the function being arranged in social networking application by above-mentioned booking function, if
User clicks the icon of this booking function, will show that the page exchanged by bill as shown in left in Figure 3 on a terminal screen.
Wherein, social networking application is an application program providing instant messaging to service for intelligent terminal, supports across common carrier, across behaviour
Make system platform communication, can quickly send voice SMS, video, picture and word etc. by network.This bill is exchanged on the page
At least include start site and purpose website choose framework, bill number chooses framework etc..Above-mentioned website chooses framework and ticket
Choose framework according to number and be in operable state, support that user performs click and chooses to wait and operate.Additionally, above-mentioned website marquee
Body also can support that user is manually entered site information, and what the bill exchange page may also include bill number is manually entered framework
Deng, this is the most specifically limited by the embodiment of the present invention.Except, in addition to above-mentioned carrying out by the way of booking, user can also pass through
The modes such as input network address or click booking link, utilize browser to carry out webpage version form booking, and the embodiment of the present invention is same to this
Sample the most specifically limits.
202, after bill is exchanged and website selection operation detected on the page, terminal demonstration mates with current geographic position
The origin site map page.
As shown in left in Figure 3, in the marquee body of start site and purpose website, all include such as " please select "
Such information, after user clicks on above-mentioned information region, terminal determines that user performs website and chooses behaviour
Make, page jump can be carried out, jump to the origin site map page shown in right figure in Fig. 3, to facilitate user to carry out initiating station
Point is chosen with purpose website.In embodiments of the present invention, the origin site map page includes at least one subway circulation line
Site information on road.Namely carrying out start site and when choosing of purpose website, terminal can show the whole urban district of user
Subway planning layout.Certainly being limited to the size of terminal screen, current display interface may only show overall subway planning
A part in layout.And the origin site map page is the map of SVG form, support that user carries out the contracting of arbitrary proportion
Put, definition and the display details of the map page will not be changed.Can be with different colours to respectively on the origin site map page
Bar subway line makes a distinction, and all marked each website on each subway line and show the website of each website
Title (wherein site name is the most not shown).
Consider, in the embodiment of the present invention it should be noted that based on subway circulation distance and people's go off daily demand
Subway planning layout is completed in units of Zhong Yi city.What administrative grade i.e., herein referred to is city.In the present invention implements, it
So the map page starting most display after website selection operation being detected is referred to as the origin site map page, it is because
Follow-up carry out user when website is chosen and may perform zoom operations or translation etc., for the map sheet that will initially show
Face and the map page performing the rear display such as zoom operations or translation make a distinction, referred to as origin site map sheet
Face.If additionally, the subway transportation system in a city is the most flourishing, then potentially include a plurality of circuit and number various website letter
Breath, is limited to the factor such as size of terminal screen, and the display origin site map page on a terminal screen may only include
A part of circuit in the figure of whole subway plotted line road and site information.
That is, the origin site map page can include the circuit near position, current position and site information, the most just initial station
The point map page can also be the overall subway plotted line road figure after reducing, or initially diagram page can also include current position
Managing the circuit near the down town belonging to position and site information etc., this is the most specifically limited by the embodiment of the present invention.
In another embodiment, due to generally user, the website near current geographic position is chosen for the general of start site
Rate is bigger, carries out start site quickly and easily choose therefore to be easy to user, and the most initially diagram page is for including
Circuit near position, current position and the page of site information.Such as, it is near Tian An-men that user is currently located geographical position, then
Initially potentially include No. 2 complete site information of line, Line 1, No. 4 lines and the part site information of No. 5 lines in diagram page.
203, terminal obtains start site information and the point of destination dot information that user chooses.
In embodiments of the present invention, the origin site map page is in order to show the subway line in whole city as completely as possible
Circuit planning figure, the display granularity of site information is generally the least, is not easy to user and carries out choosing of start site and purpose website, for
Scaling all supported by this map.User, just can be to the origin site map page carrying out start site and when choosing of purpose website
Zoom in and out, to avoid falsely dropping of website to take.Under normal circumstances, what scaling here referred to is to enter the origin site map page
Row amplifieroperation.As shown in the right figure in Fig. 3, the origin site map page includes map is zoomed in and out operation "+" choosing
Item and "-" option.When triggering "+" option time map is amplified operation, when triggering "-" option, map is reduced behaviour
Make.If additionally, terminal screen is tangible screen, also support that user manually zooms in and out operation to map.Such as, both hands are passed through
Map is zoomed in and out by paddling.When both hands move closer to, map is reduced;When both hands are gradually distance from, to map
It is amplified.
Additionally, map is amplified also by finger double click operation.For this amplification mode, can be by user
Single finger touch point is defined as scaling central point, and the scaling that double click operation is corresponding the most each time is all identical
's.Such as the first time after double click operation, map is enlarged into original 2 times size;For the second time after double click operation, equally will be current
Map is enlarged into 2 times of sizes of map after for the first time double click operation.Wherein, after determining scaling central point, same this contracting of calculating
Put central point abscissa value on the origin site map page and ordinate value;Afterwards, according to this abscissa value, this vertical coordinate
Value and scaling, zoom in and out the origin site map page, and then obtains scaling the map of website page.
In embodiments of the present invention, as a example by map being zoomed in and out by both hands paddling, wherein, user's choosing is being obtained
When the start site information taken and point of destination dot information, following manner is usually taken and realizes:
203a, after the zoom operations to the origin site map page being detected, load the contracting adaptive with this zoom operations
Put the map of website page.
For situation about directly the origin site map page being zoomed in and out, illustrate start site that user is to be chosen or
Purpose website is positioned in the currently displaying origin site map page on a terminal screen, therefore without again by origin site map
The page translates.Therefore directly the origin site map page is amplified operation, just can carry out start site or purpose
Choosing of website.When loading with the scaling map of website page that zoom operations is adaptive, also need adaptive terminal screen, count in detail
Calculation mode is as follows:
A (), two initial finger touch points according to zoom operations determine scaling central point.
Can be one container control of origin site map page setup in embodiments of the present invention.It should be noted that such as
Shown in Fig. 4, no matter for the origin site map page or for scaling the map of website page, the center position of its page with
The center position of container control is the most consistent.And the width value of the origin site map page is not more than the width value of container control,
The height value of the origin site map page is not more than the height value of container control.That is, container control is than origin site map
The page is big.
Due to when zooming in and out operation each time the position of touch of finger different, when zooming in and out operation the most each time
Scaling central point is different.As it is shown in figure 5, scaling central point refers to two initial finger touch in embodiments of the present invention
The central point of the rectangular region that point is formed.It should be noted that what initial finger touch point referred to is to zoom in and out operation
The first two finger touch location point on a terminal screen.That is, zoom operations include two initial finger touch points,
One finger slide and two termination finger touch points.
(b), with the upper left corner of the origin site map page as initial point, calculate scaling central point at the origin site map page
On the first abscissa value and the first ordinate value.
It should be noted that what transverse axis referred in embodiments of the present invention is along screen width or the side of map width
To, what the longitudinal axis referred to is the direction along screen height or map height.When the origin site map page is zoomed in and out,
If reduction operation, then the scaling map of website page obtained can as shown in Figure 5 container control little;If amplifying behaviour
Make, then the scaling map of website page obtained may as shown in Figure 6 container control big;Regardless of whether for above-mentioned which
The situation of kind, for the size of scaled size is all for original SVG map, therefore at the first horizontal seat calculating scaling central point
With the upper left corner of the origin site map page as initial point when scale value and the first ordinate value, i.e. calculate scaling central point original
Coordinate figure on SVG map.Wherein, when calculating the first abscissa value (X1) and the first ordinate value (Y1), it is usually taken down
The mode of stating realizes:
As it is shown in fig. 7, first obtain the first width value W1 and the first height value H1, the origin site map sheet of container control
The second width value W2 and the second height value H2 in face.
As shown in Figure 8, with scale the map of website page distance container control left side away from distance as L1, scaling map of website
The distance of page distance terminal screen coboundary is T1, the left margin of this scaling central point distance scaling map of website page and upper
The screen distance on border is respectively L2 and T2, and as a example by scaling is scale, then scaling central point is at the origin site map page
On X1=L2/scale, Y1=T2/scale.
Again obtain scaling central point distance the container control left side away from the first lateral separation L3, scaling central point distance terminal
First fore-and-aft distance T3 of screen coboundary, container control are apart from the second fore-and-aft distance T4 of terminal screen coboundary.Wherein, T4
Refer to the offsetTop of container control.It should be noted that the above-mentioned various distance values related to, in addition to X1 and Y1, its
What he L1, T1, L2, T2, L3, T3, T4 all referred to is the screen distance relative to terminal screen.Additionally, due to for mobile phone etc.
From the point of view of terminal, the value of offsetLeft is 0, so the distance of scaling central point distance terminal screen left margin is equal in scaling
The heart point distance container control left side away from the first lateral separation L3.
L2=L3-L1, T2=T3-T4-T1.The origin site map page is not being carried out any zoom operations or translation
In the case of operation, namely when the scaling between the scaling map of website page and the origin site map page is 1, L1=
(W1-W2)/2.And after the origin site map page is zoomed in and out,
L1=X1*scale-[X1+ (W1-W2)/2] (1)
T1=Y1*scale-[Y1+ (H1-H2)/2] (2)
Therefore, after above-mentioned formula (1) is substituted into X1=(L3-L1)/scale, just can get
After above-mentioned formula (2) is substituted into Y1=(T3-T4-T1)/scale, just can get
(c), according to the first abscissa value, scaling that the first ordinate value is corresponding with zoom operations, to origin site
The map page zooms in and out, and obtains scaling the map of website page.
For this step, after obtaining the first abscissa value X1 and the first ordinate value Y1, just lock scaling central point
Coordinate position in original SVG map, afterwards with this scaling central point for scaling center, according to this scaling to first initial station
The point map page zooms in and out, and obtains zoom operations and the scaling map of website page of terminal screen adaptation performed with user,
Realize carrying out pure CSS (Cascading Style by the wide high level of container control and the wide high level of original SVG map
Sheets, CSS) scale scaling.
Above-mentioned steps 203a describes and the origin site map page is directly amplified operation, just can carry out start site
Or the selection operation of purpose website.In another embodiment, perform zoom operations user and carry out before website chooses, can
Can carry out for this kind of situation for inquiry station dot information or check that integrally iron wire circuit planning figure has carried out map translation
Also need to consider the impact of translation factor during zoom operations.If that is, before zoom operations being detected origin site map sheet
Face has occurred that translation, then calculating scaling central point abscissa value X1 on the origin site map page ' and vertical coordinate
During value Y1 ', also need to take following manner to realize:
Obtain translation the first corresponding transverse axis translational movement $ mx and the first longitudinal axis translational movement $ my;Wherein, $ mx and
The value of $ my both can be just to be alternatively to bear.For $ mx, map is negative to left value, to right translation value is
Just;For $ my, it is negative that map translates up value, and pan-down value is just.
For this kind of situation, according to scaling scale corresponding to zoom operations, the first lateral separation L3, the first transverse axis
Translational movement $ mx, the first width value W1 and the second width value W2, calculate X1 '.According to this scaling, the first fore-and-aft distance T3,
First longitudinal axis translational movement $ my, the second fore-and-aft distance T4, the first height value H1 and the second height value H2, calculate Y1 '.That is, L2=
L3-L1-$ mx, T2=T3-T4-T1-$ my, can obtain to formula (4) based on above-mentioned formula (1):
It is equally scaling center with this scaling central point (X1 ', Y1 ') afterwards, according to this scaling scale to through flat
Moving the map of website page after operation to zoom in and out, the most available zoom operations performed with user and terminal screen are adaptive
The scaling map of website page, eliminate translation factor on scaling impact.
In another embodiment, how to eliminate the impact of translation factor in like manner with when zooming in and out operation, to map
Before translating, user may carry out zoom operations to the origin site map page.For this kind of situation, over the ground
When figure carries out translation, also need to eliminate the impact of scale factors.The concrete mode eliminating scale factors impact is divided by contracting
Putting ratio scale, detailed process is as follows:
If translation being detected after the zoom operations that above-mentioned steps 203a is mentioned, then obtain zoom operations corresponding
Scaling scale, this translation translates size and longitudinal axis translation size relative to the transverse axis of terminal screen.Wherein, should
Transverse axis translation size and this longitudinal axis translation size are for indicating the displacement on a terminal screen of this translation.That is, this is put down
Move the distance that operation is slided on a terminal screen.Wherein, finger when value=this translation of this transverse axis translation size starts
The abscissa of finger touch point at the end of the abscissa of touch point-this translation;The value of this longitudinal axis translation size=this
The vertical coordinate of finger touch point at the end of the vertical coordinate of finger touch point-this translation when translation starts.
Wherein, when this translation starts, the abscissa of finger touch point refers to a finger touch point distance container control left side
Second lateral separation L3' of back gauge, at the end of this translation, the abscissa of finger touch point refers to finger touch point distance
The container control left side away from the 3rd lateral separation L3 ";When this translation starts, the vertical coordinate of finger touch point refers to finger
3rd fore-and-aft distance T3' of touch point distance terminal screen coboundary, the vertical seat of finger touch point at the end of this translation
Mark refers to the 4th fore-and-aft distance T3 of finger touch point distance terminal screen coboundary ".
Afterwards, the second transverse axis translational movement $ mx ' when performing last translation and the second longitudinal axis translational movement $ is obtained
my’;According to the second transverse axis translational movement $ mx ', transverse axis translation size (L3'-L3 ") and scaling scale, calculate this and translate
3rd transverse axis translational movement of operation;According to the second longitudinal axis translational movement $ my ', longitudinal axis translation size (T3'-T3 ") and scaling
Scale, calculates the 3rd longitudinal axis translational movement of this translation;Finally, translate according to the 3rd transverse axis translational movement and the 3rd longitudinal axis
Amount, translates the scaling map of website page, completes to carry out translation on SVG form map.
Respectively with symbol $ mx " and $ my " refer to the 3rd transverse axis translational movement and the 3rd longitudinal axis translational movement, then
$ mx "=$ mx '+(L3'-L3 ")/scale (7)
$ my "=$ my '+(T3'-T3 ")/scale (8)
If user was not carried out any zoom operations, the most above-mentioned formula (7) and formula (8) before carrying out translation
The value of scaling scale be 1.In sum, when map is performed zoom operations, also need to consider translation factor shadow
Ring;In like manner, when map is performed translation, also need to consider scale factors impact.That is, before the first operation being detected
If the origin site map page occurs the second operation, then obtain the coefficient of performance that the second operation is corresponding.Wherein, refer to when the second operation
During for translation, then this coefficient of performance can be transverse axis translational movement and the longitudinal axis translational movement of this second operation correspondence;When second
When operation refers to zoom operations, then this coefficient of performance can be the scaling that this second operation is corresponding.Afterwards, terminal obtains the
The coefficient of performance that one operation is corresponding, and then operate corresponding coefficient of performance according to the coefficient of performance and second that the first operation is corresponding,
The current site map page is processed.Such as recalculate the position of scaling central point, or recalculate current site ground
The transverse axis translational movement of diagram page and longitudinal axis translational movement.
If 203b detects arbitrary site map target trigger action, then terminal demonstration station on the scaling map of website page
Vertex type information is set.
In embodiments of the present invention, after the scaling map of website page detects the clicking operation of either site icon,
Just show type of site as shown in left in Figure 9 on terminal screen arranges information.Wherein, type of site has included
Initial station point and purpose website.This arranges information concretely bullet layer form, it may include " northern station, Shenzhen " so amplifies display
Site name, " being set to start site " and " being set to purpose website " such website setting options, the embodiment of the present invention is to this
The most specifically limit.After having had this to arrange information, the user that is more convenient for determines start site and purpose website.If user
Need to cancel the website chosen, then click on non-ballistic layer region and can realize cancellation and choose.
Wherein, in order to show the most on a terminal screen about the bullet layer arranging information, user is not had
Click the website icon of website A, and this bullet layer arranging information is shown website B position on a terminal screen by mistake
Situation, obtain certain website after the embodiment of the present invention is additionally included in scaling or after translation relative to terminal screen
Coboundary and the distance of left margin distance.
Seeing Figure 10, from the point of view of for mobile terminals such as mobile phones, the value of offsetLeft is 0, so a website
Relative to terminal screen left margin distance namely equal to this website respective container control left side away from the 4th lateral separation L3_,
By T3_ refer to website relative to the 5th fore-and-aft distance of terminal screen coboundary as a example by, then the calculation of L3_ and T3_ is as follows:
The website of acquisition station point icon instruction the second abscissa value X2 and second on the origin site map page is indulged and is sat
Scale value Y2, namely the second abscissa value X2 and the second ordinate value Y2 are all with the upper left corner of the origin site map page as initial point.
According to the scaling scale of the origin site map page, the second abscissa value X2, container control first wide
Angle value W1, the second width value W2 of the origin site map page, the website of computer installation point icon instruction is left relative to container control
4th lateral separation L3_ of back gauge, specific formula for calculation is:
Furthermore, according to scaling scale, the second ordinate value Y2, the first height value H1 of container control, container control
Distance the second fore-and-aft distance T4 of terminal screen coboundary, the second height value H2 of the origin site map page, computer installation point diagram
The website of mark instruction is relative to the 5th fore-and-aft distance T3_ of terminal screen coboundary, and specific formula for calculation is:
And after obtaining L3_ and T3_, just can show in the terminal screen position of L3_ and T3_ instruction and above-mentioned prompting is set
Information.
203c, after first that start site detected arranges trigger action, terminal will scaling the map of website page on quilt
The website triggering the instruction of website icon is set to start site;After second that purpose website detected arranges trigger action, will
On the scaling map of website page, the website of website icon instruction is set to purpose website.
In embodiments of the present invention, when after the clicking operation " being set to start site " this prompt options being detected, determine
Detect that first arranges trigger action, as shown in right in Figure 9, by the website icon instruction that is triggered on the scaling map of website page
Website be set to start site, the map of SVG form arranges a start mark for this website.Wherein, this initiates
Labelling can be a bubble with " rising " printed words, and this is the most specifically limited by the embodiment of the present invention." it is set to mesh when detecting
Website " this prompt options clicking operation after, determine and detect that second arranges trigger action, will the scaling map of website page
On be triggered website icon instruction website be set to purpose website, the map of SVG form arranges one for this website
Purpose labelling.Wherein, this purpose labelling can be a bubble with " eventually " printed words, and this is not carried out by the embodiment of the present invention
Concrete restriction.
204, terminal is according to start site information, point of destination dot information and the bill number information got, and calculates and waits to turn
The virtual resource number moved.
At present subway system generally individually takes staged method of ticketing, terminal can the preset plug-in unit by distance charging, this is inserted
Part have recorded the charging way of various distance.This plug-in unit is opened getting start site information, point of destination dot information and bill
After number information, can automatically calculate the virtual resource number that pay to subway ticketing system.Wherein, virtual resource is often referred to
Currency for virtual form.
Furthermore, it is necessary to explanation, in addition to the calculating that terminal can carry out virtual resource number to be transferred voluntarily, also may be used
Start site information, point of destination dot information and bill number information are sent to first server, first server treat and turn
The virtual resource number moved calculates, and result of calculation is back to terminal.Introduction about first server refers to this
The subsequent descriptions part of inventive embodiments.
205, terminal is after bill is exchanged and detected on the page that confirmation operation exchanged by bill, sends to first server and includes
The bill redemption request of virtual resource number.
In embodiments of the present invention, the social networking application mentioned during first server is referred to as step 201 provides the clothes of service
Business device.First server can assist the transfer of virtual resource, namely operation of withholing is completed by first server.?
In the embodiment of the present invention, be mainly concerned with the mutual of three main bodys, terminal to first server send bill redemption request, first
Server generates according to this bill redemption request and pays the page, and is handed down to terminal.Afterwards, terminal sends money to first server
Source transfer request, owing to first server shifts equivalent virtual resource to the bank account of subway system in user account.It
After, start site information, point of destination dot information and the bill number information got are sent to second service by first server
Device (server of subway system), is that user generates virtual tickets by second server, has opened number just because of subway system
According to interface, the exchange of bill can be completed.
In embodiments of the present invention, after user chooses complete start site and purpose website on the map page, by point
Hit on the bill exchange page returned before button just can return to.This bill is exchanged and is provided with such as " purchase " printed words on the page
Confirming booking option, terminal, after the clicking operation this confirmation booking option being detected, confirms that user performs bill and exchanges really
Recognize operation, the bill redemption request including virtual resource number can be sent to first server
206, first server is after receiving this bill redemption request, generates according to this bill redemption request and pays page
Face, and issue this payment page to terminal.
Wherein, this payment page is the most as shown in figure 11, it may include order number, date, virtual resource to be transferred
Number, the reception name of firm of virtual resource, payment cipher input area etc., this is the most specifically limited by the embodiment of the present invention
Fixed.The payment page shown in Figure 11 is the situation having bound bank card for user in the user account of social networking application registration,
So after bill redemption request being detected, payment cipher input step can be jumped directly to.For user not in social networking application
The user account of registration is bound the situation of bank card, pays in the page and also need to include card number input area, identifying code input area
Territories etc., this is the most specifically limited by the embodiment of the present invention.
207, this payment page of terminal demonstration, if detecting that payment affirmation operates, then to first service paying on the page
Device sends resource transfers request.
After terminal shows this payment page on screen, if getting use in the payment cipher input frame paid on the page
The payment cipher of family input, it is determined that detect that payment affirmation operates, sends resource transfers request to first server simultaneously.
208, first server based on virtual resource number to be transferred from the first account transfer equivalent virtual resource to the
Two accounts, and send start site information, point of destination dot information and bill number information to second server, by second server
According to start site information and point of destination dot information, generate the virtual tickets with bill number information matches, and issue to terminal
Virtual tickets, completes bill and exchanges.
In embodiments of the present invention, the first account refers to the bank card account of user, and the second account refers to subway system
Bank account.It should be noted that second server can issue the guaranteed votes virtually of graphic code form, wherein figure to terminal
Code can be Quick Response Code or bar code.A graphic code can be issued respectively for each bill.Such as, 4 bills are bought then
Issue 4 graphic codes.Second server is generating after virtual tickets, and virtual tickets can be sent to first server, then by the
This virtual tickets is sent to terminal by one server.So terminal is receiving the subway ticket of graphic code form by social networking application
After, if subway gate is supported scanning patter code or is provided with the graphic code scanning that controlled check office closes at subway gate
Equipment, then user just can realize self-service riding by the subway ticket of scanning patter code form at gate.
It should be noted that the above-mentioned subway bill redemption means illustrated is applied equally to the exchange of public transport bill.This
Sample is after bill is exchanged and website selection operation detected on the page, and display is the public transport operation planning chart in whole urban district.Its
In, the vehicle line figure of each bar working line the most a certain road bus.Further, shown in the embodiment of the present invention
The most applicable scene visualizing selectively point coordinates at various needs of website selection mode.Additionally, maps processing is except can
Outside using SVG form to draw, JPEG mode or canvas mode also can be used to carry out visualization display, only
Jpeg format map loads relatively costly for a user, if preset in the application for the relatively big (needs of increasing bag of application
The most embedded big figure of subway), the maintenance cost of canvas mode is higher compared to SVG mode.
The method that the embodiment of the present invention provides, can carry out bill exchange based on map of website, owing to showing in map of website
Having a site information of at least one working line, therefore user's synchronization is it can be seen that site information on a plurality of circuit, knows
Quantity of information relatively big, visualization is higher, even if start site and purpose website be not on same circuit, without with
Family switching site list carries out website and chooses, and carry out after website is chosen can quick obtaining to the bill exchanged, and then realize
Self-help ticket-buying, user's viscosity is more preferable, and effect is preferable.
Figure 12 is the flow chart of a kind of bill exchanging method that the embodiment of the present invention provides.Seeing Figure 12, the present invention implements
The method flow that example provides includes:
1201, showing the origin site map page mated with current geographic position, the origin site map page includes
Site information at least one working line.
1202, start site information and the point of destination dot information that user chooses is obtained based on initially diagram page.
1203, according to start site information, point of destination dot information and the bill number information got, calculate to be transferred
Virtual resource number.
1204, after detecting that confirmation operation exchanged by bill, the ticket including virtual resource number is sent to first server
According to redemption request, first server generate the payment page according to bill redemption request, and issue the payment page to terminal.
1205, display pays the page, if detecting that payment affirmation operates paying on the page, then sends to first server
Resource transfers is asked, first server shifting equivalent virtual resource to the second account based on virtual resource number from the first account
Behind family, send start site information, point of destination dot information and bill number information to second server, by second server according to
Start site information and point of destination dot information, generate the virtual tickets with bill number information matches, and issue to terminal virtual
Bill, to complete bill exchange.
The method that the embodiment of the present invention provides, can carry out bill exchange based on map of website, owing to showing in map of website
Having a site information of at least one working line, therefore user's synchronization is it can be seen that site information on a plurality of circuit, knows
Quantity of information relatively big, visualization is higher, even if start site and purpose website be not on same circuit, without with
Family switching site list carries out website and chooses, and carry out after website is chosen can quick obtaining to the bill exchanged, and then realize
Self-help ticket-buying, user's viscosity is more preferable, and effect is preferable.
In another embodiment, start site information and the purpose website that user chooses is obtained based on initially diagram page
Information, including:
After the zoom operations to the origin site map page being detected, load the scaling website ground adaptive with zoom operations
Diagram page;
If detecting site map target trigger action arbitrary on the currently displaying scaling map of website page, then display station
Vertex type information is set, type of site includes start site and purpose website;
After first that start site detected arranges trigger action, website icon instruction on the map of website page will be scaled
Website be set to start site;
After second that purpose website detected arranges trigger action, website icon instruction on the map of website page will be scaled
Website be set to purpose website.
In another embodiment, display site type information is set, including:
Show in bullet layer mode and information is set, information is set and includes start site setting options and purpose website
Setting options;
After the trigger action to start site setting options being detected, determine and detect that first arranges trigger action;
After the trigger action to purpose website setting options being detected, determine and detect that second arranges trigger action.
In another embodiment, after the zoom operations to the origin site map page being detected, load and scale behaviour
Make the adaptive scaling map of website page, including:
Two initial finger touch points according to zoom operations determine scaling central point;
With the upper left corner of the origin site map page as initial point, calculate scaling central point on the origin site map page
First abscissa value and the first ordinate value;
Obtain the scaling that zoom operations is corresponding;
According to the first abscissa value, the first ordinate value and scaling, the origin site map page is zoomed in and out,
To the scaling map of website page.
In another embodiment, the method also includes:
For one container control of origin site map page setup;
Wherein, the central point of the origin site map page is consistent with the center position of container control, origin site map
The width value of the page is not more than the width value of container control, and the height value of the origin site map page is not more than the height of container control
Angle value.
In another embodiment, the scaling central point the first abscissa value on the origin site map page and the is calculated
One ordinate value, including:
Obtain scaling central point distance the container control left side away from the first lateral separation;
Obtain the first width value of container control and the first height value, the second width value of the origin site map page and the
Two height values, scaling central point distance the first fore-and-aft distance of terminal screen coboundary, container control distance terminal screen top
Second fore-and-aft distance on boundary;
According to scaling, the first lateral separation, the first width value and the second width value, calculate the first abscissa value;
According to scaling, the first fore-and-aft distance, the second fore-and-aft distance, the first height value and two height values, calculate first
Ordinate value.
In another embodiment, the scaling central point the first abscissa value on the origin site map page and the is calculated
One ordinate value, including:
If the origin site map page translates before zoom operations being detected, then obtain that translation is corresponding the
One transverse axis translational movement and the first longitudinal axis translational movement;
According to scaling, the first lateral separation, the first transverse axis translational movement, the first width value and the second width value, calculate
First abscissa value;
According to scaling, the first fore-and-aft distance, the first longitudinal axis translational movement, the second fore-and-aft distance, the first height value and two
Height value, calculates the first ordinate value.
In another embodiment, the method also includes:
If translation being detected after zoom operations, then obtain this translation transverse axis relative to terminal screen
Translation size and longitudinal axis translation size;
Obtain the second transverse axis translational movement when performing last translation and the second longitudinal axis translational movement;
Translate, according to the second transverse axis translational movement, transverse axis, the scaling that size is corresponding with zoom operations, calculate this translation
3rd transverse axis translational movement of operation;
According to the second longitudinal axis translational movement, longitudinal axis translation size and scaling, calculate the 3rd longitudinal axis of this translation
Translational movement;
According to the 3rd transverse axis translational movement and the 3rd longitudinal axis translational movement, the scaling map of website page is translated.
In another embodiment, obtain this translation to put down relative to transverse axis translation size and the longitudinal axis of terminal screen
Move size, including:
Obtain finger touch point distance the container control left side away from the second lateral separation, the second lateral separation is for perform translation
Before operation with the container left side away from distance;
Obtain finger touch point distance the container control left side away from the 3rd lateral separation, the 3rd lateral separation is for perform translation
After operation with the container left side away from distance;
Calculate the second lateral separation and the difference of the 3rd lateral separation, obtain transverse axis translation size;
Obtaining the 3rd fore-and-aft distance of finger touch point distance terminal screen coboundary, the 3rd fore-and-aft distance is for perform translation
With the distance of terminal screen coboundary before operation;
Obtaining the 4th fore-and-aft distance of finger touch point distance terminal screen coboundary, the 3rd lateral separation is for perform translation
With the distance of terminal screen coboundary after operation;
Calculate the 3rd fore-and-aft distance and the difference of the 4th fore-and-aft distance, obtain longitudinal axis translation size.
In another embodiment, if the clicking trigger to either site icon being detected on the scaling map of website page
Operation, then display site type information is set, including:
Second abscissa value of the website of acquisition station point icon instruction and the second ordinate value, the second abscissa value and second
Ordinate value is all with the upper left corner of the origin site map page as initial point;
According to scaling corresponding to zoom operations, the second abscissa value, the first width value of container control, origin site
Second width value of the map page, the website of computer installation point icon instruction relative to the container control left side away from the 4th laterally away from
From;
According on scaling, the second ordinate value, the first height value of container control, container control distance terminal screen
Second fore-and-aft distance on border, the second height value of the origin site map page, computer installation point icon instruction website relative to
5th fore-and-aft distance of terminal screen coboundary;
Show in the position that the 4th lateral separation and the 5th fore-and-aft distance indicate and information is set.
Above-mentioned all optional technical schemes, can use and arbitrarily combine the alternative embodiment forming the disclosure, at this no longer
Repeat one by one.
Figure 13 is the structural representation of a kind of bill exchanging device that the embodiment of the present invention provides.See Figure 13, this device
Including: display module 1301, acquisition module 1302, computing module 1303 and sending module 1304.
Display module 1301, the origin site map page mated with current geographic position for display, origin site ground
Diagram page includes the site information at least one working line;
Acquisition module 1302, for obtaining start site information and the purpose website that user chooses based on initially diagram page
Information;
Computing module 1303, is used for according to start site information, point of destination dot information and the bill number information got,
Calculate virtual resource number to be transferred;
Sending module 1304, for, after detecting that confirmation operation exchanged by bill, including virtual to first server transmission
The bill redemption request of number of resources, is generated the payment page by first server according to bill redemption request, and issues to terminal
Pay the page;
Display module 1301, is additionally operable to display and pays the page;
Sending module 1304, if being additionally operable to detect that payment affirmation operates on the payment page, then sends out to first server
Send resource transfers to ask, first server shift equivalent virtual resource to second based on virtual resource number from the first account
After account, send start site information, point of destination dot information and bill number information to second server, by second server root
According to start site information and point of destination dot information, generate the virtual tickets with bill number information matches, and apprehensive under terminal
Intend bill, to complete bill exchange.
In another embodiment, acquisition module 1302, for detecting that the scaling to the origin site map page is grasped
After work, load the scaling map of website page adaptive with zoom operations;If detecting currently displaying scaling map of website page
Arbitrary site map target trigger action on face, then display site type information is set, type of site includes start site
With purpose website;After first that start site detected arranges trigger action, website icon on the map of website page will be scaled
The website of instruction is set to start site;After second that purpose website detected arranges trigger action, map of website will be scaled
On the page, the website of website icon instruction is set to purpose website.
In another embodiment, acquisition module 1302, information is set for showing in bullet layer mode, prompting is set
Information includes start site setting options and purpose website setting options;When detecting that the triggering to start site setting options is grasped
After work, determine and detect that first arranges trigger action;After the trigger action to purpose website setting options being detected, determine inspection
Measure second and trigger action is set.
In another embodiment, acquisition module 1302, it is additionally operable to the initial finger touch point of two according to zoom operations
Determine scaling central point;With the upper left corner of the origin site map page as initial point, calculate scaling central point at origin site map
The first abscissa value on the page and the first ordinate value;Obtain the scaling that zoom operations is corresponding;According to the first abscissa
Value, the first ordinate value and scaling, zoom in and out the origin site map page, obtains scaling the map of website page.
In another embodiment, this device also includes:
Module 1305 is set, is used for as one container control of origin site map page setup;
Wherein, the central point of the origin site map page is consistent with the center position of container control, origin site map
The width value of the page is not more than the width value of container control, and the height value of the origin site map page is not more than the height of container control
Angle value.
In another embodiment, acquisition module 1302, for obtain scaling central point distance the container control left side away from
First lateral separation;Obtain the first width value and the first height value, second width of the origin site map page of container control
Value and the second height value, scaling central point distance the first fore-and-aft distance of terminal screen coboundary, container control distance end panel
Second fore-and-aft distance of curtain coboundary;According to scaling, the first lateral separation, the first width value and the second width value, calculate
First abscissa value;According to scaling, the first fore-and-aft distance, the second fore-and-aft distance, the first height value and two height values, calculate
First ordinate value.
In another embodiment, acquisition module 1302, if for origin site map before zoom operations being detected
The page translates, then obtain the first transverse axis translational movement corresponding to translation and the first longitudinal axis translational movement;According to scaling,
First lateral separation, the first transverse axis translational movement, the first width value and the second width value, calculate the first abscissa value;According to scaling
Ratio, the first fore-and-aft distance, the first longitudinal axis translational movement, the second fore-and-aft distance, the first height value and two height values, calculate first and indulge
Coordinate figure.
In another embodiment, acquisition module 1302, if being additionally operable to after zoom operations detect translation, then
Obtain this translation and translate size and longitudinal axis translation size relative to the transverse axis of terminal screen;
Acquisition module, is additionally operable to obtain the second transverse axis translational movement when performing last translation and the translation of second longitudinal axis
Amount;
Computing module, is additionally operable to translate, according to the second transverse axis translational movement, transverse axis, the pantograph ratio that size is corresponding with zoom operations
Example, calculates the 3rd transverse axis translational movement of this translation;
Computing module, is additionally operable to, according to the second longitudinal axis translational movement, longitudinal axis translation size and scaling, calculate this translation
3rd longitudinal axis translational movement of operation;
According to the 3rd transverse axis translational movement and the 3rd longitudinal axis translational movement, the scaling map of website page is translated.
In another embodiment, acquisition module 1302, for obtain finger touch point distance the container control left side away from
Second lateral separation, the second lateral separation be perform before translation with the container left side away from distance;Obtain finger touch point
The distance container control left side away from the 3rd lateral separation, the 3rd lateral separation be perform after translation with the container left side away from
Distance;Calculate the second lateral separation and the difference of the 3rd lateral separation, obtain transverse axis translation size;Obtain finger touch point distance eventually
3rd fore-and-aft distance of end screen coboundary, the 3rd fore-and-aft distance be perform before translation with terminal screen coboundary away from
From;Obtaining the 4th fore-and-aft distance of finger touch point distance terminal screen coboundary, the 3rd lateral separation is for performing translation
Afterwards with the distance of terminal screen coboundary;Calculate the 3rd fore-and-aft distance and the difference of the 4th fore-and-aft distance, obtain longitudinal axis translation big
Little.
In another embodiment, acquisition module 1302, for the second abscissa of the website of acquisition station point icon instruction
Value and the second ordinate value, the second abscissa value and the second ordinate value are all former with the upper left corner of the origin site map page
Point;According to scaling corresponding to zoom operations, the second abscissa value, the first width value of container control, origin site map
Second width value of the page, computer installation point icon instruction website relative to the container control left side away from the 4th lateral separation;Root
According to scaling, the second ordinate value, the first height value of container control, container control apart from the second of terminal screen coboundary
Fore-and-aft distance, the second height value of the origin site map page, the website of computer installation point icon instruction is relative on terminal screen
5th fore-and-aft distance on border;Show in the position that the 4th lateral separation and the 5th fore-and-aft distance indicate and information is set.
The device that the embodiment of the present invention provides, can carry out bill exchange based on map of website, owing to showing in map of website
Having a site information of at least one working line, therefore user's synchronization is it can be seen that site information on a plurality of circuit, knows
Quantity of information relatively big, visualization is higher, even if start site and purpose website be not on same circuit, without with
Family switching site list carries out website and chooses, and carry out after website is chosen can quick obtaining to the bill exchanged, and then realize
Self-help ticket-buying, user's viscosity is more preferable, and effect is preferable.
It should be understood that above-described embodiment provide bill exchanging device carry out bill exchange time, only with above-mentioned respectively
The division of functional module is illustrated, and in actual application, can distribute above-mentioned functions by different merits as desired
Module can complete, the internal structure of device will be divided into different functional modules, with complete described above all or portion
Divide function.It addition, the bill exchanging device that above-described embodiment provides belongs to same design with bill exchanging method embodiment, its tool
Body realizes process and refers to embodiment of the method, repeats no more here.
Figure 14 is a kind of terminal that the embodiment of the present invention provides, and this terminal may be used for performing offer in above-described embodiment
Bill exchanging method.Seeing Figure 14, this terminal 1400 includes:
RF (Radio Frequency, radio frequency) circuit 110, include one or more computer-readable storage mediums
The memorizer 120 of matter, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (Wireless
Fidelity, Wireless Fidelity) module 170, include one or more than one processor 180 processing core and power supply
190 parts such as grade.It will be understood by those skilled in the art that the terminal structure shown in Figure 14 is not intended that the restriction to terminal, can
To include that ratio illustrates more or less of parts, or combine some parts, or different parts are arranged.Wherein:
RF circuit 110 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, by base station
After downlink information receives, transfer to one or more than one processor 180 processes;It addition, be sent to relating to up data
Base station.Generally, RF circuit 110 includes but not limited to antenna, at least one amplifier, tuner, one or more agitator, use
Family identity module (SIM) card, transceiver, bonder, LNA (Low Noise Amplifier, low-noise amplifier), duplex
Device etc..Additionally, RF circuit 110 can also be communicated with network and other equipment by radio communication.Radio communication can use appoints
One communication standard or agreement, include but not limited to that GSM (Global System of Mobile communication, move by the whole world
Dynamic communication system), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code
Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple
Access, WCDMA), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short
Messaging Service, Short Message Service) etc..
Memorizer 120 can be used for storing software program and module, and processor 180 is stored in memorizer 120 by operation
Software program and module, thus perform various function application and data process.Memorizer 120 can mainly include storing journey
Sequence district and storage data field, wherein, storage program area can store the application program (ratio needed for operating system, at least one function
Such as sound-playing function, image player function etc.) etc.;Storage data field can store the number that the use according to terminal 1400 is created
According to (such as voice data, phone directory etc.) etc..Additionally, memorizer 120 can include high-speed random access memory, it is also possible to bag
Include nonvolatile memory, for example, at least one disk memory, flush memory device or other volatile solid-state parts.
Correspondingly, memorizer 120 can also include Memory Controller, to provide processor 180 and input block 130 to memorizer
The access of 120.
Input block 130 can be used for receiving numeral or the character information of input, and produces and user setup and function
Control relevant keyboard, mouse, action bars, optics or the input of trace ball signal.Specifically, input block 130 can include touching
Sensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touches display screen or Trackpad, can collect use
Family thereon or neighbouring touch operation (such as user uses any applicable object such as finger, stylus or adnexa at touch-sensitive table
Operation on face 131 or near Touch sensitive surface 131), and drive corresponding attachment means according to formula set in advance.Optional
, Touch sensitive surface 131 can include touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detection is used
The touch orientation at family, and detect the signal that touch operation brings, transmit a signal to touch controller;Touch controller is from touch
Receive touch information on detection device, and be converted into contact coordinate, then give processor 180, and processor 180 can be received
The order sent also is performed.Furthermore, it is possible to use the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave
Realize Touch sensitive surface 131.Except Touch sensitive surface 131, input block 130 can also include other input equipments 132.Specifically,
Other input equipments 132 can include but not limited to physical keyboard, function key (such as volume control button, switch key etc.),
One or more in trace ball, mouse, action bars etc..
Display unit 140 can be used for the information that inputted by user of display or the information being supplied to user and terminal 1400
Various graphical user interface, these graphical user interface can be made up of figure, text, icon, video and its combination in any.
Display unit 140 can include display floater 141, optionally, can use LCD (Liquid Crystal Display, liquid crystal
Show device), the form such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display floater
141.Further, Touch sensitive surface 131 can cover display floater 141, when Touch sensitive surface 131 detects thereon or neighbouring touching
After touching operation, send processor 180 to determine the type of touch event, with preprocessor 180 according to the type of touch event
Display floater 141 provides corresponding visual output.Although in fig. 14, Touch sensitive surface 131 and display floater 141 are conducts
Two independent parts realize input and output function, but in some embodiments it is possible to by Touch sensitive surface 131 and display
Panel 141 is integrated and realizes input and output function.
Terminal 1400 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensings
Device.Specifically, optical sensor can include ambient light sensor and proximity transducer, and wherein, ambient light sensor can be according to environment
The light and shade of light regulates the brightness of display floater 141, and proximity transducer can cut out display when terminal 1400 moves in one's ear
Panel 141 and/or backlight.As the one of motion sensor, Gravity accelerometer can detect in all directions (generally
Three axles) size of acceleration, can detect that size and the direction of gravity time static, can be used for identifying the application (ratio of mobile phone attitude
Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;Extremely
Other sensors such as the gyroscope that can also configure in terminal 1400, barometer, drimeter, thermometer, infrared ray sensor, at this
Repeat no more.
Voicefrequency circuit 160, speaker 161, microphone 162 can provide the audio interface between user and terminal 1400.Sound
The signal of telecommunication after the voice data conversion that frequency circuit 160 can will receive, is transferred to speaker 161, speaker 161 is converted to
Acoustical signal exports;On the other hand, the acoustical signal of collection is converted to the signal of telecommunication by microphone 162, voicefrequency circuit 160 receive
After be converted to voice data, then after voice data output processor 180 is processed, through RF circuit 110 be sent to such as another
Terminal, or voice data is exported to memorizer 120 to process further.Voicefrequency circuit 160 is also possible that earplug is inserted
Hole, to provide the communication of peripheral hardware earphone and terminal 1400.
WiFi belongs to short range wireless transmission technology, and terminal 1400 can help user to receive and dispatch electricity by WiFi module 170
Sub-mail, browsing webpage and access streaming video etc., it has provided the user wireless broadband internet and has accessed.
Processor 180 is the control centre of terminal 1400, utilizes various interface and each portion of the whole mobile phone of connection
Point, it is stored in the software program in memorizer 120 and/or module by running or performing, and calls and be stored in memorizer 120
Interior data, perform the various functions of terminal 1400 and process data, thus mobile phone is carried out integral monitoring.Optionally, process
Device 180 can include one or more process core;Preferably, processor 180 can integrated application processor and modulation /demodulation process
Device, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor is mainly located
Reason radio communication.It is understood that above-mentioned modem processor can not also be integrated in processor 180.
Terminal 1400 also includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can be by electricity
Management system is logically contiguous with processor 180, thus realizes management charging, electric discharge and power consumption by power-supply management system
The functions such as management.Power supply 190 can also include one or more direct current or alternating current power supply, recharging system, power supply event
Barrier testing circuit, power supply changeover device or the random component such as inverter, power supply status indicator.
Although not shown, terminal 1400 can also include photographic head, bluetooth module etc., does not repeats them here.Specifically at this
In embodiment, the display unit of terminal is touch-screen display, and terminal also includes memorizer, and one or more than one
Program, one of them or more than one program is stored in memorizer, and be configured to by one or more than one
Reason device performs to state one or more than one program comprises the instruction for carrying out above-mentioned bill exchange operation.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can pass through hardware
Completing, it is also possible to instruct relevant hardware by program and complete, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Within principle, any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.