Giter VIP home page Giter VIP logo

Comments (5)

ChakChak1234 avatar ChakChak1234 commented on July 28, 2024 1

well, this might be related to when you use mplt.plot_markers(new_df), you use requests.get() to call a url that contains your api key. See my issue (#12) for details. I re-opened the issue because I think it might be a reoccurring problem.

I was able to sidestep the problem by individually calling the img for the map itself.

from mapsplotlib.

tcassou avatar tcassou commented on July 28, 2024 1

As I described in #12 this is happening if you have not set up billing details for your account in the developer console (first 300$ are free). Adding this should fix it!

from mapsplotlib.

ChakChak1234 avatar ChakChak1234 commented on July 28, 2024

Try this code out to get the image.

def get_img(country, zoom, size, scale, maptype):
    # url variable store url
    url  = 'https://maps.googleapis.com/maps/api/staticmap?'
    url += 'center={}&'.format(country)
    url += 'zoom={}&'.format(zoom)
    url += 'scale={}&'.format(scale)
    url += 'size={}x{}&'.format(size, size)
    url += 'maptype={}&'.format(maptype)
    
    r = requests.get(url)
    img = Image.open(StringIO((r.content)))
    
    return img

get_img(country = 'United States', zoom = 4, size = 640, scale = 1, maptype = 'hybrid')

You would have to do something like this to figure out what's going on.

import inspect

print(inspect.getsource(mplt.plot_markers))

from mapsplotlib.

tcassou avatar tcassou commented on July 28, 2024

Hi @leoankita
As @ChakChak1234 pointed out it could be related to a similar issue (#12), I'll have a look and will get back to you!

from mapsplotlib.

tcassou avatar tcassou commented on July 28, 2024

Please refer to #12 for more context about this issue, thanks again for raising it!

from mapsplotlib.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.