When chatting with a friend a few days ago, he said that he wanted to capture data from the GoogleMap. He didn't care at the time and thought it should be easy. Instead, he just analyzed the request address of GoogleMap, analyze the address and use the information collector to define the desired data format.
Later, I analyzed it in this way, and the result was not feasible. Google was still a cow B. I found the request address and looked at Baidu, which would be much simpler, the above method can be used.
Google has much more information than Baidu. Many people want to collect the data they want, so they decide to write a collection tool by themselves.
Finally, I found that Google has a local search interface, which is implemented through Ajax and can be combined with maps.
The Google Ajax search API address is as follows:
Http://code.google.com/intl/zh-CN/apis/ajaxsearch/local.html
However, this interface can only return up to 32 records for a single search. Therefore, if you want to find a wide range of information, you have to find a solution.
ProgramIt is not easy to put. First, let's take a screenshot of the program.
The procedure is as follows:
1. Select a range on the map first;
2. Enter the keyword to search;
3. Select the layer to be searched;
Why select a search layer? This is mainly the search interface provided by Google. In the current range, up to 32 records can be returned, and it is paging. Therefore, if you want to find all the data, we need to put the map large enough. We should try our best to see no more than 32 pieces of data in the range. Of course, the bigger the map, the better, but the highest level of the map is 19. If the level is higher, to search for such a large range, it will get slower and slower-this is just a stupid solution, but it can still solve some problems. I will study it later to see if there is any better solution.