By Daniel Du
We talked about Ajax Viewer, Fusion Viewer, actually Mobile Viewer is another important viewer, especially for those who want to view map data on mobile devices. The Mobile Viewer framework is a set of JavaScript classes, CSS files, images and icons designed to provide a compelling and intuitive interface for displaying Autodesk Infrastructure Map Server 2014 spatial content on the Apple iPhone, iPad, and iPod Touch. The OpenLayers mapping framework is used to handle many aspects of the map display and management. Several of the PHP scripts used by the Fusion framework are used unmodified in order to interact with the Infrastructure Map Server Web Tier API to perform such functions as session creation, map initialization, selection, and determination of feature properties. You do not need to download/install anything on your devices.
In this chapter, we introduce Mobile Viewer itself and its API, we also talk about how to create a custom controls to extend the mobile viewer and how to debug, build and deploy it. Please find the attached PPT and code samples, and Mobile Viewer Reference Guide section of the AIMS documents
Download Creating a Custom Control for Mobile Viewer
How to setup and run Mobile Viewer Sample.
Please note that the samples just demo how to create custom control, they are not fully tested, and you need to do more work to use them in your project.
1. Install Apache Ant(http://ant.apache.org), and add to PATH environment variable.
2. Copy C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\MobileViewer To C:\MobileViewer_Dev
3. Unpack MobileViewer2013.zip to C:\MobileViewer_Dev and merge the contents. Here is the folder structure after merging :
4. Setup the server side logic.
a) Copy sample\ListSelectionAppDotnet to C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\MobileViewer
b) Convert virtual directory to web application in IIS, please make sure to use ASP.NET 4.0, an easy way is to use MapServer2013AppPool as application pool:
c) Copy all dlls from C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\mapviewernet\bin To C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\MobileViewer\ListSelectionAppDotnet\bin
d) Copy webconfig.ini from C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www to C:\Program Files\Autodesk\Autodesk Infrastructure Web Server Extension 2013\www\MobileViewer\ListSelectionAppDotnet
5. Start-> cmd to open command window:
a) cd C:\MobileViewer_Dev (the folder contains build.xml)
b) Ant
6. Open Mobile viewer and test
a) Open in browser
b) Click “DevCampHelloWorld” button, and click on map;
c) Click “DevCampShowMapInformation” button to show the map information
d) Zoom in and select some features with multi-selection tool
e) Click “ListSelection” button, to show the feature information of selected features.