Configure a Profile
The Config Manager is the central place to tailor map behaviour for distinct business use cases—letting you define views, features, styles, filters, actions and defaults without code.
Need a profile ID quickly?
- Every time you create a profile, the system generates a unique Profile ID. PCF controls rely on this value to decide which configuration to load.
- You can copy it from the
Profile IDcolumn on the Config Manager landing page, or from the top-right corner inside an open profile.
Preconfigured Profiles
Once you have installed Maptaskr Power Maps, OOTB we supply a handful of profiles to help get you started:
| Profile Name | Description | Usage |
|---|---|---|
| Default | The parent profile to all other preconfigured profiles. Any changes made here will be applied to the preconfigured children profiles unless overridden. | Not used anywhere by default |
| Account and Contact | This profile has been configured to get you started straight away using the Maptaskr Power Maps admin Dashboard map. | Ready to use for dashboard mapping |
| Default Record | The parent profile configuration for Account record and Contact record maps. | Not used anywhere by default |
| Account Record | Preconfigured profile setup to be used on the account form. | Account form integration |
| Contact Record | Preconfigured profile setup to be used on the contact form. | Contact form integration |
Configuration Options
The Config Manager provides comprehensive customization capabilities through the following configuration areas. Each area allows you to tailor specific aspects of the map behavior to meet your business requirements:
Core Map Settings
| Feature | Description |
|---|---|
| Map Details | Set the address provider, region provider, and base map providers. |
| Map Features | Select features to load by default on the map (e.g., accounts, addresses). |
| Map Styles | Configure visual styles for map elements (e.g., address pins, region areas) and set default measurement units. |
| Map Filters | Define filters to focus on relevant data, such as by layer, shape, region, or geometry. |
| Map Actions | Define actions available to users via right-click or context menu on the map. |
| Predefined Shapes | Enable core map functions such as uploading, drawing, and deleting shapes. |
| Layer Gallery Availability | Control which layers are available to end users. |
| Preconfigured Layers | Automatically load specific layers when the map initializes. |
| Map Zoom | Configure zoom options and behaviors, such as zooming to user location, address pin, shapes, or layers. |
| Custom Code | Add custom JavaScript code to extend or modify map behavior for advanced scenarios. |
Advanced Profile Usage
By default, you assign a profile by entering its ID in the text field of the PCF control. However, this static approach may not be sufficient when you need to render different profiles dynamically based on attributes such as the current user, their roles, or fields on the record.
The Profile Id field in a Maptaskr PCF control can accept simple JavaScript code, allowing you to conditionally return a profile ID. This enables dynamic profile selection based on runtime conditions.
Example 1: Role-Based Profile Selection
In this example, there are two profiles—one for editing and one read-only. The JavaScript checks if the current user has a specific role (Sales Manager) and returns the appropriate profile:
// If current user has role of sales manager show Edit Profile
// Sales Manager Role
if (props['userRoles'].indexOf('6f55bc85-0007-461b-9626-286ab2a2b12a') !== -1) {
// Edit Profile
('294d1985-91fb-476a-900c-3241ae78b22f');
} else {
// Read-only Profile
('91b4713d-e8ff-4608-8e03-477b21b1a56e');
}
Example 2: Owner-Based Profile Selection
Another common scenario is based on record ownership. If the logged-in user is the owner of the record, they receive edit permissions; otherwise, they get a read-only view:
// If logged in user is owner of account then use edit profile
if (props['userName'] == props['_ownerid_value@OData.Community.Display.V1.FormattedValue']) {
('294d1985-91fb-476a-900c-3241ae78b22f');
} else {
('91b4713d-e8ff-4608-8e03-477b21b1a56e');
}
Available variables: Any form attribute (entity field) and user details exposed on the page. To inspect them, open the browser dev tools (F12) while the map is loaded—two console tables are logged: one for form attributes and one for user info.
Guidelines:
- Return a valid profile ID that exists in your Config Manager.
- Keep logic fast and side‑effect free (just compute a string).
- Prefer explicit returns for readability in more complex conditions.