Leaflet CDN

637 views
Skip to first unread message

Jason Sanford

unread,
Feb 22, 2012, 2:00:54 AM2/22/12
to leafl...@googlegroups.com
I saw leafletjs.com was unclaimed so I thought I'd grab it up before some squatter did (I really hate when that happens).

I'm forwarding requests to http://leafletjs.com and http://www.leafletjs.com to Leaflet's home page (http://leaflet.cloudmade.com).

I'm set up the code subdomain as a CDN using Amazon's CloudFront, which just fetches changes to an S3 bucket and pushes them to their locations throughout the world. This should help some people around the world with quick access to the distributable/versioned Leaflet code.

So, I'll be keeping up with the Leaflet releases and will be pushing them to this CDN. The images for markers and zoom buttons as well as the IE specific CSS are also available (basically everything in the dist/ directory). The resources can be found in the following format:


where x, y and z are major, minor and bug fix indexes respectively. For example the current release, 0.3.1 can be found at:


I don't want this to seem like I hijacked the leafletjs.com domain. If CloudMade wants to maintain this I'd just hand it over. But for now I don't mind. :)

Feel free to use this resource as you see fit.

Thanks
Jason

Vladimir Agafonkin

unread,
Feb 22, 2012, 4:34:24 AM2/22/12
to leafl...@googlegroups.com
Jason,

Wow, this is so awesome! You are great, thank you very much! 

I was thinking about using CloudFront for a Leaflet CDN lately but never got my hands around it. And leafletjs.com is quite a nice domain name (much shorter and first-level). I'll ask CloudMade execs what they think, but meanwhile it's safe to update the code on the download and quickstart pages to the new CDN links.

I'm very grateful for your help!

2012/2/22 Jason Sanford <jasons...@gmail.com>

Jason

unread,
Feb 24, 2012, 11:59:23 AM2/24/12
to Leaflet
Cool, I'm glad to help.

I didn't quite get what you were saying toward the bottom of your
message. Are you asking if it's safe to link to the CDN on the
download and quickstart pages? Or asking someone to do it?

Also, I thought I'd see if anyone had any ideas for keeping this CDN
up to date with a version pointing to master as well. This could
change quite often but would help debugging new features (like the
inertia panning you announced today). Does anyone have any strategies
(or just ideas) for polling for changes to master then pushing them to
an S3 bucket (the master directory where changes are pushed out to the
CDN)?

Thanks
Jason


On Feb 22, 2:34 am, Vladimir Agafonkin <agafon...@gmail.com> wrote:
> Jason,
>
> Wow, this is so awesome! You are great, thank you very much!
>
> I was thinking about using CloudFront for a Leaflet CDN lately but never
> got my hands around it. And leafletjs.com is quite a nice domain name (much
> shorter and first-level). I'll ask CloudMade execs what they think, but
> meanwhile it's safe to update the code on the download and quickstart pages
> to the new CDN links.
>
> I'm very grateful for your help!
>
> 2012/2/22 Jason Sanford <jasonsanf...@gmail.com>
>
>
>
>
>
>
>
>
>
> > I saw leafletjs.com was unclaimed so I thought I'd grab it up before some
> > squatter did (I really hate when that happens).
>
> > I'm forwarding requests tohttp://leafletjs.comand
> >http://www.leafletjs.comto Leaflet's home page (
> >http://leaflet.cloudmade.com).
>
> > I'm set up the code subdomain as a CDN using Amazon's CloudFront, which
> > just fetches changes to an S3 bucket and pushes them to their locations
> > throughout the world. This should help some people around the world with
> > quick access to the distributable/versioned Leaflet code.
>
> > So, I'll be keeping up with the Leaflet releases and will be pushing them
> > to this CDN. The images for markers and zoom buttons as well as the IE
> > specific CSS are also available (basically everything in the dist/
> > directory). The resources can be found in the following format:
>
> >     JavaScript:http://code.leafletjs.com/leaflet-x.y.z/leaflet.js
> >     CSS:http://code.leafletjs.com/leaflet-x.y.z/leaflet.css
>
> > where x, y and z are major, minor and bug fix indexes respectively. For
> > example the current release, 0.3.1 can be found at:
>
> >     JavaScript:http://code.leafletjs.com/leaflet-0.3.1/leaflet.js
> >     CSS:http://code.leafletjs.com/leaflet-0.3.1/leaflet.css
>
> > I don't want this to seem like I hijacked the leafletjs.com domain. If
> > CloudMade wants to maintain this I'd just hand it over. But for now I don't
> > mind. :)
>
> > Feel free to use this resource as you see fit.
>
> --
> Vladimir Agafonkinhttp://agafonkin.com/en

Vladimir Agafonkin

unread,
Feb 24, 2012, 4:10:12 PM2/24/12
to leafl...@googlegroups.com
Jason,

I meant that we can now suggest other people to use the CDN links instead of writing something like "<path_to_dist>/leaflet.css" in the examples, so they can get up and running by just copy-pasting the code without downloading and setting up Leaflet locally. :) I wanted to make the corresponding changes in the next few days (when I get my hands on it) but you can do a pull for this as well.

Regarding auto-pushing to S3, GitHub has a useful post-receive hooks feature http://help.github.com/post-receive-hooks/ that can be used to ping some web service to update the CDN. The only thing left to figure out is setting up such a service.

2012/2/24 Jason <jasons...@gmail.com>

Cool, I'm glad to help.

I didn't quite get what you were saying toward the bottom of your
message. Are you asking if it's safe to link to the CDN on the
download and quickstart pages? Or asking someone to do it?

Also, I thought I'd see if anyone had any ideas for keeping this CDN
up to date with a version pointing to master as well. This could
change quite often but would help debugging new features (like the
inertia panning you announced today). Does anyone have any strategies
(or just ideas) for polling for changes to master then pushing them to
an S3 bucket (the master directory where changes are pushed out to the
CDN)?

Thanks
Jason

 
--
Vladimir Agafonkin

Jason Sanford

unread,
Feb 24, 2012, 4:40:05 PM2/24/12
to leafl...@googlegroups.com
Cool, sounds like a good reason to create my first Node app :)

Vladimir Agafonkin

unread,
Feb 25, 2012, 6:04:12 AM2/25/12
to leafl...@googlegroups.com
Just updated the download and quick start pages to reflect the availability of CDN-hosted Leaflet:

Cool, sounds like a good reason to create my first Node app :)

Di Wu

unread,
Jun 26, 2013, 8:21:26 PM6/26/13
to leafl...@googlegroups.com
You don't seem to have SSL working for the CDN url, can you get SSL working?

Reply all
Reply to author
Forward
0 new messages