Skip to content
This repository was archived by the owner on Feb 21, 2026. It is now read-only.
This repository was archived by the owner on Feb 21, 2026. It is now read-only.

'center' doesn't accommodate other spatial references #4

@AndyPeepsJR

Description

@AndyPeepsJR

All our mapping is in EPSG:27700, or British National Grid. the code will only cater for EPSG:4326, and assumes incoming coordinates are in that format. By simply defining esri/SpatialReference and changing line 494 of main.js to:

        //specify center and zoom if provided as url params 
        if (this.config.level) {
            options.zoom = this.config.level;
        }
        if (this.config.center) {
            var points = this.config.center.split(",");
            if (points && points.length === 2) {
                options.center = [parseFloat(points[0]), parseFloat(points[1])];
            }
            else if (points && points.length === 3) {
                options.center = new Point(parseFloat(points[0]), parseFloat(points[1]), new SpatialReference({ wkid: parseInt(points[2]) }));
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions