Maps JavaScript API는 래스터와 벡터의 두 가지 지도 구현 방법을 제공합니다. 래스터 지도는 기본적으로 로드되며, Google Maps Platform 서버 측에서 생성된 후 웹 앱에 제공되는 픽셀 기반 래스터 이미지 타일의 그리드로 지도를 로드합니다. 벡터 지도는 벡터 기반 타일로 구성되며, 이 타일은 로드 시 WebGL(브라우저에서 사용자 기기의 GPU에 액세스하여 2D 및 3D 그래픽을 렌더링하도록 해주는 웹 기술)을 사용하여 클라이언트 측에서 그려집니다. 벡터 지도 유형은 시각적 충실도가 개선되고 지도에서 기울기와 방향을 제어할 수 있으므로 최상의 사용자 환경을 위해 권장됩니다.
벡터 지도 기능에 대해 자세히 알아보기
renderingType 지도 옵션을 지정하거나 연결된 지도 ID에서 옵션을 설정하여 지도의 렌더링 유형을 설정합니다. renderingType 옵션은 지도 ID를 구성하여 설정된 렌더링 유형 설정을 재정의합니다.
renderingType 옵션 지정
renderingType 옵션을 사용하여 지도에 래스터 또는 벡터 렌더링 유형을 지정합니다 (지도 ID는 필요하지 않음). div 요소와 JavaScript를 사용하여 로드된 지도의 기본 렌더링 유형은 google.maps.RenderingType.RASTER입니다. 다음 단계에 따라 renderingType 옵션을 설정하세요.
RenderingType 라이브러리를 로드합니다. 이는 지도 라이브러리를 로드할 때 실행할 수 있습니다.
기울기를 사용 설정하려면 tiltInteractionEnabled 지도 옵션을 true로 설정하거나 map.setTiltInteractionEnabled(true)를 호출합니다.
이동을 사용 설정하려면 headingInteractionEnabled 지도 옵션을 true로 설정하거나 map.setHeadingInteractionEnabled(true)를 호출합니다.
<gmp-map> 요소를 사용하여 로드된 지도의 경우 기본 렌더링 유형은 google.maps.RenderingType.VECTOR이며 기울기 및 방향 컨트롤이 사용 설정됩니다. <gmp-map> 요소를 사용하여 렌더링 유형을 설정하려면 rendering-type 속성을 사용합니다.
지도 ID를 사용하여 렌더링 유형 설정
지도 ID를 사용하여 렌더링 유형을 지정할 수도 있습니다. 새 지도 ID를 만들려면 클라우드 기반 지도 스타일 지정 사용 - 지도 ID 가져오기의 단계를 따르세요.
지도 유형을 JavaScript로 설정하고 옵션 (벡터 또는 래스터)을 선택해야 합니다. 지도에서 기울기 및 회전을 사용 설정하려면 기울기 및 회전을 선택합니다. 이렇게 하면 이러한 값을 프로그래매틱 방식으로 조정할 수 있으며 사용자가 지도에서 직접 기울기 및 회전을 조정할 수도 있습니다. 기울기 또는 회전을 사용하면 앱에 부정적인 영향을 미치는 경우, 사용자가 기울기 및 회전을 조정할 수 없도록 기울기와 회전을 선택 해제한 상태로 두세요.
그런 다음 생성한 지도 ID로 지도 초기화 코드를 업데이트합니다. 지도 ID는 지도 관리 페이지에서 찾을 수 있습니다. 다음과 같이 mapId 속성을 사용하여 지도를 인스턴스화할 때 지도 ID를 제공하세요.
[null,null,["최종 업데이트: 2025-08-27(UTC)"],[[["\u003cp\u003eThe Maps JavaScript API offers two map types: raster (default) and vector (recommended for enhanced user experience with tilt and heading control).\u003c/p\u003e\n"],["\u003cp\u003eYou can set the rendering type using the \u003ccode\u003erenderingType\u003c/code\u003e map option or by associating a map ID with specific rendering settings.\u003c/p\u003e\n"],["\u003cp\u003eVector maps provide better visual quality and allow for tilt and heading manipulation, requiring enabling specific interactions for these features.\u003c/p\u003e\n"],["\u003cp\u003eMap IDs offer pre-configured rendering types and can be created and managed through the Cloud console, enabling customization without code changes.\u003c/p\u003e\n"],["\u003cp\u003eUsing a map ID and API key from the same Google Cloud project is recommended for optimal integration and management.\u003c/p\u003e\n"]]],[],null,["# Rendering type (raster and vector)\n\nThe Maps JavaScript API offers two different implementations of the map: raster\nand vector. The raster map is loaded by default, and loads the map as a grid of\npixel-based raster image tiles, which are generated by Google Maps Platform\nserver-side, then served to your web app. The vector map is a composed of\nvector-based tiles, which are drawn at load time on the client-side using\nWebGL, a web technology that allows the browser to access the GPU on the user's\ndevice to render 2D and 3D graphics. The vector map type is recommended for the\nbest user experience, as it provides improved visual fidelity as well as the\nability to control tilt and heading on the map.\n[Learn more about vector map features.](/maps/documentation/javascript/vector-map)\n\nSet the rendering type for a map either by specifying the `renderingType` map\noption, or by setting the option on an associated map ID. The `renderingType`\noption overrides any rendering type settings made by configuring a map ID.\n\nSpecify the `renderingType` option\n----------------------------------\n\nUse the `renderingType` option to specify either the raster or vector\nrendering type for your map (no map ID required). For maps loaded using a `div`\nelement and JavaScript, the default rendering type is\n`google.maps.RenderingType.RASTER`. Take these steps to set the `renderingType`\noption:\n\n1. Load the `RenderingType` library; this can be done when loading the Maps\n library:\n\n const { Map, RenderingType } = await google.maps.importLibrary(\"maps\");\n\n2. When initializing the map, use the `renderingType` option to specify either\n `RenderingType.VECTOR` or `RenderingType.RASTER`:\n\n map = new Map(\n document.getElementById('map'),\n {\n zoom: 4,\n center: position,\n renderingType: RenderingType.VECTOR,\n }\n );\n\nWhen the vector map rendering type is set, you must set the options for the\nneeded features.\n\n- To enable tilt, set the `tiltInteractionEnabled` map option to `true` or call `map.setTiltInteractionEnabled(true)`.\n- To enable panning, set the `headingInteractionEnabled` map option to `true` or call `map.setHeadingInteractionEnabled(true)`.\n\nFor maps loaded using the `\u003cgmp-map\u003e` element, the default rendering type is\n`google.maps.RenderingType.VECTOR`, with tilt and heading control enabled. To\nset the rendering type by using the `\u003cgmp-map\u003e` element, use the\n`rendering-type` attribute.\n\nUse a map ID to set rendering type\n----------------------------------\n\nYou can also specify the rendering type by using a map ID. To create a new map\nID, follow the steps in [Using Cloud-based Map Styling - Get a map ID](/maps/documentation/javascript/styling#creating-map-ids).\nBe sure to set the Map type to **JavaScript** , and select an option (**Vector**\nor **Raster** ). Check **Tilt** and **Rotation** to enable tilt and rotation\non the map. Doing so will allow you to programmatically adjust these values, and\nalso lets users adjust tilt and heading directly on the map. If the use of tilt\nor heading will adversely affect your app, leave **Tilt** and **Rotation** un-\nchecked so users will not be able to adjust tilt and rotation.\n\nNext, update your map initialization code with the map ID you created. You can\nfind your map IDs on the\n[Maps\nManagement](https://console.cloud.google.com/google/maps-apis/studio/maps) page. Provide a map ID when you instantiate the map using the\n`mapId` property as shown here: \n\n```javascript\nmap = new google.maps.Map(document.getElementById('map'), {\n center: {lat: -34.397, lng: 150.644},\n zoom: 8,\n mapId: '\u003cvar translate=\"no\"\u003eMAP_ID\u003c/var\u003e'\n});\n```\n| **Important:** It is recommended to associate your map ID and API key with the same Google Cloud console project."]]