Open MattGraz opened 7 years ago
Don't want to influence things to much but Geo coding I don't think is the problem. There's packages that convert lat long to state or city and don't require depends on Google API. We just need the jQuery or whatever js code to get the default browser but in location prompt then ajax post it. Probably 10 lines max of straight js. For now we can just add a dummy flask post rout that takes two floats and just always return Ohio rules cause that's all we have anyways.
On Apr 5, 2017 7:39 PM, "MattGraz" notifications@github.com wrote:
Found: https://github.com/rochacbruno/Flask-GoogleMaps
Examples with code:
http://flaskgooglemaps.pythonanywhere.com/
I'll try playing around with this and getting something integrated.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matthew-sochor/fish.io.ai/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AOeuWqz6sVDKUOEsquJAvu5j2u1HIWETks5rtCY1gaJpZM4M08d_ .
Also for mapping we can plot all the points in our database with leaflet js. It's super light weight and works off any dumb http get route with Json. But maybe the Google extension does all this too? Let's code make sure it's actively maintained.
On Apr 5, 2017 7:44 PM, "Josiah Olson" thenomemac@gmail.com wrote:
Don't want to influence things to much but Geo coding I don't think is the problem. There's packages that convert lat long to state or city and don't require depends on Google API. We just need the jQuery or whatever js code to get the default browser but in location prompt then ajax post it. Probably 10 lines max of straight js. For now we can just add a dummy flask post rout that takes two floats and just always return Ohio rules cause that's all we have anyways.
On Apr 5, 2017 7:39 PM, "MattGraz" notifications@github.com wrote:
Found: https://github.com/rochacbruno/Flask-GoogleMaps
Examples with code:
http://flaskgooglemaps.pythonanywhere.com/
I'll try playing around with this and getting something integrated.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/matthew-sochor/fish.io.ai/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AOeuWqz6sVDKUOEsquJAvu5j2u1HIWETks5rtCY1gaJpZM4M08d_ .
From @matthew-sochor : http://www.mrc-productivity.com/techblog/?p=1082
Looks like this guy has exactly what we need.
FYI, I got a google API key for our app if we need it.
cool beans
@thenomemac, @matthew-sochor
I'm getting an error that some of the methods needed to geocode don't work on "insecure origin". AKA, we need to use HTTPS in lieu of HTTP. I assume this is an easy-ish conversion to do? Being a complete noob at web dev I don't have much context, though.
maybe easy-ish? not sure why you need to be https to use an api? that doesn't sound right? maybe because you're in debug mode? I'm biased for deving minimal solution where we just focus for the demo tomorrow on figuring out how to get JS to trigger the allow location dialog. then we fake the locations API for now and have it hard coded to CLE. Thoughts?
On Wed, Apr 5, 2017 at 9:35 PM, MattGraz notifications@github.com wrote:
@thenomemac https://github.com/thenomemac, @matthew-sochor https://github.com/matthew-sochor
I'm getting an error that some of the methods needed to geocode don't work on "insecure origin". AKA, we need to use HTTPS in lieu of HTTP. I assume this is an easy-ish conversion to do? Being a complete noob at web dev I don't have much context, though.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matthew-sochor/fish.io.ai/issues/12#issuecomment-292044241, or mute the thread https://github.com/notifications/unsubscribe-auth/AOeuWhQ1L0jn1oo-Ht1Dguc0syxEzegOks5rtEFGgaJpZM4M08d_ .
I keep getting an error on the geocoding functions saying the functionality is disabled on "insecure origins" and the error recommends using https to circumvent these challenges. If you know of a way around, I'm open to suggestions. It may certainly be possible, but I've been unable to get it working.
Hmm we may have to get https certificates for our app. Can you do it from the PC browser to test it for now? Not sure how fast I can get those setup.
On Apr 5, 2017 10:11 PM, "MattGraz" notifications@github.com wrote:
I keep getting an error on the geocoding functions saying the functionality is disabled on "insecure origins" and the error recommends using https to circumvent these challenges. If you know of a way around, I'm open to suggestions. It may certainly be possible, but I've been unable to get it working.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/matthew-sochor/fish.io.ai/issues/12#issuecomment-292049308, or mute the thread https://github.com/notifications/unsubscribe-auth/AOeuWuv9_9UKUOFhb56ec1dthxNNpXVFks5rtEnGgaJpZM4M08d_ .
I've been using purely PC thus-far. I'll keep chugging away for a little bit here and see if I can get a breakthrough.
Per https://developers.google.com/web/updates/2016/04/geolocation-on-secure-contexts-only?hl=en
Starting with Chrome 50, Chrome no longer supports obtaining the user's location using the HTML5 Geolocation API from pages delivered by non-secure connections. This means that the page that's making the Geolocation API call must be served from a secure context such as HTTPS.
https in flask: http://flask.pocoo.org/snippets/111/
Generating Certs: http://werkzeug.pocoo.org/docs/0.11/serving/
I see makes sense for security reasons. We can get HTTPS certs for our app. Just not sure I can get them setup yet tonight. Might I suggest you google the problem of spoofing/generating certs for "tests" and "dev" and see if that works. If you figure it out please contrib. FYI I know for a fact mozilla gives free certs. So it may not be too hard to get some from them.
Totally understandable. I think the links I posted above may be the answer so I'm going to give those a shot and see what happens.
We can launch with:
from werkzeug import run_simple
run_simple('localhost', 5000, app,
ssl_context='adhoc')
Werkzeug will generate some ssl certs for local running/debugging. It isn't a long term solution but should at least allow us to iterate
ya our resumes are growing. we're web security experts and data scientists now.
speak for yourselves I've done jack shit so far with the web app. Resume fail 👎
I bolded some text and centered an image. I'll count it haha.
@thenomemac: I got https: running on local host
* Running on https://localhost:5000/ (Press CTRL+C to quit)
sweet does the geocode stuff work now
Working on it now
I think my problem is that I can't get Jinja to install correctly.
dependencies: https://github.com/rochacbruno/Flask-GoogleMaps
Jinja is installed by default with flask... are we sure this extension is upto date with latest flask version?
Alright, then I have no idea how to get this thing going :/
@matthew-sochor, @thenomemac I'll toss in a temporary image for place holding so we can demonstrate what our vision was at the demo.
So who's doing this. Think this is must have
Maybe dev it under the SSL certificates. Once I get a couple other features added I'll look into getting us public certs from Mozilla
Found: https://github.com/rochacbruno/Flask-GoogleMaps
Examples with code:
http://flaskgooglemaps.pythonanywhere.com/
I'll try playing around with this and getting something integrated.