

# Example: Style a map
<a name="example-switch-styles"></a>

![\[alt text not found\]](http://docs.aws.amazon.com/location/previous/developerguide/images/samples/map-styles-both_small.png)


This code example shows how to switch between a satellite map and a vector road map, using MapLibre in JavaScript. Uses MapLibre, the Amazon Location authentication helper, and JavaScript.

Geospatial GitHub link: [Interactive map with style switching](https://github.com/aws-geospatial/amazon-location-samples-js/tree/main/map-style-change)