Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Mobile Viewer installation testing

4 REPLIES 4
Reply
Message 1 of 5
mark.leslie
581 Views, 4 Replies

Mobile Viewer installation testing

I have installed the Mobile Viewer. I have chahnged the defaultMap in the index.html page to one of my MapDefinitions. I have no commercial baselayers at the moment...all I want is to get the default mobile layout showing a valid map definition.

I load the index.html page in Firefox and after the splash screen displays, nothing happens at all...loading data is as far as it gets.

I installed firebug to try and see where the page is hanging. I localized the problem to the initializeMobileViewer() function. When I get to line 135, mobileViewer.initialize(options), the function gets called, and I can switch into mobileviewer.js to step through the initialise function. I can get to line 72, this.setStatus(mobileViewer.START_LOAD), where we jump into the set status function and in there we switch into the this.loadlocalizedStrings(). Here is where I lose the thread... while


this.strings = new mobileViewer.Strings({ locale:this.locale, onComplete: OpenLayers.Function.bind(this.setStatus, this, mobileViewer.STRINGS_LOADED) });


executes (this seems to be a constructor for the mobileViewer object's String property) the function assignment this.Strings = doesn't seem to complete!?? the closing } is never reached (but perhaps i don't understand Firebug debugging)...anyway...the mobileViewer.Stings (= this.strings above) still doesn't have a value when I switch back out of mobileViewer.initialize(options) and back out again to the original call from the initializeMobileViewer() function to mobileViewer.initialize(options). ????Smiley Frustrated

So now I would expect that the OnComplete=createMap() callback will executed but this is where my debugging session ends....the splash screen stays, and no other code gets called, not the createMap(), or its onComplete() function, createUserInterface().

Now I'm no js programmer or developer, so I expect the instructions to get this technologie running shouldn't require me to tweak Openlayers.js or anything else, just change the defaultMap variable to a valid mapDefinition and I should get a functioning default mobileViewer Webapp....so why doesn't this work?

I followed the install instructions and the technology doesn't seem to work on my Infrastrucure....I need some advice from a pro!

Can anyone give me any insights as to what could be going wrong with this virgin installation on a new VM and a otherwise functioning installation of Map Server 2014 (sheboygan.mgp loaded, sheboygan map works, mapagent works, site admin works, fusion I assume aswell because the site admin works, sample apps work etc, etc)

Smiley SadSmiley FrustratedMan Frustrated

4 REPLIES 4
Message 2 of 5
gluckett
in reply to: mark.leslie

The default site expects you to have this map available:
Library://Samples/Sheboygan/Maps/SheboyganSphericalMercator.MapDefinition

If you do not, nothing will appear.

Alternative: in your URL:
http://localhost/mapserver2015/mobileviewer/?map=Library://whatevermap.MapDefinition

Where whatevermap is a map you made on your server and you can replace it with anything...


Also, don't use Internet Explorer - it won't work anyway.
Message 3 of 5
mark.leslie
in reply to: gluckett

If you read my message (long I know) i was using Firebug. In firefox not IE.

 

Is changing the constant defMap to a valid map definition thats not Sheboygan the same as adding the map query string to my 2014 Map Server mobile viewerr URL?

Message 4 of 5

I had the same problem: the Sheboygan map worked, but my map did not appear after I changed the map definition in index.html page.

 

To make to work I changed in Autodesk Infrastructure Studio the coordinate system for the map to LL84 (WGS84 datum, Latitude-Longitude; Degrees)

Message 5 of 5
reno.sun.gis
in reply to: mark.leslie

Hi Mark,

 

I used AIMS Mobile Viewer before, and I remembered you have to use WGS84 Pseudo Mercator as your map coordinate system in order to make it work.

 

Also, seems I only used Openlayers as my base map.

 

Therefore, my code under initializeMobileViewer() as following

 

function initializeMobileViewer() {

clearTimeout(initTimeout);
var options = {
mgURL: '../mapagent/mapagent.fcgi',
onComplete: createMap
};


var baseLayers = mobileViewer.getQueryParam('baselayers');
if (baseLayers != null) {
baseLayers = baseLayers.toLowerCase();
}
var locale = mobileViewer.getQueryParam('locale');
if (locale != null && locale.length > 0) {
options.locale = locale;
}

mobileViewer.initialize(options);

}

 

Under CreateMap():

 

function createMap() {

var commercialBaseLayers = [];

commercialBaseLayers.push(['OSM', 'null', mobileViewer.getString('OPEN_STREET_MAP')]);

var mapDef = mobileViewer.getQueryParam('map');
if (mapDef == null || mapDef.length == 0) {
mapDef = defaultMapDef;
}

mgMap = new mobileViewer.Map({
mapDiv: document.getElementById('mapContent'),
fullWorldExtent: true,
mapResourceId: mapDef,
onComplete: createUserInterface,
commercialBaseLayers: commercialBaseLayers
});

}

 

Hope these codes help...

 

I will also suggest you use KaliopaMobileViewer for mapguide/AIMS. It's the way more user friendly, and easier to customize comapre to AIMS Mobile Viewer. However, I do hope AIMS team will make great improvement to make its fushion responsive to all devices. Just totally built by pure HTML5, CSS, JavaScript, and other Map API.

 

I am using KaliopaMobileViewer for the Town of Qualicum Beach Public Mapping and GIS site, and you can have a look.

 

Let me know if you have more questions about KaliopaMobileViewer, and I am happy to help you.

 

Cheers!

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report