Location:

Customized Map

This chapter describes how to set the map style.

1. Use official map style

2. Create and use a custom map (not deployed in NIMAP yet, please wait)

Use map official style

You can use the officially provided map style to set the basemap. The optional styles are as follows:

Standard Map

Silent Night

Gray feelings

Colorful World

There are two ways to set the map style:

Set when the map is initialized:

                    nimap.accessToken="your AK";
                    var map = new nimap.Map('container',{
                        Container: 'map', // ​​map container
                        Zoom: 10, // ​​set the zoom level of the map display
                        Center: [116.397428, 39.90923], // ​​set the map center point coordinates
                        Style: '${mapStyle}', //Set the display style of the map
                        localIdeographFontFamily: "PingFang SC, Microsoft YaHei, Microsoft Yahei, Arial, sans-serif, bold" // Font local read
                    });
                

After the map is created, use the setStyle method of the Map object to modify it:

                    map.setStyle('https://lbs.navinfo.com/open-map/style/normal');
                

Use a custom map style

The function has not been opened yet. Please add this feature later, so stay tuned.

TOP