Select to view content in your preferred language

# Overlay a image onto the map programmatically

724
3
10-19-2022 02:31 AM
by
Frequent Contributor

I am trying to figure out if it is possible to overlay image onto the map programmatically and am wondering if its even possible with ArcgisJS SDK?

The idea is for user to upload and image they have of a map area (either from aerial vehicle or from scanned images such as old maps) and overlay it programmatically

1 Solution

Accepted Solutions
Esri Contributor

Hi @Aeseir ,

We recently added MediaLayer at v4.24, which provides this ability. The ability to use control points to georeference an image is being added in 4.25 and is currently available on the next branch for testing purposes. You can see the release notes about ControlPointGeoreference here: https://github.com/Esri/feedback-js-api-next/blob/main/CHANGELOG.md#layer-updates

3 Replies
New Contributor

Use what should be obsolete, World File.

I'm trying to understand how to calculate each parameter myself. Their skew/rotation documentation and explanation isn't very clear.

I got this part.

A = mx · cos t
B = my · (k · cos t - sin t)
D = mx · sin t
E = -1 · my · (k · sin t + cos t)
C = translation in x direction
F = translation in y direction

I don't understand this part. Please explain:

Each of these coefficients can be defined as

where

mx = change of scale in x direction
my = change of scale in y direction
k = shear factor along the x-axis = tan (skew angle) (the skew angle is measured from the y-axis)
t = rotation angle, measured counter-clockwise from the x-axis

How to calculate mx, my, k, t ??

Esri Contributor

Hi @Aeseir ,

We recently added MediaLayer at v4.24, which provides this ability. The ability to use control points to georeference an image is being added in 4.25 and is currently available on the next branch for testing purposes. You can see the release notes about ControlPointGeoreference here: https://github.com/Esri/feedback-js-api-next/blob/main/CHANGELOG.md#layer-updates

by
Frequent Contributor

That is great news, had a quick look at it and that will do the trick nicely.