logo
Tutorials Examples naver map js api v3 네이버 지도 API Connecting a map with a style editor

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.

  1. Get a Client ID
  2. Create and publish a map style. For more details, refer to the Style Editor Guide.
  3. Check the My Style ID value 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