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

Hi!

I'm Gabriel, an Argentinian programmer (please excuse my english).

I'm using the service published on http://ojw.dev.openstreetmap.org/ to get maps for an application, on regular time intervals. From some days i've been detecting some errors in my log when loading the image data, on a .NET component designed to such end. These errors are related to the info on the downloaded stream (the image). After some hours of debugging, i've noticed that if i call this url:

http://ojw.dev.openstreetmap.org/StaticMap/?lat=-38.033819065207&lon=-57.570014370957&z=15&mlat0=-38.033819065207&mlon0=-57.570014370957&layer=mapnik&w=350&h=250&filter=grey&show=1

... i've got an incorrect response, in terms of image data. If I change the zoom parameter (the z=15 part of the url) from 15 to 16, the service works as expected.

After looking the raw data of the image in an hex editor, i've notice this error at the firsts lines of the stream:

Warning: imagecreatefrompng(): '../../data/tiles/mapnik151114420132.png' is not a valid PNG file in /home/ojw/publichtml/StaticMap/map.php.inc on line 49

If i remove this bytes from the stream, i got a "correct" image data. When open it from a image browser, the image appears correct but with a grey block at the lower right part of it.

What can i do to fix it?

Thanks in advance!

This question is marked "community wiki".

asked 11 Sep '13, 18:54

Kaleb's gravatar image

Kaleb
1112
accept rate: 0%


This (and indeed anything on dev.openstreetmap.org) is not a production service. Our dev machines are predominantly provided to help developers of OSM mapping software, rather than offering APIs to third-party clients. In particular, 'static map APIs' such as this have often caused very high load on the dev machines and have had to be shut down.

I'd recommend instead that you use the MapQuest Open Static Maps API. These maps are made from OSM data just the same, but are likely to offer a more reliable service. Make sure to read MapQuest Open's terms of service and any attribution requirements before deploying it.

permanent link

answered 11 Sep '13, 20:15

Richard's gravatar image

Richard ♦
30.9k44279412
accept rate: 18%

Also take a look at static map images in the wiki for alternative solutions, such as Bigmap. And please make sure to read the tile usage policy first.

(28 Dec '14, 22:15) scai ♦
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:

×535
×293
×60
×33

question asked: 11 Sep '13, 18:54

question was seen: 11,394 times

last updated: 28 Dec '14, 22:22

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