Skip to content

Dev proxy cache #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 9, 2015
Merged

Dev proxy cache #383

merged 4 commits into from
Nov 9, 2015

Conversation

hjanetzek
Copy link
Member

Just a super simple tile cache for development for offline work and (at least for me) much faster load time for the initial view

  • Add to Readme

@matteblair
Copy link
Member

Nice! This will come in handy when I'm on bus trips too.

Can't quite get it to work on OS X though. I started the python server and then ran tangram with my source url set to http://localhost:8000/vector.mapzen.com/osm/all/{z}/{x}/{y}.mvt and tiles were loading, but nothing was written in the .tiles folder.

I would test on Ubuntu but the latest OS X update removed my GRUB config :\

@tallytalwar
Copy link
Member

Good to know about GRUB config. Will update cautiously or do some hacking
around before I upgrade to El Capitan..
On Nov 6, 2015 5:33 PM, "Matt Blair" [email protected] wrote:

Nice! This will come in handy when I'm on bus trips too.

Can't quite get it to work on OS X though. I started the python server and
then ran tangram with my source url set to
http://localhost:8000/vector.mapzen.com/osm/all/{z}/{x}/{y}.mvt and tiles
were loading, but nothing was written in the .tiles folder.

I would test on Ubuntu but the latest OS X update removed my GRUB config :\


Reply to this email directly or view it on GitHub
#383 (comment).

- change scene url to
  http://localhost:8000/vector.mapzen.com/osm/all/{z}/{x}/{y}.mvt
- run 'python proxy.py'
- delete .tiles to clear the cache
@hjanetzek
Copy link
Member Author

Not sure what may be go wrong there. My python is a bit rusty though. Could you try again with the updates?

@matteblair
Copy link
Member

I think the problem here is that the NSURL library we use on OS X now (as of 10.11) blocks cleartext HTTP loading unless you make a security exception for it - and the proxy server doesn't seem to work with HTTPS. I'll see if there's an easy fix, if not I'll just merge this as-is.

@matteblair
Copy link
Member

I think the only way to make this work on OS X is to add

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

To our Info.plist. As documented here, this key is really only intended for debugging purposes. There isn't much harm in enabling this on our desktop demo app since it's not a real end-product, though it may end up masking networking issues that we'll encounter when running on iOS (without this flag).

matteblair added a commit that referenced this pull request Nov 9, 2015
@matteblair matteblair merged commit 031de46 into master Nov 9, 2015
@matteblair matteblair deleted the dev-proxy-cache branch November 9, 2015 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants