Giter Club home page Giter Club logo

lookaround-map's Introduction

lookaround-map

lookaround-map is a web app for viewing Apple Look Around panoramas on any platform, using reverse-engineered requests to Apple's internal Maps API.

Please don't make automated requests against prod. Check if my Python library streetlevel satisfies your usecase, and if not, set up a local instance of the server to make requests against instead.

Features

  • View panoramas in any modern browser, on any device
  • Custom blue line layer which displays the full extent of the coverage at all zoom levels
  • See the exact positions of panoramas at z >= 16
  • Color or filter the coverage layers by type or date
  • View metadata Apple Maps doesn't show you: panorama ID, elevation, full capture date and time
  • Save a screenshot of the viewport
  • Open the current view in Apple Maps or Google Street View

Embedding

The panorama viewer can be embedded into another web page. Check out the sample code here.

Setup

git clone https://github.com/sk-zk/lookaround-map.git --recursive
cd lookaround-map
pip install -r requirements.txt
npm i --global rollup
npm i
rollup -c
flask run

Decoding

For browsers which don't natively support HEIC (which is every browser except Safari 17 or higher), the panorama faces must be converted to a supported format before sending them to the client. To do so, one of these three libraries can be used. Simply install the one you like and it will be selected automatically.

#1: By default, pillow-heif will be used to decode images. Supports Linux, Mac and Windows.

#2: pyheif used to be faster than pillow-heif and is supported for this reason. Supports Linux and Mac.

#3: However, the fastest option (that I'm aware of) is my own heic2rgb, which is noticeably faster than the previous two. Supports Linux and Windows. heic2rgb can also remux the HEVC bitstream of the image to MP4 for browsers which don't support HEIC, but do support HEVC.

TODO

  • Decode the official blue line layer
    • Not hugely important because I've got my own, but it would be nice as fallback and for whenever an update drops
    • Out of all the network requests that happen when you tap the Look Around button, the most likely candidate for containing that information is style 53 at z=15 specifically.
    • Vector tiles are in Apple's custom VMP4 format. The general structure of the format has been decoded, but the actual content of the individual sections has not, and a quick glance at Ghidra's decompiler output for the parsing functions makes me put this one in the "let's get back to this in another year or two" category.
  • Decode the mesh, render it, and use it to improve movement etc.
    • There are three types of pano data Apple Maps will request. One is /t/<face>/<zoom>, which returns the pano faces as HEIC, but there are two others: /m/<zoom> and /mt/7, in a custom container format starting with the magic string MCP4. These files contain the mesh, compressed with Edgebreaker. I can decode the CLERS string, but I have not yet been able to make sense of how vertices are encoded in this format.
  • Add PoIs
    • Everyone's least favorite feature, but it makes sense to add it for completion's sake.

Credits

This app uses icons by eva-icons, boxicons and Liz Bravo.

lookaround-map's People

Contributors

apfeloxid avatar shmugoh avatar sk-zk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lookaround-map's Issues

Are panorama images streamed or served locally?

For the panorama images, can I serve them from my own server / S3 bucket or are they all live streamed from the Apple Maps API and proxied through my own server? Does provisioning servers closer to users make any difference in pano transitions?

"The panorama can't be loaded" when embedded inside app browser

Hi,

Everything is working fine in iOS Safari but when I embed the page inside Capacitor, I get the following error:
"The panorama can't be loaded"

Do you have any idea what would the reason or error that's causing this issue? Is it something to do with Three JS or the canvas element? I have a Three JS app inside Capacitor and didn't have any problems.

Go to pano using address

If I have only an address e.g: "Keplerstraße 7, 70174 Stuttgart, Germany" and no exact coordinates, is it possible to go to the pano or nearest available pano directly (If the there is no available pano in the original address)?

I have a dynamic list of addresses that I need to get into lookaround mode directly, but the problem is that I can't verify which address has an available panos and which ones don't.

Ability to move forward without clicking?

Is there any way to move forward without relying on mouse clicks? e.g if I need to make a transition forward in look around mode but this gets called from some function instead of user click.

Incorrect panorama aspect ratio on Android

When viewing panoramas in Chrome on Android, it seems that the image aspect ratios are incorrect. I've attached screenshots showing the cars appearing very squished. Is there a parameter that needs to be modified within the viewer.js to fix this?

Screenshot_2024-05-08-21-01-35-74_40deb401b9ffe8e1df2f1cc5ba480b12
Screenshot_2024-05-08-21-01-48-93_40deb401b9ffe8e1df2f1cc5ba480b12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.