Comments (5)
I've just merged this into master in #153, you can set it by passing in a bounds literal when creating a GoogleMapPlotter
object:
import gmplot
fit_bounds = {'north':37.832285, 'south': 37.637336, 'west': -122.520364, 'east': -122.346922}
gmap = gmplot.GoogleMapPlotter(37.766956, -122.438481, 13, fit_bounds=fit_bounds)
from gmplot.
Agreed, this feature would make fitting the map in the desired bounds way easier than it is right now.
from gmplot.
I would also find this highly useful and am trying to figure this out right now.
How is everyone doing this right now?
from gmplot.
@keithstellyes
You may want to take a look at this:
https://github.com/enriqueav/gmplot/blob/master/gmplot/gmplot.py#L173
# Call to fit_bounds
# https://developers.google.com/maps/documentation/javascript/reference/map#Map.fitBounds
gmap.fit_bounds(north, east, south, west)
from gmplot.
Right as you said that I found this PR and got it working:
However that code in that PR is slightly bugged in that SW is supposed to go first, NE.
Thanks either way though! Appreciate it :)
from gmplot.
Related Issues (20)
- Is there a way to add custom marker icons? HOT 3
- Crash Course Example Google Maps Loads Incorrectly with API Key HOT 3
- please update demo usage
- gmap heatmap inconsistent results
- Deprecation warning due to invalid escape sequences
- How to rotate a drawn map HOT 4
- Plot color/alpha based on a coordinate or value HOT 2
- Render as URI HOT 5
- Can't get HTML of polyline.
- setup.py egg_info" failed with error code 1
- Marker color isn't supported HOT 4
- Does this support v3 api? HOT 2
- Multicolored lines? HOT 1
- GMPLOT Pins into buttons
- When API KEY From Google is used, the code crashes lol
- GoogleMapPlotter.text size / font?
- API Key is visible to anyone who views the html file header
- Not able to hide marker
- API key visible when html page hosted
- Why did I have to add API key manually to HTML?
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 gmplot.