Background technology
With the popularization of smart mobile phone, Mobile Telephone Gps have become the most important application of mobile phone position information.In general, user needsIt is inputted in the form of word in map software and searches the address for needing to reach or the chosen position point directly on map,To achieve the purpose that navigation.And location information is shared, there are mainly two types of modes:1st, written form:Such as build title, street,Number etc..The recipient of location information needs word inputting navigation software, achievees the purpose that navigation;2nd, position is sent:It is logicalWechat is crossed, the position that will be chosen is sent to good friend online.Location information recipient can in wechat this position of simple click, reachTo the purpose of navigation.
Address is shared with written form, is had the following problems:1st, in vast non-urban area, word can not accurate descriptionAddress;Even if the 2nd, in urban area, participator also usually can not be with word accurate description address;3rd, duplication of name address causes recipientIt can not position;4th, address recipient needs to copy address into navigation software, there is the user of obstacle for input, such as child, oldPeople, illiteracy etc. have very big difficulty.
Share address in a manner of sending position, have the following problems:1st, function can not be applied under line on line, can not incite somebody to actionIt is printed onto physically (such as leaflet, product);The 2nd, position can not be attached to other software, webpage, social platform and electronics textIn shelves.
The content of the invention
Exist to solve the problems, such as that mode is shared in above two position, the present invention provides one kind to be based on dynamic web page and twoThe position of dimension code is shared and air navigation aid, participator can be carried in electronic map by way of input address or reconnaissance to systemAddress is handed over, system will be that participator generates Quick Response Code.Participator can be transferred Quick Response Code in a manner of any on line or under lineTo recipient.Recipient passes through mobile phones universal barcode scanning software barcode scanning, you can is accurately positioned and navigates.
The technical solution adopted by the present invention is as follows:
It is a kind of to be shared based on dynamic web page with the position of Quick Response Code and air navigation aid, comprise the following steps:
The location information that step 1, participator need to share to server submission;
Step 2, server generate unique identifier according to location information, and identifier are stored together with location information;
Identifier is added to parametric form in the dynamic web page network address of itself by step 3, server, and will be with parameterNetwork address character string is converted into Quick Response Code;
The Quick Response Code of generation is fed back to participator by step 4, server, and participator shares the Quick Response Code to recipient;
The Quick Response Code that step 5, recipient are received by mobile phones universal barcode scanning software scans, restores the network address with parameter,Adjust browser by the network address to server requested webpage;
After step 6, the dynamic web page of server receive request, corresponding position is inquired about according to supplemental characteristic therein and is believedIt ceases, and the different type of browser is judged according to request header, different scripts is returned to recipient;
If from wechat browser, script calls the wechat in wechat JS-SDK from recipient's mobile phone for step 7, requestStoring map checks positional interface, opens wechat storing map displaying designated position information;If request comes from other browsers,Script calls the map interface of arousing in installed map software JSAPI from recipient's mobile phone, opens corresponding map softwareShow designated position information;
Step 8, recipient reach the navigation routine of the position using the navigation feature generation in map software.
Further, step 1 concretely comprises the following steps:Participator using computer or mobile phone access electronic map, by reconnaissance orThe mode of input address determines to need the position shared and submits to server.
Preferably, access electronic map is the cell phone software, webpage, micro- by using the opening API exploitation of map softwareBelieve public platform or the access of wechat small routine.
Further, the location information includes longitude, latitude, amplification stage, place name, address.
In step 4, participator is on line or line under type shares Quick Response Code.Line upper type is i.e. in webpage, electronic document exhibitionShow or recipient is transferred to by social platform, line under type is printed onto in physical item.
It is a kind of to be shared based on dynamic web page with the position of Quick Response Code and navigation system, the client used including participator,The mobile phone and server equipped with general barcode scanning software that recipient uses, the server include two-dimensional code generation module, positionPut information storage module and Quick Response Code parsing module;
The client is equipped with electronic map and location information submits interface, for selecting or inputting the position that need to share letterIt ceases and submits to server;
The two-dimensional code generation module, the location information for server to be received generate unique identifier, and will markSymbol stores location information memory module together with location information, and identifier is added to Quick Response Code parsing with parametric form afterwardsIn the dynamic web page network address that module uses, and the network address character string with parameter is converted into Quick Response Code and is shown in client, shownIn participator;
The location information memory module, for storing the key-value pair of unique identifier and corresponding position information, for two dimensionCode parsing module passes through unique identifier inquiring position information;
The Quick Response Code parsing module, for the request received according to dynamic web page, using the parameter in request to positionInformation storage module inquires about correspondence position information, and the variety classes of browser is judged by request header, returns to different scriptsTo recipient's mobile phone terminal browser;If request calls wechat JS- by script from wechat browser on recipient's mobile phoneWechat storing map in SDK checks positional interface, opens wechat storing map and shows designated position information;If request comes fromOther browsers, then script the map interface of arousing in installed map software JSAPI is called from recipient's mobile phone, openCorresponding map software shows designated position information;
User's mobile phone for the Quick Response Code received by general barcode scanning software scans, restores the net with parameterLocation, and by the network address to server requested webpage, after webpage arouses map application by script, on the ground for being labeled with location informationThe navigation button is clicked in figure software to navigate.
Further, the client includes computer or mobile phone.
Further, it is the opening using map software that the electronic map in the client and location information, which submit interface,API is provided in the form of cell phone software, webpage, public platform or wechat small routine.
Further, the Quick Response Code parsing module is based on dynamic web page technique and wechat JS-SDK/ map softwares JSAPI is realIt is existing.
Beneficial effects of the present invention:
1st, the present invention is based on Quick Response Codes to share position, can be accurately positioned by general barcode scanning software scans Quick Response Code, gramThe defects of word shares mode has been taken, has expanded audient's scope of recipient, while can have been transmitted in a manner of any on line or under lineTo recipient, reduce transmission limitation.
2nd, the present invention turns the network address with parameter by location information with unique identifier code and embedded dynamic web page network addressIt changes Quick Response Code into, scans the two-dimensional code to obtain network address, and requested webpage obtains location information using location parameter, opens by scriptLocal map display location, it is unlimited to barcode scanning software, expand audient's scope.And original two-dimension code navigation system is directBy location information code conversion into Quick Response Code, this mode needs user to install the software that can identify coding in advance, adds useThe use difficulty at family.
Specific embodiment
The present invention is described in detail with reference to the accompanying drawings and examples.
A kind of to be shared based on dynamic web page with the position of Quick Response Code and air navigation aid, the system used in this method includes sharingThe mobile phone and server equipped with general barcode scanning software that computer or mobile phone that person uses, recipient use.The server bagInclude two-dimensional code generation module, location information memory module and Quick Response Code parsing module.The above method comprises the following steps:
Step 1, the opening API using map softwares such as Google, Baidu, Gao De or Tencents, with cell phone software, webpage, public affairsCrowd number or wechat small routine form provide electronic map and location information submission interface to participator.Participator utilizes computer or handMachine accesses electronic map, by way of reconnaissance or input address, determines to need the position shared and submits to server.ItsIn, location information may include longitude, latitude, amplification stage, place name, address etc..
Step 2, the two-dimensional code generation module of server generate unique identifier according to the location information received, afterwards will onlyOne identifier stores location information memory module together with location information in the form of key-value pair.
Identifier is added to the dynamic web page of Quick Response Code parsing module by step 3, two-dimensional code generation module with parametric formIn network address, the network address character string with parameter is converted into Quick Response Code using Quick Response Code generation technique.
The Quick Response Code of generation is showed in the computer or mobile phone of participator by step 4, server, and participator shares to recipientThe Quick Response Code.
The Quick Response Code that step 5, recipient are received by mobile phones universal barcode scanning software scans, restores the network address with parameter,Browser is called to press the network address to server requested webpage.
After step 6, the dynamic web page of Quick Response Code parsing module receive request, deposited using the parameter in request to location informationThe corresponding location information of module polls is stored up, and the variety classes of browser is judged by request header, different scripts is generated and returnsTo recipient's mobile phone browser.
If from wechat browser, the script generated is called from recipient's mobile phone in wechat JS-SDK for step 7, requestWechat storing map check positional interface (wx.openLocation), open wechat storing map displaying designated position information;If request, from other browsers, the script generated is called from recipient's mobile phone in installed map software JSAPIArouse map interface, open corresponding map software displaying designated position information.
Step 8, recipient click on the navigation button in map software, you can navigate.
It these are only the preferred embodiment of the present invention, protection scope of the present invention can not be limited.Those skilled in the artThe extension and deformation made according to foregoing description, all belong to the scope of protection of the present invention.