POST
|
Hello, All of our maps are sized to print on 11"x17" (Ledger) paper, but when we go to print, ArcMap wants to print them letter size and tiled. I set it up on my computer and it seems to remember the settings, but open up the same MXD on another computer and it's back to letter size. In the past, it seems that we used to be able to set it up in the .MXD file, and it would remember the page size. Does anyone have any ideas? We use ArcMap 10.4.1
... View more
08-04-2020
08:22 AM
|
0
|
0
|
243
|
POST
|
Good morning. We have a function that sets the thickness of the outline for the parcels on our map. They are merely outlines of the surveyed property boundaries. We want to make the "subject" property outlined a little bolder so it stands out from the surrounding properties. The way it works now is we have an ISimpleLineSymbol object, and set the width to 5. This works great when we first fire up ArcMap (10.4.1) unless we close out the map and create one that encompasses a wider area, then go back to the smaller map. Somehow on the second try, the line is so heavy it looks like it was scrawled with a crayon, and even overwrites the text symbols inside. It looks like the width property is in "points". Does it depend upon the IMapFrame.MapScale or is it proportional to something else?
... View more
02-10-2020
09:29 AM
|
0
|
0
|
296
|
POST
|
Hello, all. I have an .mxd file with a couple of map layers, and few text elements on it. Most of the text elements are visible in Layout View. However, there are two that I cannot find in the ArcMap environment (this is ArcGIS 10.4.1 for Desktop). I have a routine that finds them programmatically just fine in the ESRI.ArcGIS.ArcMapUI.IMxDocument, but I cannot find or select them on the map (GUI) itself. I can find the objects such as "printed" (see attached). But even selecting all elements (as shown in the "Before" screen shot) does not show the elements that you see in the "After" screen shot. The "Select by Attributes" does not show them either, in any of the layers. I am stumped. Does anyone out there have an idea how to find them?
... View more
07-31-2019
08:16 AM
|
0
|
0
|
236
|
POST
|
You are a genius! I've been wrestling with this off and on since I sent it. Featurelayers, on and on... Thanks a million!
... View more
02-08-2016
09:04 AM
|
0
|
1
|
776
|
POST
|
It is an aspx page, but should run as a simple HTML Thank you so much! The county doesn't provide labels in the Shape File, so I have to "wing it" on the text. I am hoping to include the HCAD_NUM from the query instead of "Hello, world" as the text, but haven't had any luck with that, either. P.S. if you comment out the "graphic.setSymbol(AcctText);" you can see the outlines of the parcels.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="map.aspx.vb" Inherits="map" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<link href="Styles/Tundra.css" rel="stylesheet" />
<link href="Styles/ESRI.css" rel="stylesheet" />
<script src="https://js.arcgis.com/3.15/"></script>
<script>
//Avoids cross site scripting warnings
require(["esri/config"], function (esriConfig) {
esriConfig.defaults.io.corsEnabledServers.push("arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com");
esriConfig.defaults.io.corsEnabledServers.push("arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com:8080");
esriConfig.defaults.io.corsEnabledServers.push("arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com:80");
esriConfig.defaults.io.corsEnabledServers.push("arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com:443");
esriConfig.defaults.io.corsEnabledServers.push("arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com:6080");
esriConfig.defaults.io.corsEnabledServers.push("arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com:6443");
});
require([
"esri/map",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/tasks/QueryTask",
"esri/tasks/query",
"dojo/dom",
"dojo/on",
"esri/layers/FeatureLayer",
"esri/Color",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/renderers/SimpleRenderer",
"esri/geometry/Extent",
"dojo/parser",
"esri/geometry/Circle",
"esri/units",
"esri/symbols/Font",
"esri/symbols/TextSymbol",
"esri/config",
"esri/tasks/GeometryService",
"esri/tasks/BufferParameters",
"esri/toolbars/draw",
"esri/symbols/SimpleMarkerSymbol",
"esri/graphic",
"esri/geometry/Point",
"esri/layers/LabelClass",
"dojo/domReady!"],
function (Map, ArcGISDynamicMapServiceLayer, QueryTask,
Query, dom, on, FeatureLayer, Color, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, Extent, parser, Circle, Units, Font, TextSymbol, Graphic, Point, LabelClass) {
parser.parse();
map = new Map("map", {
showLabels: true
});
var baseLayer = new ArcGISDynamicMapServiceLayer("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer");
map.addLayer(baseLayer);
var countyLayer = new FeatureLayer("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer/0");
var outline = new SimpleLineSymbol("solid", new Color([255, 255, 255, 1]), 2);
var fill = new SimpleFillSymbol("solid", outline, new Color([255, 255, 0, 0.5]));
countyLayer.setRenderer(new SimpleRenderer(fill));
map.addLayer(countyLayer);
//Query the parcels layer for the subject property
queryTask = new QueryTask("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer/1");
query = new Query();
query.returnGeometry = true;
query.outFields = ["HCAD_NUM", "LocAddr"];
//Set up a callback for when the get details button is pressed.
function execute() {
query.where = "HCAD_NUM = '" + dom.byId("hcad_num").value + "'";
queryTask.execute(query, foundSubject);
}
on(dom.byId("execute"), "click", execute);
//Set up a query for
function foundSubject(results) {
var f = results.features;
//new Circle(center, options?) https://developers.arcgis.com/javascript/jsapi/circle-amd.html
circle = new Circle({ center: f[0].geometry.getExtent().getCenter(), radius: dom.byId("distance").value, radiusUnit: Units.FEET });
//Execute a new query that searches for all properties around subject
var areaQuery = new Query();
areaQuery.geometry = circle.getExtent();
areaQuery.returnGeometry = true;
areaQuery.outFields = ["HCAD_NUM", "LocAddr"];
queryTask.execute(areaQuery, showResults);
}
function showResults(results) {
var symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([0, 0, 0]), 1.0), new Color([180, 180, 180, 1])
);
map.graphics.clear();
var resultFeatures = results.features;
//Zoom to parcel
var ex = esri.graphicsExtent(resultFeatures);
map.setExtent(ex);
var font = new Font();
font.setSize("7pt");
font.setWeight(Font.WEIGHT_BOLD);
var Textcolor = new Color();
Textcolor.setColor([255, 0, 0]);
for (var i = 0, il = resultFeatures.length; i < il; i++) {
var graphic = resultFeatures;
//var ext = graphic.geometry.getExtent();
//var gWidth = ext.getWidth();
//var gHeight = ext.getHeight();
//var gCenter = ext.getCenter();
var AcctText = new TextSymbol();
AcctText.setFont(font);
AcctText.setColor(Textcolor);
AcctText.setText("Hello, World");
graphic.setSymbol(symbol);
graphic.setSymbol(AcctText);
var featureAttributes = graphic.attributes;
var resultItems = [];
for (var attr in featureAttributes) {
resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
map.graphics.add(graphic);
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
</script>
<title>CTN GIS</title>
<style type="text/css">
#distance {
width: 75px;
}
</style>
</head>
<body class="tundra">
Account: <input type="text" id="hcad_num" value="1122030000018" /> Radius: <input type="text" id="distance" value="500" />
<input id="execute" type="button" value="Show Map" />
<br />
<br />
<div id="info" style="padding:5px; margin:5px; background-color:#eee;">
</div>
<br /><br />
<div>
<div id="map"
data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region:'center'"
style="padding:0;">
</div>
</div>
<br /><br />
</body>
</html>
... View more
02-05-2016
01:12 PM
|
0
|
0
|
776
|
POST
|
Thanks, Robert. I am sorry I took so long. I have been wrestling with this thing since you wrote, and was hoping to have an intelligent reply... But no luck. This has been a very humbling experience to say the least. I was able to use your suggestion without error, and was able to place "Hello World" all around the map, but I can't get the parcel outlines and labels to show up at the same time. Still wrestling.
... View more
02-05-2016
12:19 PM
|
0
|
5
|
776
|
POST
|
Please forgive me for what is probably a totally newbie question, but the programmer who started this project left and I am really under the gun. I have looked at every sample I could find, and have searched the forum to no avail. We are able to pull up all of the properties within a (user-defined) radius of the center of our subject property. What I need to do is to place text near the center of each of the properties that fall within the radius. (HCAD_NUM, Site Address, etc. from the ShapeFile) I see how to get the extents for the map, but how to determine the location and size of the individual plots escapes me. I would also like to determine the width of the individual plots so I can adjust the fonts size and, perhaps text rotation so the text doesn't leak over onto other properties. (Desired Text is shown in red) My failed attempt to add text is at the very bottom. require([
"esri/map",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/tasks/QueryTask",
"esri/tasks/query",
"dojo/dom",
"dojo/on",
"esri/layers/FeatureLayer",
"esri/Color",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/renderers/SimpleRenderer",
"esri/geometry/Extent",
"dojo/parser",
"esri/geometry/Circle",
"esri/units",
"esri/symbols/Font",
"esri/symbols/TextSymbol",
"esri/layers/LabelClass",
"esri/config",
"esri/graphic",
"esri/tasks/GeometryService",
"esri/tasks/BufferParameters",
"esri/toolbars/draw",
"esri/symbols/SimpleMarkerSymbol",
"dojo/domReady!"],
function (Map, ArcGISDynamicMapServiceLayer, QueryTask,
Query, dom, on, FeatureLayer, Color, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, Extent, parser, Circle, Units, Font, TextSymbol)
{
parser.parse();
//map = new Map("map");
map = new Map("map", {
//extent: bbox,
showLabels: true //very important that this must be set to true!
});
var baseLayer = new ArcGISDynamicMapServiceLayer("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer");
map.addLayer(baseLayer);
var countyLayer = new FeatureLayer("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer/0");
var outline = new SimpleLineSymbol("solid", new Color([255, 255, 255, 1]), 2);
var fill = new SimpleFillSymbol("solid", outline, new Color([255, 255, 0, 0.5]));
countyLayer.setRenderer(new SimpleRenderer(fill));
map.addLayer(countyLayer);
//Query the parcels layer for the subject property
queryTask = new QueryTask("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer/1");
query = new Query();
query.returnGeometry = true;
query.outFields = ["HCAD_NUM", "LocAddr"];
//Set up a callback for when the get details button is pressed.
function execute()
{
query.where = "HCAD_NUM = '" + dom.byId("hcad_num").value + "'";
queryTask.execute(query, foundSubject);
}
on(dom.byId("execute"), "click", execute);
//Set up a query for
function foundSubject(results)
{
var f = results.features;
//new Circle(center, options?) https://developers.arcgis.com/javascript/jsapi/circle-amd.html
circle = new Circle({ center: f[0].geometry.getExtent().getCenter(), radius: dom.byId("distance").value, radiusUnit: Units.FEET });
//Execute a new query that searches for all properties around subject
var areaQuery = new Query();
areaQuery.geometry = circle.getExtent();
areaQuery.returnGeometry = true;
areaQuery.outFields = ["HCAD_NUM", "LocAddr"];
queryTask.execute(areaQuery, showResults);
}
function showResults(results)
{
var symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([0, 0, 0]), 1.0), new Color([180, 180, 180, 1])
);
map.graphics.clear();
var resultFeatures = results.features;
//Zoom to parcel
var ex = esri.graphicsExtent(resultFeatures);
map.setExtent(ex);
for (var i = 0, il = resultFeatures.length; i < il; i++) {
var graphic = resultFeatures;
graphic.setSymbol(symbol);
var featureAttributes = graphic.attributes;
var resultItems = [];
for (var attr in featureAttributes) {
resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
map.graphics.add(graphic);
var textSymbol = new TextSymbol(featureAttributes[attr]);
map.graphics.add(textSymbol);
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
... View more
02-04-2016
07:26 AM
|
0
|
7
|
2706
|
POST
|
Hello. Sadly the developer who started this project has quit, and I am desperately trying to get up to speed. All I want is something simple. Should be one of the most common functions in mapping - to add text inside a graphic as shown. (The map is generated, i put the number in there using paint for purposes of this post) But as soon as I define a textsymbol, the program bombs. I don't even have to do anything with it, just the var declaration kills it. (See near the bottom of the code) I have "required" esri/symbols/TextSymbol among others at the top of the script file. The idea is to place the contents of the HCAD_NUM field from the shapefile near the middle of each plot. But I can't even get it to show a hard-coded "Hello world" anywhere on the screen. Any help would be greatly appreciated. require([ "esri/map", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/tasks/QueryTask", "esri/tasks/query", "dojo/dom", "dojo/on", "esri/layers/FeatureLayer", "esri/Color", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/renderers/SimpleRenderer", "esri/geometry/Extent", "dojo/parser", "esri/geometry/Circle", "esri/units", "esri/symbols/TextSymbol", "esri/layers/LabelClass", "esri/config", "esri/graphic", "esri/tasks/GeometryService", "esri/tasks/BufferParameters", "esri/toolbars/draw", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/Font", "dojo/domReady!"], function (Map, ArcGISDynamicMapServiceLayer, QueryTask, Query, dom, on, FeatureLayer, Color, SimpleLineSymbol, SimpleFillSymbol, SimpleRenderer, Extent, parser, Circle, Units) { parser.parse(); //map = new Map("map"); map = new Map("map", { //extent: bbox, showLabels: true //very important that this must be set to true! }); var baseLayer = new ArcGISDynamicMapServiceLayer("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer"); map.addLayer(baseLayer); var countyLayer = new FeatureLayer("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer/0"); var outline = new SimpleLineSymbol("solid", new Color([255, 255, 255, 1]), 2); var fill = new SimpleFillSymbol("solid", outline, new Color([255, 255, 0, 0.5])); countyLayer.setRenderer(new SimpleRenderer(fill)); map.addLayer(countyLayer); //Query the parcels layer for the subject property queryTask = new QueryTask("https://arcgis-ctngis-1263207624.us-west-2.elb.amazonaws.com/arcgis/rest/services/HCAD/CADDataAndParcels/MapServer/1"); query = new Query(); query.returnGeometry = true; query.outFields = ["HCAD_NUM", "LocAddr"]; //Set up a callback for when the get details button is pressed. function execute() { query.where = "HCAD_NUM = '" + dom.byId("hcad_num").value + "'"; queryTask.execute(query, foundSubject); } on(dom.byId("execute"), "click", execute); //Set up a query for function foundSubject(results) { var f = results.features; circle = new Circle({center: f[0].geometry.getExtent().getCenter(), radius: dom.byId("distance").value, radiusUnit: Units.FEET}); //Execute a new query that searches for all properties around subject var areaQuery = new Query(); areaQuery.geometry = circle.getExtent(); areaQuery.returnGeometry = true; areaQuery.outFields = ["HCAD_NUM", "LocAddr"]; queryTask.execute(areaQuery, showResults); } function showResults(results) { var symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([0, 0, 0]), 1.0), new Color([255, 255, 255, 1]) ); var textSymbol = new TextSymbol("Hello, World"); map.graphics.clear(); var resultFeatures = results.features; map.graphics.clear(); var resultFeatures = results.features; //Zoom to parcel var ex = esri.graphicsExtent(resultFeatures); map.setExtent(ex); for (var i = 0, il = resultFeatures.length; i < il; i++) { var graphic = resultFeatures; graphic.setSymbol(symbol); map.graphics.add(graphic); var point = graphic.center; var featureAttributes = graphic.attributes; var resultItems = []; for (var attr in featureAttributes) { resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>"); } resultItems.push("<br>"); } dom.byId("info").innerHTML = resultItems.join(""); } });
... View more
01-29-2016
12:46 PM
|
0
|
4
|
2231
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|