This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

[closed] How to center the map background on a specific area in OpenLayers

0

Hi,

I have search but nothing find until now. I search a solution to have the worldmap centering on a specific longitude. I need to represent some links between U.S.A and Asia as well U.S.A and Europe. Today, my links between U.S.A and Asia cross Europe/Africa. It's not very nice .

I have my own server with openstreetMap installed on it.

Is there any solution to do that?

Thanks a lot for all answers or ideas.

asked 31 May '13, 15:16

dconradfr's gravatar image

dconradfr
11112
accept rate: 0%

closed 03 Jun '13, 21:47

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273

The question has been closed for the following reason “Question is off-topic or not relevant” by Frederik Ramm 03 Jun ‘13, 21:47


One Answer:

3

Read the OpenLayers API docs. You're looking for setCenter.

This is not an OpenLayers help forum - they have their own support channels.

answered 03 Jun '13, 20:10

mcw's gravatar image

mcw
41677
accept rate: 6%

Source code available on GitHub .