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
Cloud Optimized GeoTIFF creation and validation plugin for rasterio

rio-cogeo Cloud Optimized GeoTIFF (COG) creation and validation plugin for Rasterio. Documentation: https://cogeotiff.github.io/rio-cogeo/ Source Code

216 Dec 31, 2022
GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.

Table of Contents What is GeoNode? Try out GeoNode Install Learn GeoNode Development Contributing Roadmap Showcase Most useful links Licensing What is

GeoNode Development Team 1.2k Dec 26, 2022
Ingest and query genomic intervals from multiple BED files

Ingest and query genomic intervals from multiple BED files.

4 May 29, 2021
Geospatial web application developed uisng earthengine, geemap, and streamlit.

geospatial-streamlit Geospatial web applications developed uisng earthengine, geemap, and streamlit. App 1 - Land Surface Temperature A simple, code-f

13 Nov 27, 2022
Python package for earth-observing satellite data processing

Satpy The Satpy package is a python library for reading and manipulating meteorological remote sensing data and writing it to various image and data f

PyTroll 882 Dec 27, 2022
pure-Python (Numpy optional) 3D coordinate conversions for geospace ecef enu eci

Python 3-D coordinate conversions Pure Python (no prerequistes beyond Python itself) 3-D geographic coordinate conversions and geodesy. API similar to

Geospace code 292 Dec 29, 2022
A compilation of several single-beam bathymetry surveys of the Caribbean

Caribbean - Single-beam bathymetry This dataset is a compilation of several single-beam bathymetry surveys of the Caribbean ocean displaying a wide ra

Fatiando a Terra Datasets 0 Jan 20, 2022
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
:earth_asia: Python Geocoder

Python Geocoder Simple and consistent geocoding library written in Python. Table of content Overview A glimpse at the API Forward Multiple results Rev

Denis 1.5k Jan 02, 2023
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
Daily social mapping project in November 2021. Maps made using PyGMT whenever possible.

Daily social mapping project in November 2021. Maps made using PyGMT whenever possible.

Wei Ji 20 Nov 24, 2022
Tools for the extraction of OpenStreetMap street network data

OSMnet Tools for the extraction of OpenStreetMap (OSM) street network data. Intended to be used in tandem with Pandana and UrbanAccess libraries to ex

Urban Data Science Toolkit 47 Sep 21, 2022
A modern, geometric typeface by @chrismsimpson (last commit @ 85fa625 Jun 9, 2020 before deletion)

Metropolis A modern, geometric typeface. Influenced by other popular geometric, minimalist sans-serif typefaces of the new millenium. Designed for opt

Darius 183 Dec 25, 2022
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
Python renderer for OpenStreetMap with custom icons intended to display as many map features as possible

Map Machine project consists of Python OpenStreetMap renderer: SVG map generation, SVG and PNG tile generation, Röntgen icon set: unique CC-BY 4.0 map

Sergey Vartanov 0 Dec 18, 2022
Hapi is a Python library for building Conceptual Distributed Model using HBV96 lumped model & Muskingum routing method

Current build status All platforms: Current release info Name Downloads Version Platforms Hapi - Hydrological library for Python Hapi is an open-sourc

Mostafa Farrag 15 Dec 26, 2022
Obtain a GNSS position fix from an 11-millisecond raw GNSS signal snapshot

Obtain a GNSS position fix from an 11-millisecond raw GNSS signal snapshot without any prior knowledge about the position of the receiver and only coarse knowledge about the time.

Jonas Beuchert 2 Nov 17, 2022
gjf: A tool for fixing invalid GeoJSON objects

gjf: A tool for fixing invalid GeoJSON objects The goal of this tool is to make it as easy as possible to fix invalid GeoJSON objects through Python o

Yazeed Almuqwishi 91 Dec 06, 2022
Implementation of Trajectory classes and functions built on top of GeoPandas

MovingPandas MovingPandas implements a Trajectory class and corresponding methods based on GeoPandas. Visit movingpandas.org for details! You can run

Anita Graser 897 Jan 01, 2023
Extract GoPro highlights and GPMF data.

Python script that parses the gpmd stream for GOPRO moov track (MP4) and extract the GPS info into a GPX (and kml) file.

Chris Auron 2 May 13, 2022