Select to view content in your preferred language

markerset offset

2057
8
03-13-2017 08:09 AM
DorothyMortenson1
Occasional Contributor

I have a point dataset. 

I take the exact coordinates of a point and use the following to map it:

var point = new Point({
longitude: long,
latitude: lat
});

var pointGraphic = new Graphic({
geometry: point,
symbol: markerSymbol
});
view.graphics.add(pointGraphic);

The two points do not line up on top of each other like they should (see attached image).

When I do the same thing in ArcMap they do line up exactly.

0 Kudos
8 Replies
thejuskambi
Frequent Contributor

What is the SpatialReference of the basemap used?

Can you share the values of the coordinates.

0 Kudos
DorothyMortenson1
Occasional Contributor

Thanks for responding.

The coordinates are:

45.21129000, -122.86243400

The map and the dataset are in Web Mercator.

0 Kudos
thejuskambi
Frequent Contributor

Ok so, you add a point to the map as Graphic object. How is the other point added to map. FeatureLayer or Dynamic Layer? and which SpatialReference is that layer in.

And the coordinates for both the points are same? even all the decimal places?

0 Kudos
DorothyMortenson1
Occasional Contributor

I am using Javascript API 4.2

The dataset is being displayed using MapImageLayer.

Which is in web mercator.

The popup uses the featurelayer

http://arcgis2.wrd.state.or.us/arcgis/rest/services/Dynamic/j_gw_all_wells/MapServer/0

Which is in web mercator.

In this example, I am focused on gw_logid = 'MARI0000622'

The coordinates are exactly the same, even the decimal places.

Works in ArcMap. Not in this application.

0 Kudos
thejuskambi
Frequent Contributor

Hello Dorothy,

I have reviewed the point in question. I find that the accuracy of the points differ.

The coordinates in the map service is X: -1.3676985192200001E7 and Y: 5654847.198399998

whereas, the latitude_dec: 45.21129 and longitude_dec: -122.862434

but if you convert the point coordinates to WGS84 I get lat : 45.21129548364 and long :-122.86244838829631. It is almost same, but slightly different.

The difference does not affect on higher map-scale, but at lower map-scale you will be able to see the difference visibly. You need to decide which value is correct and updated the other value accordingly.

Hope this was helpful.

KenBuja
MVP Esteemed Contributor

Although at six decimal places of precision, you're talking about less than a meter difference. Was the data collected to that level of accuracy?

lat lon - Measuring accuracy of latitude and longitude? - Geographic Information Systems Stack Excha... 

DorothyMortenson1
Occasional Contributor

Thank you. I'll double check our procedures.

0 Kudos
DorothyMortenson1
Occasional Contributor

So this is what I have concluded.

I took three different points that I marked on very distinct features at airports (the tip of the arrow or a cross of some kind).

I projected into the WGS 1984 Web Mercator (auxiliary sphere). While I am in ArcMap, all is well. Points are where they should be.

It's when the data is squeezed through the REST service that it changes the coordinates slightly - but not consistently.

In most cases, it's puts the point about 4 ft off to the south east. I think this is something that would vary around the world.  I remember my coworker mentioning this, but I didn't pay that close of attention.

I had added my service back into an ArcMap file, and the points do not line up.  Same is the case for the Javascript application.  

As Thejus mentioned, when you do a query on the rest service itself and see the coordinates in the results, they are not the same.

I guess this makes sense. I have had a number of attributes go afoul by the rest services, as it seems to have a mind of it's own as far as data types, particularly with long numbers or time.

Thanks for everyone's input.  

0 Kudos