#leaflet | Logs for 2012-07-02

Back
[00:05:30] -!- factor has quit [Read error: Connection reset by peer]
[00:16:02] -!- syyl has quit [Quit: Leaving]
[00:17:29] -!- factor has quit [Read error: Connection reset by peer]
[00:21:09] -!- factor has quit [Read error: Connection reset by peer]
[00:43:49] -!- Farthen has quit [Excess Flood]
[00:56:39] Guest43936 is now known as Farthen
[01:12:16] -!- Farthen has quit [Excess Flood]
[01:14:25] -!- Farthen has quit [Client Quit]
[01:15:34] -!- tjb1 has quit [Ping timeout: 246 seconds]
[01:26:37] -!- dimas_ has quit [Ping timeout: 240 seconds]
[01:39:20] -!- ChanServ has quit [*.net *.split]
[01:39:24] -!- Farthen has quit [Quit: ZNC - http://znc.in]
[01:41:02] -!- Farthen has quit [Client Quit]
[01:47:35] -!- Farthen has quit [Excess Flood]
[02:36:02] -!- skunkworks__ has quit [Remote host closed the connection]
[02:49:27] -!- WalterN has quit [Ping timeout: 244 seconds]
[02:59:19] -!- Thetawaves has quit [Quit: This computer has gone to sleep]
[03:00:49] -!- ChanServ [ChanServ!ChanServ@services.] has joined #leaflet
[03:00:49] -!- mode/#leaflet [+o ChanServ] by adams.freenode.net
[03:13:03] -!- cmorley has quit [Ping timeout: 245 seconds]
[03:13:24] -!- mazafaka1 has quit [Ping timeout: 246 seconds]
[04:17:07] -!- r00t-Shed has quit [Ping timeout: 240 seconds]
[04:25:42] -!- Valen has quit [Quit: Leaving.]
[04:46:26] -!- mhaberler has quit [Quit: mhaberler]
[05:03:29] -!- Fox_Muldr has quit [Ping timeout: 265 seconds]
[05:05:53] -!- berndj has quit [Ping timeout: 265 seconds]
[05:08:28] -!- tjb1 has quit [Read error: Connection reset by peer]
[05:14:16] -!- A0Sheds has quit [Ping timeout: 246 seconds]
[05:16:58] -!- tjb1 has quit [Quit: tjb1]
[05:19:50] -!- FinboySlick has quit [Quit: Leaving.]
[05:56:41] -!- A0Sheds has quit [Changing host]
[06:04:32] -!- KimK_ has quit [Ping timeout: 246 seconds]
[06:08:03] -!- karavanjo has quit [Remote host closed the connection]
[06:08:36] -!- karavanjo [karavanjo!~karavanjo@213.184.242.183] has joined #leaflet
[06:10:21] -!- karavanjo has quit [Read error: Connection reset by peer]
[06:11:18] -!- ctang [ctang!180627af@gateway/web/freenode/ip.24.6.39.175] has joined #leaflet
[06:11:22] <ctang> hi all
[06:12:06] <ctang> how to I make the map automatically locate and display a specific are for the user?
[06:12:24] <ctang> locateAndSetView( <Number> maxZoom?, <Locate options> options? )
[06:13:19] <ctang> locate( <Locate options> options? )
[06:21:59] -!- Valen has quit [Quit: Leaving.]
[06:22:00] -!- gambakufu has quit [Read error: Connection reset by peer]
[06:23:16] <ctang> anyone here?
[06:25:29] -!- karavanjo [karavanjo!~karavanjo@213.184.242.183] has joined #leaflet
[06:25:49] -!- mhaberler has quit [Client Quit]
[06:26:27] <ctang> hi kravanjo
[06:26:32] <ctang> I have a question
[06:27:05] <ctang> do you know how to set the map to geolocate the user?
[06:27:41] <perl> ctang: see the tutorial for mobile: http://leaflet.cloudmade.com/examples/mobile.html
[06:27:53] <perl> ctang: it has a section on geolocation
[06:28:18] <ctang> hi perl, I'm using the leaflet maps marker wordpress plugin
[06:29:04] <ctang> map.locateAndSetView(16);
[06:29:11] <ctang> where do I put this>
[06:29:19] <perl> ctang: ok, I have no experience with that plugin specifically
[06:29:31] <ctang> i understand
[06:29:40] <ctang> but the dist files for leaflet should be the same right?
[06:29:57] <ctang> I'm using osm which file would I put map.locateAndSetView(16);
[06:33:08] <ctang> ?
[06:35:23] <perl> I don't know really, I tried looking at the docs for the plugin, but it's not apparent how/where you would add extra initialization javascript code
[06:35:34] <perl> but it should be possible
[06:36:05] <ctang> map.setView(markerLocation, selectlayer.getZoom())
[06:36:19] <ctang> would I chante that to map.locateAndSetView(#);
[06:36:32] <perl> yes
[06:36:45] <ctang> so I don't need anything else really
[06:36:54] <ctang> but to change that, because locateandsetview should be build in
[06:36:57] <perl> no, that should be it, I guess
[06:36:58] <ctang> per the docs
[06:38:44] <perl> ctang: I think you should ask the plugin developers... it's pretty straight forward in leaflet's api, but it might be that the plugin has to be changed
[06:38:55] <perl> anyway, they should know how to do it
[06:39:10] <ctang> he said it wasn't something with the plugin itself
[06:39:25] <ctang> the plugin just creates markers ontop of a leaflet map
[06:39:35] <perl> oh, ok
[06:40:02] <ctang> place.geometry.location.lng()); marker.setLatLng(markerLocation); map.setView(markerLocation, selectlayer.getZoom()); document.getElementById('lat').value = place.geometry.location.lat().toFixed(6); document.getElementById('lon').value = place.geometry.location.lng().toFixed(6); <?php if ($popuptext != NULL) { ?> marker.bindPopup('<?php echo preg_replace('/(\015\012)|(\015)|(\012)/','<br/>',$popuptext)
[06:40:29] <ctang> would I need to remove any of this stuff?
[06:41:30] <perl> well, the map.setView call, as you mentioned earlier
[06:42:02] <perl> the rest is fine, I guess, although a lot of it is specific to the plugin, from what I can tell
[06:42:06] -!- gambakufu has quit [Ping timeout: 264 seconds]
[06:57:23] -!- Keknom has quit [Quit: Leaving.]
[06:57:41] -!- karavanjo has quit [Read error: Connection reset by peer]
[06:58:35] <ctang> hi perl
[06:58:48] <ctang> it seems like some of that is not allowing the shortcode
[06:58:53] <ctang> what do I need to take out?
[07:01:04] -!- tjb1 has quit [Quit: tjb1]
[07:08:20] <perl> hm, I don't follow. what do you mean by "the shortcode"?
[07:12:50] <ctang> http://leaflet.cloudmade.com/examples/mobile.html
[07:13:19] <ctang> "Leaflet has a very handy shortcut for zooming the map view to the detected location — locateAndSetView method, replacing the usual setView method in the code: map.locateAndSetView(16);"
[07:14:15] -!- karavanjo [karavanjo!~karavanjo@213.184.242.183] has joined #leaflet
[07:25:37] <perl> ctang: sorry, don't know what the problem might be. best guess is to compare it to the mobile example (which I assume works for you?) and see if you can find anything that's missing
[07:38:52] -!- micges has quit [Ping timeout: 256 seconds]
[08:15:01] -!- KimK_ has quit [Ping timeout: 245 seconds]
[08:15:50] -!- ctang has quit [Ping timeout: 245 seconds]
[08:32:16] -!- WalterN has quit [Ping timeout: 250 seconds]
[08:40:37] -!- b_b [b_b!ejabberd@81.18.178.14] has joined #leaflet
[08:40:45] -!- Mourner [Mourner!c3148201@gateway/web/freenode/ip.195.20.130.1] has joined #leaflet
[08:45:19] -!- WalterN has quit [Ping timeout: 246 seconds]
[09:05:30] -!- sumpfralle has quit [Ping timeout: 252 seconds]
[09:12:56] -!- karavanjo has quit [Remote host closed the connection]
[09:17:27] -!- WalterN has quit [Ping timeout: 255 seconds]
[09:21:26] -!- chron0 has quit [Changing host]
[09:55:10] -!- rob_h has quit [*.net *.split]
[09:55:10] -!- JT-Shop has quit [*.net *.split]
[09:55:10] -!- Gigs- has quit [*.net *.split]
[09:55:10] -!- tris has quit [*.net *.split]
[09:55:10] -!- alexis has quit [*.net *.split]
[09:55:11] -!- SadMan has quit [*.net *.split]
[09:55:11] -!- netAction has quit [*.net *.split]
[09:55:30] -!- Gigs- has quit [Changing host]
[09:56:38] -!- alexis [alexis!~alexis@hack.lolnet.org] has joined #leaflet
[09:56:38] -!- netAction [netAction!~netAction@netaction.de] has joined #leaflet
[10:00:17] -!- karavanjo [karavanjo!~karavanjo@leased-line-brest-91-149-154-34.telecom.by] has joined #leaflet
[10:15:54] -!- DJ9DJ has quit [Ping timeout: 252 seconds]
[10:34:09] -!- b_b [b_b!ejabberd@81.18.178.14] has parted #leaflet
[10:58:20] -!- Mourner has quit [Ping timeout: 245 seconds]
[11:02:06] -!- factor has quit [Quit: Leaving]
[11:02:44] -!- vladimirek has quit [Remote host closed the connection]
[11:19:37] -!- fatpandas has quit [Quit: leaving]
[11:47:50] -!- draig has quit [Read error: Connection reset by peer]
[11:47:51] draig_ is now known as draig
[11:48:30] -!- draig has quit [Read error: Connection reset by peer]
[12:12:14] -!- mal``` has quit [Ping timeout: 260 seconds]
[12:20:39] -!- Brandonian [Brandonian!~bmorrison@c-76-23-71-165.hsd1.in.comcast.net] has joined #leaflet
[13:11:14] -!- b_b [b_b!ejabberd@81.18.178.14] has joined #leaflet
[14:31:51] -!- Thetawaves has quit [Quit: This computer has gone to sleep]
[15:07:44] -!- JT-Shop has quit [Quit: Leaving]
[15:14:01] -!- vladimirek has quit [Remote host closed the connection]
[15:19:14] -!- ink has quit [Disconnected by services]
[15:34:41] -!- Tom_L has quit [Client Quit]
[15:51:16] -!- A0Sheds has quit [Ping timeout: 246 seconds]
[16:04:55] -!- BenceKovi11 has quit [Ping timeout: 246 seconds]
[16:15:42] -!- IchGuckLive has quit [Remote host closed the connection]
[16:21:42] -!- IchGuckLive has quit [Ping timeout: 264 seconds]
[16:24:24] -!- Farthen has quit [Excess Flood]
[16:24:33] -!- Farthen has quit [Excess Flood]
[16:25:02] -!- Farthen has quit [Excess Flood]
[16:25:33] -!- Farthen has quit [Excess Flood]
[16:26:02] -!- Farthen has quit [Excess Flood]
[16:26:32] -!- Farthen has quit [Excess Flood]
[16:27:02] -!- Farthen has quit [Excess Flood]
[16:27:32] -!- Farthen has quit [Excess Flood]
[16:28:02] -!- Farthen has quit [Excess Flood]
[16:28:33] -!- Farthen has quit [Excess Flood]
[16:29:03] -!- Farthen has quit [Excess Flood]
[16:29:33] -!- Farthen has quit [Excess Flood]
[16:30:03] -!- Farthen has quit [Excess Flood]
[16:30:33] -!- Farthen has quit [Excess Flood]
[16:31:03] -!- Farthen has quit [Excess Flood]
[16:35:24] -!- LeelooMinai has quit [Ping timeout: 252 seconds]
[16:47:04] Brandonian is now known as Brandonian-lunch
[16:58:51] -!- anonimasu has quit [Ping timeout: 244 seconds]
[17:05:56] -!- sumpfralle has quit [Ping timeout: 248 seconds]
[17:13:09] -!- rob_h has quit [Quit: Leaving]
[17:41:38] -!- frallzor has quit [Ping timeout: 255 seconds]
[17:56:01] -!- phantoxe has quit []
[18:01:39] -!- karavanjo has quit [Quit: Leaving]
[18:18:20] Brandonian-lunch is now known as Brandonian
[18:28:04] -!- phantoneD has quit [Ping timeout: 248 seconds]
[18:42:25] -!- WalterN has quit [Ping timeout: 246 seconds]
[18:45:07] -!- sumpfralle has quit [Ping timeout: 240 seconds]
[18:49:23] -!- draig has quit [Quit: draig]
[18:49:50] -!- frallzor has quit [Client Quit]
[18:53:57] -!- ve7it has quit [Remote host closed the connection]
[18:59:22] -!- chillly [chillly!~chris@adsl-83-100-235-16.karoo.KCOM.COM] has joined #leaflet
[19:20:12] -!- syyl_ws has quit [Quit: Verlassend]
[19:30:08] -!- karavanjo [karavanjo!~karavanjo@213.184.242.183] has joined #leaflet
[19:46:15] -!- Thetawaves has quit [Quit: This computer has gone to sleep]
[19:54:38] -!- servos4ever has quit [Quit: ChatZilla 0.9.85 [SeaMonkey 2.0.11/20101206162726]]
[20:08:50] -!- tjb1 has quit [Quit: tjb1]
[20:10:03] -!- b_b [b_b!ejabberd@81.18.178.14] has parted #leaflet
[20:26:26] -!- alpha1125 has quit [Quit: Computer has gone to sleep.]
[20:27:02] -!- draig has quit [Read error: Connection reset by peer]
[20:37:57] -!- ve7it has quit [Remote host closed the connection]
[21:05:16] -!- joe9 has quit [Quit: leaving]
[21:16:43] -!- DJ9DJ has quit [Quit: bye]
[21:37:53] -!- chillly has quit [Quit: Leaving]
[21:46:54] -!- Loetmichel has quit [Ping timeout: 264 seconds]
[21:47:00] cylly2 is now known as Loetmichel
[21:55:00] -!- Diony has quit [Quit: Quitte]
[21:56:50] -!- syyl has quit [Quit: Leaving]
[21:58:38] -!- WalterN has quit [Ping timeout: 250 seconds]
[22:11:45] -!- johtso [johtso!u563@gateway/web/irccloud.com/x-kucuftamnvaldqdn] has joined #leaflet
[22:12:07] -!- SadMan has quit [Ping timeout: 240 seconds]
[22:12:30] -!- ewidance1 has quit [Ping timeout: 246 seconds]
[22:14:01] -!- phantoxeD has quit [Ping timeout: 244 seconds]
[22:39:29] -!- cttt_ [cttt_!180627af@gateway/web/freenode/ip.24.6.39.175] has joined #leaflet
[22:40:13] <cttt_> anyone in here?
[22:40:19] <cttt_> I have a question regarding leaflet
[22:44:50] <frewsxcv> cttt_: Fire away
[22:48:46] <cttt_> I'm using the plugin leaflet maps marker
[22:48:56] <cttt_> and I need to map.locateandsetview
[22:49:09] <cttt_> I attempted to replace the status map.setview/layer.setview
[22:49:12] <cttt_> but it didn't work
[22:49:35] <cttt_> I need the browser/mobile device to detect the user's location and display tiles around them
[22:49:49] <cttt_> I'm using OSM as my basemap
[22:55:40] <frewsxcv> cttt_: What happens when you try map.locateandsetview?
[22:57:09] <cttt_> nothing, it remains the same static view
[22:57:24] <frewsxcv> cttt_: Any errors in the console?
[22:57:36] <frewsxcv> I assume you're doing map.locateAndSetView(<options here>)
[22:58:26] <cttt_> yes
[22:59:59] <frewsxcv> cttt_: What browser?
[23:01:13] <cttt_> chrome
[23:02:24] <frewsxcv> cttt_: I haven't actually tried locate() or locateAndSetView(), but Chrome should prompt to get your location
[23:02:27] <frewsxcv> is it doing that?
[23:04:47] <frewsxcv> cttt_: Does this work for you? http://leaflet.cloudmade.com/examples/mobile-example.html
[23:05:02] <cttt_> nope
[23:05:31] <frewsxcv> cttt_: It's something on your side. That site works fine for me
[23:05:38] <frewsxcv> cttt_: Do you have Firefox installed?
[23:07:06] <frewsxcv> Try it with Firefox and see if it still doesn't work
[23:07:55] <cttt_> nope; it's centering on markers
[23:08:38] <frewsxcv> cttt_: Centering on markers?
[23:10:12] <cttt_> yes
[23:10:14] <cttt_> mebias.com/testpin
[23:12:02] -!- erasmo has quit [Remote host closed the connection]
[23:12:58] <frewsxcv> cttt_: I'm looking at the source. I don't see you using locate anywhere
[23:13:40] <frewsxcv> Or does the plugin do that
[23:14:11] <cttt_> i put it into the plugin
[23:14:23] <cttt_> the plugin I think overrides the set view features of the dist
[23:14:30] <cttt_> I'm unsure though
[23:15:49] <frewsxcv> cttt_: So should it locate me when I load the page? Or do I need to press a button?
[23:16:02] * frewsxcv is unfamiliar with the plugin
[23:16:38] <cttt_> the plugin automatically sets a static corrdinate of layers and markers. you set the layer to satic coordinate and it appears
[23:16:48] <cttt_> I need it to set a view a different way
[23:17:57] <frewsxcv> Just call lmm_map_b0db9ed3.locateAndSetView()
[23:19:54] <cttt_> http://pastebin.com/VeYjLpGp
[23:20:04] <cttt_> the map name is dynamic. . . .
[23:20:10] <cttt_> where would I put it
[23:20:34] <frewsxcv> cttt_: That variable is dynamic? How is it being generated?
[23:21:05] <cttt_> From the OSM link in the script above
[23:26:24] <frewsxcv> cttt_: Well it looks like the map is being declared on line 681 as 'selectlayer'
[23:26:58] <frewsxcv> you could try adding 'selectlayer.locateAndSetView();' on the line after
[23:27:05] <cttt_> I redefined the.setview for all of those
[23:27:47] <frewsxcv> selectlayer.locateandsetview(16);
[23:27:50] <frewsxcv> in your code
[23:27:57] <frewsxcv> it's case sensitive
[23:28:00] <cttt_> so add it to 682?
[23:28:07] <frewsxcv> locateAndSetView()
[23:29:53] <frewsxcv> 00:00:00 frewsxcv | I assume you're doing map.locateAndSetView(<options here>)
[23:31:31] -!- rob_h has quit [Ping timeout: 244 seconds]
[23:35:13] <frewsxcv> cttt_: Any luck?
[23:36:07] <frewsxcv> I'll be back on later
[23:36:10] * frewsxcv detaches
[23:39:13] -!- andypugh has quit [Quit: andypugh]
[23:43:05] -!- FinboySlick has quit [Quit: Leaving.]
[23:47:10] -!- LeelooMinai has quit [Read error: Connection reset by peer]