Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom pin point image in map #155

bainadeashish opened this issue Nov 3, 2017 · 1 comment

custom pin point image in map #155

bainadeashish opened this issue Nov 3, 2017 · 1 comment


Copy link

@bainadeashish bainadeashish commented Nov 3, 2017

I am able to plot a map with pin point as a circle using dash .However, I am willing to show custom image as pin point inside map.

i have gone through the plotly dash code & found below class
`class Marker(PlotlyDict):
Valid attributes for 'marker' at path [] under parents ():

    ['autocolorscale', 'blend', 'border', 'cauto', 'cmax', 'cmin', 'color',
    'colorbar', 'colors', 'colorscale', 'colorsrc', 'colorssrc',
    'gradient', 'line', 'maxdisplayed', 'opacity', 'opacitysrc',
    'outliercolor', 'reversescale', 'showscale', 'size', 'sizemax',
    'sizemin', 'sizemode', 'sizeref', 'sizesrc', 'symbol', 'symbolsrc']

Run `<marker-object>.help('attribute')` on any of the above.
'<marker-object>' is the object at []



The Marker has symbolsrc option.Hence I tried below code to get the image i wanted
Scattermapbox(lat = lat ,lon = lon ,marker=Marker(size=13,color='rgb(6, 91, 112)',symbolsrc=url_for("static",filename='pin.jpg')), text = text )

Its giving error RuntimeError: Attempted to generate a URL without the application context being pushed. This has to be executed when application context is available.

I tried alternative like below giving the complete path of file.

Scattermapbox(lat = lat ,lon = lon ,marker=Marker(size=13,color='rgb(6, 91, 112)',symbolsrc=r'D:\dashboard\static\pin.jpg'), text = text )

This do not give any error but not giving expected output i wanted.


This comment has been minimized.

@chriddyp chriddyp closed this Nov 7, 2017
byronz added a commit that referenced this issue Apr 23, 2019
another round of dev tools edits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.