Export to GitHub

ogmaps - issue #1

Doesn't work from outside of US


Posted on Dec 30, 2007 by Massive Dog

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.

Comment #1

Posted on Jan 15, 2008 by Happy Ox

Comment deleted

Comment #2

Posted on Jan 24, 2008 by Grumpy Rabbit

I can confirm that it is not working from outside US.

Comment #3

Posted on Apr 26, 2008 by Helpful Horse

I have tried this as per standard from Australia and the html file is blank;just displays "loading" I have done a find and replace in vi;replacing en_us with en_ALL and am still receiving errors downloading the following location: brisbane location = Brisbane QLD, Australia latitude, longitude = -27.467580, 153.027892 span-latitude, span-longitude = 0.023898, 0.035748 downloading: /intl/en_ALL/mapfiles/108/maps2.css download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: /intl/en_ALL/mapfiles/transparent.png download failed - downloading: http://mt0.google.com/mt?n=404&v=w2.63&x=0&y=0&zoom=17 downloading: http://mt2.google.com/mt?n=404&v=w2.63&x=1&y=1&zoom=16 downloading: http://mt1.google.com/mt?n=404&v=w2.63&x=3&y=2&zoom=15

Comment #4

Posted on Jun 3, 2008 by Happy Hippo

This is because the URL is incomplete, it's relative, not absolute.

Modify the download method as follows:

def download_if_dne(href, filename): if os.path.isfile(filename):

print 'already downloaded:', href

    return False
else:
    if not href.startswith('http://'):
        href = 'http://maps.google.com' + href
        print 'Fixed url :', href
    try:
        print 'downloading:', href
        oa = openanything.fetch(href)
        if oa['status']==200:
            file = open( filename, 'w' )
            file.write( oa['data'] )
            file.close()
        return True
    except KeyboardInterrupt:
        raise
    except:
        print '\tdownload failed -', sys.exc_info()[0]
        return False

Comment #5

Posted on Jan 2, 2009 by Grumpy Lion

Still not work from outside US. I am using Macbook Pro with Leopard. Thanks

Comment #6

Posted on Feb 22, 2009 by Grumpy Elephant

I have an Australian version sort of working. Its downloading maps and will display them offline however have not got zoom to work yet.

As for other locations, you need to change the URL's in the main python file to be relative to your location. E.g i had to change google.com to google.com.au

If anyone wants the file let me know by emailing beau@proatfishing.com.

Cheers.

Hopefully i get it all to work, but im away for a week starting tomorrow so no time to figure out why its not 100% working. + I'm new to python

Comment #7

Posted on Mar 5, 2009 by Happy Rabbit

Comment deleted

Comment #8

Posted on Jul 4, 2012 by Helpful Hippo

Comment deleted

Comment #9

Posted on Jul 4, 2012 by Helpful Hippo

Comment deleted

Status: New

Labels:
Type-Defect Priority-Medium