> ## Documentation Index
> Fetch the complete documentation index at: https://maps.solvice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Display marker

> Display simple marker on the map

This comprehensive step-by-step tutorial provides a detailed explanation of how to incorporate a default Marker onto a map. By following this tutorial you will be able to create a map with a pin.

<Frame caption="Display marker">
  <iframe width="100%" height="355" src="https://cdn.solvice.io/assets/examples/maplibre/01-marker.html" />
</Frame>

<Steps>
  <Step title="Install Maplibre">
    ```bash theme={null}
    npm install maplibre-gl
    ```
  </Step>

  <Step title="Create Solvice Account">
    These are instructions or content that only pertain to the second step.
  </Step>

  <Step title="Choose a Solvice style">
    Do you prefer a light or dark theme? Choose one of the following styles: `light`, `dark` or `color`.

    ```javascript theme={null}
    var map = new maplibregl.Map({
    container: "map",
    hash: true,
    center: [-122.4194, 37.7749],
    zoom: 12,
    style: 'https://cdn.solvice.io/styles/light.json',
    });
    ```
  </Step>

  <Step title="Add a marker">
    Create a new marker using the `marker` function. Set Lng/Lat of the marker using `setLngLat()` function, and
    finally add it to the current map using `addTo()` function.

    ```javascript theme={null}
    const marker = new maplibregl.Marker()
    .setLngLat([12.550343, 55.665957])
    .addTo(map);
    ```
  </Step>
</Steps>

<Accordion title="Check out the full code example">
  <CodeGroup>
    ```html index.html theme={null}
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="utf-8"/>
        <title>Display a Solvice Map on a webpage</title>
        <link href="data:image/png;base64,iVBORw0KGgo=" rel="icon" type="image/png"/>
        <meta content="initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/>
        <link href="https://unpkg.com/maplibre-gl@4.1.0/dist/maplibre-gl.css" rel="stylesheet"/>
        <script src="https://unpkg.com/maplibre-gl@4.1.0/dist/maplibre-gl.js"></script>
        <style>
            #map {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 100%;
        }
        </style>
    </head>
    <body>
    <div id="map"></div>
    <script>
        var map = new maplibregl.Map({
        container: "map",
        hash: true,
        center: [-122.4194, 37.7749],
        zoom: 12,
        style: 'https://cdn.solvice.io/styles/light.json',
    });
        const marker = new maplibregl.Marker()
        .setLngLat([12.550343, 55.665957])
        .addTo(map);
    </script>
    </body>
    </html>
    ```
  </CodeGroup>
</Accordion>
