7 Replies Latest reply on Jan 21, 2015 5:59 PM by joseph.jose

    Attaching code in ArcGIS Online Template.

    Town-of-Brookline.MA
      Hello,

      I attached zipped java code into Basic Viewer map template. But could not see any effect of code on the map application. Could someone explain how Attach Code feature in map template works? Is there any standard format/guidelines for codes?

      Thanks
        • Re: Attaching code in ArcGIS Online Template.
          mminami-esristaff
          Are you expecting your attached code to work as a hosted web mapping application?  If you modify the code in a template, then you need to host the application yourself on your web server. In the future, we may be able to support this workflow, but not currently.

          The attachment on the web mapping application item (which is utilized for the templates in the map viewer) allows people to get the code. In the case of Esri's templates, it allows you to modify it. However, anyone can upload and distribute a web mapping application (that is not one of the templates in the map viewer) with attached code.

          thanks,

          Mike
          1 of 1 people found this helpful
          • Re: Attaching code in ArcGIS Online Template.
            Town-of-Brookline.MA
            Mike,

            Yes, I was expecting that the attached code can host in ArcGIS Online. I have been curious to customize some functionality without downloading the template since I am using Public Map Gallery( v 1.3.1) to showcase group of maps for public use.

            Thanks !
            • Re: Attaching code in ArcGIS Online Template.
              Wieland
              Hi mikem,

              You wrote:
              Are you expecting your attached code to work as a hosted web mapping application?  If you modify the code in a template, then you need to host the application yourself on your web server. In the future, we may be able to support this workflow, but not currently.
              Mike


              Is the Code-Upload available with the current Version of AGOL?
              We need a AGOL for Organization Subscription to do that?

              Best regards
              Wieland
              • Re: Attaching code in ArcGIS Online Template.
                astauffer-esristaff
                Hi Wieland,

                You can upload your code and share it, but ArcGIS Online does not offer a way to physically host your modified application. Eg. you cannot upload and run a custom API application from ArcGIS Online.

                Currently with an Organization, you can control the template apps that the web maps will be viewed in by modifying the application code to accept the web map as a URL parameter, and adding the application as an Item. When you add the application as an item to ArcGIS Online, you provide a URL link to the running application. Eg. http://yourserver.com/CustomApp. A member of your organization will have the option to choose from the different applications you have provided as an Administrator of the Organization. When they open it, it will look like http://yourserver.com/CustomApp/item.html?id=8ab2cce96ba744869227193c4462018c

                As Mike mentioned earlier, in a future release we hope to actually host your custom application.

                Hope that helps,
                Andrew
                • Re: Attaching code in ArcGIS Online Template.
                  bliki
                  Hi Wieland,

                  You can upload your code and share it, but ArcGIS Online does not offer a way to physically host your modified application. Eg. you cannot upload and run a custom API application from ArcGIS Online.

                  Currently with an Organization, you can control the template apps that the web maps will be viewed in by modifying the application code to accept the web map as a URL parameter, and adding the application as an Item. When you add the application as an item to ArcGIS Online, you provide a URL link to the running application. Eg. http://yourserver.com/CustomApp. A member of your organization will have the option to choose from the different applications you have provided as an Administrator of the Organization. When they open it, it will look like http://yourserver.com/CustomApp/item.html?id=8ab2cce96ba744869227193c4462018c

                  As Mike mentioned earlier, in a future release we hope to actually host your custom application.

                  Hope that helps,
                  Andrew


                  Hi Andrew,

                  Is this today possible that AGO hosts templates? We have problems when users use templates hosted from our website and not publish the content outside the organisation. (As good practice you first prepare the map and template before you publish). Because we go outside AGO it requires the user to login all the time... :-(, We also have a problem for those users that do not have a AGO global account and use enterprise logins...


                  Jan
                  • Re: Attaching code in ArcGIS Online Template.
                    astauffer-esristaff
                    Hi Jan,

                    You're asking for a bit of a different workflow that has been accomplished before using a proxy page. A proxy page comes with some of the Local Government Templates, and may be a good start to get you going. If you opt to incorporate the proxy page with your locally hosted template and need additional assistance, please contact Esri Support Services or consider a post to the Javascript forums where an expert can help you.


                    Cheers,
                    Andrew