Open attiliovaccaro opened 7 years ago
I have the same issue. it seems the image "m1.png" is missing.
Follow the steps below to add a marker clusterer: Get the marker clustering library and images from GitHub, and store them on a server accessible to your app. The JavaScript library and image files for the MarkerClusterer are available in the Google Maps repo on GitHub. Download or copy the following files from GitHub to a location accessible to your app: markerclusterer.js m1.png m2.png m3.png m4.png m5.png
https://github.com/googlemaps/v3-utility-library/tree/master/markerclusterer
How can I personalize the DEFAULT_CLUSTER_IMAGE_PATH without edit the sourcecode?
Right now is: DEFAULT_CLUSTER_IMAGE_PATH = "static/images/m"
I need to change to DEFAULT_CLUSTER_IMAGE_PATH = "static/dist/images/m"
If you are creating the Map
object in backend it is customizable by passing the cluster_imagepath
argument https://github.com/rochacbruno/Flask-GoogleMaps/blob/master/flask_googlemaps/__init__.py#L37
If you are using in a different way you can try monkey patching for now in the top of you file
import flasgger
flasgger.DEFAULT_CLUSTER_IMAGE_PATH = "static/dist/images/m"
app = Flask()
flasgger.Swagger(app)
I will think in a way to make it configurable
Passing cluster_imagepath
works fine!
Thanks!
Hello,
First off, I just wanted to say thanks for this awesome library! I'm still having the same issue as kaiofreitas was having with the images m1-m5 images not showing up on my map. Im not entirely sure how but I had the images working yesterday but when I checked my site again this morning they were gone. I have the images downloaded and in my static/images/m directory and I have changed the default cluster image path variable in the init.py file within the package. Have I messed this up somehow?
I figured out my issue, I know this probably isnt the best way to do this but what i did is just use the servers ip address /static/images/m for the url of the background image in the flask-googlemaps init.py file.
I tried to render a clustered map created as indicated in http://flaskgooglemaps.pythonanywhere.com/
I only have two markers, but as I zoom out they get grouped together but in the map only the number 2 is displayed with no icon. What am I doing wrong?