Change map type at click button

Is there a way to change the map type when a button is pressed?

In the blocks associated with the map component, the MapType option does not appear and the CustomMapStyleString option does not appear.

Any ideas ?

You can only do what you have blocks for.

Have 2 maps in the same location. With button click make one disappear and the other appear?

1 Like

No. Only one map.

You should do Jared’s suggestion.

2 Likes

You could possibly gain the control you are wanting by using the web viewer along with some custom HTML and JavaScript. This is my preferred method when needing a map with highly customizable features

1 Like

Could you demonstrate an example of this?

streets grayscale

This code in this html is from an example of using a simple tutorial on layer controls from

I didn’t use any blocks… Just created the .html file in Notepad. I did modify the styling in the html to use % instead of pixel to adjust the map to device width and height. Once you get the .html the way you want it you can upload the file in the “Files” area of the Project Designer tab. Then set the Web Viewer Component url to the name of the .html file you uploaded and that should be it. Here is the test project I used to create this

https://x.thunkable.com/copy/47bd71796988c800485aaea2c318dee3

2 Likes

My html files just show the code on the screen, what am I doing wrong?

@seth Are you referring to the html file in the project I sent? or your own personal?

My own.

If you don’t mind sharing I can attempt to help you troubleshoot the issue

Sure I’ll have to do so privately as there are api keys in the file.
I’ll message you tomorrow.

But I’ll post what we do here after. Many thanks

1 Like

The issue was that you need an active sub to Intercom for it to work. Doh haha!