Pregunta

How do i specify own places? i'm working on a website where people can search factories in a specific radius using their own postal code.

Now i would like to add those factories so that people can set their postal code and radius. factories in that radius will be shown on the map.

I did not try anything yet because i'm still learning and discovering the google maps api library for codeigniter. I did read something about geocoding in my library. but how to use that? i have not a database created for geocoding.

The Library i'm using: http://biostall.com/codeigniter-google-maps-v3-api-library

¿Fue útil?

Solución

Thanks for usng my library. How far have you got with your website so far? I suggest you at least give it a go before asking questions so people can see the code you're attempting to use.

In summary you'll want to do the following:

  1. Have your factories stored in a database
  2. In your controller, load the googlemaps library
  3. Also from the controller, call a model which returns the factories
  4. Loop through the return from the model and, for each factory, add a marker via the library (see documentation and demos on how to do this).

I hope that helps. Feel free to email me direct if you have any questions, Steve

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top