Cloned map block shows incorrect resolution

Pretty minor bug, but caused a bit of confusion until I was able to track down what was happening:

When I clone a map block with no resolution set (I created it through the API and didn’t define a resolution at all), the new map block has a resolution of 60000 when I query it through the API, but when I edit the block through the web UI it says that the resolution is “None”.

Steps to reproduce:

  1. POST /dashboards with the following template (IDs have been removed):
    "name": "Location Bug",
    "orgId": "ORG_ID",
    "refreshRate": 60,
    "defaultTheme": "light",
    "public": false,
    "blocks": [
        {
            "blockType": "map",
            "id": "LVwOZSoydz",
            "width": 2,
            "height": 2,
            "config": {
                "duration": 86400000,
                "deviceIds": [
                    "{{ctx.currentDevice}}"
                ],
                "deviceTags": [],
                "pinMode": "simple",
                "resizedPins": true,
                "startColor": "#ff261b",
                "endColor": "#8db319",
                "defaultZoom": "auto",
                "includeLines": true,
                "includeArrows": false,
                "defaultPitch": 0,
                "defaultBearing": 0,
                "iconTemplate": "{{#if isLastPoint}}\n{{colorMarker '#8db319'}}\n{{else if isFirstPoint}}\n{{colorMarker '#ff261b'}}\n{{/if}}",
                "popupTemplate": "##### **{{deviceName}}** {{#if isLastPoint}} (Current Location){{else if isFirstPoint}} (Starting Location){{/if}}\n\n{{format time}}\n\nLatLng({{format latitude}}, {{format longitude}})",
                "compositeResult": true,
                "attribute": "location"
            },
            "startX": 0,
            "startY": 0,
            "applicationId": "APPLICATION_ID",
            "title": "Map 1"
        }
    ],
    "contextConfiguration": [
        {
            "validationEnabled": false,
            "name": "currentDevice",
            "type": "deviceId",
            "applicationId": "APPLICATION_ID",
            "defaultValue": "DEFAULT_DEVICE_ID",
            "validationConfig": {}
        }
    ]
}
  1. Go to the dashboard and clone the “Map 1” block

  2. GET /dashboards/{dashboardId}. This is what I get for the blocks:

        {
            "blockType": "map",
            "id": "LVwOZSoydz",
            "width": 2,
            "height": 2,
            "config": {
                "duration": 86400000,
                "deviceIds": [
                    "{{ctx.currentDevice}}"
                ],
                "deviceTags": [],
                "pinMode": "simple",
                "resizedPins": true,
                "startColor": "#ff261b",
                "endColor": "#8db319",
                "defaultZoom": "auto",
                "includeLines": true,
                "includeArrows": false,
                "defaultPitch": 0,
                "defaultBearing": 0,
                "iconTemplate": "{{#if isLastPoint}}\n{{colorMarker '#8db319'}}\n{{else if isFirstPoint}}\n{{colorMarker '#ff261b'}}\n{{/if}}",
                "popupTemplate": "##### **{{deviceName}}** {{#if isLastPoint}} (Current Location){{else if isFirstPoint}} (Starting Location){{/if}}\n\n{{format time}}\n\nLatLng({{format latitude}}, {{format longitude}})",
                "compositeResult": true,
                "attribute": "location"
            },
            "startX": 0,
            "startY": 0,
            "applicationId": "APPLICATION_ID",
            "title": "Map 1"
        },
        {
            "blockType": "map",
            "id": "H0V56H8Scq",
            "width": 2,
            "height": 2,
            "config": {
                "duration": 86400000,
                "deviceIds": [
                    "{{ctx.currentDevice}}"
                ],
                "deviceTags": [],
                "pinMode": "simple",
                "resizedPins": true,
                "startColor": "#ff261b",
                "endColor": "#8db319",
                "defaultZoom": "auto",
                "includeLines": true,
                "includeArrows": false,
                "defaultPitch": 0,
                "defaultBearing": 0,
                "iconTemplate": "{{#if isLastPoint}}\n{{colorMarker '#8db319'}}\n{{else if isFirstPoint}}\n{{colorMarker '#ff261b'}}\n{{/if}}",
                "popupTemplate": "##### **{{deviceName}}** {{#if isLastPoint}} (Current Location){{else if isFirstPoint}} (Starting Location){{/if}}\n\n{{format time}}\n\nLatLng({{format latitude}}, {{format longitude}})",
                "compositeResult": true,
                "attribute": "location",
                "resolution": 60000
            },
            "startX": 2,
            "startY": 0,
            "title": "Map 2",
            "applicationId": "APPLICATION_ID"
        }
    ]

Compare this to the web UI, where Map 1 has the exact locations with the Resolution listed as “None”:

whereas the cloned Map 2 has locations grouped per minute even though the Resolution is listed as “None”:

Hello,

Thank you for pointing this out, and for providing the steps to replicate the problem! I will give this to our devs and we will work on a fix.

Thanks!
Julia