Public Maps Gallery template version 1.4  --Opening post

13053
175
11-22-2011 02:57 PM
Esriwebmap
New Contributor III


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
TarigAhmed1
New Contributor III
Thank you for this great template.

How do I add another page with the same feel and look to display other custom apps, we have Flex and WebADF applications?

Thank you.
0 Kudos
BrianHaren
Occasional Contributor
I just finished configuring our internal map gallery using the 1.4 template and functionality is very good.  However, this is template is for our internal use only and our web admins get very concerned about employees inadvertently pushing links outside of our domain.  Therefore I need to supress or remove the Tweet, Facebook and Google+ links that magically appeared in the template overnight.  Since I'm new at this game I need to ask - is this something I control from within the template?  If yes, how?  Until I get this problem solved I don't really feel comfortable deploying this gallery within my organization.

[ATTACH=CONFIG]11848[/ATTACH]

As always, thanks in advance!

Brian
0 Kudos
TarigAhmed1
New Contributor III
Hi David,

Have you turned on the mobileAppLink option in the optional settings config?

// USE ARCGIS iOS APP LINKS FOR USERS ON iOS DEVICES. Default: false.
pmgConfig.mobileAppLink = true;


I've verified that this works for iOS devices but I haven't for Android or Windows OS. I'm not sure if the same support exists. I'll look into it.

A little background; The first version of this template we targeted web developers with Javascript/HTML/CSS expertise but we found that a lot of users using it didn't have that experience so we made this version simpler which is why it's more controlled.

We have discussed a version of the template that embeds into a users current site design. I'll keep you posted on that.

Thanks


Hi there  .. this didn't work for me ... I can't get my iPhone to open the maps in my app directly:
Here's the file i modified and the code
C:\inetpub\wwwroot\MapsGallery1.4\config\settings.optional.js
// USE ARCGIS App links instead of viewer page. Otherwise, will go to viewer page and open into app from there. Default: true.
pmgConfig.mobileAppLink = true;

Thanks in advance for your help.
0 Kudos
Esriwebmap
New Contributor III
I just finished configuring our internal map gallery using the 1.4 template and functionality is very good.  However, this is template is for our internal use only and our web admins get very concerned about employees inadvertently pushing links outside of our domain.  Therefore I need to supress or remove the Tweet, Facebook and Google+ links that magically appeared in the template overnight.  Since I'm new at this game I need to ask - is this something I control from within the template?  If yes, how?  Until I get this problem solved I don't really feel comfortable deploying this gallery within my organization.

[ATTACH=CONFIG]11848[/ATTACH]

As always, thanks in advance!

Brian


Hi Brian,

That's a good suggestion. I may put in an option to easily turn these on and off.

You can remove them in the index.html and map.html files.

In index.html, remove this code:

<div class="socialButtons">
    <div class="item first"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> </div>
    <div class="item">
     <div id="fb-root"></div>
     <script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#appId=154863967938949&xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
     <div class="fb-like" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" data-font="arial"></div>
    </div>
    <div class="item"> 
     <!-- Place this tag where you want the +1 button to render -->
     <div class="g-plusone" data-size="medium" data-annotation="none"></div>
     <!-- Place this render call where appropriate --> 
     <script type="text/javascript">
       (function() {
      var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
      po.src = 'https://apis.google.com/js/plusone.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
       })();
     </script> 
    </div>
    <div class="clear"></div>
   </div>



In map.html, remove this code:

<div class="item first"><a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> 
    </div>
    <div class="item">
     <div id="fb-root"></div>
     <script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#appId=154863967938949&xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
     <div class="fb-like" data-send="false" data-layout="button_count" data-width="100" data-show-faces="false" data-font="arial"></div>
    </div>
    <div class="item"> 
     <!-- Place this tag where you want the +1 button to render -->
     <div class="g-plusone" data-size="medium" data-annotation="none"></div>
     <!-- Place this render call where appropriate --> 
     <script type="text/javascript">
       (function() {
      var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
      po.src = 'https://apis.google.com/js/plusone.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
       })();
     </script> 
    </div>


That should do it for you.

Thanks
0 Kudos
MiguelParedes
Esri Contributor
Greetings all,

I have just become aware of the existence of the 1.4 version of the Public Maps Gallery template.  One thing that I have noticed in version 1.3.1 a couple of days ago, and that still has not been pointed out, as far as I know is that the maps don't propagate their watermarks!  So if I have a look at a map within ArcGIS Online which contains a basemap such as OSM, I see the following:
[ATTACH=CONFIG]11873[/ATTACH]
However, in the map gallery for the same map there is no copyright watermark.  How can this be resolved?

Many thanks in advance.
Miguel
0 Kudos
MiguelParedes
Esri Contributor
Greetings, fellow Map Gallery Template fans...

I would like to suggest making the Footer area optional.  At the moment one can only change all aspects of the Footer, except turning the footer off when it isn't required.  Maybe a consideration for the next iteration?

In any case, I would appreciate some advice on how would I be able to remove it within the current structure of the template.

Many thanks in advance.
Miguel
0 Kudos
Esriwebmap
New Contributor III
Greetings all,

I have just become aware of the existence of the 1.4 version of the Public Maps Gallery template.  One thing that I have noticed in version 1.3.1 a couple of days ago, and that still has not been pointed out, as far as I know is that the maps don't propagate their watermarks!  So if I have a look at a map within ArcGIS Online which contains a basemap such as OSM, I see the following:
[ATTACH=CONFIG]11873[/ATTACH]
However, in the map gallery for the same map there is no copyright watermark.  How can this be resolved?

Many thanks in advance.


Hey Miguel,

Thanks for pointing that out. I'll see how I can best address this issue.
0 Kudos
Esriwebmap
New Contributor III
Greetings, fellow Map Gallery Template fans...

I would like to suggest making the Footer area optional.  At the moment one can only change all aspects of the Footer, except turning the footer off when it isn't required.  Maybe a consideration for the next iteration?

In any case, I would appreciate some advice on how would I be able to remove it within the current structure of the template.

Many thanks in advance.


We'll take that into consideration for the next version. You should be able to modify the map.html and index.html files and remove the div with the id of "footer". Then you can change the background color of the body/html in the CSS to a different color if you like. That should be it.

Let me know if that works for you.
0 Kudos
BillEveringham
New Contributor III
Hi Bill,

That looks really good. Nice work.

The geolocation is probably zooming too far for the custom basemap. You can change the Level of detail in one of the scripts files. I should probably make it a config variable in the future. If you look in user-agent.js on like 54 you can change the lod variable to a smaller number so it doesn't zoom users in too far.

function zoomToLocation(x, y, IPAccuracy){
 // calculate lod
 var lod = 14;


Hope that helps.


I've tried changed the lod variable to lower numbers, but with no luck. My data is in State Plane, I am assuming the could be an issue?  Here is my rest endpoint for the tiled basemap.  Is there a way to define one of the LOD's as a default zoom to location?

http://gis.arlingtonva.us/ArcGIS/rest/services/Arlington_Basemap_Plain/MapServer?f=json&pretty=true
0 Kudos
MattDriscoll
Esri Contributor
I've tried changed the lod variable to lower numbers, but with no luck. My data is in State Plane, I am assuming the could be an issue?  Here is my rest endpoint for the tiled basemap.  Is there a way to define one of the LOD's as a default zoom to location?

http://gis.arlingtonva.us/ArcGIS/rest/services/Arlington_Basemap_Plain/MapServer?f=json&pretty=true


Hey Bill,
I'll look into this some more and see what I can find.
0 Kudos