Skip Navigation

[Resolved] Google Maps Limits

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 7 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Noman 7 years ago.

Assisted by: Noman.

Author
Posts
#593678

Hi, i've builded a custom shortcode to calculate the distance beetween two addresses or lat_lon coordinates:

something like: [calculate_distance origin="..." destination="..."]

It uses the "google maps distance matrix api" to calculate the distance. I'm not a programmer so it was an hard work.

When using it i noticed it has a good performance but it is near to exceed google maps api limits (it is just 2.500 requests / day) so i have 100 places i can do the job just for 25 pageviews.

For this reason i would like to know about toolset plugin stores the addresses format in the db.
I noticed i can choose while inserting this to change it to {lat,long} format, instead of the longname address.

I have addressed stored in the db as Longname(FIELD_ADDRESS) and using php code:
types_render_field("my-address-field", array('output' => 'normal', 'format' => 'FIELD_LATITUDE,FIELD_LONGITUDE'));

i can extract lat&lon.
I would know if this operation uses the google geocoding api to render this field from FIELD_ADDRESS format to FIELD_LATITUDE,FIELD_LONGITUDE.
I should need to know this detail because i'm thinking about to obtain to calculate distance matematichally since it could exceed google's api limits.

#593809

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Alessandro,

Thank you for contacting Toolset support. As you have created a custom code and requires help on code & database stuff, this type of code or modifications falls into Custom coding & custom development and it is out of support policy (https://toolset.com/toolset-support-policy/). So we recommend to contact Toolset recommended service providers to further discuss the custom approach. We have some recommended list of service providers here if you would like to take a look: https://toolset.com/consultant/

Regarding lat/long values stored in database, those should be in a numerical format or you can check database columns to confirm. Typically we follow Google Maps & WordPress API guidelines for storing data related to maps.

Thank you

#593865

Hi Noman, i think that any consultant doesn't know about this issue. Just your developer can help us. Please let me contact by some of them.

I just need to know if, when it uses types_render_field it reads from db or it uses the google api's

#593980

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Alessandro,

Toolset storing address field info in ‘wp_options’ table and ‘toolset_maps_address_coordinates’ column.
If you want to get lat/long from google api then you can use same code as used in this ticket:
https://toolset.com/forums/topic/latlong-coordinates/#post-246627

Thanks

The forum ‘Types Community Support’ is closed to new topics and replies.