Hi Alan,
The Map plugin is a good reference example, however it was written before the ide.MakePlugin existed.
If you create a fresh project in DS and include the ideMakePlugin call at the start, it will generate the necessary javascript and html files required for a simple DS plugin. You just need to reload your project to see the new generated files. For example the code below will add 3 new files to your project - DemoPlugin.js, DemoPlugin.html and DemoPlugin.png
function OnStart()
{
//Package this project into a plugin and install it.
ide.MakePlugin( "DemoPlugin" )
//Test the plugin functionality.
app.LoadPlugin( "DemoPlugin" )
plg = app.CreateDemoPlugin()
alert( plg.Test( "World" ) )
}
You can examine those files to see the function pattern/style you need to use to add new features to your plugin. These files will be re-generated every time you run the project and a DemoPlugin.ppk will also be generated every time (in the DroidScript/PPKs folder) which contains the packaged plugin, ready for deployment or uploading to the DS Store.
The MapView plugin is a bit more sophisticated as it wraps up a WebView control. This technique allows you to make use of the many HTML5 and JavaScript libraries that exist on Github and around the web.
Hope that helps
Regards
David