Comments (5)
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.
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.
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.
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.
Please refer to #12 for more context about this issue, thanks again for raising it!
from mapsplotlib.
Related Issues (17)
- AttributeError: module 'gmaps' has no attribute 'plot_markers' HOT 3
- how to know which color is which cluster? HOT 2
- Unusable Map Results HOT 3
- Heatmap returns error: UnicodeDecodeError: 'ascii' codec can't decode byte 0x89 in position 0: ordinal not in range(128) HOT 12
- Integrate with GeoPandas? HOT 1
- Image positioning and zooming HOT 2
- Integrate into subplot HOT 3
- Heatmap colours are very dim HOT 2
- Polyline? HOT 3
- Allow passing API key without adding it to code (for install through pypi) HOT 1
- IOError: cannot identify image file <StringIO.StringIO instance HOT 6
- Filter out NaNs in lat/long
- Rotate map HOT 4
- Set upper limit in `get_zoom` function. HOT 3
- unable to import mapsplotlib HOT 5
- Zoom in and out HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapsplotlib.