opengeo/mapstory — pull request #590 by jj0hns0n (2013-03-20 16:15:28+00:00)
Title: Add oEmbed Support

This PR adds oEmbed support to mapstory enabling it to be both a consumer and provider of oEmbed functionality (we only care about being a provider now, but consumer support is there should we need it).

This relies on this library https://github.com/worldcompany/djangoembed/ which very clearly says it is unmaintained, yet the alternate library it mentions does not include oEmbed provider support. I tried to do a manual implementation of oEmbed provider and could not get it to work with Wordpress, so gave up and used this library.

I've tested this with Wordpress and it works if you add the following lines as a plugin to your wordpress install. The best path forward here is to make an actual mapstory plugin for wordpress that is easy to install. That should be trivial, but requires a bit of discussion on how its to be distributed etc. Beyond that, wordpress would have to whitelist our site in order to make it work directly with hosted sites on wordpress.com. We can also look into embed.ly as an option.

function wpb_oembed_mapstory(){
wp_oembed_add_provider( 'http://mapstory.dev.opengeo.org/maps/*', 'http://mapstory.dev.opengeo.org/oembed/json' );
}
add_action('init','wpb_oembed_mapstory');

One other thing to note is that the maps embed page is not currently setup properly. It displays the entire page headers and all. We need to make this file https://github.com/opengeo/mapstory/blob/master/templates/maps/embed.html look more like this one https://github.com/opengeo/geonode/blob/mapstory/src/GeoNodePy/geonode/templates/maps/embed.html hoping that @ischneider can help me with that as I dont have my head fully wrapped around the way the viewer works.

@cholmes I had this stood up on dev, but I believe it was re-deployed. Once this PR is merged, we can test again.