Select to view content in your preferred language

Just need a png or jpg from ArcGIS to replace ArcIMS functionality

1252
7
08-22-2013 07:36 AM
JamesCucinelli
Deactivated User
I am currently using ArcIMS to serve png/jpgs like the old html viewer in a web site that uses PHP to get data from a PostgreSQL database.

I have not had time to remake the website using all of the cool features in ArcGIS Server but I was wondering if there was a way to just get png or jpg from ArcGIS Server so that I could replicate the functionality of the ArcIMS server.

I have a deadline approaching of needing to move off of ArcIMS and not enough time to totally re-write this website and get it approved.

Any help would be greatly appreciated.
James Cucinelli
0 Kudos
7 Replies
JeffJacobson
Frequent Contributor
You should be able to generate images using the Export Map REST endpoint of a map service.
0 Kudos
JohnGravois
Deactivated User
jeff is correct.  if you publish a map service to ArcGIS Server and load it in a JavaScript application as an ArcGISDynamicMapServiceLayer, our API handles the requests for you based on the current extent of the map. 

check out this sample for an example in action.
0 Kudos
JamesCucinelli
Deactivated User
Thank you for the advice. I will check this out.

James Cucinelli
0 Kudos
JamesCucinelli
Deactivated User
example

So I think I found this from one of the links that you all pointed me to or an offshoot.

So my question is, I've been tiring to change this into a unique value renderer but keep failing. Any tips?

I have this example but I'm not smart enough to figure out how to get that code into that url or into the dynamic layers box.

I'm almost there. This has really been helpful.

James
0 Kudos
JeffMitzelfelt
Regular Contributor
I think this documentation on the REST API might help explain the parameters you would need to understand the export dialog.

Once you get the parameters set the way you want them you can look at the resulting URL to determine what needs to be built by your ArcIMS application javascript.
0 Kudos
JohnGravois
Deactivated User
jeff is definitely right, but our client web api's are supposed to simplify the process of constructing requests like these, so you might also consider checking out the Class Breaks renderer from this sample (and possibly even adapting it to build the Unique Value renderer clientside as well).
0 Kudos
JamesCucinelli
Deactivated User
Thanks for your help. I thought I couldn't use the class breaks renderer for one of two reasons. I don't have data on my services (its in a separate postgresql database) and I couldn't set the colors exactly the way I wanted.

I still might need the export map part because if I use the unique value renderer which is like an arcgis.com style map, I need to  have a function to output an image.

I'm slogging through it so we'll see. I'm using this example : https://developers.arcgis.com/en/javascript/jssamples/renderer_unique_value.html right now and just reading in the data first from the sql database and then setting the renderer.addValue lines using the data that I read in.

So I'm not merging the data like my old system in ArcIMS where I had to make a dbf file and then join it to the shapefile etc.

It's a bit of a "shortcut" but it's working so far.

James Cucinelli
0 Kudos