Skip to content

Instantly share code, notes, and snippets.

@thany
Last active July 7, 2025 13:53
Show Gist options
  • Save thany/a21281f2d9847d1c94c8c9d8a2447968 to your computer and use it in GitHub Desktop.
Save thany/a21281f2d9847d1c94c8c9d8a2447968 to your computer and use it in GitHub Desktop.
Get Denso Mapcode from Denso server using a bash command
wget http://post.denso-communications.jp/dn/navicon_start.php --method=POST --body-data="lat=35.872722875676274&lng=139.73869658316153" -O - -q | grep -Po '(?<=id="mapcode">)([^<]*)'
@bespired
Copy link

bespired commented Jul 6, 2025

@MrZuerrer
That's amazing. And goes way above my sense of comprehension.
Nice to see more people interested in Japan Mapcode.
I think for practical use I would not mind when visiting Japan again that the actual destination is a few 100m away from what my App says, because we need to find a parking spot anyway. And we use it to visit tourist attractions, not Ms Tanamakas house...
But a bit weird Denso keeps it a secret.

@thany
Copy link
Author

thany commented Jul 7, 2025

@MrZuerrer
Brilliant work! It's weird that we "have to" reverse-engineer it, as @bespired said, but it's pretty amazing how you were able to come up with those numbers. I'm curious, are they based off of any type of logic, or just magic numbers to "make it work", so to speak?

@MrZuerrer
Copy link

My use case involved solving a puzzle with the solution pointing to a particular public phone in Osaka. Hence my need for precision.

The parameters I used are "well" documented. You can find one such example in https://gis-lab.info/docs/nima-tr8350.2-wgs84fin.pdf. Documentation, however, is not meant for the uninitiated such as me... But I am persistent ;-)

BTW... I used Mapion in the past but did not realize they also provide MapCode. I will refine my PowerShell / Selenium script to drive the Mapion web page (e.g. https://www.mapion.co.jp/m2/34.735775957141,135.55287836095266,16) and with a few simulated clicks I can get the MapCode.
This addresses my requirements in a pragmatic way and given I typically need less than 50 waypoints, I can easily feed the coordinates to the script and collect the MapCodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment