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

Hi to all,

I have created a marker in map as following:

marker = new L.marker([22.42118, 78.60718], {icon: icon.png}); map.addLayer(marker);

and showing correctly in single map. But In zoom level 1, In my page I have 2 or 3 maps(3 tiles), But marker showing in a single map only(Refer the attached imagealt text).

Any option show marker in all maps?

Edited on Aug 28:

In google maps, when we drag horizontally our data will shown in all maps. But in openstreet map data showed in a single world map, not replicated to other maps. Any option to show data in all maps or how to replicate the same map horizontally in all time?

Note: In google maps data showing in a single map when morethan 1 map present in screen.

asked 15 Jul '15, 16:18

Rajavelu_M's gravatar image

Rajavelu_M
253454858
accept rate: 33%

closed 31 Aug '15, 07:10

1

Could you perhaps try and add a few more words to describe what you are trying to say? That image doesn't look like something you'd see on www.openstreetmap.org, so could you explain what you did, with what tool or website, what you expected to happen and what actually happened?

(15 Jul '15, 16:29) SomeoneElse ♦
1

I recommend to ask on the communication channels of the leafletjs project ... this is more a javascript problem than an OSM one.

(28 Aug '15, 15:38) stephan75

The question has been closed for the following reason "The question is answered, right answer was accepted" by Rajavelu_M 31 Aug '15, 07:10


Are you using the leaflet/mapbox javascript library or openlayers?

I think this may be a limitation of the map library. The reason for the multiple maps is because the view is zoomed out loads. To us it would make more sense for blue sea to be displayed left and right of the map (although this would wrongly make the seas represented as very vast), the reason it doesn't do this is because when you pan left or right you need the world to "loop" round (as it does in real life). The copy of the world is displayed to the left (hidden off-screen when you have zoomed in) so that you can pan round to the left.

You could fix it by setting the initial zoom level to be more zoomed in, or change the size of your html div to be a shape that fits the world better.

permanent link

answered 17 Jul '15, 14:55

LivingWithDragons's gravatar image

LivingWithDr...
5244616
accept rate: 4%

Looks like Leaflet to me. If it's a "bug" is it perhaps with the earth because it is round not flat? Not sure where the github registry is for that :)

(17 Jul '15, 15:09) SomeoneElse ♦

Thanks to all,

Our data will shown in all replicated maps, if we set "worldCopyJump" as 'true' in map options. Refer: http://leafletjs.com/reference.html#map-worldcopyjump

permanent link

answered 31 Aug '15, 07:07

Rajavelu_M's gravatar image

Rajavelu_M
253454858
accept rate: 33%

edited 31 Aug '15, 07:07

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:

×362
×99
×98
×29
×11

question asked: 15 Jul '15, 16:18

question was seen: 7,658 times

last updated: 31 Aug '15, 08:16

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