if not request.args.get("sw"):
    raise RuntimeError("missing sw")
if not request.args.get("ne"):
    raise RuntimeError("missing ne")

In mashup, how is the request.args.get() used in above code? I suppose "sw" and "ne" should be ids in DOM, is it? Not sure where "sw" and "ne" come from in this case?


Look at the update function in scripts.js. They are sent as parameters when the update route is called here $.getJSON(Flask.url_for("update"), parameters).

  • That makes sense. Thanks. However, one following up question is about the articles() function. {request.args.get("geo")} is used to get 'geo' but here geo is not from the scripts.js, isn't it? That line is working for me but I don't understand how it works...Do you mind to give a hint about this too? @DinoCoderSaurus Sep 4 '17 at 14:22
  • It is sent as a parameter to the get method eg https://ide50-username.cs50.io/articles?geo=02138. Hint it will be from scripts.js when you get to addMarker. Sep 4 '17 at 14:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .