gmplot
gmplot copied to clipboard
Render as URI
Is there a function to render the map as a uri instead of a html file . I want to share my map inside a frame but I am unable to do that .Here is the example of how it can be implemented map.py
@blueprint.route('/map')
def map():
gmap = gmplot.GoogleMapPlotter.from_geocode( "delhi, India",apikey="key")
gmap.render_as_uri()
return render_template('map/map.html',gmap=gmap)
map.html
{% extends "layouts/layout.html" %}
{% block header %}
<div class="container" align="left">
<embed type="image/svg+xml" src={{gmap|safe}} style='max-width:1000px'/>
</div>
{% endblock %}
{% block content %}
{% endblock %}
Not yet, but good idea!
With some help and guidance I would love to work on this.
I'd personally explore Google Maps Embed API and/or how Folium achieves this (a quick search points to this SO thread, which may or may not be useful).
I'd personally explore Google Maps Embed API and/or how Folium achieves this (a quick search points to this SO thread, which may or may not be useful).
Okay, I am working on the feature. Is there any contribution guidelines? The embed is a good way to achieve what I need but the folium one doesn't work that much since we are still forced to create an HTML file dynamically.
There are no contribution guidelines specific to this project, but you can fall back to Github's community guidelines. For any technical questions, you could note them in your PR and they can be addressed during the review.