I need to figure out how to do a Store Locator with Address or Zip Code input (and just list out the stores in simple text) or preferably implement the Google Map Store Locator.
It seems all the code is there for the Google example, I just need help translating that into SilverStripe.
I have a StoreLocationsPage and am using the DataObjectManager module to add Stores with this information: Store ID, Address, City, State, Zip, & maybe Latitude & Longitude.
1. Create markers table
I assume this means:
class Markers extends DataObject {}
2. Populate table
Using DataObjectManager
3. Find nearby locations w/ MySQL
Not sure how to do this
4. Outputting XML with PHP
I think this is achieved with the api stuff placed in the DataObject (Markers)
static $api_access = true;
function canEdit() {
return true;
}
function canView() {
return true;
}
function canCreate() {
return true;
}
5. Creating the map
Don't understand what I need to do here also. There's mention of geocoding. It would be nice (but not necessary) if it used geocoding automatically, but nice if I enter Lat & Lng info into the DataObject, it would override the geocode (sometimes those red markers on the map aren't super accurate).
Thanks