Replace MSFS2020's bing map to google map

Related tags

Geolocationmsfs2020
Overview

English verison here

中文

免责声明

本教程提到的方法仅用于研究和学习用途。我不对使用、拓展该教程及方法所造成的任何法律责任和损失负责。

背景

微软模拟飞行2020的地景使用了Bing的卫星地图,然而卫星地图比较老旧,很多地区都是几年前的图设置直接是没有的。这种现象在全球不同地区都有。在大陆的图更是10年前的图,有大量地区的卫星图都是没有的,微软便使用程序生成的图代替,质量非常的差。替换过后画质和细节得以明显的提升,可以见下图

原始地图

原始地图

Google地图替换后可以得到高清最新的影像

一个小城镇

一个小城镇 一个小城镇

青海湖(这些卫星图在Bing中不存在)

青海湖 青海湖 青海湖

成都

成都

香港

香港

历史及相关资料

我很早就在研究用谷歌地图替换的可能性,在网上也有油管大神提供了一些思路,使用爬虫从谷歌爬下数据然后导入到MSFS2020中。但这种方式比较复杂,不能大规模的使用。

后来我研究了下网络请求,发现MSFS会从bing的服务器上下载图片,理论上讲将图片替换成另外的图片应该是可以的。而且恰好bing和google的卫星图片的切片方式是类似的可以进行无缝切换,甚至微软还提供了转换的[源代码](https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system)(见QuadKeyToTileXY这个函数)

