Attaching code in ArcGIS Online Template.

7507
7
05-04-2012 07:29 AM
IT_DeptDept
New Contributor II
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
Tags (2)
7 Replies
MikeMinami
Esri Notable Contributor
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
0 Kudos
IT_DeptDept
New Contributor II
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 !
0 Kudos
WielandBusse
New Contributor II
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
0 Kudos
by Anonymous User
Not applicable
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
0 Kudos
JanBliki
New Contributor III
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
0 Kudos
by Anonymous User
Not applicable
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
0 Kudos
JosephJose
New Contributor III

I have a google analytics script to be added to a webmap. As you know, it's a script that needs to run once for every access.  Can I use the "Attach code" functionality to collect statistics on the webmap?

0 Kudos