ThinkGeo.com    |     Documentation    |     Premium Support

How to make OpenStreetMap map wrap around the DateLine?

I am working on a windows forms application that users can create routes on map. I am using the OpenStreerMap map layer as the base map with a dynamic layer on top of it. The problem i am facing is the OSM map is not wrapped around the date line, meaning it ends at the dateline and cannot be scrolled continuously. So if i want to draw a line from Australia to USA i cannot go the shortest way.

How can i make the OSM map wrap from the date line? In the web version this can be done it seems like below

var mapnik = new OpenLayers.Layer.OSM.Mapnik(i18n("javascripts.map.base.mapnik"), {
  keyid: "mapnik",
  displayOutsideMaxExtent: true,
  wrapDateLine: true,
  layerCode: "M"

});

Also for the desktop edition of map suite we can do this in other map representations (like shape file maps) by setting the

baseMapLayer.WrappingMode = WrappingMode.WrapDateline;

But i cannot find some similar property for the desktop OSM map classes.
Any help is much appreciated. Thanks is advance.

Hi Zaki,

It looks in DesktopEdtion, the OpenStreetMapLayer don’t support wrapDateLine, in DesktopEdition only ShapeFileFeatureLayer support that.

And in WPF edition we support that in overlay level.

If you think that’s important for our desktop edition, please visit this page and vote for it: Vote for new features on the Enhancement Tracker

Regards,

Don

1 Like

Hi Don,

Thank you very much. I guess I will have to make my other layers comply with the OSM layer.

Best regards.
Zaki

Hi Zaki,

I am gold to hear that’s helpful.

Regards,

Don