# How to put a marker at a specific position using unfolding map?

**URL:** <https://discourse.processing.org/t/how-to-put-a-marker-at-a-specific-position-using-unfolding-map/15765>\
**Category:** Libraries\
**Created:** [November 24, 2019, 12:16pm UTC](https://discourse.processing.org/t/how-to-put-a-marker-at-a-specific-position-using-unfolding-map/15765 "2019-11-24T12:16:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkxxbdm](https://avatars.discourse-cdn.com/v4/letter/k/b5a626/32.png) [@kkxxbdm](https://discourse.processing.org/u/kkxxbdm)\
**Post date:** [November 24, 2019, 12:16pm UTC](https://discourse.processing.org/t/how-to-put-a-marker-at-a-specific-position-using-unfolding-map/15765/1 "2019-11-24T12:16:07Z")

</div>

```auto
Location center = new Location(64, 20);
Integer zoom_start = 9;  

AbstractMapProvider provider5;
UnfoldingMap map;
String provider5Attrib;
String attrib;
Float attribWidth;
PImage clock;
PImage calendar;
int totalFrames = 3600;
Integer screenfillalpha = 120;
import de.fhpotsdam.unfolding.*;
import de.fhpotsdam.unfolding.core.*;
import de.fhpotsdam.unfolding.data.*;
import de.fhpotsdam.unfolding.events.*;
import de.fhpotsdam.unfolding.geo.*;
import de.fhpotsdam.unfolding.interactions.*;
import de.fhpotsdam.unfolding.mapdisplay.*;
import de.fhpotsdam.unfolding.mapdisplay.shaders.*;
import de.fhpotsdam.unfolding.marker.*;
import de.fhpotsdam.unfolding.providers.*;
import de.fhpotsdam.unfolding.texture.*;
import de.fhpotsdam.unfolding.tiles.*;
import de.fhpotsdam.unfolding.ui.*;
import de.fhpotsdam.unfolding.utils.*;
import de.fhpotsdam.utils.*;

// Import some Java utilities
import java.util.Date;
import java.text.SimpleDateFormat;

void setup(){
  size(1000,1000,P2D);
  provider5 = new OpenStreetMap.OpenStreetMapProvider();
  provider5Attrib = "OpenStreetMap";
  smooth();
  
  map = new UnfoldingMap(this,provider5);
  MapUtils.createDefaultEventDispatcher(this,map);
  
  attrib = "© Prehosp Care | Unfolding Maps | Basemap by " + provider5Attrib;
  attribWidth = textWidth(attrib);
  
  map.zoomAndPanTo(zoom_start, center);
  clock = loadImage("clock_icon.png");
  clock.resize(0, 10);
  calendar = loadImage("calendar_icon.png");
  calendar.resize(0, 10);
} 

void draw(){
  if (frameCount < totalFrames) {
    map.draw();
    noStroke();
    fill(0, screenfillalpha);
    rect(0, 0, width, height);
  } 
  
}

```

I was trying to put the clock and calendar images at specific locations and it did not work, because some kind of java errors…

```auto
at processing.core.PApplet.loadBytes(PApplet.java:7353)
	at processing.core.PApplet.loadImage(PApplet.java:5559)
	at de.fhpotsdam.unfolding.tiles.TileLoader.getTileFromUrl(Unknown Source)
	at de.fhpotsdam.unfolding.tiles.TileLoader.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://tile.openstreetmap.org/9/286/138.png
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
	at processing.core.PApplet.loadBytes(PApplet.java:7345)
	... 4 more

```

Any comments are greatly appreciated.

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [November 24, 2019, 12:32pm UTC](https://discourse.processing.org/t/how-to-put-a-marker-at-a-specific-position-using-unfolding-map/15765/2 "2019-11-24T12:32:55Z")

</div>

If you encounter such problems, start by commenting out the most like causes for those errors until you find the exact line that causes the first problem. Especially when you use 3rd-Party libraries.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [November 25, 2019, 10:17pm UTC](https://discourse.processing.org/t/how-to-put-a-marker-at-a-specific-position-using-unfolding-map/15765/3 "2019-11-25T22:17:37Z")

</div>

> [@kkxxbdm](#):
>
> Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: [http://tile.openstreetmap.org/9/286/138.png](http://tile.openstreetmap.org/9/286/138.png)

My first advice would be to carefully read the errors, even if they seem over-detailed: You have a 403 (Forbidden) URL. Why are you connecting to that URL? If the URL is correct, what would you need to do for the connection to be allowed? For example, do you need credentials such as an API key?

---

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [November 25, 2019, 11:10pm UTC](https://discourse.processing.org/t/how-to-put-a-marker-at-a-specific-position-using-unfolding-map/15765/4 "2019-11-25T23:10:13Z")

</div>

@jeremydouglass This is a duplicate. Edited Code/question is here :

[Creating a simple map using a given map provider does not work in unfolding map](https://discourse.processing.org/t/creating-a-simple-map-using-a-given-map-provider-does-not-work-in-unfolding-map/15771)

(The url is set by the openstreetmap class and can‘t be changed)
