Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Function to use our ArcGIS server services #16

Closed
RoboDonut opened this issue Sep 12, 2014 · 12 comments
Closed

Add Function to use our ArcGIS server services #16

RoboDonut opened this issue Sep 12, 2014 · 12 comments

Comments

@RoboDonut
Copy link

Yeah... I know... Probably been asked 1,000 time already but i'm gonna ask again.

First i'll say i am a total noob to javaScript, so please bear with me.

Is there anyway we can get a function or methodology to use our own hosted services in this template?

the folks here have a decent function that worked in the old viewer but i am having great issue getting it to work here. I took there code and and put it into an file called buildWebMap.js in the js folder of the source but i am unable to get to reference it in the defaults.js file

Please help.

   function createWebMap(){
        var webmap = {};
        webmap.item = {
        "title":"Local Data Layer",
        "snippet": "Local service",
        "extent": [[-139.4916, 10.7191],[-52.392, 59.5199]]
        };

        webmap.itemData = {
        "operationalLayers": [{
        "url": "http://<INTERNAL IP>/arcgis/rest/services/<SERVICE NAME>/MapServer",
        "visibility": true,
        "opacity": 0.75,
        "title": "Farms"
        }],
        "baseMap": {
        "baseMapLayers": [{
        "opacity": 1,
        "visibility": true,
        "url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"
        },{
        "isReference": true,
        "opacity": 1,
        "visibility": true,
        "url": "http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer"
        }],
        "title": "World_Terrain_Base"
        },
        "version": "1.1"
        };

        return webmap;
        }
@RoboDonut RoboDonut changed the title Add Function to use out server services Add Function to use our ArcGIS server services Sep 12, 2014
@jgravois
Copy link
Contributor

Even when working with services hosted on your own ArcGIS Server machine you can still follow the standard operating procedure of authoring webmaps which include those services and refer to the webmap by id in your application of choice.

nothing is saved in the cloud except a URL so services behind a firewall stay behind a firewall.

http://doc.arcgis.com/en/arcgis-online/create-maps/make-your-first-map.htm

@RoboDonut
Copy link
Author

I mean to say, the services that we are hosing on our internal GIS server deployment, its not outward facing. We are not using ArcGIS Online at this time but would still like to use these fabulous templates.

Edit: clarify

@RoboDonut RoboDonut reopened this Sep 13, 2014
@jgravois
Copy link
Contributor

like I said in my last comment, you can save webmaps in ArcGIS Online that include references to services that can only be accessed on an internal network.

nothing is saved in the cloud except the URL itself.

@RoboDonut
Copy link
Author

i do appreciate the well thought out workflows for using internal services with ArcGIS Online, and i thank you for pointing me to the resource linked above. But ArcGIS Online is not in use or available for use.

Are there any other options?

@RoboDonut
Copy link
Author

any thoughts on this? is there any way to get support for using these template with our own resources and not pushing them through ArcGIS online?

i see the _createWebMap function in the main.js file. that is using the createMap utility function. I've tried to replace the itemInfo parameter with json using the web map specification as a guide. is this the best place to do this? would it be better / more proper to use a .json file with the web map spec in it?

@jgravois
Copy link
Contributor

its not actually an AMD approach, but i was able to load a custom webmap directly using JSON supplied within the app using the approach outlined in this gist.

if you need addtional assistance, it probably makes the most sense to move the conversation into our user forum or to log a technical support ticket.

@RoboDonut
Copy link
Author

@jgravois this is a big help. Thank you very much for your assistance and the gist.

@jgravois
Copy link
Contributor

my pleasure @RoboDonut. take care.

@asgharkhall
Copy link

@jgravois this not work for me because i don't know how replace webmap id in default.js
when i remove webmap Id mt codes not working.

@jgravois
Copy link
Contributor

@asgharkhall i've attempted to answer your question here

@ezequias
Copy link

@jgravois talking about your comment for using ArcGIS Server via Portal there is any consumption of credits if I install my portal and than set my ArcGIS Service to it in the same custom environment?

I meant: It is need to make the client buy more credits or be vinculated to any anual singing to Esri even after buying the entire ArcGIS Server Enterprise platform?

@jgravois
Copy link
Contributor

@ezequias i'm not positive i understand your question, but no credits are consumed when saving or reading webmaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants