Select to view content in your preferred language

Public Maps Gallery template version 1.4  --Opening post

33470
175
11-22-2011 02:57 PM
Esriwebmap
Occasional Contributor


Please reply to this opening post to submit questions and comments about the Public Maps Gallery (PMG) template version 1.4.
Tags (2)
0 Kudos
175 Replies
Esriwebmap
Occasional Contributor
ok - so I have started using the Android AVD Manager to test the v1.4 public maps gallery with little luck.  I thought maybe it was something to do with the AVD so I went to a Sprint stoer to test it too.  They allow you to install apps so that was my choice for full selection of mobile devices to test drive the site.

Issues:

Apple iOS:

     Redirects to a bad url and then fixes itself on way to itunes...

     // IOS APP URL
     pmgConfig.iosAppURL = "itms://itunes.apple.com/us/app/arcgis/id379687930?mt=8";
     //perhaps another redirect would work better?

Android:

     A mobile device is detected but there is no pmgConfig setting to redirect android devices to the android market so this page is displayed:



something like this would be nice...

     //ANDROID APP URL
     //pmgconfig.androidAppURL = "https://market.android.com/details?id=com.esri.android.client"

Further - once the app is installed the map cannot be loaded.  So now the device cannot view the map at all unless the change the url to start with http instead of arcgis and not a likely task for standard mobile user...

WindowsMobile

The app took too long to download and left before it was complete - perhaps it is finished now and I will return to the store and check that one;)

     there is no pmgConfig setting to redirect WindowsMobile devices to their market; something like this would be nice....

     //WINDOWS MOBILE URL
     //pmgconfig.windowsMobileAppURL = "http://social.zune.net/redirect/preferences/askclient?ReturnUrl=http%3a%2f%2fsocial.zune.net%2fredirect%3ftype%3dphoneApp%26id%3d7cb003be-990a-e011-9264-00237de2db9e"



Yeah, that's correct. Nice investigation you did there 🙂

Last time I tested on Android, I had the app installed and when using the "arcgis://" protocol URL, it wouldn't load in the ArcGIS app. I'm not sure what the URL should be to open a webmap in the ArcGIS app for android. I'll investigate this more.

Same thing with Windows Phone. Not sure if arcgis:// protocol will work to open in the app. It works in iOS. I don't have a windows mobile device to test on yet but I can test on Android.

The redirect on iOS is basically a hack. At the time, it was the only way to see if the app was installed or not. It tries the arcgis:// protocol and if that fails, it then loads the iTunes store page.

There's another way to do this with a cookie that I'll think I will try:
http://stackoverflow.com/questions/1108693/is-it-possible-to-register-a-httpdomain-based-url-scheme-...

I'll see if it is even possible to open a webmap in the android ArcGIS app and with what protocol. Same thing with Windows Mobile. I'll let you know what I find out. If it's something I can integrate, I'll update the code.
0 Kudos
DavidZiff
Deactivated User
Thanks - I really appreciate it.  Honestly, a microsoft shop we may be but their mobile market share is so diplorable i am not super concerned with it atm.  Though, it would be nice down the road to have that one too.  Android is kind'a a must.  At the very least, for now, we can just go the http* instead of arcgis* and that way it will at least work in a brouser capacity.  As much as a like iOS - the Android solution is equally important to us; we really need a cross platform solution.

Also, if there was one more item - showing our location on the map instead of just having it centered would be amazing too! 

Thanks, dz
0 Kudos
Esriwebmap
Occasional Contributor
Thanks - I really appreciate it.  Honestly, a microsoft shop we may be but their mobile market share is so diplorable i am not super concerned with it atm.  Though, it would be nice down the road to have that one too.  Android is kind'a a must.  At the very least, for now, we can just go the http* instead of arcgis* and that way it will at least work in a brouser capacity.  As much as a like iOS - the Android solution is equally important to us; we really need a cross platform solution.

Also, if there was one more item - showing our location on the map instead of just having it centered would be amazing too! 

Thanks, dz



Hi David,

I did some more research, got Android working, improved the detection and added a dialog for using the app if you have it installed.

Unfortunately, It won't work for Windows phone. Windows phones don't have a URL scheme like iOS and Android so you can't use "arcgis://" to open the app from Windows Mobile IE at this time. I tested on a Windows phone with no luck.

I also added the location graphic for the geo-locate button and zoomed it in more.

I put all this code on Github for now. I'll do some more testing and then eventually update the ArcGIS item's code. If anyone is interested, they can contribute to the template.

https://github.com/GISWebOps/Public-Maps-Gallery-Template

Thanks
0 Kudos
DavidZiff
Deactivated User
deleted                       .
0 Kudos
Esriwebmap
Occasional Contributor
Here's what it does.

[INDENT]If you're on an iOS device or Android device and you visit the site, you will get the dialog.

The dialog pops up and asks you if you have the ArcGIS app.

If you say don't install, it will set a cookie to say "disabled" and you'll never get the dialog again unless you clear your browsers cookies.

If you say "install now" you will get a web page opened to download and install the app. Then you can answer "Already installed" after it's installed.

If you say "Already installed", the cookie is set to "installed" and it will use the appropriate ArcGIS app URL for your device. (Android/iOS).[/INDENT]

I think the styling didn't get copied. I had to add that to the themes.css file for the dialog. I think there were changes to global.css as well. Also, the optional config got a few new items placed in there.
0 Kudos
DavidZiff
Deactivated User
ok - thanks - i will test again this evening with an Android phone -
0 Kudos
Esriwebmap
Occasional Contributor
ok - thanks - i will test again this evening with an Android phone -


Cool. Let me know how it goes.

It's unfortunate there's no way for the browser to communicate with the device and see if an app is installed so we have to rely on the user to tell us.
0 Kudos
DavidZiff
Deactivated User
k - works great - i cut and pasted the custom style and clearly missed some stuff... on to icons now - thanks.

The only thing i can think of is an out from the app that returns to the page which launched the app - that would be sweet.  i.e. if one pushes the back button (not sure what that would be on iphone atm) but the back motion would return one to the browser paged which launched the app.  The other option would be to tweak the aout-launch of the app to have a splash which warned that the app was being opened and if one wanted to return to the gallery they would have to return to their browser/safari ... whatever. 

Thanks again:)!
0 Kudos
xanderm
Regular Contributor
Thanks.

1.  I was able to change the title font in the header using the line in global.css.  I still would like to include a logo to the left of the title, so I'll have to figure that out.  Suggestions welcome, of course.  [Edit -- I found a way to get the logo working.]

2.  I'm really not sure what to change in the map.  Maybe the problem is that I have two levels of group layers?  I'll play around with it.



Can you please share how you got your logo to work on the header?

Thanks,
xander
0 Kudos
JustinRay1
Regular Contributor
I am having problems with how my template interacts with Internet Explorer.  I try to go to the site (still under development so I can't link you to it), but I seem to get the following prompt for most of my maps (and frequently multiple times per map): "Stop running this script? A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive."  Yes/No.  Clicking No often does not succeed in loading the map, and the message will pop up numerous times after this before it finally functions properly.  The maps I am linking to are found here.  I am using IE version 8.0.6001.18702CO.  Does the problem lie in how I have customized the template, or in Internet Explorer?  Related: the template seems to function fine with Firefox.

Thank you
0 Kudos