From: ScottDowne Date: Tue, 11 Jan 2011 21:09:51 +0000 (-0500) Subject: [#246] pulled map updates and 0.2 X-Git-Tag: v0.2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a64396da1c5beae50871b0f993e5cabcb499365b;p=popcorn-js.git [#246] pulled map updates and 0.2 --- a64396da1c5beae50871b0f993e5cabcb499365b diff --cc demos/semantic_video/xml/webMadeMovies.xml index e687a19,0000000..0616d8d mode 100644,000000..100644 --- a/demos/semantic_video/xml/webMadeMovies.xml +++ b/demos/semantic_video/xml/webMadeMovies.xml @@@ -1,324 -1,0 +1,324 @@@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Look around the page as info is updated! + + + This video made exclusively for drumbeat.org + + + + + + + + + + Grassroots Mapping, Tungsten Monkey + + + + KeyBoard Cat, Charlie Schmidt + + + + Grassroots Mapping, Tungsten Monkey + + + + + + + + + + + + Learn more about Grass Roots mapping at www.grassrootsmapping.org + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Read Zittrain's book 'The Future of the Internet — And How to Stop It' + + + + + + + + + + + + + + + + - ++ + + + + + + + + + + + + All right let's take a look and show me some + of the neat things you can do on the Internet + Have you ever wondered if there is a common thread + that exists between open source + phone hackers in South Africa, + adventurers using kites to map an oil spill, + and a video of a cat seen by tens of millions of people? + Well it's the Internet + the cat, the kite, and the phone hackers + would all be impossible without the Internet + an open network that lets anyone + participate without asking permission. + The Internet is what lets M.I.T student Jeffrey Warren + use kites to map an oil spill. + well wait a second why do we have to go all the way + into space to take pictures of things + that are right, literally right next to us, you know. + We can use simple tools like balloons or kites. + Have the camera taking pictures every five seconds + the idea is to get a lot of people involved + in producing maps and then share all of the information + like Wikipedia style you know? + The Internet is what allows Steve Song and his friends + to create a D.I.Y. phone network + called the Village Telco. + Everyone that has a device, that we call a mesh potato, + actually has a phone number + and can call anyone else on the mesh at no charge. + So taking open-source principles to a telephone company. + Everything is open, anyone can come and anyone can join + anyone can make contributions + and that's why I'm here. + The Internet is what allowed Charlie Schmidt + to film his cat on his keyboard + and the rest is history. + I remember having two profound thoughts back to back + and the first one was any pervert in his basement + can compete with NBC. + And then I thought, ohh I am that pervert in his basement. + It wasn't always this way + before the web our computers could only network + through a series of walled gardens, and we had to ask + permission to publish our content or create new services. + There were some big companies in there that thought + they would run the mainframes that we + might be mediating data through. + CompuServe, America Online, The Source, + MCI Mail,Prodigy. + if you go to CompuServe, + you'll get whatever CompuServe has put under its roof. + If you subscribe to AOL you'll get whatever AOL has. + Prodigy even has a twenty-one volume electronic + encyclopedia that's updated quarterly + including thirty messages. + Alright, Prodigy :D + No one really factored in that off in a quiet corner, + there were tinkerers doing foundational technologies + for networking, + and they had a certain freedom that the firms didn't have. + You didn't have to do a business development deal + with the owner of the Internet... + before you could put up a website. + So that's what allowed Tim Berners-Lee + to develop a protocol for an application, + that would just run on top of the Internet, + called the web. + And then he was like, OK world go to it. + Ordinary people are becoming electronic publishers. + They are putting up the things + that mean something to them + and they want to share it with the rest of the world. + Why is it better than CompuServe or Prodigy? + That anyone can put any servers on + and have it do anything they want. + In fact most browsers have the ability + for you to view that source code. + I can go in then and start changing it + myself for free. Ok great. + Listen there’s even an encyclopedia + Awesome. All right. + We owe everything about the Internet + to the fact that its open. + And the hacker spirit that the people + who created it believed it. + But all that could change. + The way things are… are not the way + things will inevitably be. + The Internet itself is evolving + and can be pushed + in one direction or another. + And some futures are much better than others. + It’s great to have the example of the World Wide Web. + It’s great to have the example of Wikipedia. + There’s more where that came from. + + And I help make a better Internet + By making things easier to use + At Web Made Movies + we want to build a better Internet + by making video more open. + The page your watching is a good example + We’re going to keep exploring how video + can be more like the web. + And tell the story of some web heroes + along the way. + Explore our credits section to see + how you can get involved. + + + My name is Mona Kasra + and I'm building a better Internet + + + I make the Internet better + producing and sharing music + using Creative Commons + + + + + + + + + diff --cc plugins/googleMap/popcorn.googleMap.js index 8e7e635,0d16e1e..b275654 --- a/plugins/googleMap/popcorn.googleMap.js +++ b/plugins/googleMap/popcorn.googleMap.js @@@ -53,6 -53,18 +53,17 @@@ var googleCallback } }, _setup : function( options ) { + // create a new div this way anything in the target div + // this is later passed on to the maps api + options._newdiv = document.createElement('div'); + options._newdiv.id = "actualmap"+i; + options._newdiv.style.width = "100%"; + options._newdiv.style.height = "100%"; - options._newdiv.style.display = "none"; + i++; + if (document.getElementById(options.target)) { + document.getElementById(options.target).appendChild(options._newdiv); + } + // insert google api script once if (!_mapFired) { _mapFired = true; @@@ -70,21 -82,26 +81,28 @@@ }; // If there is no lat/long, and there is location, geocode the location // you can only do this once google.maps exists - // however geocode takes a while so loop this function until lat/long is defined. var isGeoReady = function() { - if ( !_mapLoaded && !options.lat) { - if ( !_mapLoaded) { ++ if ( !_mapLoaded ) { setTimeout(function () { isGeoReady(); - }, 13); + }, 5); } else { if (options.location) { var geocoder = new google.maps.Geocoder(); + // calls an anonymous function called on separate thread geocoder.geocode({ 'address': options.location}, function(results, status) { if (status === google.maps.GeocoderStatus.OK) { - options.lat = results[0].geometry.location.wa; - options.long = results[0].geometry.location.ya; + options.lat = results[0].geometry.location.lat(); + options.long = results[0].geometry.location.lng(); + options._location = new google.maps.LatLng(options.lat, options.long); + options._map = new google.maps.Map(options._newdiv, {mapTypeId: google.maps.MapTypeId[options.type] || google.maps.MapTypeId.HYBRID }); ++ options._map.getDiv().style.display = 'none'; } }); + } else { + options._location = new google.maps.LatLng(options.lat, options.long); + options._map = new google.maps.Map(options._newdiv, {mapTypeId: google.maps.MapTypeId[options.type] || google.maps.MapTypeId.HYBRID }); ++ options._map.getDiv().style.display = 'none'; } } }; @@@ -115,17 -122,11 +123,11 @@@ isReady(); }, 13); } else { - - if(options._map){ - options._map.getDiv().style.display = 'block'; - } else { - var location = new google.maps.LatLng(options.lat, options.long); - options._map = new google.maps.Map(options._newdiv, {mapTypeId: google.maps.MapTypeId[options.type] || google.maps.MapTypeId.HYBRID }); - } + options._map.getDiv().style.display = 'block'; // reset the location and zoom just in case the user plaid with the map - options._map.setCenter(location); + options._map.setCenter(options._location); if ( options.zoom ) { -- if ( typeof options.zoom !== "Number" ) { ++ if ( typeof options.zoom !== "number" ) { options.zoom = +options.zoom; } } else { diff --cc plugins/googleMap/popcorn.googleMap.unit.js index b5cd31f,9badfe3..4491384 --- a/plugins/googleMap/popcorn.googleMap.unit.js +++ b/plugins/googleMap/popcorn.googleMap.unit.js @@@ -17,8 -17,8 +17,8 @@@ test("Popcorn Google Map Plugin", funct } stop(); -- - ok ('googlemap' in popped, "googleMap is a mehtod of the popped instance"); ++ + ok ('googlemap' in popped, "googlemap is a mehtod of the popped instance"); plus(); ok ( document.getElementById('map').innerHTML === "", "initially, there is nothing inside the map" );