# How does map.draw() function in Unfolding Map work?

**URL:** <https://discourse.processing.org/t/how-does-map-draw-function-in-unfolding-map-work/9125>\
**Category:** Beginners\
**Created:** [March 8, 2019, 9:55pm UTC](https://discourse.processing.org/t/how-does-map-draw-function-in-unfolding-map-work/9125 "2019-03-08T21:55:31Z")\
**Posts on this page:** 2\
**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:** [March 8, 2019, 9:55pm UTC](https://discourse.processing.org/t/how-does-map-draw-function-in-unfolding-map-work/9125/1 "2019-03-08T21:55:32Z")

</div>

Hi, I was trying to search information about this map.draw() function, but I did not find anything about this at all. Could anyone kindly let me know the purpose of this function or point to some links/references?

The following is a part of the code.

```auto
void draw( ) {
        if (frameCount < totalFrames) {
           map.draw(); // what it this? 
           noStroke();
           fill(0, screenfillalpha);
           rect(0,0,width,height);
        }
} 

```

Many thanks for your time and attention.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 9, 2019, 12:09am UTC](https://discourse.processing.org/t/how-does-map-draw-function-in-unfolding-map-work/9125/2 "2019-03-09T00:09:14Z")

</div>

-a- out of context it could not be understood.  
the minimum to get this working is:

```auto
/* An application with a basic map.*/

import de.fhpotsdam.unfolding.*;
UnfoldingMap map;

void setup() {
  size(800, 600, P2D);
  map = new UnfoldingMap(this);
}

void draw() {
  map.draw();
}

```

-b- in words: you call  
the draw() method of the ( “map” what is of ) class “UnfoldingMap”

-c- in all provided examples it is used same

-d- did you look at the documentation?

- 
  - Processing IDE / Help / Libraries Reference / Unfolding Maps /

- 
  - or just use filemanager  
… /libraries/Unfolding/reference/index.html

find  
Map draw

> draw  
> public void draw()  
> Updates and draws the map. The main method to display this UnfoldingMap.

there is no more ( like no parameter… if you ask that?)

but possibly you ask about other methods:

> #### getLocationFromScreenPosition
> 
> @Deprecated

> #### getLocation
> 
> public [Location] getLocation([ScreenPosition] screenPosition)  
> Converts a position on the screen to a geographic location.  
> Parameters:  
> `screenPosition` - The position in screen coordinates.  
> Returns:  
> The geographic location with latitude and longitude.
