In Google and Yahoo Maps API, I read in th terms of service:
YOU SHALL NOT: "store or allow end users to store map imagery, map data or geocoded
location information from the Yahoo!
Maps APIs for any future use;"
My problem and scope of my project is to build a real estate website. The user who posts an ad for selling his/her house will be able to write the house's address, or point it directly into a map. Then I would save that latitude/longitude data to a mysql database so I can retrieve it later when a new user will be looking for a house for sale.
Is this the correct procedure? How does that relate with the terms above? I mean, how can a geocoding system be useful if I cannot store a simple latitude/longitude?
Google doesn't appear to have this restriction that you speak of. The Google Geocoding API website actually suggests caching or storing the content to reduce hits to their servers and improve performance.
As far as addresses go, your users are entering them, so you can store the addresses. The latitudes/longitudes can be retrieved from the Google Maps API service using those addresses.
It's okay to cache the results, so you'll only need to really look them up during the first search.
As far as I can tell, you are not supposed to store any Geocoded data from Google into a database. I have the same problem on a Drupal site. The module I'm using stores latitude and longitude data in the database. If you look at the terms of service referenced on the page jmort253 pointed to in his answer, you'll find this:
(from https://developers.google.com/maps/terms#section_10_1_3)
10.1.3 Restrictions against Data Export or Copying.
(a) No Unauthorized Copying, Modification, Creation of Derivative
Works, or Display of the Content. You must not copy, translate,
modify, or create a derivative work (including creating or
contributing to a database) of, or publicly display any Content or any
part thereof except as explicitly permitted under these Terms. For
example, the following are prohibited: (i) creating server-side
modification of map tiles; (ii) stitching multiple static map images
together to display a map that is larger than permitted in the Maps
APIs Documentation; (iii) creating mailing lists or telemarketing
lists based on the Content; or (iv) exporting, writing, or saving the
Content to a third party's location-based platform or service.
(b) No Pre-Fetching, Caching, or Storage of Content. You must not
pre-fetch, cache, or store any Content, except that you may store: (i)
limited amounts of Content for the purpose of improving the
performance of your Maps API Implementation if you do so temporarily,
securely, and in a manner that does not permit use of the Content
outside of the Service; and (ii) any content identifier or key that
the Maps APIs Documentation specifically permits you to store. For
example, you must not use the Content to create an independent
database of "places" or other local listings information.
(c) No Mass Downloads or Bulk Feeds of Content. You must not use the
Service in a manner that gives you or any other person access to mass
downloads or bulk feeds of any Content, including but not limited to
numerical latitude or longitude coordinates, imagery, visible map
data, or places data (including business listings). For example, you
are not permitted to offer a batch geocoding service that uses Content
contained in the Maps API(s).
Parts b and c really make it sound like what you and I are trying to do is a no-no. Am I reading this wrong?
Geocoding refers to the reversal of the address from Lat / Long coordinates. You could have the person entering the address specify it, and store the lat / long coords into the database for later use (returned from Google or Yahoo Maps API).
Or you could just violate these seemly absurd terms and store the insignificant data anyways :)