Connecting a map with a style editor
The GL submodule allows you to use custom styles published from Style Editor.
Caution
When using custom styles, the default map types and layer features are not available.
- Map types: Normal, Satellite, Hybrid, Terrain
- Layers: Bicycle, Traffic information, Street View, Cadastral
Verifying Custom Styles
Before using custom styles, you must complete the following steps.
- Get a Client ID
- Create and publish a map style. For more details, refer to the Style Editor Guide.
- Check the
My Style IDvalue in the My Style > Menu(⋮) > Check My Style ID screen.
Integrating Custom Styles
To integrate custom styles, you need to load the GL submodule. When initializing the map, set the gl and customStyleId values in MapOptions.
var mapOptions = {
center: new naver.maps.LatLng(37.3595704, 127.105399),
zoom: 10,
gl: true, // Enable vector map
customStyleId: MY_STYLE_ID // My Style ID published from Style Editor
};
var map = new naver.maps.Map('map', mapOptions);
Examples: Connecting a map with a style editor