Is there documentation regarding best practices for creating address fields? I'm not yet ready to incorporate mapping features, but might want to do that in the future. Should the fields be grouped in some way? What do I need to consider now if I want to map in the future? Initially I will be doing the data input when I create the custom post.
I've searched the Toolset site and Google but I have only found bits and pieces of an answer.
FWIW, I am attempting to use WP/Toolset as a CMS and my custom posts will provide information about the photos and documents in my family archive. Ultimately, I'd like to have the visitors to the site be able to sort by people, dates, locations, events, etc. By the way, if anyone else is doing this I'd love to brainstorm with you!
Thanks,
Mike
Hello,
Yes, it is possible to search and order the result by address distance.
I suggest you try these:
1) Follow our document to setup a custom address field
https://toolset.com/course-lesson/installing-toolset-maps-and-adding-address-fields/
2) Filter and order the results by distance:
https://toolset.com/course-lesson/filtering-and-ordering-map-markers-by-distance/
Thanks for the quick response Luo.
I had seen the two links that you reference. What I am trying to get my head around as I design my custom fields is that in Toolset there is just one field for the entire address AND it is related to setting up the Mapping API. I have not programmed professionally for decades, but back in the day we'd have individual fields for each part of the address and they'd be arranged in a hierarchy and often grouped together into sub-components of the address. There might be individual fields for city, state, zip, etc, but the street address might be a group composed of number, name, and road type.
Now it seems that all that parsing is done either by Google or Toolset and somehow, magically, your tools will get at the individual components of the address to sort and filter. As I said in my initial message, I'm don't want to use mapping initially. But it seems like I should just go with the flow set up the API anyway so that I can use the address field for sorting and filtering via Toolset's features. I don't want to do anything particularly fancy, I just want to be able to filter my custom posts by street name or state.
So, bottom line, should I just use the Address Block and API or create separate fields for those components that I want to sort and filter by? I suppose another question is do I have to set up the API to use the Address block?
Thanks again.
Mike
Luo,
I'm going to punt and close this out. Upon further investigation and playing around, I am going to get a Google API key to enable me to use the Toolset Address field, and then just not worry about mapping for the time being. I will also create a couple of custom fields for the street address and city so that I can hopefully use Toolset to sort on those individual fields.
As I suspected the Google API is a bit of a pain to configure (I'm currently getting Javascript errors when I try to display a map) and I imagine it will be a bit of a pain to maintain in my particular situation as I am using localhost and plan on having many duplicates of my project, some of which will be standalone apps without Internet connectivity.
Thanks for your effort.
>>>>Mike
My issue is resolved now. Thank you!