Kevin,
I downloaded the sample from our wiki wiki.thinkgeo.com/wiki/Map_Suite_Web_Edition_All_Samples#Custom_Scale_Bar
The original code is like
ManagedProj4Projection proj4 = new ManagedProj4Projection();
proj4.InternalProjectionParameters = ManagedProj4Projection.GetGoogleMapParameters();
proj4.ExternalProjectionParameters = ManagedProj4Projection.GetEpsgParameters(4326);
It works properly as the sample want to show us, the displayed map is virtual earth layer, so the coordinate is very large that the original scale bar can not calculate the scale, so we need to create a custom ScaleBarAdornmentLayer to use different way to calculate it, the good thing we can use Projection to help us, so we set internal projection parameters are the same as virtual earth projection which is the same as Google maps’, so we can get it by using GetGoogleMapParameters API, and the external projection we choose 4326 because it’s a wgs84 standard which used to DecimalDegree unit longitude latitude coordinate, that can easy to call GetDistanceTo API to get full bar length.
I don’t know the reason you changed the sample code as below, maybe you misunderstood the intent of this sample. You have to change virtual earth layer to another layer which is in 4326 projection, and you want to show scale bar as that “unknown projection” which you set it to external parameters, you need to modify the code of CustomScaleBar because as I know it uses DecimalDegree as geography unit to get distance to, it only supports Wgs84 projection, not supports the projection with external parameters because it’s not longlat wgs84 projection.
ManagedProj4Projection proj4 = new ManagedProj4Projection();
proj4.InternalProjectionParameters = ManagedProj4Projection.GetEpsgParameters(4326);
proj4.ExternalProjectionParameters = "+proj=eqc +lat_ts=60 +lon_0=0 +x_0=0 +y_0=0 +a=6371007 +b=6371007 +units=m +no_defs";
While you update the code to implement it, if you have any questions please let me know.
Thanks,
James