Change map color or style
-
Hi there,
This is by far the best multi-vendor plugin! I have a question here, is it possible to change the color or style of the map?
Thanks.
The page I need help with: [log in to see the link]
-
Hi,
You may use Google map this service – https://mapstyle.withgoogle.com/
Now, get Google Map static API code form here – https://ibb.co/zRtLctp
Use this snippet and add your Static API Code –
add_filter( 'wcfm_google_map_api_url', function( $api_url, $api_key ) { $api_url = 'SET YOUR STATIC API CODE HERE'; return $api_url; }, 50, 2 );Add custom code(s) to your child theme’s functions.php
In case you do not have child theme then add those using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
Hi,
I have added the code to the code snippet plugin, but it still does not work. This is the error I got: staticmap:1 Failed to load resource: the server responded with a status of 403 ()
The map style I want to change is on the store list map.
Thank you very much.
Please show me screenshot for your added code?
Between, do you have generated “Google Map static API code”?
Thank You
Hi,
Here is the screenshot link: https://prnt.sc/scco10
Yes “Google Map static API code” has generated and added to the snippet.
Thank you very much.
That’s great. It’s not showing map as per your custom design?
This is the error I got: staticmap:1 Failed to load resource: the server responded with a status of 403 ()
– Where you have this error? Store list page? Can you please share that page url with me to check once!
Hi,
After inserting the code, the map is not displayed on the store list page.
Sure, here is the issue link: https://www.kelokal.com/
Thank you very much.
Hi,
Well, I have found that, to use Google Map Static API you have to digitally signed this first.
Please check here for the process – https://developers.google.com/maps/documentation/maps-static/get-api-key#digital-signature
If still it’s not working for you then contact Google Map support directly.
Thank You
Hi,
Thank you for the information. I will try it out.
However, I have one more question. How can I change the map pin marker from the store list page map?
Thanks again.
-
This reply was modified 5 years, 11 months ago by
Tommie.
Hi,
However, I have one more question. How can I change the map pin marker from the store list page map?
– Do you want to change map pin icon?
If so, it’s possible. Choose your pin image and upload to site, then know me that image url. I will give you a snippet to change map pin using your own image.
Thank You
Hi,
Yes, I want to change it.
The map pin icon is uploaded: https://www.kelokal.com/wp-content/uploads/2020/05/location-marker.svg
Thank you very much.
Thanks, please add this snippet to your site –
add_filter( 'wcfmmp_map_store_icon', function( $icon, $store_id, $store_user ) { return 'https://www.kelokal.com/wp-content/uploads/2020/05/location-marker.svg'; }, 50, 3 );Add custom code(s) to your child theme’s functions.php
In case you do not have child theme then add those using this plugin – https://wordpress.org/plugins/code-snippets/Thank You
It works and Thanks for the support!
Glad to here, you are always welcome 🙂
If you get a chance then please leave a review for me.
Thank you and please be safe 🙂
-
This reply was modified 5 years, 11 months ago by
The topic ‘Change map color or style’ is closed to new replies.