-
Notifications
You must be signed in to change notification settings - Fork 944
Conversation
…content.handlebars
@moollaza Is there anything in particular I need to add here? |
@javathunderman thanks! We're checking it out! |
var issLatitude = (Math.round(api_result.iss_position.latitude * 100) / 100).toFixed(2); | ||
var issLongitude = (Math.round(api_result.iss_position.longitude * 100) / 100).toFixed(2); | ||
|
||
DDG.require('maps', function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing opening curly braces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jagtalon What line?
attribution github => ['https://github.com/rishiag','Rishi Agarwal'], | ||
twitter => ['http://twitter.com/rishiagar','Rishi Agarwal']; | ||
|
||
triggers any => "iss location", "iss position"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other triggers might be "international space station" or maybe "iss tracker / iss tracking" as mentioned in #1217 (comment)
@jagtalon Fixed a few issues, but not sure if that's what you meant. |
model: 'Place', | ||
|
||
view: 'Map', | ||
data: [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding url
here should make the link on the map work.
data: [{
url: "...",
...
}]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jagtalon How does that work? Do you mean I should add
url: "(link goes here)",
@jagtalon There's an issue that's making the tests fail; I think it's some issue with Travis, not this code, as a lot of old IAs are failing in the error report. |
@javathunderman ah I see--don't worry about the tests for now. It's working on my end anyway |
@javathunderman looking forward to your changes! |
"use strict"; | ||
env.ddg_spice_isslocation = function(api_result) { | ||
|
||
if(!api_result || api_result !== "success") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exits because you're comparing api_result
with "success", but you should be comparing api_result.message
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I replace both instances with "api_result.message"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the latter one. !api_result
says, "check if api_result is not null or undefined" and api_result.message !== "success"
says that the message
property of api_result
should equal to "success" to continue.
Looking at http://your-codio-instance:5000/js/spice/isslocation/ should make it clearer. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@javathunderman probably best to check
if (!api_result || !api_result.message || api_result.message !== "success"){
If we know the message is always there, you can leave out the check for the existance of api_result.message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@moollaza Ok, will update tonight.
@jagtalon I agree, ISSLocation looks like it's accidentally not set it or something |
@jagtalon Maps is OK with me. |
Alright cool all we need is the asset. Thanks @moollaza |
@abeyang no pressure ;) |
@javathunderman in the mean time, you can apply this change--the JS doesn't work at the moment. #1559 (comment) |
@jagtalon Sorry for the late response- fixed the JS code. |
@moollaza Not seeing that CSS code in any of the files...Where do I replace the pin with that new asset? |
@javathunderman he's just saying that it should be added to the existing |
@javathunderman just tried it out with this: .mapview-marker.mapview-marker-star,
.mapview-marker.mapview-marker-star.has-focus {
background-image: url("1x.png") !important;
background-size: 30px 44px !important;
width: 30px !important;
height: 44px !important;
margin-left: -15px !important;
} |
Ah, thanks. Implementing this… |
share/spice/isslocation/1x.png
@abeyang Implemented that new icon. |
@jagtalon Anything else to do here? |
@javathunderman we'll take a look and get back to you soon |
@moollaza Small issue- if you move the map so far that you come back to one end of the world, the map pin doesn't show up. Should this be as is? |
@javathunderman that's a great find -- I think for now we'll consider that tolerated as it seems to be the expected behaviour from Leaflet.js -- Perhaps you should file a bug over there? I'm sure other have noticed this! |
@javathunderman @mintsoft I made a mistake -- we can't simply drop in the name of the asset to the CSS because the share files require versioned paths. We'll need to modify the background image using JS and |
Checking it out! |
@javathunderman just add the icon in this PR and everything should be good. Maybe we could just use 2x.png for now. Other than that, https://ddh9.duckduckgo.com/?q=iss+location&ia=map |
@javathunderman actually, we got it. Opened a PR here #1675. Thanks for the contribution! :) |
@javathunderman @rishiag congrats! It's live: https://duckduckgo.com/?q=iss+location&ia=map Sorry for the delay, it's actually been live for about a week. Thanks again for taking the time to contribute! We really appreciate it. Feel free to stick around and comment/help on other PR's & Issues or even submit more Instant Answers! |
Yay! |
Continuation of #1217. Please refer to the PR template there for more information!
This PR fixes a few things that were not in the old one.
Please let me know if I need to update this comment!
cc @mintsoft @jagtalon @moollaza @MrChrisW @rishiag