# Marker not displaying on map using unfolding library

**URL:** https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240
**Category:** Libraries
**Created:** [December 8, 2019, 4:58am UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240 "2019-12-08T04:58:57Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 8, 2019, 4:58am UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/1 "2019-12-08T04:58:57Z")

</div>

code:-

```auto
import de.fhpotsdam.unfolding. <em>;
import de.fhpotsdam.unfolding.geo.</em> ;
import de.fhpotsdam.unfolding.utils.*;
import de.fhpotsdam.unfolding.providers.Microsoft;

import de.fhpotsdam.unfolding.marker.*;

UnfoldingMap map;

void setup() {
size(800, 600);
map = new UnfoldingMap(this,new Microsoft.AerialProvider());
MapUtils.createDefaultEventDispatcher(this);
}

void draw() {
map.draw();
Location berlinLocation = new Location(52.5, 13.4);
SimplePointMarker berlinMarker = new SimplePointMarker(berlinLocation);
map.addMarkers(berlinMarker);

}

```

output on terminal:-

Unfolding Map v0.9.6  
No OpenGL renderer. Using Java2DMapDisplay.

output:-

 ![ma.PNG](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/27fe9a7848d076c4ae855c40af6cdfbf5f0be285.jpeg)

---

<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: [December 8, 2019, 5:19am UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/2 "2019-12-08T05:19:59Z")

</div>

Try printing out berlinMarker.getScreenPosition(map) to check wether the marker is within the screen dimensions.

---

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 8, 2019, 7:46am UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/3 "2019-12-08T07:46:43Z")

</div>

still nothing been displayed on the map

---

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 8, 2019, 7:51am UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/4 "2019-12-08T07:51:10Z")

</div>

and the position showing is [429.0, 168.0, 0.0]

---

<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: [December 8, 2019, 4:09pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/5 "2019-12-08T16:09:52Z")

</div>

Hmm… as far as i know, that Code shouldn‘t have any problems… except for the missing \* in the first 2 imports, and the second import being _like this_

Maybe @tnagel knows more 😅

---

<div class="post-metadata">

### Author: ![tnagel](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@tnagel](https://discourse.processing.org/u/tnagel)
#### Post date: [December 8, 2019, 5:03pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/6 "2019-12-08T17:03:16Z")

</div>

This is a known bug (see [https://github.com/tillnagel/unfolding/issues/118](https://github.com/tillnagel/unfolding/issues/118)). Please use

`size(800, 600, P2D);`

as work-around.

---

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 8, 2019, 6:36pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/7 "2019-12-08T18:36:28Z")

</div>

Error while using P2D in size()

Error:-

Java.lang.runtimeException: Java.lang.NoSuchFieldError: quality

Code in the image

 ![IMG_20191209_000143.jpg](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/e/e0248dd5df1773b5810aa4bffed41434e0a73b6e.jpeg)

---

<div class="post-metadata">

### Author: ![unique\_username](https://avatars.discourse-cdn.com/v4/letter/u/a88e57/32.png) [@unique\_username](https://discourse.processing.org/u/unique_username)
#### Post date: [December 8, 2019, 6:49pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/8 "2019-12-08T18:49:44Z")

</div>

I suggest using the original code but putting  
map.draw();  
after  
map.addMarkers(berlinMarker);  
,so the code would look like this;

```auto
import de.fhpotsdam.unfolding. ;
import de.fhpotsdam.unfolding.geo. ;
import de.fhpotsdam.unfolding.utils.*;
import de.fhpotsdam.unfolding.providers.Microsoft;
import de.fhpotsdam.unfolding.marker.*;
UnfoldingMap map;
void setup() {
size(800, 600);
map = new UnfoldingMap(this,new Microsoft.AerialProvider());
MapUtils.createDefaultEventDispatcher(this);
}
void draw() {
Location berlinLocation = new Location(52.5, 13.4);
SimplePointMarker berlinMarker = new SimplePointMarker(berlinLocation);
map.addMarkers(berlinMarker);
map.draw();
}

```

not sure if this would work or not, just thinking that you should add the marker to the map data before displaying it.

---

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 8, 2019, 7:08pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/9 "2019-12-08T19:08:51Z")

</div>

No, it did not make any difference

---

<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: [December 8, 2019, 9:09pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/10 "2019-12-08T21:09:18Z")

</div>

That‘s probably not gonna help, but please add the marker in setup. You‘re currently adding a marker each frame… that might cause some problems.

---

<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: [December 8, 2019, 9:11pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/11 "2019-12-08T21:11:37Z")

</div>

Are you sure you didn‘t mean P3D? I‘ve seen another post where it was fixed with P3D, though i‘m not sure if it was the same problem.

---

<div class="post-metadata">

### Author: ![tnagel](https://avatars.discourse-cdn.com/v4/letter/t/b5ac83/32.png) [@tnagel](https://discourse.processing.org/u/tnagel)
#### Post date: [December 8, 2019, 9:54pm UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/12 "2019-12-08T21:54:39Z")

</div>

Please use the newest Unfolding beta at [http://services.informatik.hs-mannheim.de/~nagel/GDV/Unfolding\_for\_processing\_0.9.92.zip](http://services.informatik.hs-mannheim.de/~nagel/GDV/Unfolding_for_processing_0.9.92.zip)

---

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 9, 2019, 6:05am UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/13 "2019-12-09T06:05:57Z")

</div>

Thanks guys…it worked finally with P3D for me

---

<div class="post-metadata">

### Author: ![iamgsshetty](https://avatars.discourse-cdn.com/v4/letter/i/ecae2f/32.png) [@iamgsshetty](https://discourse.processing.org/u/iamgsshetty)
#### Post date: [December 9, 2019, 6:45am UTC](https://discourse.processing.org/t/marker-not-displaying-on-map-using-unfolding-library/16240/14 "2019-12-09T06:45:45Z")

</div>

does removeMarker and clearMarker does not exist because its showing error while I am using it. Although this command exists I unfoldingmap api page under manage marker
