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

See the snapshot below. I am able to click markers on this map and I can also display the lat longs on it.

But I just can't see the map!

alt text


The code is here. This function gets called first.

function displayMapAndClick ()
{
    map = L.map ('map', 
    {
        dragging: true,
    }).setView([51.505, -0.09], 13, true);

    L.tileLayer('http://{s}.tile.cloudmade.com/API-key/997/256/{z}/{x}/{y}.png', 
    {
        attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>',
        maxZoom: 13,
        styleId: 997
    }).addTo(map);

    selectCenterPoint ();
}

The Qt's code which accesses the open street map url is:

void Map::geoCode (QString local)
{
    clearCoordinates ();

    QString url = "http://openstreetmap.org/";
    manager->get (QNetworkRequest (QUrl (url)));
    ++pendingRequests;
}

asked 10 Oct '12, 06:20

Anisha%20Kaul's gravatar image

Anisha Kaul
293410
accept rate: 0%

closed 15 Apr '13, 23:26

Jonathan%20Bennett's gravatar image

Jonathan Ben...
8.3k1785108

The question has been closed for the following reason "The question is answered, right answer was accepted" by Jonathan Bennett 15 Apr '13, 23:26


Did you replace API-key in the CloudMade tile URL?

permanent link

answered 10 Oct '12, 06:41

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

@scai No, do I have to replace it? Sorry, didn't know about it. From where do we get a separate key?

(10 Oct '12, 06:44) Anisha Kaul
2

@Anisha-Kaul Yes I think so, seems like you just have to register to get a free API key.

(10 Oct '12, 07:28) scai ♦

@scai Ok, I''l try that and folow up soon. :)

(10 Oct '12, 07:31) Anisha Kaul

@scai I registered at CloudMade, and got the key. but this didn't help in anything. The map isn't yet displayed.

(10 Oct '12, 08:07) Anisha Kaul

Can you use a tool like Wireshark to see which tile URL it tries to open and to check whether this URL is valid?

(10 Oct '12, 08:12) scai ♦
2

@scai I again restarted the application, and this time the map did get displayed. The key has done the trick I think. Please put your comment as an answer and I'll select it. Thanks,.

(10 Oct '12, 08:23) Anisha Kaul
showing 5 of 6 show 1 more comments

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
×74
×9

question asked: 10 Oct '12, 06:20

question was seen: 5,692 times

last updated: 15 Apr '13, 23:26

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