Using JSON style with map

I am planning to use MapTiler Cloud to get vector map data. It currently loads the map using the following line:
mapStyle = "https://maps.tilehosting.com/styles/basic/style.json?key=..."
However, I already have my own custom map style for the vector tiles as a JSON file.

Is it possible to get the vector map tiles from MapTiler and set the json style locally?
I have tried uploading the custom style to your MapTiler as an alternative method but I am getting an error to say that it is too large. (270kb)

1 reply

Yes, it is possible to host the style locally as well as upload the style to Cloud...

270Kb for a style is huge! You must be doing something very strange in the style...
A local hosting example is visible at https://openmaptiles.github.io/klokantech-basic-gl-style/ (use View Source... in your browser).
The link to style can be just filename - in such case it is looked for in local directory on your own webserver.