(map: mapboxgl.Map)
| 29 | try { const s = localStorage.getItem(MAP_POS_KEY); if (s) return JSON.parse(s); } catch {} |
| 30 | return DEFAULT_INDIA_VIEW; |
| 31 | } |
| 32 | |
| 33 | function hideExtraLabels(map: mapboxgl.Map) { |
| 34 | const style = map.getStyle(); |
| 35 | if (!style?.layers) return; |
| 36 | style.layers.forEach((layer) => { |
| 37 | if (layer.id.includes("poi") || layer.id.includes("road-label") || layer.id.includes("transit") || layer.id.includes("building-") || (layer.id.includes("road") && layer.type === "symbol")) { |
| 38 | try { map.setLayoutProperty(layer.id, "visibility", "none"); } catch {} |
| 39 | } |
| 40 | }); |
| 41 | } |
| 42 |
no outgoing calls
no test coverage detected