mwgg / Airports

A JSON database of 28k+ airports with ICAO/IATA codes, names, cities, two-letter country identifiers, elevation, latitude & longitude, and a timezone identifier
MIT License
515 stars 184 forks source link

GCJ-02 GPS lost accuracy when get China Airports #109

Open jyxjjj opened 9 months ago

jyxjjj commented 9 months ago

I used this repo with Telegram Bot. To send Inline Keyboard Buttons with multiple Map Apps' WebPage Version. Just like this:

$button1 = new InlineKeyboardButton([
    'text' => 'Show In Google Maps',
    'url' => "https://www.google.com/maps?q={$airport['lat']},{$airport['lon']}",
]);
$button2 = new InlineKeyboardButton([
    'text' => 'Show In Apple Maps',
    'url' => "https://maps.apple.com/?ll={$airport['lat']},{$airport['lon']}&q={$airport['name']}",
]);
$button3 = new InlineKeyboardButton([
    'text' => ($airport['tz'] == 'Asia/Shanghai' ? '' : '[Unsupported] ') . 'Show In AMap',
    'url' => "https://ditu.amap.com/regeo?lat={$airport['lat']}&lng={$airport['lon']}&name={$airport['name']}",
]);

AS title said, China Always using GCJ-02 GPS location type.

So this repos' lat and lon always losing accuracy in different maps.

For example: image image image

Different map gave different point.

I don't know if it is Google's issue that they doesn't support GCJ-02 GPS locations.

I am here to confirm if it is Google's issue or this database's.

And I want to know how to resolve this.