POST
|
Thank you Robert, I went a slightly different way than what I did initially...I make a specific call to SQL for visible layers, instead of using dynamically built list. Then I set visible layers with results from SQL call. var defaultVisible = [40, 51, 69, 65, 63, 64]; '$.ajax({ type: "POST", url: myWebService, contentType: "application/json; charset=utf-8", dataType: "json", async: false, success: function (data) { var obj = jQuery.parseJSON(data.d); roadlayer.setVisibleLayer([obj]); }, error: function (data) { 'Unable to load Map Profile: ' + data.status + ' ' + data.statusText); roadlayer.setVisibleLayer([defaultVisible]); } });
... View more
02-05-2016
08:54 AM
|
0
|
1
|
797
|
POST
|
Thank you! Yes I changed the printurl to point to print service on my sever and it worked.
... View more
02-04-2016
07:02 PM
|
0
|
0
|
578
|
POST
|
on Print API reference page it says "Note that this functionality requires an ArcGIS Server 10.1 instance." Does that mean no other instance will work? (like 10.3.1?)
... View more
02-04-2016
03:03 PM
|
1
|
3
|
578
|
POST
|
Hi, I'm trying to print a map using "esri/dijit/Print" I am adding a DynamicServiceLayer to a base map. When I click on the print button it flashes then nothing happens. I added a few handlers. print-start fires, print-complete does NOT fire, error does NOT fire. So the print starts but does not complete or does not throw an error. I did try adding the layer as a FeatureLayer: I was able to print the base however the added feature layer did not print despite it being visible. Map Service is located on ArcGIS Server 10.3.1 What am I missing? here is how I add dynamic layer: app.map = new Map("map", { basemap: "streets", center: [-117.42330, 47.751103], zoom: 18 }); var roadLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://igis.spokanecounty.org/arcgis/rest/services/Engineering/ENGINEERINGqueries/MapServer", { id: "roadLayer", visible: true }); app.map.addLayers([roadLayer]); roadLayer.on("load", function () { }); roadLayer.setVisibleLayers([68]); Here is print Dijit app.printUrl = "http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"; app.printer = new Print({ "map": app.map, "templates": [{ label: "Map", format: "PDF", layout: "MAP_ONLY", exportOptions: { width: 500, height: 400, dpi: 96 } }, { label: "Layout", format: "PDF", layout: "A4 Portrait", layoutOptions: { titleText: "My Print", authorText: "esri", copyrightText: "My Company", scalebarUnit: "Miles", } }], url: app.printUrl }, dom.byId("print_button")); app.printer.startup(); app.printer.on('error', function (evt) { alert('The url to the print image is : ' + evt.result.url); }); app.printer.on('print-complete', function (evt) { alert('The url to the print image is : ' + evt.result.url); }); app.printer.on('print-start', function (evt) { alert('started'); });
... View more
02-04-2016
02:56 PM
|
0
|
4
|
2364
|
POST
|
Thank you... The ([$('#ulLayerVisibility input[type="checkbox"]:checked').map(function ()...returns an array of ids. It is a get function that return checked items from list. I use the same function to update visibility when user checks or unchecks an item in a list. You are correct I need to get the layer list when it is done loading. That is my question...
... View more
02-04-2016
02:36 PM
|
0
|
3
|
797
|
POST
|
Hi I dynamically create a listview based on data from SQL server, which lists maps layers and visibility. I can loop through list to create array or visible layers. This works great when I make a change in the listview but I would like to use the process to setVisibleLayers when the map is loaded. I am trying to set the setVisibleLayers method of layer to the same .get function I use elsewhere but the layers are not visible. I believe it is because listview has not been fully created yet. Is there a way I can set the visible layers this way? var roadLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisappserv3.spokanecounty.org/ArcGIS/rest/services/Engineering/ENGINEERINGqueries_10/MapServer", { id: "roadLayer", visible: true }); roadLayer.setVisibleLayers([$('#ulLayerVisibility input[type="checkbox"]:checked').map(function () { var checkid = $(this).attr('id').split(":"); return checkid[1]; }).get()]); map = new Map("map", { extent: customExtentAndSR }); map.addLayers([roadLayer]);
... View more
01-26-2016
03:26 PM
|
0
|
6
|
2720
|
POST
|
Thank you Robert, Do you have an example? I don't see those properties for map.infoWindow John
... View more
01-11-2016
12:57 PM
|
0
|
2
|
657
|
POST
|
Hi, I am using IdentifyTask with map.onclick then display attributes in a popup. Everything works great, however I would like to change the default color of found feature (right now it is default to a cyan). How can I do that? var deferred = identifyTask .execute(identifyParams) .addCallback(function (response) { return arrayUtils.map(response, function (result) { var feature = result.feature; var layerName = result.layerName; var idTemplate = new InfoTemplate(); idTemplate.setContent("Parcel ID:" + feature.attributes['PID_NUM'] + " " + "Address:" + feature.attributes['site_address'] + " " + "Owner:" + feature.attributes['owner_name'] + "); idTemplate.setTitle("Parcel"); feature.setInfoTemplate(idTemplate); return feature; }); }); map.infoWindow.setFeatures([deferred]); map.infoWindow.show(evt.mapPoint);
... View more
01-11-2016
11:21 AM
|
0
|
5
|
3024
|
POST
|
Thank you Rickey, I figured out that I could use mouse-up event and test which button was pressed, then I execute Identify Task (after I disabled right-click context menu).
... View more
12-31-2015
01:24 PM
|
0
|
0
|
420
|
POST
|
is it possible to execute an Identify Task when right mouse button is clicked instead of left mouse button (map onclick event)?
... View more
12-31-2015
12:52 PM
|
0
|
2
|
2949
|
POST
|
The problems appears to be that spatial reference of map is 2926 but spatial reference of cluster layer is 4326. I have tried setting the spatial reference of cluster layer with no luck. new ClusterLayer({ "data": photoInfo.data, "distance": 50, "id": "clusters", "labelColor": "#fff", "spatialReference": new esri.SpatialReference({ "wkid": 2926 }), "labelOffset": 10, "resolution": map.extent.getWidth() / map.width, "singleColor": "#888", "singleTemplate": popupTemplate
... View more
11-20-2015
12:17 PM
|
0
|
0
|
209
|
POST
|
I've used the point clusterer with ArcGIS base maps where I store the x,y in that spatial reference. I would like to use the tool with x,y stores in State Plane coordinates of Washington (spatial reference 2926). I am having problems getting it to work. The cluster points show up in Algeria (not Washington). What am I missing? function addClusters(resp) { var obj = jQuery.parseJSON(resp.d); var photoInfo = {}; var wgs = new SpatialReference({ "wkid": 2926 var photocnt = 0; function (p) { var rec = p.split(";"); var latlng = new Point(parseFloat(rec[1]), parseFloat(rec[2]), wgs); var attributes = { "RequestID": rec[0] return { "x": latlng.x, "y": latlng.y, "attributes": attributes var popupTemplate = new PopupTemplate(); ""); "<b>ID:</b>${RequestID}<br/>" + "<b>Type:</b><br/>" + "<a rel='external' target='_blank' href='SWUViewInspectionDetail.htm?id=${ID}'>Details</a>"); // cluster layer that uses OpenLayers style clustering new ClusterLayer({ "data": photoInfo.data, "distance": 50, "id": "clusters", "labelColor": "#fff", "labelOffset": 10, "resolution": map.extent.getWidth() / map.width, "singleColor": "#888", "singleTemplate": popupTemplate var defaultSym = new SimpleMarkerSymbol().setSize(4); var renderer = new ClassBreaksRenderer(defaultSym, "clusterCount"); var picBaseUrl = "http://static.arcgis.com/images/Symbols/Shapes/"; var blue = new PictureMarkerSymbol(picBaseUrl + "BluePin1LargeB.png", 32, 32).setOffset(0, 15); var green = new PictureMarkerSymbol(picBaseUrl + "GreenPin1LargeB.png", 64, 64).setOffset(0, 15); var red = new PictureMarkerSymbol(picBaseUrl + "RedPin1LargeB.png", 72, 72).setOffset(0, 15); // close the info window when the map is clicked "click", cleanUp); // close the info window when esc is pressed "key-down", function (e) { if (e.keyCode === 27) { }
... View more
11-19-2015
01:08 PM
|
0
|
1
|
2022
|
POST
|
Hi, I have a map service with multiple sub-layers, which I am adding to a map as Dynamic Map Service Layer. I have added the Legend Widget, which works great, but would like to change the titles of the sub-layers. I am able to change the title of the primary layer but do not see how to change sub-layers. Can I do that?
... View more
08-12-2015
03:41 PM
|
0
|
1
|
3014
|
POST
|
Hi, I'm trying to change the transparency of a layer in a map service. I have looked at examples and have tried different things but nothing seems to change the transparency. What am I missing? map = new Map("map", { basemap: "streets", center: [-117.42330, 47.751103], zoom: 11 }); var roadLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisappserv3/ArcGIS/rest/services/SCOUT/ENGINEERINGqueries/MapServer", { id: "roadLayer", visible: true }); roadLayer.setVisibleLayers([28]); map.addLayers([roadLayer]); var optionsArray = []; var drawingOptions = new LayerDrawingOptions(); drawingOptions.transparency = 50; optionsArray[28] = drawingOptions; map.roadLayer.setLayerDrawingOptions(optionsArray);
... View more
07-20-2015
09:49 AM
|
0
|
3
|
5026
|
Title | Kudos | Posted |
---|---|---|
1 | 02-04-2016 03:03 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|