...
If you find that you are not happy with the Zoom level used by iShare GIS when a user performs a Find Address in iShare GIS then you may change this by editing the iShareGIS.aspx page.
Step-by-step guide
- Navigate to the D:\Astun\iShareGIS\n.n\WebApps\Web folder and open the iShareGIS.aspx page in a Text Editor such as Notepad ++.
- Search for Astun.JS.IncludeJS
Code Block |
---|
title | Exerpt of Original code |
---|
|
<script type="text/javascript" src="js/lib/prototype-1.6.0.3.js"></script>
<script type="text/javascript" src="FileIncluderJS.aspx"></script>
<script type="text/javascript">
Event.observe(window, 'load', function() {
Astun.JS.IncludeJS('gis', function() {
window.astun.app = new Astun.JS.MapApp("#ishare-gis", "gis",
{
branding: "<h1><a href=\"https://astuntech.atlassian.net/wiki/x/14AgAQ\">iShare GIS</a></h1>"
}
);
});
});
</script> |
- Add the following immediately after the line Astun.JS.IncludeJS('gis', function() {
. Change the locationZoomWidth to the value you require, in our example we have changed it to 100.
Code Block |
---|
|
// Set the locationZoomWidth to a small value so that the map zooms
// in to a large scale when a user selects an address from the
// address search.
if (!window.astun.settings) {
window.astun.settings = {};
}
window.astun.settings.locationZoomWidth = 100; |
- Change the locationZoomWidth to the value you require, in our example we have changed it to 100.
- Your code should now look like this:
...