---
title: "MaptilerLogoControl | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Class MaptilerLogoControl`Maptiler`

This LogoControl extends the MapLibre LogoControl but instead can use any image URL and any link URL. By default this is using MapTiler logo and URL.

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#MaptilerLogoControl))

-   [LogoControl](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/)
    -   MaptilerLogoControl

##### Index

### Constructors[](#constructors)

[constructor](#constructor)

### Properties[](#properties)

[options](#options)

### Methods[](#methods)

[getDefaultPosition](#getdefaultposition) [onAdd](#onadd) [onRemove](#onremove)

## Constructors[](#constructors-1)

### `Maptiler`constructor[](#constructor)

-   new MaptilerLogoControl(options?: [LogoControlOptions](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.LogoControlOptions/)): MaptilerLogoControl[](#constructormaptilerlogocontrol)
    
    #### Parameters
    
    -   options: [LogoControlOptions](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.LogoControlOptions/) = {}
    
    #### Returns MaptilerLogoControl
    
    Overrides [LogoControl](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/).[constructor](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/#constructor)
    

## Properties[](#properties-1)

### options[](#options)

options: [LogoControlOptions](https://docs.maptiler.com/sdk-js/api-reference/types/LogoControlOptions/)

Inherited from [LogoControl](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/).[options](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/#options)

## Methods[](#methods-1)

### getDefaultPosition[](#getdefaultposition)

-   getDefaultPosition(): [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)[](#getdefaultposition-1)
    
    Optionally provide a default position for this control. If this method is implemented and [Map.addControl](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#addcontrol) is called without the `position` parameter, the value returned by getDefaultPosition will be used as the control's position.
    
    #### Returns [ControlPosition](https://docs.maptiler.com/sdk-js/api-reference/types/ControlPosition/)
    
    a control position, one of the values valid in addControl.
    
    Inherited from [LogoControl](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/).[getDefaultPosition](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/#getdefaultposition)
    

### `Maptiler`onAdd[](#onadd)

-   onAdd(map: [Map](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/)): [HTMLElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLElement/)[](#onadd-1)
    
    Register a control on the map and give it a chance to register event listeners and resources. This method is called by [Map.addControl](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#addcontrol) internally.
    
    #### Parameters
    
    -   map: [Map](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/)
        
        the Map this control will be added to
        
    
    #### Returns [HTMLElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLElement/)
    
    The control's container element. This should be created by the control and returned by onAdd without being attached to the DOM: the map will insert the control's element into the DOM as necessary.
    
    Overrides [LogoControl](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/).[onAdd](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/#onadd)
    

### onRemove[](#onremove)

-   onRemove(): void[](#onremove-1)
    
    Unregister a control on the map and give it a chance to detach event listeners and resources. This method is called by [Map.removeControl](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/#removecontrol) internally.
    
    #### Returns void
    
    Inherited from [LogoControl](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/).[onRemove](https://docs.maptiler.com/sdk-js/api-reference/classes/LogoControl/#onremove)
