Maptaskr Shapes
Overview
Maptaskr Shapes are used to persist shapes drawn on the map and associate them with a Dataverse record. Each shape consists of two parts:
- GeoJSON representation — the editable geometry stored in WGS84 (latitude/longitude). This is what Maptaskr renders and allows users to modify on the map.
- Original uploaded file (optional) — if the shape originated from an uploaded file (e.g. Shapefile, KML, GeoJSON in a different projection), the original is preserved untouched in its native projection.
For a list of what files we support Learn more
This separation ensures you always retain the source data at full precision while still providing a standardised format for display and editing.
What is saved where?

When you add a Maptaskr PCF map control to a Dataverse form, shapes drawn or uploaded on that map are saved against the current record. Each shape record stores:
| Identifier | Purpose |
|---|---|
| Related Entity Type | The logical name of the entity the shape belongs to. |
| Related Entity ID | The unique ID of the specific record the shape belongs to. |
| Related Entity Field | The form field name used by the PCF map control — this ties the shape to a specific map instance on the form. |
Because shapes are linked via the field name, you can add multiple maps to the same form (or across multiple forms) and each map will only load and edit its own shapes. There is no limit to how many map controls can be associated with a single record, as long as each one references its own dedicated field to store shape IDs.
Maptaskr Core Shapes table
| Column Name | Logical Name | Data Type | Usage |
|---|---|---|---|
| CentroidLatitude | mtrcore_CentroidLatitude | Decimal | Centroid Latitude of the GeoJSON File |
| CentroidLongitude | mtrcore_CentroidLongitude | Decimal | Centroid Longitude of the GeoJSON File |
| GeoJSON File | mtrcore_GeoJSONFile | Single line of text | The "attachment/note" Id containing the Base64 encoded GeoJSON file. |
| GeoModel File | mtrcore_GeoModelFile | Single line of text | Unused at present. |
| MaxLatitude | mtrcore_MaxLatitude | Decimal | The Max Latitude of the GeoJSON File (used for extent testing) |
| MaxLongitude | mtrcore_MaxLongitude | Decimal | The Max Longitude of the GeoJSON File (used for extent testing) |
| MinLatitude | mtrcore_MinLatitude | Decimal | The Min Latitude of the GeoJSON File (used for extent testing) |
| MinLongitude | mtrcore_MinLongitude | Decimal | The Min Longitude of the GeoJSON File (used for extent testing) |
| Name | mtrcore_Name | Single line of text | The Name of the Shape (usually consistent with the Map Shape name) |
| OrigModel File | mtrcore_OrigModelFile | Single line of text | Unused at present. |
| OrigShape File | mtrcore_OrigShapeFile | Single line of text | The "attachment/note" Id containing the Base64 encoded original uploaded shape file (in whatever format was uploaded). |
| Predefined Id | mtrcore_PredefinedId | Single line of text | The Map Shape ID — used to link it to a preconfigured shape definition. |
| Related Entity Field Name | mtrcore_RelatedEntityFieldName | Single line of text | The name of the Field used by the Map PCF that this shape was created in. This map will be the only map to load the shape for editing purposes. |
| Related Entity ID | mtrcore_RelatedEntityID | Single line of text | The ID of the related entity this shape belongs to. |
| Related Entity Type | mtrcore_RelatedEntityType | Single line of text | The Type of the related entity this shape belongs to. |
| Uploaded By | mtrcore_UploadedBy | Single line of text | Unused at present. |
This is supplemented by the following standard fields:
| Column Name | Logical Name | Data Type | Usage |
|---|---|---|---|
| Created By | createdby | Lookup | User who created the shape |
| Created By (Delegate) | createdonbehalfby | Lookup | Delegate service user who created the shape (if created by a service account) |
| Created On | createdon | Date and Time | Date and time the shape was created |
| Modified By | modifiedby | Lookup | User who modified the shape last |
| Modified By (Delegate) | modifiedonbehalfby | Lookup | Delegate service user who modified the shape last (if modified by a service account) |
| Modified On | modifiedon | Date and Time | Date and time the shape was last modified |
- The OrigShape file saved will NOT be altered with the GeoJSON editing facilities.
- Disable editing facilities, and use the file contained within this field if you want to ensure absolute precision when accepting shape files.
- Any modified GeoJSON will be in the WGS84 coordinate space, and may introduce precision errors if not handled correctly.
Base64 Attachments
Shape geometry is not stored directly on the Maptaskr Core Shapes record. Instead, the actual file content is saved as a Base64-encoded attachment (Dataverse Note / annotation), and the shape record holds a reference (the annotation ID) in the relevant field.
Two attachments may exist per shape:
| Field | Attachment content |
|---|---|
mtrcore_GeoJSONFile | Base64-encoded GeoJSON (WGS84). This is the editable representation used by the map. |
mtrcore_OrigShapeFile | Base64-encoded original uploaded file in its native format and projection. Preserved as-is. |
Example: GeoJSON attachment (decoded)
Maptaskr uses an extended version of the Mapbox simplestyle-spec to store per-feature styling directly in GeoJSON properties. These properties control how the shape is rendered on the map.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [
[
[144.9631, -37.8136],
[144.9641, -37.8136],
[144.9641, -37.8126],
[144.9631, -37.8126],
[144.9631, -37.8136]
]
]
},
"properties": {
"title": "Sample Area",
"fill": "#0078d4",
"fill-opacity": 0.5,
"stroke": "#FFFFFF",
"stroke-opacity": 1,
"stroke-width": 2,
"stroke-type": "Solid",
"text-color": "#000000",
"text-opacity": 1,
"text-shadow": "#FFFFFF",
"text-shadow-opacity": 1,
"font-size": 14
}
}
]
}
simplestyle-spec property reference
| Property | Type | Default | Description |
|---|---|---|---|
fill | String | #0078d4 | Fill colour (hex). Applies to polygons and point circles. |
fill-opacity | Number | 1 | Fill opacity (0 – 1). |
stroke | String | #FFFFFF | Stroke/border colour (hex). Applies to lines and polygon edges. |
stroke-opacity | Number | 1 | Stroke opacity (0 – 1). |
stroke-width | Number | 1 | Stroke width in pixels (max 64). |
stroke-type | String | Solid | Stroke dash style. One of Solid or Dashed. |
text-color | String | #000000 | Label text colour (hex). |
text-opacity | Number | 1 | Label text opacity (0 – 1). |
text-shadow | String | #FFFFFF | Text halo/shadow colour (hex) for readability against the map. |
text-shadow-opacity | Number | 1 | Text shadow opacity (0 – 1). |
font-size | Number | 14 | Label font size in pixels. |
title | String | — | Text displayed as a label on the feature. |
Using Saved Shapes as Layers
Saved shapes can locate records in a Dataverse layer, with or without a pin. Configure a Shape style to select the saved shapes to render.
How it works
- Configure the Dataverse layer for the target table or view, including its record ID field.
- Add one Shape style and select the form field used by the record-level map as its Shape Source. Optionally restrict it using Predefined Shape Id.
- Maptaskr matches active shapes for that table, record and source field, loads their GeoJSON attachments, and renders the matching geometry.
The source field identifies which record-level map's shapes to use. The Shape style uses saved per-feature appearance unless you enable Override the shape style.
Pins, shapes, or both
- Pin only: A valid mapped latitude/longitude pair locates the record. Use a point style to display the pin.
- Shape only: A matching saved shape locates the record even when its coordinates are empty or the table has no coordinate columns. You do not need to copy the shape's centroid into the parent record.
- Both: A record can have a pin and one or more matching shapes. A spatial query can include it when either its pin or a configured shape's extent matches the requested area; the pin does not have to be inside that area for its shape to qualify.
Layer/view and search filters still apply. Shape selection also respects the source field, any configured predefined IDs, and active shape state. A shape elsewhere on the record is not automatically included.
The Data Tab represents parent records, not individual shapes: multiple shapes, or a pin plus shapes, do not create extra rows or inflate the distinct parent-record count. Matching shapes are grouped with their parent across query pages. Layer extents include matching shape bounds as well as valid pin locations, rather than relying on a parent pin or a shape centroid alone.
Shape-only support is a layer capability, not a bulk-discovery rule. Use manual layer configuration for coordinate-free tables. Add from Dataverse still requires a discoverable coordinate pair; see Supported Layers.
Adding a shape style to a Dataverse layer
-
Open the Layer Configuration for your Dataverse layer.
-
Open Features, select the sublayer, and open Layer Styles. Add a new style with Style Type set to Shape, or edit the existing Shape style.
-
Set Shape Source to the form field used by the record-level map. Set Predefined Shape Id if only particular predefined shapes should be included.
-
Keep the saved shape appearance, or enable Override the shape style and configure fill colour, stroke, opacity and labels.
-
Save the style and layer configuration. For pins as well as shapes, retain an appropriate point style and coordinate mappings.
Only one Shape style is active per Dataverse layer. In legacy configurations with additional Shape styles, only the first in the style configuration's layers array is used; later ones remain editable but are ignored. Both the Layer Gallery and Preloaded Layers editors flag ignored styles. Their tables display styles in reverse array order, so the top row is not necessarily the active Shape style. See Layer Styling - One Active Shape Style for ordering, warnings and restrictions.
The images below illustrate Shape Source configuration and a record rendered with both a pin and a polygon. They do not demonstrate shape-only records or the R8 ignored-style warnings.


