Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Google map saved to Documents v2

edited May 2013 in Code Sharing Posts: 17

This sample uses http.request to get a Google map then saves the map to Documents or Dropbox. User inputs an address for the map. The address string is processed to replace spaces with "+" signs. The address is sent to Google maps. Then the user enters a file name to be used for saving the image to Documents or Dropbox sprite storage.
v2 - simplified string proceesing, zoom is now controllable on map image.
The file can be downloaded at: http://pastebin.com/zs4Sip0N

Comments

  • Posts: 2,820

    Nice job. This is cool.

  • Posts: 666

    Look into string.gsub() to optimize your space to plus converter. You can replace a lot of code with 1 or 2 lines of lua.

  • Posts: 17

    Thank you for the suggestion. Version two is available. I liked my subroutine, but one line of code is better than 20. Zoom is also now controllable.

  • edited May 2013 Posts: 666

    Code is much nicer now; easier to read.

Sign In or Register to comment.