#leaflet | Logs for 2012-12-07

Back
[00:08:00] -!- logger[mah] has quit [Remote host closed the connection]
[00:22:25] -!- racycle [racycle!~racycle@75-25-129-128.lightspeed.sjcpca.sbcglobal.net] has joined #leaflet
[00:26:11] -!- ybon has quit [Quit: WeeChat 0.3.8]
[00:34:54] -!- mattions has quit [Ping timeout: 264 seconds]
[00:42:52] -!- micges has quit [Quit: Leaving]
[00:50:46] -!- Nick001-Shop has quit [Remote host closed the connection]
[00:51:49] -!- adb has quit [Ping timeout: 264 seconds]
[00:53:32] -!- Farthen has quit [Excess Flood]
[01:00:32] -!- toastydeath has quit [Read error: Connection reset by peer]
[01:03:42] -!- asdfasd has quit [Ping timeout: 264 seconds]
[01:04:10] -!- bj_ [bj_!63f92a17@gateway/web/freenode/ip.99.249.42.23] has joined #leaflet
[01:07:51] <bj_> yo
[01:08:19] -!- bj_ has quit [Client Quit]
[01:09:23] -!- andypugh has quit [Quit: andypugh]
[01:26:13] -!- Aero-Tec has quit [Read error: Connection reset by peer]
[01:57:28] -!- mhaberler has quit [Quit: mhaberler]
[03:06:51] -!- Simon2 [Simon2!~Simon@mail.cassio.be] has joined #leaflet
[03:14:43] -!- olsson_ has quit [Ping timeout: 255 seconds]
[03:15:51] -!- sumpfralle has quit [Ping timeout: 276 seconds]
[03:24:42] -!- skunkworks has quit [Ping timeout: 264 seconds]
[03:47:41] -!- PCW has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.2/20121024073032]]
[04:05:57] -!- Keknom has quit [Quit: Leaving.]
[04:15:26] -!- dhoovie has quit [Ping timeout: 246 seconds]
[04:16:31] -!- ben98216 has quit []
[04:16:58] -!- syyl has quit [Ping timeout: 265 seconds]
[04:21:53] -!- Loetmichel has quit [Ping timeout: 246 seconds]
[04:28:45] -!- bradsimantel [bradsimantel!~simantel@c-67-171-204-179.hsd1.or.comcast.net] has joined #leaflet
[05:37:25] -!- jpk [jpk!~jpk@unaffiliated/vorondil] has joined #leaflet
[05:50:34] -!- kmiyashiro has quit [Quit: kmiyashiro]
[05:56:22] -!- psha[work] [psha[work]!~psha@195.135.238.205] has joined #leaflet
[06:01:50] -!- Fox_Muldr has quit [Ping timeout: 260 seconds]
[06:22:59] -!- bradsimantel has quit [Quit: bradsimantel]
[07:10:25] -!- ve7it has quit [Remote host closed the connection]
[07:10:27] -!- JT-Shop has quit [Read error: Connection reset by peer]
[07:47:54] -!- leehambley [leehambley!~codebeake@p57AED809.dip.t-dialin.net] has joined #leaflet
[07:55:16] -!- bmwyss [bmwyss!~bmwyss@fw-eucentre.unipv.it] has joined #leaflet
[08:19:41] -!- JT-Shop has quit [Read error: Connection reset by peer]
[08:22:06] -!- racycle has quit [Quit: racycle]
[08:22:40] -!- archivist_herron has quit [Ping timeout: 260 seconds]
[08:22:54] -!- pjm has quit [Ping timeout: 264 seconds]
[08:29:15] -!- emel has quit [Excess Flood]
[08:29:36] -!- emel [emel!~emel@sd-22438.dedibox.fr] has joined #leaflet
[08:32:41] theos is now known as Guest8525
[08:35:59] -!- Guest8525 has quit [Ping timeout: 246 seconds]
[08:59:43] -!- mackerski [mackerski!~dermot@87-198-252-242.static.ptr.magnet.ie] has joined #leaflet
[09:00:49] -!- Aero-Tec has quit [Ping timeout: 244 seconds]
[09:01:01] Aero-Tec_ is now known as Aero-Tec
[09:03:17] -!- grummund has quit [Ping timeout: 248 seconds]
[09:09:30] -!- ybon [ybon!~ybon@80.214.1.3] has joined #leaflet
[09:14:29] -!- Simon2 has quit [Read error: Connection reset by peer]
[09:20:28] -!- Simon2 [Simon2!~Simon@mail.cassio.be] has joined #leaflet
[09:22:02] -!- mattions [mattions!~mattions@cpc3-cmbg14-2-0-cust446.5-4.cable.virginmedia.com] has joined #leaflet
[09:44:16] -!- jpk has quit [Ping timeout: 256 seconds]
[10:03:35] -!- the_wench has quit [Ping timeout: 240 seconds]
[10:04:54] -!- archivist has quit [Ping timeout: 264 seconds]
[10:05:33] -!- mhaberler has quit [Quit: mhaberler]
[10:18:15] -!- pingufan has quit [Quit: Konversation terminated!]
[10:24:14] -!- dhoovie has quit [Read error: Connection reset by peer]
[10:53:06] -!- Cylly has quit []
[11:49:18] -!- mattions has quit [Ping timeout: 264 seconds]
[11:49:55] -!- vladimirek has quit [Ping timeout: 240 seconds]
[12:07:04] -!- mhaberler has quit [Quit: mhaberler]
[12:32:03] -!- mattions [mattions!~mattions@zone7.jesus.cam.ac.uk] has joined #leaflet
[12:37:06] -!- djheinz has quit [Read error: Connection reset by peer]
[12:52:05] -!- Simon2 has quit [Read error: Connection reset by peer]
[12:58:49] -!- Simon3 [Simon3!~Simon@mail.cassio.be] has joined #leaflet
[13:06:56] -!- putnik has quit [Quit: leaving]
[13:07:07] -!- putnik [putnik!~putnik@putnik.ws] has joined #leaflet
[13:07:07] -!- putnik has quit [Changing host]
[13:07:07] -!- putnik [putnik!~putnik@wikimedia/putnik] has joined #leaflet
[13:07:31] -!- mattions has quit [Ping timeout: 250 seconds]
[13:31:16] -!- mk0 has quit [Quit: Leaving]
[13:35:05] -!- mattions [mattions!~mattions@zone7.jesus.cam.ac.uk] has joined #leaflet
[13:55:18] -!- leehambley has quit [Quit: leehambley]
[14:17:09] -!- automata_ has quit [Ping timeout: 252 seconds]
[14:19:31] -!- Brandonian [Brandonian!~bmorrison@c-107-3-238-247.hsd1.tn.comcast.net] has joined #leaflet
[14:20:59] -!- psha[work] has quit [Quit: Lost terminal]
[14:23:13] -!- mhaberler has quit [Quit: mhaberler]
[14:29:37] -!- joeg has quit [Ping timeout: 264 seconds]
[14:30:05] -!- mackerski has quit [Quit: mackerski]
[14:37:44] -!- wboykinm [wboykinm!~quassel@132.198.159.96] has joined #leaflet
[14:38:40] zz_satyag is now known as satyag
[14:47:36] -!- maalox has quit [Ping timeout: 240 seconds]
[14:47:43] -!- maalox [maalox!~maalox@50-57-155-137.static.cloud-ips.com] has joined #leaflet
[14:49:37] satyag is now known as zz_satyag
[15:02:11] -!- leehambley [leehambley!~codebeake@p57AED809.dip.t-dialin.net] has joined #leaflet
[15:04:02] -!- Simon3 has quit [Read error: Connection reset by peer]
[15:04:54] -!- Simon3 [Simon3!~Simon@mail.cassio.be] has joined #leaflet
[15:08:09] -!- Simon3 has quit [Read error: Connection reset by peer]
[15:09:49] -!- Simon3 [Simon3!~Simon@mail.cassio.be] has joined #leaflet
[15:15:28] -!- toastydeath has quit [Read error: Connection reset by peer]
[15:17:46] -!- tayy [tayy!~tayy@cm28.zeta180.maxonline.com.sg] has joined #leaflet
[15:28:45] -!- bmwyss has quit [Quit: bmwyss]
[15:32:56] -!- mattions has quit [Ping timeout: 252 seconds]
[15:34:45] -!- ktchk has quit [Ping timeout: 276 seconds]
[15:44:31] <tayy> hi all
[15:44:47] <tayy> is there a way to get all the latlngs of all the markers on the map?
[15:45:02] <tayy> i want the map to fitBounds after all the markers have been added
[15:50:07] zz_satyag is now known as satyag
[15:51:36] <ybon> tayy: if you add them in a LayerGroup/FeatureGroup, you will be able to use the group getBounds()
[15:54:18] -!- kmiyashiro [kmiyashiro!~KellyM@c-107-3-191-199.hsd1.ca.comcast.net] has joined #leaflet
[15:56:01] <tayy> ybon: thanks! i'll look into that
[15:57:16] -!- mattions [mattions!~mattions@zone7.jesus.cam.ac.uk] has joined #leaflet
[15:58:15] -!- fatpandas has quit [Ping timeout: 260 seconds]
[15:58:33] JT-Shop-2 is now known as JT-Shop
[16:06:01] -!- skunkworks_ has quit [Quit: Leaving]
[16:07:10] -!- kmiyashiro has quit [Quit: kmiyashiro]
[16:07:18] -!- neverho0d has quit [Ping timeout: 264 seconds]
[16:22:48] -!- Aero-Tec has quit [Ping timeout: 252 seconds]
[16:22:58] Aero-Tec_ is now known as Aero-Tec
[16:29:07] -!- bradsimantel [bradsimantel!~simantel@c-67-171-204-179.hsd1.or.comcast.net] has joined #leaflet
[16:35:22] -!- toastydeath has quit [Read error: Connection reset by peer]
[16:39:49] -!- mozmck has quit [Quit: Leaving.]
[16:40:04] -!- bradsimantel_ [bradsimantel_!~simantel@c-67-171-204-179.hsd1.or.comcast.net] has joined #leaflet
[16:40:07] -!- bradsimantel_ has quit [Client Quit]
[16:40:18] -!- bradsimantel has quit [Read error: Connection reset by peer]
[16:48:28] -!- tayy has quit [Remote host closed the connection]
[16:49:21] -!- BarCar [BarCar!c1dd88e5@gateway/web/freenode/ip.193.221.136.229] has joined #leaflet
[16:50:52] -!- racycle [racycle!~racycle@75-25-129-128.lightspeed.sjcpca.sbcglobal.net] has joined #leaflet
[16:52:03] <BarCar> Can anybody help me understand how to add many markers from a JS array to a map with leaflet?
[16:52:53] <BarCar> Seems I need to create all the markers and add to a layer group in one go which doesn't lend itself to client-side iteration through an array.
[17:01:27] -!- Simon3 has quit [Read error: Connection reset by peer]
[17:15:03] -!- zzolo [zzolo!~zzolo@173-160-119-114-Minnesota.hfc.comcastbusiness.net] has joined #leaflet
[17:15:28] <ybon> BarCar: what your array looks like?
[17:17:35] satyag is now known as zz_satyag
[17:20:23] -!- gmouer has quit [Ping timeout: 246 seconds]
[17:23:22] -!- tjb1 has quit [Quit: tjb1]
[17:26:21] <BarCar> array of location name, longitude, latitiude, description (for infobox pop up)
[17:26:55] <BarCar> var locations = [];
[17:27:37] <BarCar> locations.push(new map_location("AE-DUBAI", 25.0, 55.3, "DUBAI", "Full Address"));
[17:27:55] <BarCar> Repeat times several hundred locations
[17:27:58] -!- r00t4rd3d has quit [Read error: Connection reset by peer]
[17:28:30] <BarCar> You may be able to tell that JavaScript is not my strong suit...
[17:29:00] <ybon> so you just need to do: var marker = L.marker([lat, lng]).addTo(map);
[17:29:35] <BarCar> yeah - thanks - I figured that for basic markers
[17:29:40] <ybon> then if you want a popup, marker.bindPopup(you_content);
[17:29:52] <BarCar> but I want to group them into layers - home locations and office locations
[17:30:02] -!- syyl_ws has quit [Quit: Verlassend]
[17:30:11] <ybon> I see
[17:30:23] -!- gmouer2 has quit []
[17:30:24] <ybon> http://leafletjs.com/examples/layers-control.html will help
[17:31:21] <BarCar> I've been working through that but it suggests all the markers need to be defined with known namesbefore a layer group can be created
[17:31:40] <BarCar> which doesn't lend itself to iterating through an array of locations
[17:32:02] <ybon> ah
[17:32:18] <ybon> no, you can use layer.addLayer(your_marker)
[17:32:26] <ybon> layer is your LayerGroup instance
[17:33:13] <BarCar> great! that's exactly what I was missing I think.
[17:33:15] <ybon> so you can 1. create your layer group 2. loop over your array of locations 3. for each, create the marker and add it to the layer
[17:33:19] <ybon> ok
[17:33:20] <BarCar> much much appreciated.
[17:35:20] <ybon> :)
[17:44:32] -!- Theta9 has quit [Ping timeout: 246 seconds]
[17:57:56] -!- yuvipanda [yuvipanda!~yuvipanda@mediawiki/Yuvipandan] has joined #leaflet
[18:00:28] -!- yuvipanda has quit [Client Quit]
[18:15:58] -!- leehambley [leehambley!~codebeake@p57AED809.dip.t-dialin.net] has parted #leaflet
[18:16:18] -!- zzolo has quit [Quit: zzolo]
[18:21:04] -!- syyl_ has quit [Quit: Leaving]
[18:27:57] -!- mattions has quit [Ping timeout: 252 seconds]
[18:51:30] -!- leepfrog [leepfrog!4fca705d@gateway/web/freenode/ip.79.202.112.93] has joined #leaflet
[18:53:56] <leepfrog> \o there
[18:54:24] <leepfrog> any experienced JS dev here who uses leaflet?
[18:58:33] -!- zzolo [zzolo!~zzolo@c-75-72-229-64.hsd1.mn.comcast.net] has joined #leaflet
[19:00:49] -!- mattions [mattions!~mattions@cpc3-cmbg14-2-0-cust446.5-4.cable.virginmedia.com] has joined #leaflet
[19:01:59] -!- motioncontrol has quit [Ping timeout: 260 seconds]
[19:05:15] -!- Vq has quit [Ping timeout: 260 seconds]
[19:06:06] -!- Oo_BIGey1 has quit [Ping timeout: 264 seconds]
[19:12:57] -!- kmiyashiro [kmiyashiro!~KellyM@65-123-15-198.dia.static.qwest.net] has joined #leaflet
[19:14:13] -!- motioncontrol has quit [Quit: Sto andando via]
[19:23:13] -!- sumpfralle has quit [Read error: Operation timed out]
[19:26:58] -!- IchGuckLive has quit [Quit: ChatZilla 0.9.87 [Firefox 16.0.2/20121025205401]]
[19:32:52] -!- leepfrog has quit [Quit: Page closed]
[19:37:30] -!- psha has quit [Quit: Lost terminal]
[19:55:40] -!- pcw_home has quit [Ping timeout: 260 seconds]
[19:59:44] -!- born2late has quit [Ping timeout: 244 seconds]
[20:05:36] -!- archivist_herron has quit [*.net *.split]
[20:05:36] -!- JT-Shop has quit [*.net *.split]
[20:05:37] -!- Patang has quit [*.net *.split]
[20:05:37] -!- mazafaka has quit [*.net *.split]
[20:05:37] -!- cmorley1 has quit [*.net *.split]
[20:05:37] -!- cncbasher_ has quit [*.net *.split]
[20:05:37] -!- icee has quit [*.net *.split]
[20:05:38] -!- zz_satyag has quit [*.net *.split]
[20:05:38] -!- fragalot has quit [*.net *.split]
[20:05:38] -!- cpresser has quit [*.net *.split]
[20:05:38] -!- markvandenborre has quit [*.net *.split]
[20:05:38] -!- pthorin_ has quit [*.net *.split]
[20:05:39] -!- phillipadsmith has quit [*.net *.split]
[20:06:35] -!- Aero-Tec has quit [Ping timeout: 240 seconds]
[20:06:35] Aero-Tec_ is now known as Aero-Tec
[20:07:50] -!- RyanS has quit [Ping timeout: 244 seconds]
[20:11:00] -!- zz_satyag [zz_satyag!satyag@kiwi.bnc4free.com] has joined #leaflet
[20:11:00] -!- pthorin_ [pthorin_!~petert@gbg01.kartena.se] has joined #leaflet
[20:11:00] -!- phillipadsmith [phillipadsmith!u2905@gateway/web/irccloud.com/x-krehlqrjyfmpizyu] has joined #leaflet
[20:17:08] -!- kmiyashiro has quit [Ping timeout: 255 seconds]
[20:18:44] -!- mhaberler has quit [Quit: mhaberler]
[20:21:11] -!- RyanS has quit [Ping timeout: 255 seconds]
[20:29:15] -!- skunkworks_ has quit [Ping timeout: 260 seconds]
[20:48:48] -!- vladimirek has quit [Remote host closed the connection]
[20:59:09] -!- Brandonian has quit [Read error: Connection reset by peer]
[20:59:26] -!- Brandonian [Brandonian!~bmorrison@c-107-3-238-247.hsd1.tn.comcast.net] has joined #leaflet
[21:02:39] -!- kmiyashiro [kmiyashiro!~KellyM@65-123-15-198.dia.static.qwest.net] has joined #leaflet
[21:03:45] -!- Tecan has quit [Ping timeout: 250 seconds]
[21:43:25] -!- joeg has quit [Ping timeout: 244 seconds]
[21:52:08] -!- BarCar has quit [Ping timeout: 245 seconds]
[21:56:05] -!- pilla_ has quit [Remote host closed the connection]
[22:03:27] -!- FinboySlick has quit [Quit: Leaving.]
[22:10:43] -!- DJ9DJ has quit [Quit: bye]
[22:35:46] -!- skunkworks has quit [Read error: Connection reset by peer]
[22:42:02] -!- wboykinm has quit [Remote host closed the connection]
[22:58:25] -!- sumpfralle has quit [Ping timeout: 264 seconds]
[23:01:17] -!- Brandonian has quit [Read error: Connection reset by peer]
[23:01:33] -!- Brandonian [Brandonian!~bmorrison@c-107-3-238-247.hsd1.tn.comcast.net] has joined #leaflet
[23:04:18] -!- sumpfralle1 has quit [Ping timeout: 252 seconds]
[23:06:15] -!- sumpfralle has quit [Ping timeout: 240 seconds]
[23:09:29] -!- grummund has quit [Ping timeout: 255 seconds]
[23:10:23] -!- sumpfralle2 has quit [Ping timeout: 265 seconds]
[23:16:02] -!- sumpfralle has quit [Ping timeout: 252 seconds]
[23:27:29] -!- sumpfralle1 has quit [Ping timeout: 255 seconds]
[23:32:31] -!- motioncontrol has quit [Remote host closed the connection]
[23:32:39] -!- sumpfralle has quit [Ping timeout: 252 seconds]
[23:37:23] -!- racycle has quit [Quit: racycle]
[23:38:38] -!- sumpfralle1 has quit [Ping timeout: 244 seconds]
[23:42:35] -!- sumpfralle has quit [Ping timeout: 240 seconds]
[23:46:18] -!- sumpfralle1 has quit [Ping timeout: 276 seconds]
[23:51:00] -!- servos4ever has quit [Quit: ChatZilla 0.9.85 [SeaMonkey 2.0.11/20101206162726]]
[23:52:40] -!- sumpfralle has quit [Ping timeout: 255 seconds]
[23:59:20] -!- zzolo has quit [Quit: zzolo]