Skip Navigation

[Resolved] Where is the reference guide for Toolset Maps Javascript API ?

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 9 replies, has 2 voices.

Last updated by Minesh 6 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1104510

Hello,

I'm looking for the reference guide for Toolset Maps Javascript API where I can find the different functions.

Do you have a link or a file ?

Regards,
Guillaume

#1104580

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - Toolset maps offer the javascript hook js_event_wpv_addon_maps_init_map_completed which you can use to set maps options.

More info:
=> https://toolset.com/documentation/user-guides/programmatically-change-map-settings/#changing-settings-when-using-google-maps-api

#1104659

Thank you.

But I wondered some help about "WPViews" - like in this post for example :

https://toolset.com/forums/topic/maps-in-tabs-ultimate-shortcode/

regards

#1105336

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - could you please share details about your exact issue so I can guide you in the right direction.

Please share problem URL where I can see your issue.

#1105356

Hello,

I don't have any specific problem. I am developing a javascript that will manage the refreshing of the marker list according to the visible portion of the map.

I see in the toolset map module, in 'toolset-maps/ressources/js/wpv_addon_maps.js', some of the javascipt API funtions.

Did you know if there is any other functions ? I'm surprised that there is no documention about that.

Regards,
Guilaume

#1105394

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - if you want to have reload map button - you can use the following shortcode:
=> https://toolset.com/documentation/user-guides/maps-shortcodes/#map-reload

For example:

<button class="js-wpv-addon-maps-reload-map" data-map="my-map">Reload the map</button>

But if you want to call reload method from within your custom javascript/jQuery call, you can use the:

WPViews.view_addon_maps.reload_map('map-1');

Where:
- Replace 'map-1' with your original map ID.

#1105476

Thanks

I allready see the help page about shortcode, but this is not my question.

As I said : I want to know all the javascript functions available that I can use in extra js zone in Views.

If you open the file 'toolset-maps/ressources/js/wpv_addon_maps.js' from the Tooset Map module : you can see some javascript functions we can use from extra javascript code.

My question : Do you have a complete list of Javascript function which could be used ?

Regards

#1105479

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

My question : Do you have a complete list of Javascript function which could be used ?
==> No - I do not have any other Docs to share other than what I already shared with you and for good reason, I would suggest you to only use the functions/methods which are documented and which I already shared with you.

#1105487

OK....

I'm surprised by your answer, but no matter ; I will search by myself 🙁

For example, I discover that 'WPViews.view_addon_maps.markers[ID_MAP]' will return all the markers of the map.

I think that create a documentation base about variables and functions usable in javascript could be a good idea for a better use of the great Toolset Map module.

Bye

#1105494

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - As I supporter, we need to work within limits and we do not tell you explicitly to use things which is not documented yet. And if there is no Doc available, how can I share with you.

However, I agree with you and I'll pass your request to the person who handles the Doc part to update the Docs as you suggested. Thank you.