...
Code Block | ||
---|---|---|
| ||
soloMap.addFindNearestPanel({"title": "Locate Nearest Features"}); |
3. Set Map Options & Additional Features
Now you need to define the map options and any additional features (layers) that you wish to use for your map.
Code Block | ||
---|---|---|
| ||
soloMap.createMap('atMap', { themeName: 'base', mapSource: 'Workshop/AllMaps', layers: 'Primaryprimary_Schoolsschools,Secondarysecondary_Schoolsschools', view:{easting:495553, northing:175654, zoom:2000} }); |
themeName
This entry allows the map to use a different CSS/image set which are stored in /web/css/jquery/ folder. In this example we have used ‘base’ but it may have one of the following values: 'base', 'astun', 'blitzer', 'blue' & 'ui-lightness'
mapSource
This is the map source that you wish to be displayed in your Solo Map. If you don't specify a mapSource then the Default Map Source will be used.
layers
If you wish to include additional Map Features to be displayed when the map is loaded then you may define a layers parameter with as many layers as you wish by separating each Layer name (not Display Name) with a comma. In the above example we have chosen to display Primary and Secondary Schools. These layers must be defined within iShare Studio.
Info |
---|
If you don't specify the layers parameter then the layers configured as Visible on Startup will be displayed. |
view
geoRSS
This is another optional parameter that has not been included in the above example. Please see Including a GeoRSS Feed for details.
4. Set the Map Size
Code Block |
---|
<style type="text/css"> #atMap { position: relative; height: 500px !important; width: 100%; padding: 0; border: 1px solid #ccc; } </style> |
The height parameter is defined as “!important” in order that it is not overridden by any other style sheet. You may adjust these values based on the size of map you wish to display.
Note |
---|
The map will always take its size from that of its containing element, so you must always set a size explicitly. |
...