Quick Start to Oskari development
- Download sources from here
- Extract the files from the downloaded archive
- Open
/applications/sample/myfirst/index.html
in your browser and you should see:
This is the map application with only OpenLayers and the core of Oskari downloaded with a custom 'Hello World' bundle added as extension.
To add new funtionality to the application we add another bundle to it:
- Open
/applications/sample/myfirst/appsetupconfig.json
file in an editor - Find the a bundle block for
myfirstbundle
and append the followingmysecondbundle
after it (remember to separate the blocks with a comma):
{
"bundlename" : "mysecondbundle",
"metadata" : {
"Import-Bundle" : {
"mysecondbundle" : {
"bundlePath" : "../../../packages/sample/bundle/"
}
}
}
}
- Reload
index.html
on your browser and click the map. You should get another message alert whenever you click the map. This is the functionality added bymysecondbundle
: it listens to an Oskari Event and reacts to it by showing an alert. - If you open
/applications/sample/mysecond/index.html
in your browser you will have the same functionality without the Hello World alert on startup.
Next steps
Working with Tiles and Flyouts
Requesting Toolbar for a new button
Last modified: Tue Sep 17 2024 12:23:37 GMT+0300 (Eastern European Summer Time)