Infrastructure Map Server Developer

Infrastructure Map Server Developer

Reply
Member
ralfzenklusen
Posts: 4
Registered: ‎09-30-2011
Message 1 of 4 (1,536 Views)
Accepted Solution

Bing Maps Mobile Viewer

1536 Views, 3 Replies
10-11-2011 07:53 AM

Hi

I work with AIMS2012 and installed mobile viewer. Now I can display the map (sdf files) but base layers for example Google Maps or Bing Maps are not visible. How or where can I define what base layers are visible in the mobile viewer?

 

Best and thx

You don't.

 

You pass that parameter as part of the URL like so:

 

index.html?baselayers=[osm.[google.[yahoo.[bing]]]]

 

- Jackie

Valued Mentor
jackie.ng
Posts: 284
Registered: ‎10-06-2008
Message 2 of 4 (1,532 Views)

Re: Bing Maps Mobile Viewer

10-11-2011 09:19 PM in reply to: ralfzenklusen

I did take a look at the Mobile Viewer when AIMS 2012 was in beta, and the documentation at that point stated that if you want to show commerical layer types, you pass in the layer types through the baselayers query string parameter, and a dot-separated list of layer types

 

baselayers=[osm.[google.[yahoo.[bing]]]]

 

I don't know if this has changed for the final release.

 

- Jackie

Member
ralfzenklusen
Posts: 4
Registered: ‎09-30-2011
Message 3 of 4 (1,529 Views)

Re: Bing Maps Mobile Viewer

10-11-2011 11:46 PM in reply to: jackie.ng

Hi Jackie

 

Below you can find the code from the index.html file (method initializeMobileViewer). The main problem is that I don't know where and how I have to set the variable baseLayers = 1.

 

var baseLayers = mobileViewer.getQueryParam('baselayers');
        if(baseLayers != null)
        {
            baseLayers = baseLayers.toLowerCase();
            if(baseLayers.indexOf('google') != -1)
            {
                options.googleAPIKey = 'ABQIAAAATNYJBHVIVaSq5AtEw2iEHxSJCEhdEXSl6Vs0dgfLrrKbPf3nZhSDk_cegF7b2IlTWrLNLOXKqNVJqg';
            }
            if(baseLayers.indexOf('bing') != -1)
            {
                options.bingAPI = 'true';
            }
            if(baseLayers.indexOf('yahoo') != -1)
            {
                options.yahooAPIKey = 'XnPi3lbV34HwYXZ3h3peTvVs.dGoQtkMv1f.v9ztVLy9VWbzqhZM.vcFmwrMjpsX1lvpV4w-';
            }
            if(baseLayers.indexOf('osm') != -1)
            {
                options.osmAPI = "true";
            }
        }

 

Thx

Valued Mentor
jackie.ng
Posts: 284
Registered: ‎10-06-2008
Message 4 of 4 (1,520 Views)

Re: Bing Maps Mobile Viewer

10-12-2011 06:05 PM in reply to: ralfzenklusen

You don't.

 

You pass that parameter as part of the URL like so:

 

index.html?baselayers=[osm.[google.[yahoo.[bing]]]]

 

- Jackie

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.