Try using a Geolocation API. It's a little bit difficult to write "web apps" in bash; you would have to use curl or wget. You might have better luck with python, ruby or perl (etc).
Edit: Sorry, I guess I wasn't that clear... By "web app", I actually meant client-side web app: one that uses http requests / web services. But you're right, people usually mean server-side app's when they say "web app" (that's changing though... a lot). So, that's why I suggested a geolocation api (google it... there are many) and a tool like wget or curl. Bash doesn't have any networking functions built-in per se. But unix/linux/mac's all can run millions of utilities... (as can windows, via cygwin).
Anyway, for example, using hostip.info (just one example), let's say your IP address is 148.87.67.135 :
$ wget -nv -O - 'http://api.hostip.info/get_html.php?ip=148.87.67.135&position=true'
Country: UNITED STATES (US)
City: Reston, VA
Latitude: 38.95
Longitude: -77.35
IP: 148.87.67.135
** note: this forum hides the url in the command... it should still work if you hold your mouse over it and look in the "status bar" area of your browser. Here's the format of the url: http + api.hostip.info + get_html.php ? ip={your_IP_address} & optional_arg={some_value}'
You can leave off the IP, and it'll use your current IP. The "position" (lat/long) is also optional. Note that it's common that you're behind a firewall and on a local network (e.g., a 192.* or 10.* network), which has a useless / meaningless IP address for this purpose, so it may be better to let the server look up your IP. But the actual IP the server sees may be from your ISP, which is possibly not as "local" as you would like. (Details, details...)
Have fun,
-m