I've wandered upon this thread in search of a solution. We've confirmed with our Esri reps that our enterprise license agreements permits us to change the "Powered by Esri" in our webmaps as needed. But the added complexity in this case is that we need to be able to choose from multiple logos based on different situations. I was able to achieve something similar previously by adding a new parameter to a template's appConfig to change the logo in a template's header, but I have not been able to successfully change the logo in the attribution control.
Is there a way to build something that will allow users to select from multiple logo options to replace the "Powered by Esri" logo?
If you are going to use css to hide this logo, keep in mind the class name can change from .logo-med to .logo-sm on smaller screen sizes so you may want to include .logo-sm in your css. In my personal opinion, I think the easiest and best way to do this is hide the logo in the map constructor using logo:false and adding some html inside your map div (by map div I mean the div you are mounting your map into), this way you can absolutely position the new logo and give it a z-index to sit over the map.
Also my co-worker came back from the UC and said they explained how to change out the logo in one of the seminars.
Any way to remove the clickable feature of the logo using the above css example? Or change the url location?
I think this thread should have died right here. Instead, you folks keep discussing how to violate license terms. SMH.4.2 (h) seems to be the appropriate section in the linked version of the agreement. Must have been updated since Erwin posted.
4.1c: Licensee may customize Software using any (i) macro or scripting language, (ii) published application programming interface (API), or (iii) source or object code libraries, but only to the extent that such customization is described in Documentation.
you should read license agreements here: http://www.esri.com/legal/pdfs/mla_e204_e300/english.pdf4.2 (g) Licensee shall not remove or obscure any Esri or its licensors' patent, copyright, trademark, or proprietary rights notices contained in or affixed to Software, Data, Web Services, or Documentation.
.logo-med { background-image: url('myLogo.png') !important; height: 50px; width: 100px; }
#mapDiv .logo-med { background-image: url('myLogo.png') !important; height: 50px; width: 100px; }
<script src="//code.jquery.com/jquery-1.10.2.js"></script> <script type="text/javascript"> $("#mapDiv_root").append($('<div id ="logo"></div>')); </script>
<style type="text/css"> div.mapDiv_root #logo { display: inline-block; position: absolute; height: 36px; width: 46px; right: 5px; bottom: 5px; z-index: 30; background-image: url('logo.png'); cursor: pointer; } </style>
.map .logo-med { display: inline-block; vertical-align: bottom; width: 65px; height: 36px; z-index: 30; background-image: url("../images/map/logo-med.png"); cursor: pointer; _background-image: none; }
Hi odoe,I'm still a beginner at JavaScript. Can you explain what you mean by "I append a div to the "map_root" element"?
.my-logo { display: inline-block; position: absolute; height: 36px; width: 46px; right: 5px; bottom: 5px; z-index: 30; background-image: url('../img/my-logo.png'); cursor: pointer; }
See post# 13. I don't know how else to explain it.
div.map #baseMap { position:absolute; right:20px; top:10px; z-Index:999; } div.map #logo { position:absolute; bottom:20px; right:20px; z-index:100; width:15px; heigth:15px; } Note: #baseMap and #logo are ids of your basemap and your logo image.
I was able to get the example Heming provided to work, except it now affects the format of my "BaseMapGallery" widget because the logo is in the same section (below).<style type="text/css"> div.map img { position:absolute; bottom:20px; right:20px; z-index:100; width:15px; heigth:15px; } <body class="nihilo"> </style> <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000;padding:0;"> <a href="http://www.google.com"><img src="logo.png" alt="View Logo" /></a> <div style="position:absolute; right:20px; top:10px; z-Index:999;"> <div dojoType="dijit.TitlePane" title="Switch Basemap" closable="false" open="false"> <div dojoType="dijit.layout.ContentPane" style="width:380px; height:280px; overflow:auto;"> <div id="basemapGallery" ></div>
<style type="text/css"> div.map img { position:absolute; bottom:20px; right:20px; z-index:100; width:15px; heigth:15px; } <body class="nihilo"> </style> <div id="map" dojotype="dijit.layout.ContentPane" region="center" style="border:1px solid #000;padding:0;"> <a href="http://www.google.com"><img src="logo.png" alt="View Logo" /></a> <div style="position:absolute; right:20px; top:10px; z-Index:999;"> <div dojoType="dijit.TitlePane" title="Switch Basemap" closable="false" open="false"> <div dojoType="dijit.layout.ContentPane" style="width:380px; height:280px; overflow:auto;"> <div id="basemapGallery" ></div>
Three lines of code? Not sure which code you are using (perhaps a combination of what Bailey and yourself posted)?Is there an additional "dojo.require" statement that may be necessary?
esri.config.defaults.map.logoLink = "http://yoursite.com" document.getElementsByClassName('logo-med')[0].style.backgroundImage="url(\"http://www.yoururl.com/to/the/image.gif\")"; document.getElementsByClassName('logo-med')[0].style.backgroundRepeat="no-repeat";
<style type="text/css"> div.map img { position:absolute; bottom:20px; right:20px; z-index:100; width:15px; heigth:15px; } </style> <script type="text/javascript"> function init() { map = new esri.Map("map", { extent: initialExtent, logo: false }); } ... </script> <body class="claro"> ... <div id="map" class="roundedCorners" dojotype="dijit.layout.ContentPane" region="center"> <a href="http://www.google.com"><img src="logo.png" alt="View Logo" /></a> </div> ... </body>
I've got both the replacement logo and url working. Make sure you post the (3 lines of) code in your init() function after the map object is created.
Martin, that is also on Utah's GIS Portal. That is only a portion of what needs to be completed, though, which only adds a custom hyperlink to the logo. I attempted what Utah's site recommends, but it only deleted ESRIs logo, but did not add mine.
When the user clicks the logo it links to esri.com. How do you disable that, or better yet change the url?
esri.config.defaults.map.logoLink = "http://yoursite.com"
Thanks, Bailey. I cannot figure out where to insert it in the HTML file, though.
If you are trying to replace just the image it can be accomplished by the following code: <script type="text/javascript"> //Change the background image document.getElementsByClassName('logo-med')[0].style.backgroundImage="url(\"http://www.yoururl.com/to/the/image.gif\")"; //Keep the image from repeating document.getElementsByClassName('logo-med')[0].style.backgroundRepeat="no-repeat"; </script>
<script type="text/javascript"> //Change the background image document.getElementsByClassName('logo-med')[0].style.backgroundImage="url(\"http://www.yoururl.com/to/the/image.gif\")"; //Keep the image from repeating document.getElementsByClassName('logo-med')[0].style.backgroundRepeat="no-repeat"; </script>
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.