# Creating a simple map using a given map provider does not work in unfolding map

**URL:** <https://discourse.processing.org/t/creating-a-simple-map-using-a-given-map-provider-does-not-work-in-unfolding-map/15771>\
**Category:** Libraries\
**Created:** [November 24, 2019, 2:39pm UTC](https://discourse.processing.org/t/creating-a-simple-map-using-a-given-map-provider-does-not-work-in-unfolding-map/15771 "2019-11-24T14:39:36Z")\
**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, 2:39pm UTC](https://discourse.processing.org/t/creating-a-simple-map-using-a-given-map-provider-does-not-work-in-unfolding-map/15771/1 "2019-11-24T14:39:36Z")

</div>

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

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;

UnfoldingMap map;

AbstractMapProvider provider5;
void setup() {
  size(800, 600, P2D);
  smooth();
  provider5 = new OpenStreetMap.OpenStreetMapProvider();
  map = new UnfoldingMap(this,provider5);
}

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

```

For the above code, the map does not show up and only to get some error messages. On the other hand, if I delete provider5, then it works. Could anyone let me know how to fix it?

---

<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, 3:07pm UTC](https://discourse.processing.org/t/creating-a-simple-map-using-a-given-map-provider-does-not-work-in-unfolding-map/15771/2 "2019-11-24T15:07:29Z")

</div>

I also tried the following, and it does not work either.

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

int totalFrames = 3600;
Location center = new Location(62,10);
Integer zoom_start = 9;

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;

UnfoldingMap map;
AbstractMapProvider provideru;
String provideruAttrib;
String attrib;
Float attribWidth;

void setup() {
  size(1000, 1000, P3D);
  smooth();
  provideruAttrib = "Google Maps";
  provideru = new Google.GoogleMapProvider();
  map = new UnfoldingMap(this,provideru);
  MapUtils.createDefaultEventDispatcher(this, map);
  
  map.zoomAndPanTo(zoom_start, center);
}

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

```

---

<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, 3:13pm UTC](https://discourse.processing.org/t/creating-a-simple-map-using-a-given-map-provider-does-not-work-in-unfolding-map/15771/3 "2019-11-24T15:13:08Z")

</div>

The problem is that for some reason the access to the providers you give is not working. As for why… i tried going through the whole Code on Github, but the only thing that should happen is to use the mercatoProjection with a specified location… so i don‘t even see where the url would even be loaded…

All i can tell you, is to try and use different Providers and see if others work… or not set a provider for now and only add one later on, to see if maybe something else is the 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:** [November 26, 2019, 6:53am UTC](https://discourse.processing.org/t/creating-a-simple-map-using-a-given-map-provider-does-not-work-in-unfolding-map/15771/4 "2019-11-26T06:53:22Z")

</div>

Yes, this should work.

Which version of Unfolding Maps are you using? What are the error messages you are getting?
