Skip to main content
Version: Release 3 - 1.3.3.X

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.
tip

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?

Shape Dataverse Relationships

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:

IdentifierPurpose
Related Entity TypeThe logical name of the entity the shape belongs to.
Related Entity IDThe unique ID of the specific record the shape belongs to.
Related Entity FieldThe 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 NameLogical NameData TypeUsage
CentroidLatitudemtrcore_CentroidLatitudeDecimalCentroid Latitude of the GeoJSON File
CentroidLongitudemtrcore_CentroidLongitudeDecimalCentroid Longitude of the GeoJSON File
GeoJSON Filemtrcore_GeoJSONFileSingle line of textThe "attachment/note" Id containing the Base64 encoded GeoJSON file.
GeoModel Filemtrcore_GeoModelFileSingle line of textUnused at present.
MaxLatitudemtrcore_MaxLatitudeDecimalThe Max Latitude of the GeoJSON File (used for extent testing)
MaxLongitudemtrcore_MaxLongitudeDecimalThe Max Longitude of the GeoJSON File (used for extent testing)
MinLatitudemtrcore_MinLatitudeDecimalThe Min Latitude of the GeoJSON File (used for extent testing)
MinLongitudemtrcore_MinLongitudeDecimalThe Min Longitude of the GeoJSON File (used for extent testing)
Namemtrcore_NameSingle line of textThe Name of the Shape (usually consistent with the Map Shape name)
OrigModel Filemtrcore_OrigModelFileSingle line of textUnused at present.
OrigShape Filemtrcore_OrigShapeFileSingle line of textThe "attachment/note" Id containing the Base64 encoded original uploaded shape file (in whatever format was uploaded).
Predefined Idmtrcore_PredefinedIdSingle line of textThe Map Shape ID — used to link it to a preconfigured shape definition.
Related Entity Field Namemtrcore_RelatedEntityFieldNameSingle line of textThe 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 IDmtrcore_RelatedEntityIDSingle line of textThe ID of the related entity this shape belongs to.
Related Entity Typemtrcore_RelatedEntityTypeSingle line of textThe Type of the related entity this shape belongs to.
Uploaded Bymtrcore_UploadedBySingle line of textUnused at present.

This is supplemented by the following standard fields:

Column NameLogical NameData TypeUsage
Created BycreatedbyLookupUser who created the shape
Created By (Delegate)createdonbehalfbyLookupDelegate service user who created the shape (if created by a service account)
Created OncreatedonDate and TimeDate and time the shape was created
Modified BymodifiedbyLookupUser who modified the shape last
Modified By (Delegate)modifiedonbehalfbyLookupDelegate service user who modified the shape last (if modified by a service account)
Modified OnmodifiedonDate and TimeDate and time the shape was last modified
Tip
  • 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:

FieldAttachment content
mtrcore_GeoJSONFileBase64-encoded GeoJSON (WGS84). This is the editable representation used by the map.
mtrcore_OrigShapeFileBase64-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

PropertyTypeDefaultDescription
fillString#0078d4Fill colour (hex). Applies to polygons and point circles.
fill-opacityNumber1Fill opacity (01).
strokeString#FFFFFFStroke/border colour (hex). Applies to lines and polygon edges.
stroke-opacityNumber1Stroke opacity (01).
stroke-widthNumber1Stroke width in pixels (max 64).
stroke-typeStringSolidStroke dash style. One of Solid or Dashed.
text-colorString#000000Label text colour (hex).
text-opacityNumber1Label text opacity (01).
text-shadowString#FFFFFFText halo/shadow colour (hex) for readability against the map.
text-shadow-opacityNumber1Text shadow opacity (01).
font-sizeNumber14Label font size in pixels.
titleStringText displayed as a label on the feature.

Using Saved Shapes as Layers

When a Dataverse record has a saved shape, you can use that record as a Dataverse layer and apply a shape style to render the geometry on the map.

How it works

  1. The Dataverse layer loads records from the target entity.
  2. A shape style is applied to the layer, telling Maptaskr which field contains the shape references.
  3. Maptaskr fetches the GeoJSON attachments and renders the geometries on the map.

The shape style can be configured to reference any of the form fields that contain shape IDs. You can use saved shape styles from the configuration, or override the style per-layer for a more consistent visual approach across different map instances.

Important

Any Dataverse record with a shape must have a latitude/longitude field to allow it to be rendered as a layer and to have its shapes loaded. If you don't otherwise need a coordinate field, you can set it to the shape's centroid on save and then hide it when creating the Dataverse layer configuration.

Adding a shape style to a Dataverse layer

  1. Open the Layer Configuration for your Dataverse layer.

  2. Navigate to the Shape Style section.

  3. Select the form field that contains the shape IDs you wish to render.

  4. Choose a style preset from the saved styles, or configure a custom style (fill colour, stroke, opacity, etc.).

  5. Save the layer configuration.

Shape Style Configuration

Shape Style Configuration


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.


References