# GeoSwarm : project to serve Maps with IPFS

**URL:** <https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552>\
**Category:** Ecosystem and Usage\
**Created:** [April 11, 2018, 5:55pm UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552 "2018-04-11T17:55:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/diego/32/3349_2.png) [@Diego](https://discuss.ipfs.tech/u/Diego)\
**Post date:** [April 11, 2018, 5:55pm UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/1 "2018-04-11T17:55:50Z")

</div>

Hello. I’m try to adapt openlayers to download TiledMaps via IPFS.  
I’m using js-ipfs, and my code is there [https://github.com/RDiegoSuarez/GeoSwarm-client](https://github.com/RDiegoSuarez/GeoSwarm-client)

This is a very early stage,

But i have a problem. My app doesn’t see tiles until i have downloaded them from another tab in [https://ipfs.io/ipfs/HASH/file\_path](https://ipfs.io/ipfs/HASH/file_path).

Any suggestion ?

May be there is others similar projects that i can contribute instead of developping a solution from scratch.

---

<div class="post-metadata">

**Author:** ![Diego](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/diego/32/3349_2.png) [@Diego](https://discuss.ipfs.tech/u/Diego)\
**Post date:** [April 12, 2018, 5:33am UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/2 "2018-04-12T05:33:24Z")

</div>

Hello, again. Does anybody have an an idea about my problem ?  
This is a kind of google maps using IPFS to store and get the tiles.  
But js-ipfs in the browser isn’t really working…

---

<div class="post-metadata">

**Author:** ![josselinchevalay](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/josselinchevalay/32/3078_2.png) [@josselinchevalay](https://discuss.ipfs.tech/u/josselinchevalay)\
**Post date:** [April 12, 2018, 7:01am UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/3 "2018-04-12T07:01:27Z")

</div>

hello i run your project

in log i have that :

/ipfs/QmWPvCEnSkGR8iTs6uiZSNkbupbv7sz3MV5mKW3erHYVZa/world/z0/0\_0.png  
ipfs.js:80 GOT =\> 0\_0.png

correct log or not ?

Regards

---

<div class="post-metadata">

**Author:** ![vmx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vmx/32/9772_2.png) [@vmx](https://discuss.ipfs.tech/u/vmx)\
**Post date:** [April 12, 2018, 10:49am UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/4 "2018-04-12T10:49:55Z")

</div>

I tried it locally with Firefox and I got an OpenLayers instance showing a world map the first time i opened it.

---

<div class="post-metadata">

**Author:** ![josselinchevalay](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/josselinchevalay/32/3078_2.png) [@josselinchevalay](https://discuss.ipfs.tech/u/josselinchevalay)\
**Post date:** [April 12, 2018, 12:20pm UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/5 "2018-04-12T12:20:19Z")

</div>

hi in my side i use google chrome

---

<div class="post-metadata">

**Author:** ![Diego](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/diego/32/3349_2.png) [@Diego](https://discuss.ipfs.tech/u/Diego)\
**Post date:** [April 12, 2018, 6:07pm UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/6 "2018-04-12T18:07:13Z")

</div>

Hi.  
Thank you both for your test.

Yes a map is on screen. But if you “zoom” and “move” you will see pixelization.  
That’s because openlayers is doing a “soft zoom” with previous zoom image as a basis  
But the true tile is not coming until i access it directly from [ipfs.io](http://ipfs.io)

You can debug this via the console.  
After some zoom and move, you see the request message, but no “GOT” msg.

I don’t understand why.

---

<div class="post-metadata">

**Author:** ![vmx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vmx/32/9772_2.png) [@vmx](https://discuss.ipfs.tech/u/vmx)\
**Post date:** [April 12, 2018, 7:28pm UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/7 "2018-04-12T19:28:44Z")

</div>

I’d take OpenLayers out of the equation for finding the issue. I did the following from the web console:

```
node.files.get('/ipfs/QmWPvCEnSkGR8iTs6uiZSNkbupbv7sz3MV5mKW3erHYVZa/world/z0').then((data) => { console.log('data:', data) }).catch((err) => { console.log('error:', err)})
> Promise { <state>: "pending" }
> data: Array [{…}, {…}]

node.files.get('/ipfs/QmWPvCEnSkGR8iTs6uiZSNkbupbv7sz3MV5mKW3erHYVZa/world/z1').then((data) => { console.log('data:', data) }).catch((err) => { console.log('error:', err)})
> Promise { <state>: "pending" }

```

So on `z1` the Promise was always “pending”, it never resolved or errored.

---

<div class="post-metadata">

**Author:** ![Diego](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/diego/32/3349_2.png) [@Diego](https://discuss.ipfs.tech/u/Diego)\
**Post date:** [April 13, 2018, 4:55am UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/8 "2018-04-13T04:55:28Z")

</div>

Then you open a tab, or a new browser, and go to  
[https://ipfs.io/ipfs/QmWPvCEnSkGR8iTs6uiZSNkbupbv7sz3MV5mKW3erHYVZa/world/z1](https://ipfs.io/ipfs/QmWPvCEnSkGR8iTs6uiZSNkbupbv7sz3MV5mKW3erHYVZa/world/z1)

And … magic ! The answer is coming back in your console …

A ressource is “downloadedable” by js-ipfs only if a “true” node have already seen it.

---

<div class="post-metadata">

**Author:** ![vmx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/vmx/32/9772_2.png) [@vmx](https://discuss.ipfs.tech/u/vmx)\
**Post date:** [April 16, 2018, 8:52am UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/9 "2018-04-16T08:52:15Z")

</div>

I’ve tried it again, now zooming in and out works correctly for me. I don’t know if it’s due to visiting the link above or something got fixed. Can you try it again?

---

<div class="post-metadata">

**Author:** ![Diego](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/diego/32/3349_2.png) [@Diego](https://discuss.ipfs.tech/u/Diego)\
**Post date:** [April 16, 2018, 6:49pm UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/10 "2018-04-16T18:49:08Z")

</div>

Hi.  
I’ve developed a little script that do a wget for each tiles on [ipfs.io](http://ipfs.io).  
That the only solution i’ve found for now.

May be it is because js-ipfs is not finished yet.  
For example, the DHT is not implemented.

I will release a new data soon.  
I will see if there is another way

But, thank you vmx …

---

<div class="post-metadata">

**Author:** ![hud](https://avatars.discourse-cdn.com/v4/letter/h/ce73a5/32.png) [@hud](https://discuss.ipfs.tech/u/hud)\
**Post date:** [March 16, 2021, 3:03am UTC](https://discuss.ipfs.tech/t/geoswarm-project-to-serve-maps-with-ipfs/2552/11 "2021-03-16T03:03:51Z")

</div>

@vmx @Diego was wondering if you guys are still working on this? If not, what was the obstacle?
