Summary of the invention
The invention provides a kind of localization method and device, how to solve the problem of the physical location of quickly positioning target.
In order to address the above problem, the invention discloses a kind of localization method, comprising:
Show search box and block navigation, described block navigation comprises individual navigation;
Receive the input content of search box and/or the click on content of block navigation;
Receive the inquiry request of the input content of the described search box of foundation and/or the click on content generation that block navigates;
Resolve described inquiry request, obtain target designation; Described target designation comprises: block title or individual title;
In database, the described target designation of inquiry, obtain corresponding target information; Described target information at least comprises: target map information;
According to described target information invocation map mapping function, target is positioned.
Alternatively, described target designation is the block title; Described target map information comprises: the two-dimensional virtual map of target region, the block diagram layer of target and target latitude and longitude coordinates;
Describedly according to described target information invocation map mapping function, target is positioned, comprising:
The invocation map module shows the two-dimensional virtual map of described target region;
Calling graph layer switching function, the map coverture interface by the two-dimensional virtual map covers the block diagram layer of described target on described two-dimensional virtual map, as target map;
The invocation map mapping function, determine the position of described target latitude and longitude coordinates on described target map, as target location;
Call the mark point interface, the described target location of mark on described target map.
Alternatively, described target map information also comprises: each floor of block figure layer;
Described method also comprises:
Receive floor information;
Removing covers the target block figure layer on described two-dimensional virtual map;
Calling graph layer switching function, floor figure layer described floor information is corresponding by the map coverture interface of described two-dimensional virtual map covers on described two-dimensional virtual map.
Alternatively, described target designation is individual title; Described target map information comprises: the two-dimensional virtual map of target region, the floor figure layer of target and target latitude and longitude coordinates;
Describedly according to described target information invocation map mapping function, target is positioned, comprising:
The invocation map module shows the two-dimensional virtual map of described target region;
Calling graph layer switching function, the map coverture interface by the two-dimensional virtual map covers the floor figure layer of described target on described two-dimensional virtual map, as target map;
The invocation map mapping function, determine the position of described latitude and longitude coordinates on described target map, as target location;
Call the mark point interface, the described target location of mark on described target map.
Alternatively, described target information also comprises the target essential information.
Alternatively, described method also comprises:
Call navigation module and show described target information in the mode of word, 3D outdoor scene or real-time video.
Alternatively, described method also comprises:
Call the window that wafts and show function, on the target behind location, with the window shape formula of wafing, show described target information.
Alternatively, the described inquiry request that receives the input content of the described search box of foundation and/or the click on content generation that block navigates comprises:
Receive the inquiry request of the input content of the described search box of foundation and/or the click on content generation that block navigates by the AJAX mode.
The invention also discloses a kind of locating device, comprising:
Display module, for showing search box and block navigation, described block navigation comprises individual navigation;
The content reception module, for the click on content of the input content that receives search box and/or block navigation;
The request receiving module, the inquiry request generated for the click on content received according to the input content of described search box and/or block navigation;
Parsing module, for resolving described inquiry request, obtain target designation; Described target designation comprises: block title or individual title;
Enquiry module, at the described target designation of database inquiry, obtain corresponding target information; Described target information at least comprises: target map information;
Locating module, for positioning target according to described target information invocation map mapping function.
Alternatively, described target designation is the block title;
Described target map information comprises: the two-dimensional virtual map of target region, the block diagram layer of target and target latitude and longitude coordinates;
Described locating module comprises:
Display sub-module, show the two-dimensional virtual map of described target region for the invocation map module;
Cover submodule, for calling graph layer switching function, the map coverture interface by the two-dimensional virtual map covers the block diagram layer of described target on described two-dimensional virtual map, as target map;
The location positioning submodule, for the invocation map mapping function, determine the position of described target latitude and longitude coordinates on described target map, as target location;
The mark submodule, for calling the mark point interface, the described target location of mark on described target map.
Compared with prior art, the present invention includes following advantage:
The present invention is by showing search box and block navigation, described block navigation comprises individual navigation, then receive the input content of search box and/or the click on content of block navigation, then receive the inquiry request of the input content of the described search box of foundation and/or the click on content generation that block navigates, resolve afterwards described inquiry request, obtain target designation; Then the described target designation of inquiry in database, obtain corresponding target information, finally according to described target information invocation map mapping function, target positioned, can be on virtual map the physical location of quickly positioning target.
Further, the present invention as the user when e-commerce website is browsed the shop product page and is wanted to go to shop entity StoreFront, can directly locate the physical location that this shop is positioned at market by virtual map, and can to this shop entity information, roughly understand by the 3D outdoor scene in map and real-time video, facilitate the user to find and go to corresponding solid shop.The present embodiment, by cover block bottom and floor maps on the two-dimensional virtual map, combines virtual market and entity market, facilitates the user to position e-business website Shang retail shop, obtains the physical location of retail shop.
Embodiment
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
Embodiment mono-:
With reference to Fig. 1, show the process flow diagram of a kind of localization method of the present invention, the present embodiment specifically can comprise the following steps:
Step 101, show search box and block navigation.
The navigation of block described in the present embodiment comprises individual navigation.Can input block title or individual title in search box, all block titles have been showed in the block navigation, click any one block title and can show in this block all individual title comprised afterwards.
Step 102, receive the input content of search box and/or the click on content of block navigation.
In search box input block title or individual title, can position, the content that directly navigation of click block is showed also can position, after search box input block title, click again the individuality navigation in the block of showing that navigates, also can position, so this step receives the input content of search box and/or the click on content of block navigation.Here " and/or " comprise following three kinds of situations:
One, receive only the input content of search box.For be situation about directly positioning in search block diagram input field piece title or individual title.
Two, receive only the click on content of block navigation.For be directly to click the situation that block navigation positions.
Three, receive the input content of search box and the click on content of block navigation.For be first in search box input block title, at navigation area, the block title appears after then clicking search, click the block title of navigation area, or the individual title in lower one deck menu of block title positions.
Step 103, the inquiry request that the input content of the described search box of reception foundation and/or the click on content of block navigation generate.
This step receives inquiry request, and inquiry request can generate according to the input content of search box and/or the click on content of block navigation, here " and/or " comprise equally three kinds of situations:
1) inquiry request generated according to the input content of search box.
The inquiry request that the click on content of 2) navigating according to block generates.
3) inquiry request generated according to the click on content of the input content of search box and block navigation.
Step 104, resolve described inquiry request, obtains target designation; Described target designation comprises: block title or individual title.
Resolve inquiry request, can obtain block title or individual title.
Step 105, in database, the described target designation of inquiry, obtain corresponding target information; Described target information at least comprises: target map information.
Query aim title in database, namely inquiry block title or individual title in database, can obtain corresponding information, and the target information obtained in the present embodiment at least comprises target map information, such as the latitude and longitude coordinates of target etc.
Step 106, position target according to described target information invocation map mapping function.
After getting target information in step 105, just can target have been positioned the invocation map mapping function.The map mapping function can be determined the position of coordinate in map according to the longitude and latitude received.
The present embodiment is by showing search box and block navigation, described block navigation comprises individual navigation, then receive the input content of search box and/or the click on content of block navigation, then receive the inquiry request of the input content of the described search box of foundation and/or the click on content generation that block navigates, resolve afterwards described inquiry request, obtain target designation; Then the described target designation of inquiry in database, obtain corresponding target information, finally according to described target information invocation map mapping function, target positioned, can be on virtual map the physical location of quickly positioning target.
In a preferred embodiment of the present invention, described target designation is the block title; Described target map information comprises: the two-dimensional virtual map of target region, the block diagram layer of target and target latitude and longitude coordinates; Described step 106 positions target according to described target information invocation map mapping function, specifically can comprise following sub-step:
Sub-step 1, the invocation map module shows the two-dimensional virtual map of described target region.
The two-dimensional virtual map of target region can directly obtain from Baidu's map, as the bottom map.
Sub-step 2, calling graph layer switching function, the map coverture interface by the two-dimensional virtual map covers the block diagram layer of described target on described two-dimensional virtual map, as target map.
For example, the block name is called: one district, International trade city, the block diagram floor of corresponding target be exactly one district, International trade city the figure floor.The block diagram layer of target is covered on the two-dimensional virtual map, and the map after covering, as target map, is about to virtual map and superposes with actual block map, is that the physical location that obtains block is afterwards got ready like this.
Sub-step 3, the invocation map mapping function, determine the position of described target latitude and longitude coordinates on described target map, as target location.
Can the invocation map mapping function, the target latitude and longitude coordinates of localizing objects on target map, and can find the physical location of target.
Sub-step 4, call the mark point interface, the described target location of mark on described target map.
Call the mark point interface, on map, target location is marked, the user just can intuitively see easily the physical location at target place on target map like this.
In another kind of preferred embodiment of the present invention, described target map information also comprises: each floor of block figure layer, and described localization method also comprises:
Receive floor information;
Removing covers the target block figure layer on described two-dimensional virtual map;
Calling graph layer switching function, floor figure layer described floor information is corresponding by the map coverture interface of described two-dimensional virtual map covers on described target map.
For example, the target designation received is the block title, one district, International trade city specifically, the block diagram floor of corresponding target be exactly one district, International trade city the figure floor.The block diagram layer of target is covered on the two-dimensional virtual map, and the map after covering is as target map.Now receiving floor information is 2 layers, at first the target block map is removed, and then the floor figure floor of International trade city one district's 2 floor is covered on the two-dimensional virtual map, just can intuitively see the positional information of International trade city one district's 2 floor.Figure layer switching function can be schemed layer accordingly according to a figure layer Information Selection, and to cover base map layers (two-dimensional virtual map) upper, realizes that the change of map block figure layer show the different floors in market, and the switching that is mainly used in market floor layout picture changes.
In a preferred embodiment of the present invention, described target designation is individual title; Described target map information comprises: the two-dimensional virtual map of target region, the floor figure layer of target and target latitude and longitude coordinates; Step 106 is described to be positioned target according to described target information invocation map mapping function, specifically can comprise following sub-step:
Sub-step 1), the invocation map module shows the two-dimensional virtual map of described target region.
The two-dimensional virtual map of target region can directly obtain from Baidu's map, as the bottom map.
Sub-step 2), calling graph layer switching function, the map coverture interface by the two-dimensional virtual map covers the floor figure layer of described target on described two-dimensional virtual map, as target map.
The floor figure floor of target " river horse industry " is the floor figure floor of International trade city one district's four floor, and the floor figure layer of target is covered on the two-dimensional virtual map, as target map.
Sub-step 3), the invocation map mapping function, determine the position of described latitude and longitude coordinates on described target map, as target location.
Can the invocation map mapping function, the target latitude and longitude coordinates of localizing objects on target map, and can find the physical location of target.
Sub-step 4) call the mark point interface, the described target location of mark on described target map.
Call the mark point interface, on map, the position of target river horse industry marked, the user just can intuitively see easily the physical location at target place on target map like this, as shown in Figure 2.
In a preferred embodiment of the present invention, target information is except comprising target map information, and target information also comprises the target essential information.Described localization method also comprises: call navigation module and show described target information in the mode of word, 3D outdoor scene or real-time video.
In a preferred embodiment of the present invention, described localization method also comprises: call the window that wafts and show function, on the target behind location, with the window shape formula of wafing, show described target information.The window that wafts displaying function can be opened with the form of the window that wafts target information in map corresponding coordinate point, and the user can jump to by the link in the window that wafts corresponding target details page.
In a preferred embodiment of the present invention, can receive inquiry request by the AJAX mode.Be that the input content of the described search box of described reception foundation and/or the inquiry request of the click on content generation that block navigates comprise: the inquiry request that receives the input content of the described search box of foundation and/or the click on content generation that block navigates by the AJAX mode.AJAX i.e. " Asynchronous JavaScript and XML " (asynchronous JavaScript and XML), and AJAX is not abb., but the noun of being created by Jesse James Gaiiett refers to a kind of webpage development technology that creates the interaction network page application.AJAX can only send and fetch essential data to server, and the data that exchange between server and browser are reduced in a large number, and result can see that response applies faster.A lot of work for the treatment of simultaneously can complete on the client machine of the request of sending, so the processing time of Web server has also reduced.
Embodiment bis-:
The target of below take is that the shop that e-commerce website is browsed is example, and the localization method that embodiment mono-is proposed is elaborated.
Step 101 shows that search box and block navigation can be understood by shown in Fig. 3, as shown in Figure 3, page head is search box, page left side is navigation information, page right side is electronic chart, the user can select to want by the navigation information in left side retail shop or the market block of location, and by the corresponding retail shop of computer technology Auto-matching or the corresponding two-dimensional map latitude and longitude coordinates of market region block message, the location in corresponding shop is carried out in realization in the two-dimensional virtual map, and shows corresponding store information and product information.Navigation information (block navigation) shows as shown in Figure 3: the information such as one district, International trade city, 2nd district, International trade city, 3rd district, International trade city.
The user can position retail shop's (individual title in corresponding embodiment mono-) by following three kinds of modes:
Mode one: the user directly clicks and opens retail shop's page and browsed, and by clicking little map, directly locates this retail shop and is positioned at Zhong position, entity market.
Mode two: user's page of spreading out the map, direct search corresponding store information (retail shop number, retail shop's title etc.) in search column, and the Search Results of clicking in navigation bar carries out the retail shop location.
Mode three: user's page of spreading out the map, directly click the market block and select market (one district, International trade city etc.) to open this market block, select floor or industry, and click the location that retail shop's title in showing is carried out this retail shop.
In Fig. 2, the user can go to retail shop's page browsing retail shop product information and virtual reality by clicking retail shop's title in map, also can share this retail shop by click " sharing position " and be positioned at Zhong position, market.
After the user clicks corresponding market block (the block title in corresponding embodiment mono-), browser sends to retail shop's server request to inquire about corresponding retail shop information by the AJAX mode user's click information, server is also resolved after receiving information, obtain the title of retail shop by inquiry retail shop database, ID, retail shop's picture, retail shop's latitude and longitude coordinates information, the essential informations (target information in corresponding embodiment mono-) such as retail shop's contact method, main management industry, address, and return to browser by AJAX.Browser to page cell therefor and ground module, and carries out the displaying of retail shop's information and the location of retail shop position by corresponding function by data allocations.
In the present embodiment, retail shop's information inquiry relates to AJAX communication, retail shop's information inquiry function, page info change function, the return function after communicating by letter successfully.Wherein, AJAX communication refers to by the AJAX mode and sends inquiry request, and returns results information; Retail shop's information inquiry function can obtain the information such as floor, market, retail shop and product category of user's click and encapsulate to the information communication interface function, and determines the demonstration of page part container and hide according to corresponding click on area.Return function after communicating by letter successfully can be resolved the information of returning, and by corresponding information display in page corresponding container, and map locating information and the window that wafts are showed to the information that need use passes to the ground module.
Map location relates to the map mapping function, map self-defining image layer switching function, and the map reference information window that wafts is showed function.Wherein, the map mapping function can receive transit square degree information, by the precision latitude, determines the position of coordinate in map, and with the pin icon, this coordinate is identified.Map self-defining image layer switching function can receive figure layer information, and schemes accordingly layer according to a figure layer Information Selection and be covered on the map base map layers, realizes that the change of map block figure layer show the different floors in market.The map reference information window that wafts shows that function can receive retail shop's Word message and pictorial information, and its form with the window that wafts is opened in map corresponding coordinate point, and the user can jump to by the link in the window that wafts corresponding retail shop details page.
The present embodiment can also provide 3D outdoor scene and the real-time video of retail shop, is the schematic diagram of 3D outdoor scene as shown in Figure 4, is the schematic diagram of real-time video as shown in Figure 5.The 3D outdoor scene relates to the map mapping function, map self-defining image layer switching function, and the map reference information window that wafts is showed function, the flash outdoor scene is play the embedded page and respective function.Real-time video relates to the map mapping function, map self-defining image layer switching function, and the map reference information window that wafts is showed function, real-time video is play the embedded page and respective function.
Can further understand the content of the present embodiment in conjunction with following steps, as shown in Figure 6, specifically can comprise the following steps:
Step 201, the user clicks respective block.
For example, the user can click the market block.
Step 202, browser sends inquiry request.
The market block generated query request that browser is clicked according to the user, and send to server.
Step 203, retail shop's server obtains inquiry request.
Step 204, inquiry retail shop essential information.
Step 205, inquiry retail shop cartographic information.
Step 206, return to corresponding information to browser.
Step 207, browser resolves information is also showed retail shop's information.
Step 208, map module parses information is also showed cartographic information.
Step 209, the user browses corresponding information.
The present embodiment as the user when e-commerce website is browsed the shop product page and is wanted to go to shop entity StoreFront, can directly locate the physical location that this shop is positioned at market by virtual map, and can to this shop entity information, roughly understand by the 3D outdoor scene in map and real-time video, facilitate the user to find and go to corresponding solid shop.The present embodiment, by cover block bottom and floor maps on the two-dimensional virtual map, combines virtual market and entity market, facilitates the user to position e-business website Shang retail shop, obtains the physical location of retail shop.
Embodiment tri-:
With reference to Fig. 7, show the structured flowchart of a kind of locating device of the present invention, the present embodiment specifically can comprise: display module 11, content reception module 12, request receiving module 13, parsing module 14, enquiry module 15 and locating module 16, wherein:
Display module 11, for showing search box and block navigation, described block navigation comprises individual navigation; Content reception module 12, for the click on content of the input content that receives search box and/or block navigation; Request receiving module 13, the inquiry request generated for the click on content received according to the input content of described search box and/or block navigation; Parsing module 14, for resolving described inquiry request, obtain target designation; Described target designation comprises: block title or individual title; Enquiry module 15, at the described target designation of database inquiry, obtain corresponding target information; Described target information at least comprises: target map information; Locating module 16, for positioning target according to described target information invocation map mapping function.
In a preferred embodiment of the present invention, the target designation that parsing module 14 is resolved the inquiry request acquisition is the block title; Described target map information comprises: the two-dimensional virtual map of target region, the block diagram layer of target and target latitude and longitude coordinates; Described locating module 16 specifically can comprise: display sub-module, cover submodule, location positioning submodule and mark submodule, wherein: display sub-module shows the two-dimensional virtual map of described target region for the invocation map module; Cover submodule, for calling graph layer switching function, the map coverture interface by the two-dimensional virtual map covers the block diagram layer of described target on described two-dimensional virtual map, as target map; The location positioning submodule, for the invocation map mapping function, determine the position of described target latitude and longitude coordinates on described target map, as target location; The mark submodule, for calling the mark point interface, the described target location of mark on described target map.
The present embodiment shows search box and block navigation by display module 11, then content reception module 12 receives the input content of search box and/or the click on content of block navigation, then request receiving module 13 receives the inquiry request of the input content of the described search box of foundation and/or the click on content generation that block navigates, parsing module 14 is resolved described inquiry request afterwards, obtains target designation; Then enquiry module 15 is inquired about described target designation in database, obtain corresponding target information, last locating module 16 positions target according to described target information invocation map mapping function, can be on virtual map the physical location of quickly positioning target.
For device embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part gets final product referring to the part explanation of Fig. 1 embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that between each embodiment, identical similar part is mutually referring to getting final product.
Above to a kind of localization method provided by the present invention and device, be described in detail, applied specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment is just for helping to understand method of the present invention and core concept thereof; , for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention simultaneously.