How do you wrap the dateline in OpenLayers with OSM data like they do on the main map?

I can't seem to get wrapDateLine to work with OpenLayers.Layer.OSM?

Is there another way?

asked 26 Nov '10, 15:51

maw269's gravatar image

accept rate: 0%

Seems to be "wrapDateLine: true". Maybe you also need the "displayOutsideMaxExtent: true".

Here's the actual code as in the repo :

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

answered 27 Nov '10, 14:39

Harry%20Wood's gravatar image

Harry Wood
accept rate: 14%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 26 Nov '10, 15:51

question was seen: 4,713 times

last updated: 27 Nov '10, 14:39

powered by OSQA