O'Reilly logo

Map Scripting 101 by Adam DuVander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. USER LOCATION

image with no caption

Creating a location-based website requires a starting point. Sometimes this point comes as data from your database or from your site's focus on a small geographic area. Even in these cases, you can benefit from knowing a user's location.

You can retrieve this information in a number of ways, which I'll cover in this chapter. The methods vary in complexity and accuracy. In some cases, you'll need to make a simple call in JavaScript. In others, you'll install a database so your server can determine the location.

Finding a user's location also depends on how much permission you need from him or her. An IP address, for example, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required