Start your integration with our map component now.
 Getting started with the map component 
 Authenticating with the map component 
 Initiating the map component 
 Displaying parcel points with the map component 
 Updating the map component configuration 
 Create an app linked to your account 
Articles in that section
Updating the map component configuration
If two contexts are present on the same page (for example, sender and recipient) and loading two maps is not possible (map in a modal for example), it may be necessary to switch from one to the other.
This needs to be done in 3 steps:
- Update the configuration.
- Restart a search for a parcel point.
- Force the selection of a previously chosen relay point if a choice has already been made by the user previously.
To modify the component configuration:
boxtalMaps.updateConfig(
    {
        locale: 'fr', // language used in UI, optional, possible values include fr or en
        parcelPointNetworks: [ // the list of networks to display
            {
                code: 'CHRP_NETWORK', // network code, here the code for Chronopost
                markerTemplate: {
                    color: '#94a1e8' // it is possible to override the color of the marker for each network
                },
            }
        ],
        options: {
            primaryColor: '#00FA9A', // color of buttons (and markers if not overriden)
            autoSelectNearestParcelPoint: false // the closest relay will be selected by default as soon as the search is carried out
        },
    }
);
To force the choice of a previously chosen relay point:
boxtalMaps.chooseParcelPoint(parcelPoint);