Skip to content

Commit 640654c

Browse files
SmallSeaRiverfount
authored andcommitted
Fixed wrong map object when calling setCenter() which make function working properly.
1 parent a027e27 commit 640654c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
# Flask Google Maps
1+
# Flask Google Maps [![Generic badge](https://img.shields.io/badge/PayPal-Donante-red.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2UGZHBYZV39XY&source=url)
2+
23

34
[![Flask Estension](https://img.shields.io/badge/flask-extension-green.svg?style=flat)](https://flaskextensions.com)
4-
<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2UGZHBYZV39XY&source=url"><img alt='Donate with Paypal' src='https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif' /></a>
5+
[![PyPI version fury.io](https://badge.fury.io/py/flask-googlemaps.svg)](https://pypi.python.org/pypi/flask-googlemaps/)
6+
[![PyPI download month](https://img.shields.io/pypi/dm/flask-googlemaps.svg)](https://pypi.org/project/flask-googlemaps/)
7+
[![PyPI license](https://img.shields.io/pypi/l/flask-googlemaps.svg)](https://pypi.python.org/pypi/flask-googlemaps/)
8+
[![PyPI format](https://img.shields.io/pypi/format/flask-googlemaps.svg)](https://pypi.python.org/pypi/flask-googlemaps/)
9+
[![PyPI status](https://img.shields.io/pypi/status/flask-googlemaps.svg)](https://pypi.python.org/pypi/flask-googlemaps/)
10+
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/flask-googlemaps.svg)](https://pypi.python.org/pypi/flask-googlemaps/)
511

612
Easy to use Google Maps in your Flask application
713

flask_googlemaps/templates/googlemaps/gmapjs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
if (navigator.geolocation) {
4848
navigator.geolocation.getCurrentPosition(function (position) {
4949
initialLocation = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
50-
map.setCenter(initialLocation);
50+
{{gmap.varname}}.setCenter(initialLocation);
5151
});
5252
}
5353
{% endif %}

0 commit comments

Comments
 (0)