Integrate the google map api with the GOOGLE Search API. I wrote a class in object-oriented mode, passed a latitude and longitude, and automatically obtained nearby information through GOOGLE LOCAL
Integrate the google map api with the GOOGLE Search API. I wrote a class in object-oriented mode, passed a latitude and longitude, and automatically obtained nearby information through GOOGLE LOCAL
By integrating the Google MAP API with the Google search API, I wrote a class in an object-oriented way, passing through a latitude and longitude to automatically get the relevant information from Google Local
1. Use gmap2 controls in the Google map API
When talking about the default control and gmap2 settings on the map, I mentioned the Google map local search bar control. It is actually very easy to add this control to the map, you do not need to call gmap2.addcontrol (). You only need one sentence:
Map. enablegooglebar ()
glocalresult mentioned above is also a class defined in the Google Ajax search API. It is used as an object variable without a constructor. For more information, see the document, the following describes the main attributes of the class:
. Title,. titlenoformatting,. Lat,. lng,. streetaddress,. City,. Country,. phonenumbers [],. staticmapurl
2. Use the custom JS and gclientgeocoder classes in the Google map API
In fact, the Google map API provides a gclientgeocoder class to implement address decoding, that is, to convert place names and coordinates. This is to submit the place names from the client to find the d
or code segment without any help, but you do not have the data or resources you need at hand. In these cases, even with tutorials or open source code scripts, more things are needed. For example, consider adding a search engine to a Web page. The premise is that you already have the data you want to search for-but what if you want to search for data outside your
In all of the sites are essential to have "site search" function, this function, can be very convenient to help others on our website to find the necessary articles and related content. and frequent "in-site search", we need to call our database resources to increase the burden on the server. Today, pieces will be together with you, the "burden" passed on to Google
All websites must have the "intra-Site Search" function, which helps others find the desired articles and related content on our website. Frequent "intra-Site Search" requires that our database resources be called to increase the server load. Today, we will share this "burden" with everyone and use Google's powerful custom se
It took two days to use Google's API to make such a small thing. In fact, there are not many real implementation codes, just a dozen lines. A time-consuming task is to understand the functions of each API and debug JavaScript.
The following is a brief introduction of several functions I have used this time.
• Constructor google.
coordinate point found, or null if no anchor is found, so that we can create a gmarker tag and display it on the map based on the glatlng latitude and longitude coordinate point.Search to locate multiple pointsAccording to the keyword positioning there is a problem, if the search keyword on the map has more than one point, then the return of the first latitude and longitude coordinate point is not necessarily the address you are looking for, this tim
Requirement: a search function in the website requires an out-of-site search. Here I use Google search.
Custom Search address: http://www.google.com/custom? The. com and cn
Google and YaHoo have a search api interface similar to bing ?? I want to create an api similar to salaaam.com for multiple search engines bing. search. live. netjson. aspx provides the search
Google and Yahoo have wooden bing-like Search API interface ah??
I want to be a salaaam.com-like multi-search engine Bing Http://api.search.live.net/json.aspx provides a search interface, I use curl_setopt to successfully get the return value to hang my own style, But Google
Google and YaHoo have a search api interface similar to bing ?? I want to create a search api interface similar to salaaam.com for bing's multiple search engines Google and YaHoo Youmu
SearchControl return a Result:gresult
Searchcontrol.setonkeepcallback (this, localsearchkeephandler);//keeping a search result
This option is used to set the search box position in a DOM tree.
Drawoptions.setsearchformroot (document.getElementById ("drawoptions"));
Set the input box to a user defined element
Drawoptions.setinput (document.getElementById ("input"));
Tell the
. You can often find the code you need, even the entire script, and there are helpful comments and descriptions of how it works.
Using the public API
Many times, you will experience a technical problem. You don't need help to write a script or a piece of code, but you don't have the data or resources on hand. In these cases, even with tutorials or open source scripts, more needs to be made. For example, consider adding a
Recently made a PC-side list page and map to find hotel pages, two pages need to use the Google Map API V3 maps.There are two places that spend a lot of time, including custom icons and custom information boxes, and share my experience here. Because it is the first time to use, so write a problem place please point out
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.