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

Render as URI #180

Open
anushkrishnav opened this issue Aug 13, 2020 · 5 comments
Open

Render as URI #180

anushkrishnav opened this issue Aug 13, 2020 · 5 comments
Assignees
Labels
enhancement Enhancement or feature.

Comments

@anushkrishnav
Copy link

anushkrishnav commented Aug 13, 2020

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 %}

@frslm frslm added the enhancement Enhancement or feature. label Aug 15, 2020
@frslm
Copy link
Contributor

frslm commented Aug 15, 2020

Not yet, but good idea!

@anushkrishnav
Copy link
Author

With some help and guidance I would love to work on this.

@frslm
Copy link
Contributor

frslm commented Aug 20, 2020

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).

@anushkrishnav
Copy link
Author

anushkrishnav commented Aug 20, 2020

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.

@frslm
Copy link
Contributor

frslm commented Aug 21, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or feature.
Projects
None yet
Development

No branches or pull requests

2 participants