Select to view content in your preferred language

Replace ESRI logo with custom logo?

15930
34
10-17-2011 10:37 AM
BarryGuidry
Regular Contributor
I've found how to insert a custom logo into the header of a web application, but how can one replace the "Powered by ESRI" logo?
0 Kudos
34 Replies
JoeJeurissen
Deactivated User
Set the logo to false in the parameter options of the map constructor.

Example:
var map = new esri.Map("map",{logo:false});


Then position your logo where you want in the map container.
0 Kudos
BaileyLipscomb1
Emerging Contributor
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>
0 Kudos
martinschmoll
Deactivated User
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>


When the user clicks the logo it links to esri.com.  How do you disable that, or better yet change the url?
0 Kudos
BarryGuidry
Regular Contributor
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>

Thanks, Bailey.  I cannot figure out where to insert it in the HTML file, though.
0 Kudos
BaileyLipscomb1
Emerging Contributor
Thanks, Bailey.  I cannot figure out where to insert it in the HTML file, though.


Drop it in the header below all of the ArcGIS javascript functions. Let me know if that works.
0 Kudos
martinschmoll
Deactivated User
When the user clicks the logo it links to esri.com.  How do you disable that, or better yet change the url?


I found it in old API documentation...

esri.config.defaults.map.logoLink = "http://yoursite.com"
0 Kudos
BarryGuidry
Regular Contributor
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.
0 Kudos
martinschmoll
Deactivated User
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.


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.
0 Kudos
BarryGuidry
Regular Contributor
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.
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?
0 Kudos