NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

How do you wrap the dateline in OpenLayers with OSM data like they do on the main openstreetmap.org 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

maw269
1157714
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("javascripts.map.base.mapnik"), {
      keyid: "mapnik",
      displayOutsideMaxExtent: true,
      wrapDateLine: true,
      layerCode: "M"
   });
permanent link

answered 27 Nov '10, 14:39

Harry%20Wood's gravatar image

Harry Wood
9.5k2588128
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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×2
×1
×1

question asked: 26 Nov '10, 15:51

question was seen: 5,366 times

last updated: 27 Nov '10, 14:39

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum