关于Here Maps 3.1 JS API reduced样式及可用样式文件的问询
Hey there! Let's clear up your question about the reduced.day and reduced.night styles for HERE Maps 3.1 JS API vector tiles:
Key Facts About Reduced Styles
- First off: reduced.day and reduced.night are official, supported styles—but they're pre-built, internal optimized styles rather than publicly available YAML files like normal.day.yml or the sample dark.yml. HERE designed these specifically for performance (smaller payloads, faster rendering for low-bandwidth or mobile scenarios) and keeps their source YAML wrapped up in the API infrastructure instead of exposing it publicly.
How to Use Them (No YAML Needed)
You don't need a YAML file to implement these styles—you can call them directly via the API when initializing your map. Here's a quick code example:
// Initialize the HERE platform const platform = new H.service.Platform({ apikey: 'YOUR_API_KEY' }); // Create vector tile layers, including the reduced styles const defaultVectorLayers = platform.createDefaultLayers({ tileSize: 512, type: 'vector' }); // Initialize map with reduced.day style const map = new H.Map( document.getElementById('map-container'), defaultVectorLayers.vector.reduced.day, // Directly reference the reduced style { zoom: 12, center: { lat: 52.5200, lng: 13.4050 } // Berlin example coordinates } );
Swap reduced.day for reduced.night to switch to the dark reduced variant.
If You Need to Customize a Reduced-Like Style
If you want to tweak the reduced style's behavior (since you can't access its YAML), you have two solid options:
- Start with public YAML and trim it down: Take the publicly available
normal.day.ymlor sample dark.yml, then manually remove non-essential layers (like detailed POIs, decorative road markings, or complex land cover patterns), simplify line widths, and reduce color palettes to match the lightweight goal of the reduced styles. - Use the HERE Style Editor: The official style editor lets you modify base styles (like normal.day) and export your custom YAML. You can replicate the reduced style's minimalistic approach by disabling heavy layers and simplifying visual elements.
Additional Notes
If you need precise details on what the reduced styles include (like which layers are enabled/disabled), check the HERE Maps API official documentation's style reference section—it outlines the layer structure and properties for all pre-built styles, including reduced.day and reduced.night.
内容的提问来源于stack exchange,提问作者Hidastelija

