Building a Store Locator ASP.NET Application: Adding The Map and Markers

Last week's article, Building a Store Locator ASP.NET Application Using Google Maps API (Part 1), was the first in a multi-part article series exploring how to add store locator-type functionality to your ASP.NET website using the free Google Maps API. Part 1 started with an examination of the database used to power the store locator, which contains a single table named Stores with columns capturing the store number, its address and its latitude and longitude coordinates. Next, we looked at using Google Maps API's geocoding service to translate a user-entered address, such as San Diego, CA or 92101 into its latitude and longitude coordinates. Knowing the coordinates of the address entered by the user, we then looked at writing a SQL query to return those stores within (roughly) 15 miles of the user-entered address. These nearby stores were then displayed in a grid, listing the store number, the distance from the address entered to each store, and the store's address.

While a list of nearby stores and their distances certainly qualifies as a store locator, most store locators also include a map showing the area searched, with markers denoting the store locations. This article looks at how to use the Google Maps API, a sprinkle of JavaScript, and a pinch of server-side code to add such functionality to our store locator. CLick here to read the entire article, Building a Store Locator ASP.NET Application: Adding Tha Map and Markers



About the Author

Scott Mitchell

Scott Mitchell is the Editor, founder, and primary contributor to 4GuysFromRolla.com. In addition to founding 4GuysFromRolla.com, Scott also created ASPFAQs.com and ASPMessageboard.com. He works as a freelance writer, trainer, and consultant and resides in California.

Comments

  • There are no comments yet. Be the first to comment!

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • On-demand Event Event Date: January 27, 2015 For years, identity and access management (IAM) has been seen as the project of denial, restriction, limitation and sometimes failure. The processes and technologies required to enhance security seemed also destined to stifle collaboration and interfere with revenue-generating work. In fact, at times, the processes forced employees, partners and customers to spend precious time searching for ways to circumvent the IAM infrastructure in order to do their jobs. The …

  • Many enterprise organizations have sensitive files stored cross the enterprise using a variety of technologies and security controls. As bad as this is, environments are actually getting worse as today's complex IT architecture is expanded with cloud and mobile computing. Addressing this problem with status quo solutions won't work, so what will? ESG believes it's time for CIOs and CISOs to take a long look at centralized cloud-based content management services. New offerings provide enterprise scale, simplify …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date