Hi James,
We want to get to the bottom of this dateline thing once and for all. Can you upgrade to 15.0.0-beta132, in which we have the following changes for you?
-
Labels. A line split at the dateline is now recognized as one line by the SDK itself, not by the label code guessing from the endpoints. The label sits at the center of the whole line at every zoom level, in every tile, for any layer type (InMemory, shapefile, pre-split GeoJSON), and with a custom WrappingExtent too.
-
Splitting and joining. There is a new DatelineHelper that works directly in meters, so you can skip the degree round trip:
var world = MaxExtents.GetDefaultMaxExtent(GeographyUnit.Meter);
// before adding a route to the layer (no-op if it doesn't cross)
var feature = DatelineHelper.Split(new Feature(lineInMeters), world);
// for your arrows: the continuous line back, true endpoints at [0] and [last]
var whole = DatelineHelper.Merge(feature, world);
DecimalDegreesHelper.SplitByDateline still works exactly as you use it now. Either way the split feature carries a hidden column
__tg_dateline_split, which is what the SDK reads.
-
Editing. EditOverlay handles the dateline now: a linecomes back in Features and in OnFeatureDrawn alreadysplit, while on the map you edit it as one continuous line. This covers the “once we allow modification of the lines” point from your
last post. One thing to be aware of: a crossing line not a LineShape.
-
Great circle. Unchanged from beta127: start.GreatCirceady split on the seam.
Nothing in your current code needs to change for betasplitting and helper-label code if you want, but itkeeps working as is. If you try the editing path and anything looks off, send us a screenshot.
Thanks,
Ben