Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Esri Silverlight/WPF UI with a mapcontrol and a slider. In the mapcontrol is a graphics layer with a single polyline on it, created using coordinates from a layer in a mapservice. The shapefield of the featureclass used by the mapservice has PolylineM's.

I would like to find a way to move a point marker graphic along the polyline to reflect the M position as derived from the slider. The min and max values of the slider are the MinM and MaxM values of the polyline.

share|improve this question
up vote 0 down vote accepted

There is a .NET implementation of linear referencing in the SQL Server Spatial Tools project that you could use as a model. The SQL Server geometry types would need to be changed with their ArcObject equivalents, but the process should be similar.

The first part of the function simply loops through each vertex in a line to find which two points the M value falls between:

Then once you have the two points either side you can interpolate the postition, as shown in the InterpolateBetweenGeom function:

share|improve this answer
Arcobjects isn't used on client side. It looks like polylines in both the spatial data service as well as the Silverlight/WPF SDK… do not contain M values, which is likely a limitation of the REST API's polyline. I'm wondering what the easiest way to retrieve feature xym's from the mapservice. – Kirk Kuykendall Mar 1 '11 at 22:52
@kirk - as long as you know which are the start and end nodes of the line you can use the above algorithm to calculate the point's position. You just need to keep track of segment lengths. I did something similar in JS / OpenLayers. – geographika Mar 2 '11 at 0:02
Thanks, I think I got that figured out. I was hoping to find an easy way to retrieve M's from the server. It looks like I'll need to use a SOAP call. – Kirk Kuykendall Mar 2 '11 at 15:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.