Online and mobile-offline queries
Online, shape-enabled layers use FetchXML joins between parent records, configured active shapes and their GeoJSON notes. Results are grouped into distinct parent records across the underlying Dataverse pages.
In the mobile app's offline mode, records and shape metadata are queried separately from the available offline data and joined locally. Candidate record and shape streams are paged before their deduplicated parent union is paged; geometry is then loaded for the requested parent page. Parent and shape filters still apply, including to shape-only matches.
Offline results depend on the parent records, shapes and GeoJSON notes being available on the device. Do not assume an online dataset is automatically available offline or that both modes have identical query costs. Paging-limit failures are surfaced rather than silently treating incomplete results as complete; a total may be unavailable. Validate online and mobile-offline queries and paging with your own data before rollout.
Best Practice for Shape Persistence
-
Persist shapes only for as long as you need them. If shapes are transient or used only during a workflow stage, consider cleaning them up when no longer relevant. Orphaned shape records increase storage usage and may slow layer queries over time.
-
Offload to an Enterprise GIS for long-term storage. If your organisation has access to a system such as ArcGIS, consider building a process that validates uploaded shapes and publishes them as authoritative features in that system. Once published, the Dataverse shape record can be removed to free storage, and the record can instead render the official GIS layer. This also makes the geometry accessible to other platforms and teams outside of Dynamics 365.
-
Preserve the original file when precision matters. If your workflow requires sub-metre accuracy or specific coordinate systems, always reference the OrigShape file rather than the WGS84 GeoJSON, which may have reprojection artefacts.
-
Separate maps by field name. When multiple maps exist on a form, ensure each PCF control references a distinct field. This guarantees shapes are scoped correctly and avoids accidental cross-map edits.