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

Hi I am making an android app which uses an OpenStreetMap. I have my own tile server which serves the street map.

When I tell the app to centre on a specifc area on the map by passing in the coordinates as a GeoPoint, it centres somewhere around Africa when it should centre on Edinburgh.

Here is the code:

// osm map view 
MapView osmMap;

public void onCreate(Bundle savedInstanceState) {

    osmMap = (MapView) findViewById(;

    // Create custom map source pointing to Tile Server
    XYTileSource myMapSource = new XYTileSource("myMap", null, 0, 16, 256, ".png", Constants.LOCAL_SERVER_URL);

    // Set the source and default map coordinates/zoom

    osmMap.getController().animateTo(new GeoPoint(55.95223359877632*1e6, -3.188550710678032*1e6));

Anyone know how I can get the coorindates to align with the map correctly?


asked 29 Oct '12, 15:07

srose's gravatar image

accept rate: 0%

If your map is centering off the african coast around here:

Then your coordinates are not working correctly. that location is the 0,0 of lat/long. Do a thorough check on whether your GeoPoint is working properly

permanent link

answered 30 Oct '12, 09:34

samlarsen1's gravatar image

accept rate: 50%

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: 29 Oct '12, 15:07

question was seen: 3,932 times

last updated: 30 Oct '12, 09:34

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