POST
|
Hi there, I've made a query layer based on some MSSQL Server tables which I've published as a map service. Now I'm wondering if it's possible to edit the sql defining the query layer via the REST API of the map service. I'd like users of a web app to tweak some parameters such as date range, which would in turn edit the sql statement. Any tips as to whether this is do-able? Thanks, Rowan
... View more
10-27-2016
03:00 AM
|
0
|
1
|
884
|
POST
|
Thanks for the suggestion Tim but I was hoping to be able to have it as a live join rather than converting it to a static data source like a csv. Cheers
... View more
11-16-2014
01:56 PM
|
0
|
1
|
740
|
POST
|
Hi there, I've often used the standard join tool to join spatial data with a table however Im wondering if its possible to setup a join to json data which represents a table? The scenario is I have a google sheet (like an excel but in the cloud), within ArcGIS desktop I'd like to be able to run my join on to this data which I can I can access via json... Can anyone suggest any ideas as to how this might be feasible? Cheers, Rowan PS I can't find a regular ArcGIS Desktop forum so I'm posting here sorry..
... View more
11-13-2014
06:20 PM
|
0
|
4
|
3492
|
POST
|
Hi Johnothan, Thanks for your efforts but its still doesn't seem to work *sigh* The transformation you suggested was indeed correct. I tried to read through your code and added a few other bits to the dojo.require to see if that made a difference but alas. I think I'll go back to the drawing board and try to work from scratch with the new code rather than the legacy. It's a bit frustrating that throughout the samples provided by esri there is old and new stuff, its makes it very hard to learn. Anyway thanks for all your help, I really appreciate it. Cheers Rowan
... View more
02-06-2014
01:38 PM
|
0
|
0
|
731
|
POST
|
Still no joy Im afraid. Everything loads including the correct polygon but its still not zooming. Could it be a problem to do with the WKID? My layer uses the 4283 projection. Thanks for all your help, its been awesome, even if it hasnt quite worked yet!
... View more
02-05-2014
12:11 PM
|
0
|
0
|
731
|
POST
|
Hi Jonathon, Thanks for your suggestion however I couldn't get it work. I took the following out of my code featureLayer.setDefinitionExpression("LOCAL_PROJECT_NAME ='MU7901'");
map.addLayer(featureLayer); and replaced it with your code however obviously I haven't put it in the right place... If you could post the full code so that I can see where Im supposed to be putting it that would be great 🙂 Thanks, Rowan PS Really need to book myself in for a javascript course 🙂
... View more
02-04-2014
12:49 PM
|
0
|
0
|
731
|
POST
|
Hi there, Noob question here... I've managed to get my map going which is consuming a feature layer over a basemap, all working fine so far! I've got a definition expression on my feature so that I'm only returning a few polygons. I'm now trying to work out how to make the map automatically zoom to the extent of the returned polygons. Any tips would appreciated. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Layer in a map service - [ON-DEMAND]</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/dojo/dijit/themes/soria/soria.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html, body, #mapDiv, .map.container {
padding:0;
margin:0;
height:100%;
}
</style>
<script>var dojoConfig = { parseOnLoad:true };</script>
<script src="http://js.arcgis.com/3.8/"></script>
<script>
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("dijit.TooltipDialog");
var map;
function init() {
map = new esri.Map("mapDiv", {
basemap: "hybrid",
});
var featureLayer = new esri.layers.FeatureLayer("http://####/ArcGIS/rest/services/###/####/MapServer/2",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["*"],
opacity:.50
});
featureLayer.on("mouse-over", showTooltip);
featureLayer.on("mouse-out", closeDialog);
featureLayer.setDefinitionExpression("OBJECTID ='612485'");
map.addLayer(featureLayer);
}
function showTooltip(evt){
closeDialog();
var tipContent = "<b>LMID</b>: " + evt.graphic.attributes.LMID +
"<br><b>Area</b>: " + evt.graphic.attributes.QUANTITY ;
var dialog = new dijit.TooltipDialog({
id: "tooltipDialog",
content: tipContent,
style: "position: absolute; width: 250px; font: normal normal bold 6pt Tahoma;z-index:100"
});
dialog.startup();
dojo.style(dialog.domNode, "opacity", 0.85);
dijit.placeOnScreen(dialog.domNode, {x: evt.pageX, y: evt.pageY}, ["TL", "BL"], {x: 10, y: 10});
}
function closeDialog() {
var widget = dijit.byId("tooltipDialog");
if (widget) {
widget.destroy();
}
}
dojo.ready(init);
</script>
</head>
<body class="soria">
<div id="mapDiv"></div>
</body>
</html>
... View more
02-03-2014
02:43 PM
|
0
|
6
|
4161
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|