Skip Navigation

[Resolved] Map Styles only *sometimes* work

This support ticket is created 4 years, 11 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 10 replies, has 2 voices.

Last updated by maxfieldB 4 years, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#1404919

Tell us what you are trying to do?
Hello, I am trying to alter the default map style using the default map style using a JSON file generated from Snazzy maps. Sometimes this works - however on other computers, the map is rendered in the default Google Map Style. Can you help us debug?

Is there any documentation that you are following?
No

Is there a similar example that we can see?
No

What is the link to your site?
hidden link

#1405055

Hello,

Please provide more details for the questions:
What kind of other computers (OS, browser) do you want to test?
And what kind of map style do you want to see?

And I suggest you try to setup the map style according to Google Map document:
hidden link
Style Reference

#1405059

The browsers that failed were Safari on Mac Catalina, and then Chrome on Windows - however Chrome then worked on a *different* computer - so it appears to be random whether or not it will work.

The file we have uploaded is a JSON file that conforms to the link you've sent.

Can you help me troubleshoot this or connect me with someone who can?

Thanks!
Max

#1405081

Since I don't have a Mac device, I can test it with Windows + Chrome, please provide detail steps to duplicate the same problem:
so it appears to be random whether or not it will work.

How can I see it is not work?
And I did not see any json file you uploaded.
And how do you setup the in Snazzy maps?
What do you expect to see in google map? please take a screenshot for it.

Thanks

#1405093
Screen Shot 2019-12-10 at 8.33.22 PM.png
Screen Shot 2019-12-10 at 8.33.37 PM.png
Screen Shot 2019-12-10 at 8.30.57 PM.png

The JSON file (attached image) we have uploaded into Toolset - only works *sometimes* - other times the map is rendered in Google default style. I don't have more information than this.

I am also attaching images of the site on my own computer, where one map works (Safari) and the other doesn't (Chrome).

SnazzyMaps is a tool that generates JSON code in the style you've linked to.

#1405395
map1.JPG

I did not see any uploaded json file in this thread.

Can you put it into your own google drive disk, and share the link, thanks

To avoid more misunderstandings, please provide more details for the questions:

1) There are two screenshots in your post:
https://toolset.com/forums/topic/map-styles-only-sometimes-work/#post-1405093
Which one is expected? which one is unexpected?

2) What are the exact steps to duplicate the same problem(unexpected result)?
Open the URL hidden link
refresh the browser window?

I have tried it with my Chrome browser a lots of time, and get the same result, see screenshot: map1.JPG

#1405979

Here is the link to the JSON file
hidden link

Above, the color image is not correct - this is the default Google Map

The image with blue pins are correct.

Currently, as I said, it seems random as to *when* the desired style shows up, so we have no additional information on steps to reproduce.

Max

#1406351

I suggest you check these:
When you get the wrong style shows up
1) Check if there is any network/JS errors in your browser window
2) Check if there is any PHP errors in your website

More help:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

#1406355
Screen Shot 2019-12-11 at 7.54.00 PM.png

Hello, I am receiving the following JS error in Safari where the JSON style is failing:

#1406369

Thanks for the details, this is a server problem: CORS issues, I have searched it in google and found some related items, for example:
https://stackoverflow.com/questions/43517254/safari-10-1-xmlhttprequest-with-query-parameters-cannot-load-due-to-access-cont?rq=1

For your reference.

#1407495

My issue is resolved now. Thank you!