在不断的搜索过程中,发现了和我思路类似的例子。但他的主要目的是将一些不要的东西去掉以改善地景质量。他还建立了一个另外的仓库用来演示一个[使用代理方式替换地景的方法](https://github.com/muumimorko/MSFS2020_Proxy)。遗憾的是这个仓库缺少一些必要的东西,无法正常的运行。

IMG

原理

借鉴上面的思路,我整理出了以下的方法来实现流量截获和修改。

流程

涉及到的工具,请自行安装

实现步骤

  • (国内用户)关闭任何加速器,要不然流量不会被劫持
  • 安装Proxifier并设置代理配置(我的版本是4.0.3版本)。代理设置为mitmproxy的端口号(默认8080) proxfier
  • 按顺序 配置Proxifier的代理规则:
    • *flight*进程对应的localhost的流量发送到Direct(直连)
    • *flight*进程其他的流量发送到上面配置的代理中 proxfier
  • 修改mitm.py中的proxy_url到你能访问Google的代理
  • 在当前目录下运行run.bat启动mitmproxy mitmproxy
  • 启动模拟飞行
  • 此时proxifier就会截获流量,同时mitmproxy也会有显示流量,这些jpeg的流量就是卫星图 proxfier mitmproxy
  • 尽情享用吧

赞助

如果你已经成功的实现了,请给个star,让更多人看到! 如果你愿意给与作者一些赞助,请扫描以下二维码支持一下作者。

微信 阿里

Comments
  • LOD Tiles pretty bad around EGCC

    LOD Tiles pretty bad around EGCC

    The app is amazing, I've been using it for a while, and I love to fly 747's, however the last few days I've been flying, especially around the UK, the LOD is pretty bad.

    As you get upto 7,000ft, the tiles a few miles away seem to be autogen squares and seem to morph as you fly towards them, not sure if this problem has been reported but one way to see what I mean is start a flight from EGCC (Manchester) and you will see what I mean.

    I've tried testing from all servers and when I test the servers, it gives me a pretty good ping (0.07secs).

    Please let me know if anyone else is getting the same problem.

    bug 
    opened by Steveyram 19
  • Also stuck at

    Also stuck at "Health Check passed"

    Windows 11 installed checked my firewall is configured correctly and app is allowed I do not need proxy for Google maps Run as admin Certificate is installed correctly run your app before starting MSFS - did not work Run MSFS to main menu then started your app but do not show google maps

    Is there something else I can try?

    Verbose output:

    Exact match: Element 2: Serial Number: c9dfffaa7d7e8ef1c6bc38e6781f0fb1 Issuer: CN=mkcert DESKTOP-O2CB4QF\[email protected], OU=DESKTOP-O2CB4QF\[email protected], O=mkcert development CA NotBefore: 19/08/2021 3:01 am NotAfter: 19/11/2023 3:01 am Subject: OU=DESKTOP-O2CB4QF\[email protected], O=mkcert development certificate Non-root Certificate Cert Hash(sha1): ae4cfdbea30eaa635443b6914b3b863b52f693de

    Certificate "DESKTOP-O2CB4QF\[email protected]" already in store. CertUtil: -addstore command completed successfully. {'kh.ssl.ak.tiles.virtualearth.net': '23.45.81.145', 'khstorelive.azureedge.net': '104.212.68.106'} Overriding hosts

    • Serving Flask app 'server' (lazy loading)
    • Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
    • Debug mode: off
    • Running on all addresses. WARNING: This is a development server. Do not use it in a production deployment.
    • Running on http://192.168.50.200:8000/ (Press CTRL+C to quit) Checking mock server health 127.0.0.1 - - [13/Nov/2021 22:53:46] "GET /health HTTP/1.0" 200 - Mock server health passed Checking nginx server health Health check passed
    opened by KelvinNZ 19
  • [FIXED]: Internet disconnection after 5-10 mins

    [FIXED]: Internet disconnection after 5-10 mins

    RESOLVED:

    The issue was the addition of Pi-hole query rate-limiting by default with a recent update. The rate limit is set to allow no more than 1000 queries per 60 seconds. The limit us quickly reached using this mod. If you use a Pi-hole, to resolve it you need to edit /etc/pihole/pihole-FTL.conf and add the line RATE_LIMIT=0/0 or if already present change the values to 0/0. This fixes the issue in this case.

    Thank you for your work!

    BEFORE SUBMIT A BUG, PLEASE READ THE FAQ PAGE HERE: https://github.com/derekhe/msfs2020-google-map/wiki/FAQ

    Describe the bug Everything works great for 5 - 10 minutes the breaks my connection to the internet. All other PC's connected to the network still function normally but not mine. To restore internet I have to "ipconfig /flushdns" and unplug my network cable then plug it back in.

    To Reproduce Steps to reproduce the behavior:

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: [e.g. iOS] Windows 11
    • MOD Version [e.g. 22] 2021-11-20
    • MSFS Version, MS Store or Stream: Store

    Additional context Add any other context about the problem here.

    bug 
    opened by lazerwolf22 17
  • error message

    error message "Generate nginx file failed"

    Congratulations for the effort to develop this nice mod! After starting the run.bat file as administrator, I click "run", and receive the error message "Generate nginx file failed". It seems the mod is not loading Google Maps images. Also, I'm getting another error message in the run.dat output "dns.exeption.Timeout: The DNS operation timed out after 5.4 seconds". Any suggestions? Thanks!

    opened by viniciusbrei 14
  • [BUG] CHANGE TITLE

    [BUG] CHANGE TITLE

    Hi. I had the same problem as in issue #54 . I deleted the file and ran the batch file as Administrator. I put an exception into my Kaspersky.

    But now I get the following error:

    image

    Obviously, there is a file missing "init.py" missing. Error is "No module named "python_hosts.hosts"

    Any idea?

    thx J.

    bug 
    opened by Juergen1967 13
  • cannot find hosts file

    cannot find hosts file

    hi im getting this error message

    FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\Windows\System32\drivers\etc\hosts

    in guessing it is because my windows is installed on H drive and not C.

    is there any way to resolve this ?

    bug 
    opened by tonygoole 12
  • [BUG] Still stuck at 'health check passed'

    [BUG] Still stuck at 'health check passed'

    when i open the mod it shows that the 'requirement is already satisfied' , and when i press RUN in mod it's just stuck at health check passed

    please help me out with this sir image image

    and please inform me if your working on it sir

    opened by lordmonish 12
  • Endless loading screens when app enabled

    Endless loading screens when app enabled

    Not sure what's causing this, but it's extremely annoying.

    if I start MSFS with the google map tool running, the initial loading screen will hang forever. In order to get to the main menu, I need to stop the tool, and only run it once the menu loads.

    if I then try to load into a flight with the tool running, it will show some activity in the command prompt window and then eventually stop. The loading screen will then proceed to hang forever.

    There are no errors, it just sits on the loading screen indefinitely.

    I'm currently trying to locally cache the area I'm wanting to fly, to see if that will improve things. At present though, I cannot get ingame with the tool running.

    opened by Jademalo 12
  • [BUG] Stuck at loading screen

    [BUG] Stuck at loading screen

    After the last update, if I start the bat file before fs 2020, I get stuck in the middle of the simulator loading. The only way to solve this is to start the simulator first and then the bat file. How can I manage to start the bat file before the simulator and not get stuck in the middle of loading? From what I understand this is the best method...

    • OS: Windows 10 64bit
    • MOD Version: v2.3.4
    • MSFS Version: Xbox App
    bug 
    opened by Angelo-1992 11
  • [BUG] doesn't work

    [BUG] doesn't work

    For me the mod doesn't work. No maps being loaded and not maps being visualized in the simulator The mod loads correctly, but don't load maps. I looked at the log files under the nginx folder and into the error.log it's showing : 2021/11/11 19:26:32 [notice] 256#5576: using the "select" event method 2021/11/11 19:26:32 [notice] 256#5576: using the "select" event method 2021/11/11 19:26:32 [notice] 256#5576: nginx/1.21.3 2021/11/11 19:26:32 [notice] 256#5576: nginx/1.21.3 2021/11/11 19:26:32 [info] 256#5576: OS: 260200 build:9200, "", suite:100, type:1 2021/11/11 19:26:32 [notice] 256#5576: start worker processes 2021/11/11 19:26:32 [notice] 256#5576: start worker processes 2021/11/11 19:26:32 [notice] 256#5576: start worker process 9296 2021/11/11 19:26:32 [notice] 256#5576: start worker process 9296 2021/11/11 19:26:32 [notice] 9296#7808: nginx/1.21.3 2021/11/11 19:26:32 [notice] 9296#7808: nginx/1.21.3 2021/11/11 19:26:32 [info] 9296#7808: OS: 260200 build:9200, "", suite:100, type:1 2021/11/11 19:26:32 [notice] 9296#7808: create thread 6052 2021/11/11 19:26:32 [notice] 9296#7808: create thread 6052 2021/11/11 19:26:32 [notice] 9296#7808: create thread 5468 2021/11/11 19:26:32 [notice] 9296#7808: create thread 5468 2021/11/11 19:26:32 [notice] 9296#7808: create thread 1924 2021/11/11 19:26:32 [notice] 9296#7808: create thread 1924 2021/11/11 19:26:44 [error] 9296#6052: *1 connect() failed (10061: Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione) while connecting to upstream, client: 127.0.0.1, server: kh.ssl.ak.tiles.virtualearth.net, request: "GET /health HTTP/1.1", upstream: "http://[::1]:8000/health", host: "kh.ssl.ak.tiles.virtualearth.net" 2021/11/11 19:26:44 [error] 9296#6052: *1 connect() failed (10061: Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione) while connecting to upstream, client: 127.0.0.1, server: kh.ssl.ak.tiles.virtualearth.net, request: "GET /health HTTP/1.1", upstream: "http://[::1]:8000/health", host: "kh.ssl.ak.tiles.virtualearth.net" 2021/11/11 19:26:44 [error] 9296#6052: *1 connect() failed (10061: Impossibile stabilire la connessione. Rifiuto persistente del computer di destinazione) while connecting to upstream, client: 127.0.0.1, server: kh.ssl.ak.tiles.virtualearth.net, request: "GET /health HTTP/1.1", upstream: "http://[::1]:8000/health", host: "kh.ssl.ak.tiles.virtualearth.net" 2021/11/11 19:26:44 [warn] 9296#6052: *1 upstream server temporarily disabled while connecting to upstream, client: 127.0.0.1, server: kh.ssl.ak.tiles.virtualearth.net, request: "GET /health HTTP/1.1", upstream: "http://[::1]:8000/health", host: "kh.ssl.ak.tiles.virtualearth.net" 2021/11/11 19:26:44 [warn] 9296#6052: *1 upstream server temporarily disabled while connecting to upstream, client: 127.0.0.1, server: kh.ssl.ak.tiles.virtualearth.net, request: "GET /health HTTP/1.1", upstream: "http://[::1]:8000/health", host: "kh.ssl.ak.tiles.virtualearth.net" 2021/11/11 19:26:44 [info] 9296#6052: *1 client 127.0.0.1 closed keepalive connection

    opened by lucamors1 11
  • Slow downloads, blurry textures

    Slow downloads, blurry textures

    Google textures download sporadically, leading to blurred textures.

    Windows 11 Home Mod 2.2.6 MSFS Steam with latest update.

    Rolling cache is deleted and turned off.

    Hosts file Hosts

    Screenshots MapMod2 MapMod3 MapMod4 MapMod5 MapModA

    bug 
    opened by MrBitsy 10
  • Run.bat only works once

    Run.bat only works once

    Hello, Thanks for the good tool!

    It works fine, but I've an issue. I can run(launch) run.bat only once. It works fine only the first time. I stop it and close normally. And when I relaunch it (eg. the next day) the command window opens and stucks on the first line : F:\MSFS_GoogleMap\Python39\python.exe src\app.py

    and nothing happen. To make it work, I have to delete the whole folder and unzip again (msfs2020-google-map-2021-12-21_s1Z2i.zip). And when I launch the new run.bat it works again once.

    Any idea why? What can I do to avoid this?

    Win10 Pro up to date Legal version of MSFS up to date MS Store. Thanks in advance for your feedbacks.

    bug 
    opened by Babar242 0
  • [BUG] Google map tool doesn't load maps

    [BUG] Google map tool doesn't load maps

    BEFORE SUBMIT A BUG, PLEASE READ THE FAQ PAGE HERE: https://github.com/derekhe/msfs2020-google-map/wiki/FAQ

    Describe the bug When I run The Msfs 2020 nothing happen, the google map tool doesn't seem to connect to the servers and doesn't load maps.

    To Reproduce Steps to reproduce the behavior: After a while, When MSFS 2020 Completing running a small windows comes up of Security Alert

    Screenshots If applicable, add screenshots to help explain your problem. security alert Capture d’écran 2021-12-22 150552

    Desktop (please complete the following information):

    • OS: Windows 11
    • MOD Version: 2.3.5
    • MSFS Version: 1.19.9.0 , MS Store or Stream: Steam

    Additional context Add any other context about the problem here.

    bug 
    opened by Muh-Develop 5
  • Run.Bat won't execute

    Run.Bat won't execute

    Hi... I have downloaded the latest version (2.3.4), extracted to my Desktop, and have selected to run the run.bat file as Administrator, however, it will not run. The path for the python.exe cannot be located. See screenshot. If I "Press any key to continue", the run.bat window only closes.

    Screenshot 2021-12-15 021225

    I previously had the program installed and it worked perfectly, but I had to restore my system to a prior date and, as a result, need to re-install now.

    Desktop (please complete the following information):

    • OS: Windows 11
    • MOD Version [e.g. 22]: Not sure what this is
    • MSFS Version, MS Store or Stream: MSFS 2020 Basic Version from MS Store

    Thank you very much for your time and guidance.

    bug 
    opened by billnltc 2
  • Bing still in cache

    Bing still in cache

    I have program working. When I zoom in on world map it looks great but when I fly it has old bing clunky maps. I changed the options data rolling cache to OFF and deleted the rolling chafe file.

    Trees are on top of a resort I went to get married.

    My city has old block houses and building.

    Still not google maps. I need help. Please share Thanks

    opened by captcrunch17 0
Releases(2.3.5)
Owner
hesicong
Senior Consultant
hesicong
Python bindings to libpostal for fast international address parsing/normalization

pypostal These are the official Python bindings to https://github.com/openvenues/libpostal, a fast statistical parser/normalizer for street addresses

openvenues 651 Dec 16, 2022
🌐 Local tile server for viewing geospatial raster files with ipyleaflet or folium

🌐 Local Tile Server for Geospatial Rasters Need to visualize a rather large (gigabytes) raster you have locally? This is for you. A Flask application

Bane Sullivan 192 Jan 04, 2023
Tool to suck data from ArcGIS Server and spit it into PostgreSQL

chupaESRI About ChupaESRI is a Python module/command line tool to extract features from ArcGIS Server map services. Name? Think "chupacabra" or "Chupa

John Reiser 34 Dec 04, 2022
Tile Map Service and OGC Tiles API for QGIS Server

Tiles API Add tiles API to QGIS Server Tiles Map Service API OGC Tiles API Tile Map Service API - TMS The TMS API provides these URLs: /tms/? to get i

3Liz 6 Dec 01, 2021
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 03, 2023
Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python

geojson-area Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python. Installation $ pip install area U

Alireza 87 Dec 14, 2022
Geodata extensions for Django REST Framework

Django-Spillway Django and Django REST Framework integration of raster and feature based geodata. Spillway builds on the immensely marvelous Django RE

Brian Galey 62 Jan 04, 2023
User friendly Rasterio plugin to read raster datasets.

rio-tiler User friendly Rasterio plugin to read raster datasets. Documentation: https://cogeotiff.github.io/rio-tiler/ Source Code: https://github.com

372 Dec 23, 2022
This GUI app was created to show the detailed information about the weather in any city selected by user

WeatherApp Content Brief description Tools Features Hotkeys How it works Screenshots Ways to improve the project Installation Brief description This G

TheBugYouCantFix 5 Dec 30, 2022
Code and coordinates for Matt's 2021 xmas tree

xmastree2021 Code and coordinates for Matt's 2021 xmas tree This repository contains the code and coordinates used for Matt's 2021 Christmas tree, as

Stand-up Maths 117 Jan 01, 2023
Processing and interpolating spatial data with a twist of machine learning

Documentation | Documentation (dev version) | Contact | Part of the Fatiando a Terra project About Verde is a Python library for processing spatial da

Fatiando a Terra 468 Dec 20, 2022
3D extension built off of shapely to make working with geospatial/trajectory data easier in python.

PyGeoShape 3D extension to shapely and pyproj to make working with geospatial/trajectory data easier in python. Getting Started Installation pip The e

Marc Brittain 5 Dec 27, 2022
Expose a GDAL file as a HTTP accessible on-the-fly COG

cogserver Expose any GDAL recognized raster file as a HTTP accessible on-the-fly COG (Cloud Optimized GeoTIFF) The on-the-fly COG file is not material

Even Rouault 73 Aug 04, 2022
WebGL2 powered geospatial visualization layers

deck.gl | Website WebGL2-powered, highly performant large-scale data visualization deck.gl is designed to simplify high-performance, WebGL-based visua

Vis.gl 10.5k Jan 08, 2023
When traveling in the backcountry during winter time, updating yourself on current and recent weather data is important to understand likely avalanche danger.

Weather Data When traveling in the backcountry during winter time, updating yourself on current and recent weather data is important to understand lik

Trevor Allen 0 Jan 02, 2022
Automated download of LANDSAT data from USGS website

LANDSAT-Download It seems USGS has changed the structure of its data, and so far, I have not been able to find the direct links to the products? Help

Olivier Hagolle 197 Dec 30, 2022
A service to auto provision devices in Aruba Central based on the Geo-IP location

Location Based Provisioning Service for Aruba Central A service to auto provision devices in Aruba Central based on the Geo-IP location Geo-IP auto pr

Will Smith 3 Mar 22, 2022
h3-js provides a JavaScript version of H3, a hexagon-based geospatial indexing system.

h3-js The h3-js library provides a pure-JavaScript version of the H3 Core Library, a hexagon-based geographic grid system. It can be used either in No

Uber Open Source 648 Jan 07, 2023
Minimum Bounding Box of Geospatial data

BBOX Problem definition: The spatial data users often are required to obtain the coordinates of the minimum bounding box of vector and raster data in

Ali Khosravi Kazazi 1 Sep 08, 2022
Deal with Bing Maps Tiles and Pixels / WGS 84 coordinates conversions, and generate grid Shapefiles

PyBingTiles This is a small toolkit in order to deal with Bing Tiles, used i.e. by Facebook for their Data for Good datasets. Install Clone this repos

Shoichi 1 Dec 08, 2021