TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Pigeon Maps – Maps in React with no external dependencies

310 pointsby mariusandraover 6 years ago

20 comments

ramshankerover 6 years ago
That was like Running maps locally. My first guess was it must be serving from some super local cdn cache. So tried looking for the data serving domain. It feels even more awesome after looking at latency number.<p>This is loading all data from maps.wikimedia.org.<p>Tracing route to maps.wikimedia.org [103.102.166.240] over a maximum of 30 hops:<p><pre><code> 1 &lt;1 ms 3 ms 2 ms 192.168.1.1 2 7 ms 6 ms 6 ms abts-north-static-076.220.160.122.airtelbroadband.in [122.160.220.76] 3 8 ms 5 ms 9 ms 125.17.2.173 4 7 ms 10 ms 6 ms 182.79.181.72 5 51 ms 51 ms 65 ms 182.79.149.237 6 47 ms 50 ms 47 ms 182.79.198.2 7 73 ms 73 ms 72 ms 182.79.224.181 8 73 ms 73 ms 72 ms 14907.sgw.equinix.com [27.111.228.186] 9 79 ms 79 ms 93 ms upload-lb.eqsin.wikimedia.org [103.102.166.240] </code></pre> Now Google Maps seems to be serving all data from root domain www.google.co.in. So here we go.<p>Tracing route to www.google.co.in [172.217.167.35] over a maximum of 30 hops:<p><pre><code> 1 &lt;1 ms 1 ms 1 ms 192.168.1.1 2 8 ms 5 ms 6 ms abts-north-static-076.220.160.122.airtelbroadband.in [122.160.220.76] 3 6 ms 6 ms 5 ms 125.18.20.57 4 10 ms 7 ms 6 ms 72.14.205.93 5 42 ms 44 ms 42 ms 108.170.251.113 6 8 ms 7 ms 14 ms 72.14.234.117 7 8 ms 7 ms 7 ms del03s16-in-f3.1e100.net [172.217.167.35] </code></pre> So even after getting additional latency penalty of ~60ms, it still feels snappier! Imaging it could be even more faster with local CDN nodes. 60ms = ~3 Frames on 60Hz Monitor refresh rate.
评论 #17956078 未加载
neurotraceover 6 years ago
I just want to express how snappy this feels. It really does feel so much faster than other solutions. Good work!
评论 #17952743 未加载
arayhover 6 years ago
Personally, I&#x27;ve been really annoyed with the slow, unresponsive Google Maps on my phone when my reception gets a little bad. I&#x27;d definitely like to try comparing this against Google Maps with the same poor connection (packet loss). The 25kb compared to 200kb for Google Maps makes a huge difference! Actual rendering speed seems a lot faster as well, which is another huge plus on my dated smartphone.
评论 #17956335 未加载
评论 #17957297 未加载
评论 #17956639 未加载
russx2over 6 years ago
What are the cost implications for using this (in terms of the backend maps providers)? I looked at MapBox&#x27;s pricing, for example. Does that still apply when using this? Presumably so but I find the distinctions a bit confusing in the JS maps world.
throwaway2016aover 6 years ago
This looks like really great work.<p>Completely unrelated and irrelevant observation though... I found the use of buttons to mimic checkboxes feels a bit odd to me.<p>Also, Github repo link for those who want to see the source or star it, since there is no link on the demo right now: <a href="https:&#x2F;&#x2F;github.com&#x2F;mariusandra&#x2F;pigeon-maps" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mariusandra&#x2F;pigeon-maps</a>
评论 #17953026 未加载
ben-schaafover 6 years ago
A lot of people seem to be saying this is incredibly fast, but for me it loads only about as fast as android Google maps and the pinch-zoom&#x2F;pan are incredibly choppy with massive input lag.
评论 #17955846 未加载
ex3ndrover 6 years ago
How is it even possible to be that fast? What&#x27;s the secret sauce?
bobwaycottover 6 years ago
Isn’t React an external dependency with a host of dependencies of its own needed to build? Or does this mean it only depends on React and nothing else?
dsegoover 6 years ago
Kudos, like leaflet for react! Does it support vector tiles?
评论 #17953212 未加载
pmlamotteover 6 years ago
How did I miss this a week ago? Looks great!<p>I recently whipped up a quick hobby project where I&#x27;m displaying a map on an old kindle by running wkhtmltoimage on a server and displaying the png. It&#x27;s got a giant delay in responding with a lot of it due to Mapbox initialization time.
polskibusover 6 years ago
Does anyone know if it is ok to deploy tiles used by this library inside intranet, in sites without internet access? If so, what is the recommended way of doing it?
评论 #17956472 未加载
dawnerdover 6 years ago
It was super smooth at first but really slowed down after moving the map, to the point where I had to force close the tab.
detaroover 6 years ago
Very quick, but the demo isn&#x27;t showing attribution for at least some of the map tiles correctly.
评论 #17953203 未加载
pspeter3over 6 years ago
Is there a description about how you built this?
评论 #17953060 未加载
gammateamover 6 years ago
nice, this is one of those things you clone immediately<p>speaking of which, why do people debate about whether forks on github are persistent even when the author removes their copy, when you can always clone either way, since that keeps a copy on your system and you still have the code
iamleppertover 6 years ago
There’s not much point to use react for something like this. If you know the map canvas size and tile size of your tiles, you simply need to initialize that many images in your container. That only ever changes when the map canvas size changes or the tile size changes. Pans and zooms of the map only change the src of the images at that point.
评论 #17955105 未加载
评论 #17955306 未加载
kronaover 6 years ago
I noticed this also supports Inferno. To the author: what&#x27;s your preference?
评论 #17953720 未加载
mezodover 6 years ago
first impression was epic but there&#x27;s something wobbly with the interaction or is it just me? sometimes scrolling goes to hell and same for panning
评论 #17955657 未加载
jgalentine007over 6 years ago
Seems really lightweight and fast!
bushikoover 6 years ago
Wow, this is fast!