How to customise the map

Hi, Rich,

is this part of mapsetting.json file is affected?

“version”: 8,
“sources”: {
“vector_tiles”: {
“type”: “vector”,
“url”: “mbtiles://mapdata.mbtiles”

in fact, I am using 2017-07-03_asia_malaysia-singapore-brunei file. I saw many places is use word ‘vector_tiles’.

This wiki page talks about map customisation:

Customising the map

The mapsettings.json file contains two separate types of information:

  • Mapbox GL viewer settings (center, bounds, etc.)
  • Vector styles (colour of roads etc.)

The viewer settings are defined under the options key of mapsettings.json, this is where you need to make sure appropriate values are used for the mapdata.mbtiles you are using:

Hi, Rich,
Thank you for your advise. I think this is the point of the map issue from. However I don’t know where to get my country map related values like you said: center and bounds.

like “center”: [4.485222, 51.911712 ],
“bounds”: [ 4.42, 51.88, 4.55, 51.94

in fact, I did it by follow the topical Customising the map web page and copy the mapsetting file from there. Please let me know where and how to get my map appropriate values. Thanks

Hi, Rich,

I have tried to use Singapore location coordinate value to put in as center value. However it is still not come out my map. Can you please to advise what are the correct values for my map? Thanks

“options”: {
“default”: {
“center”: [ 1.3521, 103.8198 ],
“bounds”: [ 1.203, 101.78, 1.52, 105.84 ],
“zoom”: 14,
“maxZoom”: 19,
“boxZoom”: false

IMHO you’ve mixed longitude with latitude, as deafault is Rotterdam which for sure is closer to Greenwich and farther north than Singapore.

Hi, Michal,

do you means if I reversed the position of values like below, it will works?

“options”: {
“default”: {
“center”: [ 103.8198, 1.3521 ],
“bounds”: [ 101.78, 1.203, 105.84, 1.52 ],

Hi, Michal,

Thank you very much ! I have got my map out now. I will going to next step.

Best
Sunny

1 Like

What is interesting though is that your latitude settings were out of bounds as they should be within -90 and 90. I would expect some kind of error in logs. Nevertheless, I’m glad you’ve got it running and can proceed.

Hi, Michal,

I am not real understand what is -90 and 90 meaning. the bound value I set as
“bounds”: [ 101.78, 1.203, 105.84, 1.52 ]
which are not more or less 90. Sorry for me confuse on the value come from. by the way, I answer your question is I would like to view as Singapore on center and include Malasia and Indonesia area as well because we may install the devices on those countries as well in the future. Please advise on it. Thanks again.

Best
Sunny

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.