zaizou / ogmaps Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/ogmaps
Automatically exported from code.google.com/p/ogmaps
==About== I ordered a [http://en.wikipedia.org/wiki/Nokia_N800 Nokia N800] a day or two ago, and thought "man, wouldn't it be nice to be able to use Google Maps around town even when this thing doesn't have an internet connection?" Well, a few hours and ~200 lines of code later: the answer is definitely "heck yeah". =P This tool downloads and builds a version of [http://maps.google.com/ Google Maps] that will run completely off your own system, with no internet connection, HTTP servers, etc. required. If your device has a web browser and a python interpreter, you're pretty much good to go. ==Downloading== Assuming you have SVN installed, run the following command: {{{ $ svn checkout http://ogmaps.googlecode.com/svn/trunk/ ogmaps }}} This will create a directory `ogmaps` and download all the relevant files. ==Instructions== # Change to the directory created above. # run: `python ogmaps.py "plano, tx"` (replace "plano, tx" with wherever) *while* your internet connection is working # open the file "ogmap.html" in your web browser (later, when your internet connection is down) ==FAQ== ===How does this work?=== The script downloads all the HTML, Javascript and images Google Maps uses, and saves them to your hard drive. It then, through the magic of regular expressions and [http://www.crummy.com/software/BeautifulSoup/ BeautifulSoup], transmographies the files as necessary to use the data it downloaded a moment earlier. ===How much drive space does this use?=== That depends on how many locations you download, but it should be less than 10MB per site. It's smart enough to know what it has and hasn't downloaded already, and not re-request the same information. It downloads data for all zoom levels, but to avoid exponential growth only looks at a fixed pixel radius (~3072px / 12 tiles) around whatever point you're looking at. ===Isn't this illegal / against Google's TOC / stealing?=== I doubt it. Just don't use the images for anything other than personal use and you should be fine. But if this project disappears suddenly, check out my blog at [http://kered.org/blog] for where I'll re-host it. ===Will this work on my N770/N800/N810?=== Heck if I know. I'm still waiting for the FedEx guy! ===How can I help?=== To help the project, file a bug for any errors or feature requests you have, and/or join the list. To help me personally, check out my company's site: [http://allurstuff.com] (it's basically craigslist fused with google maps).
What steps will reproduce the problem?
1. C:\> svn checkout http://ogmaps.googlecode.com/svn/trunk/ ogmaps
2. C:\> python ogmaps.py "plano, tx"
What is the expected output? What do you see instead?
1. expected output: Google Maps Pictures in Folder "tiles"
instead output: Nothing in Folder "tiles"
What version of the product are you using? On what operating system?
product: http://code.google.com/p/ogmaps/
OS: Window XP SP2
Please provide any additional information below.
- version [ 92 >>>> 132e]
http://mt0.google.com/mt?n=404&v=w2.63&x=1&y=1&zoom=5 << too old
Original issue reported on code.google.com by [email protected]
on 22 Nov 2008 at 2:47
What steps will reproduce the problem?
1. use application from outside of US
2.
3.
What is the expected output? What do you see instead?
Google maps should be visible when offline. Instead, no maps are visible.
ogmap.html should have all mapfiles references converted to data/tiles,
however the regular expression doesn't work when the URL doesn't refer to
en_us. From Australia, the url is typically:
http://www.google.com/intl/en_ALL/mapfiles instead of
http://www.google.com/intl/en_us/mapfiles
What version of the product are you using? On what operating system?
latest version from subversion as of 30/12/07. Running cygwin on Windows
Vista.
Please provide any additional information below.
IE reports that c:/mapfiles/home3.html is not available (which it isn't).
Firefox just shows a blank map, although all elements of the display seem
to be correctly displayed, such as the zoom buttons, and the pointer on the
map to the location.
Original issue reported on code.google.com by [email protected]
on 30 Dec 2007 at 11:20
Just tried out ogmaps for the first time. Running all locations, including the
documented base case fails with 'location not found'.
> python ogmaps.py "plano, tx"
downloading the following location: plano, tx
location not found - aborting
Running on Mac OS X 10.6
Original issue reported on code.google.com by [email protected]
on 25 Jun 2011 at 10:52
What steps will reproduce the problem?
1. installed svn from 'Slik-Subversion-1.6.1-win32.msi'
2. installed python from 'python-2.6.2.msi'
3. changed path variable in OS
4. opened a cmd window for C:>
5. entered >svn checkout http://ogmaps.googlecode.com/svn/trunk/ ogmaps
6. opened the ogmaps.py file and replaced v=w2.63 -> v=w2.92 (very the the
current version by viewing the source of any google map first)
7. changed directory >cd ogmaps
8. entered >python.exe ogmaps.py "plano, tx"
9. see attached log file which shows many downloading failed errors
What is the expected output? What do you see instead?
I expect all downloading to complete, however it seems the incorrect URL
is provided
What version of the product are you using? On what operating system?
Using Win-XP, python 2.6
Please provide any additional information below.
I had to change the v=w2.63 to v=w2.92 to get the tile to download,
otherwise the folder would have been empty.
Original issue reported on code.google.com by [email protected]
on 8 May 2009 at 4:56
Attachments:
What steps will reproduce the problem?
1. Run Program
2. Open HTML File
What is the expected output? What do you see instead?
The expected output is the google maps UI for waterloo, ON.
After fixing the other two defects (Outside US, and version number),
the html page displays a white sidebar, with grey content that says "Loading".
There are a bunch of javascript warnings/errors.
There are several CSS selector errors, which I suspect isn't important,
but,
Error:
gapp is not defined in ogmap.html line 17.
I suspect this means some Javascript files are missing. I will read the
source and see what I can find out.
What version of the product are you using? On what operating system?
Using the latest SVN on Firefox 3 RC1; Linux.
Original issue reported on code.google.com by matt%[email protected]
on 9 Jun 2008 at 1:23
What steps will reproduce the problem?
1.
2.
3.
What is the expected output? What do you see instead?
Receives error while downloading. No tiles downloaded and no html file
created in folder. See additional information below...
What version of the product are you using? On what operating system?
svn 1.4.6, Windows XP
Please provide any additional information below.
Command Prompt output:
C:\Documents and Settings\HP_Owner\ogmaps>python ogmaps.py "ottawa, on"
downloading the following location: ottawa, on
location = Ottawa, ON, Canada
latitude, longitude = 45.421480, -75.691880
span-latitude, span-longitude = 0.309220, 0.330600
downloading: http://www.google.com/intl/en_us/mapfiles/94/maps2/main.js
downloading: http://www.google.com/intl/en_us/mapfiles/94/maps2/mod_cb.js
downloading:
http://www.google.com/intl/en_us/mapfiles/94/maps2/mod_traffic_app.js
downloading: http://www.google.com/intl/en_us/mapfiles/94/maps2/mod_ms.js
downloading: http://www.google.com/intl/en_us/mapfiles/94/maps2/mod_mymaps.js
downloading: http://www.google.com/intl/en_us/mapfiles/94/maps2/mod_mpl_host.js
downloading: http://www.google.com/intl/en_us/mapfiles/94/maps2/mod_kml.js
downloading: http://www.google.com/intl/en_us/mapfiles/94/maps2/mod_le.js
downloading: http://maps.google.com/intl/en_ALL/mapfiles/108/maps2.css
downloading: http://www.google.com/intl/en_ALL/images/maps_results_logo.gif
downloading: http://maps.google.com/intl/en_ALL/mapfiles/transparent.png
downloading: http://www.google.com/mapfiles/cb/bounds_cippppt.txt
downloading:
http://maps.google.com/maps/tldata?tldtype=1&hl=en&country=us&callback=_xdc_._1f
9onnphn
downloading: http://www.google.com/intl/en_us/mapfiles/arrow-white.png
downloading: http://www.google.com/intl/en_us/mapfiles/arrow.png
downloading: http://www.google.com/intl/en_us/mapfiles/lmc.png
downloading: http://www.google.com/intl/en_us/mapfiles/lmc-bottom.png
downloading: http://www.google.com/intl/en_us/mapfiles/slider.png
downloading: http://www.google.com/intl/en_us/mapfiles/scale.png
downloading: http://www.google.com/intl/en_us/mapfiles/arrowtransparent.png
downloading: http://www.google.com/intl/en_us/mapfiles/overcontract.gif
downloading: http://maps.google.com/mapfiles/etna.jpg
downloading: http://www.google.com/intl/en_us/mapfiles/drag_cross_67_16.png
downloading: http://www.google.com/intl/en_us/mapfiles/iws2.png
downloading: http://www.google.com/intl/en_us/mapfiles/iw2.png
downloading: http://www.google.com/intl/en_us/mapfiles/iw_close.gif
downloading: http://www.google.com/intl/en_us/mapfiles/iw_plus.gif
downloading: http://www.google.com/intl/en_us/mapfiles/iw_fullscreen.gif
downloading: http://www.google.com/intl/en_us/mapfiles/iw_minus.gif
downloading: http://www.google.com/intl/en_us/mapfiles/transparent.gif
Traceback (most recent call last):
File "ogmaps.py", line 293, in ?
download(location, max_span)
File "ogmaps.py", line 260, in download
html = soup.prettify()
File "BeautifulSoup.py", line 598, in prettify
return self.__str__(encoding, True)
File "BeautifulSoup.py", line 573, in __str__
contents = self.renderContents(encoding, prettyPrint, indentContents)
File "BeautifulSoup.py", line 610, in renderContents
s.append(c.__str__(encoding, prettyPrint, indentLevel))
File "BeautifulSoup.py", line 573, in __str__
contents = self.renderContents(encoding, prettyPrint, indentContents)
File "BeautifulSoup.py", line 610, in renderContents
s.append(c.__str__(encoding, prettyPrint, indentLevel))
File "BeautifulSoup.py", line 573, in __str__
contents = self.renderContents(encoding, prettyPrint, indentContents)
File "BeautifulSoup.py", line 610, in renderContents
s.append(c.__str__(encoding, prettyPrint, indentLevel))
File "BeautifulSoup.py", line 526, in __str__
if self.containsSubstitutions and '%SOUP-ENCODING%' in val:
TypeError: 'in <string>' requires character as left operand
Original issue reported on code.google.com by [email protected]
on 23 Apr 2008 at 9:09
What steps will reproduce the problem?
1. do python ogmaps.py "San Francisco, CA"
What is the expected output? What do you see instead?
The data/tiles directory is empty after the the program finishes running.
What version of the product are you using? On what operating system?
I'm running the version that's available today from svn. I'm running on
Windows XP.
Please provide any additional information below.
I get a 404 from google. I copied the html error page they barfed on me.
Original issue reported on code.google.com by [email protected]
on 26 Mar 2008 at 2:01
Attachments:
What steps will reproduce the problem?
1. as far as i can tell, as per the instructions in the readme file
2.
3.
What is the expected output? What do you see instead?
I expected the ability to zoom. I can see the overall map, but no slider
for zooming. I can see the slider in the files that I have downloaded, but
it does not appear on the google viewing window. using the mouse roll does
not work either, and it does not pan. other information is that the google
logo image does not appear, nothing appears except the overall map and a
blue top bar with 'print' 'link' and 'send'.
What version of the product are you using? On what operating system?
the copyright was in 2007, I have modified it to solve issue 1 and also the
version issue. Mac OS X 10.4
Please provide any additional information below.
I can't think of anything specific. I would like it if maps with waypoints
could be downloaded from google's 'my maps'
Original issue reported on code.google.com by [email protected]
on 8 Mar 2009 at 11:23
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.