Online map is already very common application, Google Map or even can be used as driving navigation, however, the realization of these applications involves intricate hard work, just locate your current position, there is a lot of technology, we are fortunate yes, now you 的 Web site, you can In just a few lines of code, access to a user's location, this article describes the is Yong in the Web in a variety of geographic positioning Jishu.
IP addresses obtained through the user's location information, but the Internet is a huge network, the above correspond to each computer an IP address, through this IP address, the user can know what position, we can check Maxmind GeoIP database access, Maxmind also provides a JavaScript interface to enable you to achieve this functionality on the site. 
This method (demo) has a problem, that is, you get the IP location information may not be very accurate, because the IP is your ISP assigned to you, you get the fact that ISP's geographical location, In addition, if you use VPN, you actually may be the cry to get beyond place.
By W3C Geo API access to user location
Location by IP address for the user there is a difficult issue, that is the security and privacy issues, after all, not every user is willing to own location information by others that, in view of this, people developed many technologies, Google Gears has a Geo-Location service, Plazes help you save your position, and Yahoo Fire Eagle can be considered the most easily of such a technology. However, common problems of these technologies is that they require the user to either install a plug-in, or need access to specific Web services, some trouble.
W3C has a Geo-Location API help browser manufacturers, in the browser integration of GIS functionality. Firefox 3.5 and above browsers support W3C Geo-LocationAPI, also support the API, there's Safari browser, iPhone (requires OS3.0 above). Need to check their browser location the user, the browser will display a dialogue section, request your authorization. As shown below: 
The following is a request to use the feature code: 
The following presentation can be well above shows two different geographical access to information technology, we can see them measurement location there are many different users. 
The longitude / dimension names will be converted to longitude / dimension information into a status called "Counter-Geo-Location", there are many such services on the network can use, most notably is the geo-names Web service, but It is still several issues, such as, its results are centered in the U.S.. The other is free to use, and support global information, but not many people know the service from a place where people a little surprised, Flickr. Flickr's flickr.places.findByLatLon service names according to latitude and longitude information return, you can do in the app explorer experiencing, but the easiest way is to use the Yahoo Query Language (Yahoo query language, called YQL). YQL look as follows: 
Use YQL query language, you can get data in XML or JSon format, the next graph is used in JavaScript is an example of the query language: 
Combination of the above example, the anti-Geo-Location Query help, we got detailed information on place names: 
Latitude and longitude of the problem
Although you can locate latitude and longitude of a location on Earth, but the longitude and latitude is sometimes prone to ambiguity, in order to solve this problem, Yahoo, and Flickr (Twitter soon will support) to support another location method, called the Where On Earth Identifier (referred to as WOEID) . Using this method, we can easily access from a particular region of the Flickr pictures. 
This can display a few JavaScript code image from the specified location: 
The code can also be packaged into a function, the following code will display 10 photographs from Paris, you can own YQL console to experience: 
Text mining in geographic information automatically, if you want to get a text or a web content location names mentioned in the information, Yahoo provided a good service, called Placemaker. From Yahoo, where you can get a developer key to use the services. Just create a release form to publish to http://wherein.yahooapis.com/v1/document, the Developer Key to appid release, need to check the text to documentContent release of text types documentType release, while the definition of return with outputType data types, as follows: 
You can personally experience here, use PHP to call the API, or even the format of the output data set. There is also a design using PlaceMaker GeoMaker services, simply enter the text or URL, select a location, you can return to the map. 
Because JavaScript can also be used through YQL PlaceMaker, we can use the same paragraphs of client-side script function: 
You need three things, a section of an HTML object is located, including the location of the text, a Google Maps API Key (applications) and the following code: 
Insert map in page there are many online maps, Google Map is one of the leaders, in addition to Google, Yahoo, Microsoft's mapping service is provided, there is a opening called the Open Street Maps mapping service, in the last earthquake relief in Haiti, sent useless. Insert the interactive map page The easiest way is to use Mapstraction, it provides a JavaScript library, 24ways has published a good introduction to the article. If you just want to put you in the page map, indicating your position, but do not want to use too much JavaScript, Google static maps API is the best option, it will generate a static map, the following code to this static map into your web (Google also provides a tool to create a static map): 
This international sources: http://www.smashingmagazine.com/2010/03/08/entering-the-wonderful-world-of-geo-location/
Chinese compilation Source: Rui Business Enterprise CMS Web Content Management System website