Archivi categoria: Javascript

Digging through the Navionics API v2

Phew, it’s been a really long time since I even looked at this blog.

So now I’m running on the same Arch Linux I’ve had for five years now, I got a surgery and I am recovering.

My mom opened her site at least, and she’s doing great. She got a FB page too. Ah, Facebook… if only Diaspora* took over the world might be a better place now.

I thought it would be really cool to embed Navionics maps on her site, since the head of nearly every post is: “how to get to that beautiful Mediterranean bay without sinking your sailboat on an underwater rock“.

Navionics did a good job documenting the API to embed a map on your website. It looks all beautiful and dandy until you try to request the key from their form, get redirected to a 404 page and receive this email:

Dear Partner,
Thanks for your interest in our Web API.

Download the Web API instructions here: http://webapiv2.navionics.com/index-api.html
Download the Terms of Service you agreed to here: http://www.navionics.com/en/web-api-terms-serviceen .
Don’t hesitate to contact us at apisupport@navionics.com for any technical questions.

Best regards
Navionics

UPDATE: to get the key you only need to request it at the email address provided above. They will check the website you intend to host the map on before giving you the key. Fair enough. If only a simple sentence (like “we’ll examine your site asap and if it looks nice by us we’ll be pleased to email you back with your API key”) was present, all the techniques I described in this post wouldn’t have been necessary.

Their ToS don’t allow you to tamper with their code: exactly what I did in this blog post. Since their business (aka: how they pay their meals) is to sell the maps they’re so kind as to give us free, I feel somehow morally obliged to respect their rules.

Yeah, it’s easy to get all moral and honest when you are given the key. This post explained how to get their maps nonetheless, because these are absolutely fantastic. We’ve been using them for years now on our GPSes.

TL;DR: this post has been voided because they need to make a living with something they’re giving away for free.

 

Contrassegnato da tag , ,

SlidingForms / Form Fiqui Con Javascript E CSS

Schermata ed esempiolinkgo per chi non possiede il dono della pazienza:

exclamation.png L’esempio non si vede granché bene con Internet Explorer <7 poiché contiene PNG trasparenti.
Non mi frega un cazzo se lo state usando, quindi non segnalatelo nei commenti perché ve li cancello come SPAM. Che il vostro PC possa essere stuprato dai peggiori virus circolanti e i vostri dati personali regalati ad ogni serial killer del pianeta!

Sliding Forms by SevenCapitalSins

Ok, dopo le dovute presentazioni happy passiamo alla teoria!

Continua a leggere

Javascript: Smooth Scroll

PROBLEMA:

Avete fatto una chat AJAX perfetta perfettina e la consegnate al Cliente tutti contenti.
Ma il Cliente (che ha sempre ragione) dice: «Mah, è bella sì, ma manca qualcosa…»
Voi, tuta blu dell’informatica, chiedete affranti: «Che cosa?» e pensate senza dirlo: «Manca quella bagascia puttana di tua nonna».
Il Cliente con quell’aria da sapiente alla Padrino di Marlon Brando che hanno tutti gli ignoranti quando non sanno bene cosa dire risponde: «Qualcosa… Ecco sì, qualcosa che la renda differente dalle altre!»

Come fare? Continua a leggere