|
POST
|
This is more like a jQuery question. Anyway, try this. $(".message").click(function() {
$("#message_box").dialog("option", "width", 500);
$("#message_box").dialog("open");
});
... View more
08-22-2013
06:13 AM
|
0
|
0
|
377
|
|
POST
|
require([
"esri/Map",
"esri/graphic",
"esri/symbols/PictureMarkerSymbol",
"esri/geometry/Point",
"esri/geometry/webMercatorUtils"
], function(Map, Graphic, PictureMarkerSymbol, Point, webMercatorUtils) {
var map = new Map({ basemap: "topo" }, "divMap"); // divMap: div element as map container
var pms = new PictureMarkerSymbol({"angle":0,"xoffset":2,"yoffset":8,"type":"esriPMS","url":"http://static.arcgis.com/images/Symbols/Basic/RedShinyPin.png","contentType":"image/png","width":24,"height":24});
var point = new Point(lon, lat); // given lat/lon
var wmPoint = webMercatorUtils.geographicToWebMercator(point);
var graphic = new Graphic(wmPoint, pms, null, null);
map.graphics.add(graphic);
map.centerAt(wmPoint);
});
... View more
08-21-2013
07:12 PM
|
0
|
0
|
1692
|
|
POST
|
Not clear with what you are asking for. Are you trying to locate the given lat/lon on the map or you like to search for other features that contain the point with the lat/lon?
... View more
08-21-2013
02:22 PM
|
0
|
0
|
1692
|
|
POST
|
You put dependencies in the first parameter as an array, and use aliases as the callback function parameters once all the dependencies are loaded. Inside the callback function, you can use the aliases instead. define(["dojo/dom", "dojo/query"], function(dom, query) {
getType: function(value) {
var type = "config.json";
switch (value) {
case "test":
type = "config-test.json";
break
case "landdevelopment":
type = "config-landdevelopment.json";
break
case "utilitiesinfrastructure":
type = "config-utilitiesinfrastructure.json";
break
default:
type = "config.json";
}
return type;
},
getFormattedServiceType: function(value) {
var type = "Property Locator";
var newValue = (value.replace(".json", "")).replace('config-', '');
switch (newValue) {
case "test":
type = "Test";
break
case "landdevelopment":
type = "Land Development";
break
case "utilitiesinfrastructure":
type = "Utilities Infrastructure";
break
default:
type = "Property Locator";
}
return type;
},
getAllNamedChildDijits: function(id) {
// Gather all child widgets
var w = null;
var children = null;
widgets = {};
w = query("[widgetId]", dom.byId(id));
children = w.map(dijit.byNode);
children.forEach(function(item, idx) {
if (item.name) {
widgets[item.name] = item;
}
});
return widgets;
}
});
... View more
08-21-2013
12:36 PM
|
0
|
0
|
698
|
|
POST
|
You can use ArcGIS Desktop to project the layer as it should be, and set its full extent in ArcMap to whatever you like it. Then republish the map service. The issue should be fixed by then.
... View more
08-21-2013
12:16 PM
|
0
|
0
|
1274
|
|
POST
|
Ok. After some testing, this should work. Change toggleIdentify function as below. function toggleIdentify(toolName) {
var isMeasurementActive = measurement[toolName].checked;
// disable identifyHandler when measurement tool is set and activated
if (isMeasurementActive) {
dojo.disconnect(identifyHandler);
identifyHandler = null;
}
// activate identify tool otherwise
else {
identifyHandler = map.on("click", executeIdentifyTask);
}
}
... View more
08-21-2013
12:12 PM
|
0
|
0
|
1250
|
|
POST
|
Open the app in Chrome and start the Developer Tools. Set a breakpoint at the first statement inside toggleIdentify. Will the app reach the breakpoint when you click any of the measurement tools?
... View more
08-21-2013
08:09 AM
|
0
|
0
|
1250
|
|
POST
|
Can you post the portion of the code that shows the popup?
... View more
08-20-2013
07:02 PM
|
0
|
0
|
795
|
|
POST
|
The parameter returned from findTask is FindResult[]. Refer to https://developers.arcgis.com/en/javascript/jsapi/findresult-amd.html for details. Change: function updateGrid(featureSet){
console.log(featureSet); To: function updateGrid(findResults){
console.log(findResults);
var featureSet = dojo.map(findResults, function(findResult) { return findResult.feature;}); I would also change relatedResource = entry.attributes.relatedresource === null ? "no value" : entry.attributes.relatedresource; To: relatedResource = entry.attributes.relatedresource || "no value"; As to the other portion that process the data, I would check one item that pushed to the data array, making sure it's correct.
... View more
08-20-2013
06:59 PM
|
0
|
0
|
384
|
|
POST
|
This should work: <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title></title>
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css">
<link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/dojo/dijit/themes/claro/claro.css">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
overflow:hidden;
}
#mapDiv {
width: 100%;
height: 100%;
}
</style>
<script>
var dojoConfig = {
parseOnLoad : true
};
</script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script>
<script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/"></script>
<script>
console.log('abc');
var map;
require(["esri/map", "dojo/domReady!"], function(Map) {
map = new Map("mapDiv", {
center : [-56.049, 38.485],
zoom : 3,
basemap : "topo"
});
});
</script>
<script>
require(["dijit/layout/BorderContainer", "dijit/layout/TabContainer", "dijit/layout/ContentPane", "dojo/domReady!"], function(BorderContainer, TabContainer, ContentPane) {
var tc = new TabContainer({style: "height: 100%; width: 100%;"}, "tc1-prog");
var cp1 = new ContentPane({
title : "Food",
content : "We offer amazing food"
});
tc.addChild(cp1);
var cp2 = new ContentPane({
title : "Drinks",
content : "We are known for our drinks."
});
tc.addChild(cp2);
tc.startup();
});
</script>
</head>
<body class="claro">
<div id="mainContainer" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'sidebar', gutters:true, liveSplitters:true" style="width:100%; height:100%">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'leading'" style="width: 200px;">
<div id="tc1-prog"></div>
</div>
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'center'">
<div id="mapDiv"></div>
</div>
</div>
</body>
</html>
... View more
08-20-2013
02:31 PM
|
0
|
0
|
669
|
|
POST
|
The extent for Layer: DMS Access Points (ID:7) is not set. Check http://www.mymanatee.org/arcgis/rest/services/tools/traffic/MapServer/7. Fix that, and you should be good to go:)
... View more
08-20-2013
02:10 PM
|
0
|
0
|
1274
|
|
POST
|
Try: var query = new esri.tasks.Query(); query.geometry = area.geometry; var listOfSelectedFeatures = []; for (var j = 0; j < map.graphicsLayerIds.length; j++) { var currentLayer = map.getLayer(map.graphicsLayerIds ); if (currentLayer.declaredClass === "esri.layers.FeatureLayer") { currentLayer.selectFeatures(query, currentLayer.SELECTION_NEW, function (featureSet) { listOfSelectedFeatures.concat(featureSet.features); }); } } Please be noted that 1. The above code only deals with feature layers. Pure graphics layers should be filtered out since graphics layer has no selectFeatures method. 2. listOfSelectedFeatures may contain features in mixed spatial types.
... View more
08-20-2013
02:00 PM
|
1
|
0
|
1355
|
|
POST
|
Hi Jeff, I am curious to know which print class you are talking about.
... View more
08-20-2013
01:15 PM
|
0
|
0
|
1413
|
|
POST
|
Glad to help. If you think my post answered your question, please mark it as answered. Thanks.
... View more
08-20-2013
01:09 PM
|
0
|
0
|
211
|
|
POST
|
Unfortunately, you will have few control over what to add dynamically on the printout page if using esri Print widget or PrintTask. ESRI 's solution uses the map templates for the printout layout. There is nothing else you can add to it dynamically. If you like to add something dynamically, you will need to develop some custom print function on your own.
... View more
08-20-2013
09:21 AM
|
0
|
0
|
1413
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-17-2013 05:16 AM | |
| 1 | 11-06-2013 04:34 AM | |
| 1 | 08-29-2013 10:58 AM | |
| 6 | 10-20-2020 02:09 PM | |
| 1 | 11-20-2013 06:09 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-17-2024
08:41 AM
|