-1

I am new to google maps API. I have created a membership site that businesses use to offer discounts to my members. My goal is to display a map of the businesses near them that are offering a discount, let them get directions and let them search for businesses by zip code or just by moving the map. Can someone tell me what google map API in need to accomplish this and maybe links to documentation so I can start coding. Thanks for the help in advance.

bbedson
  • 133
  • 1
  • 8

1 Answers1

1

You'll have to practice all of that. Make examples of all your sub-questions.

Then put two or three markers there.

You must have a database that has the location of the clients and (another table with) the location of the businesses.

In a for-loop you can see if each business is within reach. Something like

for(var i in business_locations) {
  if( google.maps.geometry.spherical.computeDistanceBetween(client_location, business_locations[i]) < max_radius) {
    // now create the marker  
  }
}

You can also filter the data that you get from the DB; Fastest Way to Find Distance Between Two Lat/Long Points

These are the puzzle pieces. You have some work to do.

Emmanuel Delay
  • 3,619
  • 1
  • 11
  • 17