Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArcGisFeatureServerCatalogItem: fix import #7344

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/Models/Catalog/Esri/ArcGisFeatureServerCatalogItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import loadJson from "../../../Core/loadJson";
import replaceUnderscores from "../../../Core/replaceUnderscores";
import { networkRequestError } from "../../../Core/TerriaError";
import featureDataToGeoJson from "../../../Map/PickedFeatures/featureDataToGeoJson";
import proj4definitions from "../../../Map/Vector/Proj4Definitions";
import Proj4Definitions from "../../../Map/Vector/Proj4Definitions";
import GeoJsonMixin, {
FeatureCollectionWithCrs
} from "../../../ModelMixins/GeojsonMixin";
Expand Down Expand Up @@ -252,12 +252,12 @@ class FeatureServerStratum extends LoadableStratum(
extent?.spatialReference?.latestWkid ?? extent?.spatialReference?.wkid;

if (isDefined(extent) && isDefined(wkidCode)) {
const wkid = "EPSG:" + wkidCode;
if (!isDefined((proj4definitions as any)[wkid])) {
const epsgSrc = Proj4Definitions["EPSG:" + wkidCode];
if (!isDefined(epsgSrc)) {
return undefined;
}

const source = new proj4.Proj((proj4definitions as any)[wkid]);
const source = new proj4.Proj(epsgSrc);
const dest = new proj4.Proj("EPSG:4326");

let p = proj4(source, dest, [extent.xmin, extent.ymin]);
Expand Down