|
POST
|
Hey Peter, The first issue I see is, that your requiere statements aren't lining up with your function statements. It needs to be changed to this: require([
"esri/map",
"esri/layers/FeatureLayer", "esri/dijit/Legend",
"dojo/_base/array", "dojo/parser",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/layers/ImageParameters", "dijit/layout/BorderContainer", "dijit/layout/ContentPane",
"dijit/layout/AccordionContainer", "dojo/domReady!",
], function (
Map, FeatureLayer, Legend,
arrayUtils, parser, ArcGISDynamicMapServiceLayer, ImageParameters) { Tim
... View more
06-04-2014
07:27 AM
|
0
|
0
|
1572
|
|
POST
|
The AMD version of connect is on, like this: map.on("layers-add-result", function (results) {
... View more
06-04-2014
04:41 AM
|
0
|
0
|
794
|
|
POST
|
If this is a paid Organizational account I think you would run into legal issues. I think each account needs to have a named person that is only allowed to use said account. I would contact your ESRI rep to see what way you should go.
... View more
06-02-2014
09:06 AM
|
0
|
0
|
988
|
|
POST
|
Jay, we would need to see the whole code. But from what I can see here, you need to use the var names in your add expression. app.map.addLayer(flWarbler2); app.map.addLayer(flWarbler1); That might fix it, but again I would need to see all of the code. Tim
... View more
05-29-2014
07:21 AM
|
0
|
0
|
537
|
|
POST
|
Something like this? I used buttons though. Also with your hover idea, check out this. Hope this helps! Tim
... View more
05-29-2014
05:18 AM
|
0
|
0
|
873
|
|
POST
|
No problem, don't forget to mark the thread as answered.
... View more
05-28-2014
12:23 PM
|
0
|
0
|
852
|
|
POST
|
Try this:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>test map with one marker</title>
<link type="text/css" href="style/cp.css" rel="stylesheet" />
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<script type="text/javascript" src="http://js.arcgis.com/3.9/"></script>
<script>
<!--//
var icons = new Array();
var coords = {'lat': new Array(), 'lon': new Array()};
var map = '';
var icon = '';
var lat = '43.727294000';
var lon = '-97.977614000';
require([
"esri/map",
"esri/geometry/Point",
"esri/SpatialReference",
"esri/graphic",
"dojo/on",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/PictureMarkerSymbol",
"esri/symbols/SimpleFillSymbol",
"dojo/domReady!"
],
function(Map, Point, SpatialReference, Graphic, on, SimpleMarkerSymbol, PictureMarkerSymbol, SimpleFillSymbol) {
map = new Map("idmap", {
center: [lon, lat],
zoom: 9,
basemap: "national-geographic"
});
on(map, "load", addGraphic);
function addGraphic(){
var symbolb = new PictureMarkerSymbol('http://files.geoconhead.consensusdev.com/portal/GCH3cXr0JLmkVKE3QykW/icons/type/original/vtm891210C58F9ABE062.png', 30, 30);
var gpoint = new Point(lon, lat, new SpatialReference({ wkid: 4326 }) );
var newgraphic = new Graphic(gpoint, symbolb);
map.graphics.add(newgraphic);
console.log(newgraphic);
}
});
//-->
</script>
</head>
<body>
<div id="container">
<div id="core">
<div class="column" id="column3">
<div id="idmap" style="width:500px;height:500px;"></div>
</div>
<div class="clearboth"></div>
</div>
</div>
</body>
</html> You were also missing "esri/SpatialReference" Tim
... View more
05-28-2014
11:31 AM
|
0
|
0
|
852
|
|
POST
|
Maybe this application I have created helps? I created two markers in it. One thing I see is that you are missing "dojo/on" in your require, and the corresponding "on" in your function. This might help you understanding AMD vs Legacy.
... View more
05-28-2014
11:20 AM
|
0
|
0
|
852
|
|
POST
|
Michael, I would recommend not writing it in Legacy but in AMD instead. This should be able to help you with labeling. Tim
... View more
05-28-2014
06:19 AM
|
0
|
0
|
716
|
|
POST
|
Carlynne, You should be able to extract the javascript code (right-click your story map and look at the source code) and then use it in your website. Tim
... View more
05-28-2014
04:26 AM
|
0
|
0
|
739
|
|
POST
|
Maybe try the sandbox? http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=map_create_amd
... View more
05-27-2014
12:51 PM
|
0
|
0
|
666
|
|
POST
|
Michael, would this work for you? <!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>Measure Tool</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<style>
html,body {
height:100%;
width:100%;
margin:0;
}
body {
background-color:#FFF;
overflow:hidden;
font-family:"Trebuchet MS";
}
#map {
border:solid 2px #808775;
-moz-border-radius:4px;
-webkit-border-radius:4px;
border-radius:4px;
margin:5px;
padding:0px;
}
#titlePane{
width:240px;
}
.claro .dijitTitlePaneTitle {
background: #808775;
font-weight:600;
border:solid 1px #29201A;
}
.claro .dijitTitlePaneTitleHover {
background:#808775;
}
.claro .dijitTitlePaneTitleActive {
background:#808775;
}
.claro .dijitTitlePaneContentOuter {
border-right: solid 2px #808775 !important;
border-bottom: solid 2px #808775 !important;
border-left: solid 2px #808775 !important;
}
</style>
<script src="http://js.arcgis.com/3.9/"></script>
<script>
require(["dojo/dom",
"esri/Color",
"dojo/keys",
"dojo/parser",
"esri/config",
"esri/sniff",
"esri/map",
"esri/SnappingManager",
"esri/dijit/Measurement",
"esri/layers/FeatureLayer",
"esri/renderers/SimpleRenderer",
"esri/tasks/GeometryService",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/dijit/Scalebar",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/TitlePane",
"dijit/form/CheckBox"
],
function(dom, Color, keys, parser, esriConfig, has, Map, SnappingManager, Measurement, FeatureLayer, SimpleRenderer, GeometryService, SimpleLineSymbol, SimpleFillSymbol){
var map;
parser.parse();
//This sample may require a proxy page to handle communications with the ArcGIS Server services. You will need to
//replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic
//for details on setting up a proxy page.
esriConfig.defaults.io.proxyUrl = "/proxy";
esriConfig.defaults.io.alwaysUseProxy = false;
//This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications
esriConfig.defaults.geometryService = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
map = new Map("map", {
basemap: "satellite",
center: [-85.743, 38.256],
zoom: 17
});
var sfs = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([195,176,23]), 2),null);
var parcelsLayer = new FeatureLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/0", {
mode: FeatureLayer.MODE_ONDEMAND,
outFields: ["*"]
});
parcelsLayer.setRenderer(new SimpleRenderer(sfs));
map.addLayers([parcelsLayer]);
//dojo.keys.copyKey maps to CTRL on windows and Cmd on Mac., but has wrong code for Chrome on Mac
var snapManager = map.enableSnapping({
snapKey:has("mac") ? keys.META : keys.CTRL
});
var layerInfos = [{layer: parcelsLayer}];
snapManager.setLayerInfos(layerInfos);
var measurement = new Measurement({
map: map
}, dom.byId("measurementDiv"));
measurement.startup();
});
</script>
</head>
<body class="claro">
<div id="mainWindow" data-dojo-type="dijit.layout.BorderContainer" data-dojo-props="design:'headline',gutters:false"
style="width:100%; height:100%;">
<div id="filterTitlePane" data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Filter Properties', open: true,region:'top'" >
The bigger the panel the farther off the point on the map is from the location I clicked
<br>
<br>
</div>
<div id="map" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'center'">
<div style="position:absolute; right:20px; top:10px; z-Index:999;">
<div id="titlePane" data-dojo-type="dijit.TitlePane" data-dojo-props="title:'Measurement', closable:'false', open:'false'">
<div id="measurementDiv"></div>
<span style="font-size:smaller;padding:5px 5px;">Press <b>CTRL</b> to enable snapping.</span>
</div>
</div>
</div>
</div>
</body>
</html> Tim
... View more
05-27-2014
04:36 AM
|
0
|
0
|
439
|
|
POST
|
Matt, I opened a new map, clicked on Add -> Add Layer from Web and pasted the URL in there and clicked on Add Layer. This is the result. Tim
... View more
05-27-2014
04:23 AM
|
0
|
0
|
1757
|
|
POST
|
At the bottom of this page it states: Add additional service credits to your subscription at any time. Additional credits can be purchased in blocks of 1,000 for $100 ($0.10 per credit). Just call ESRI customer service and they hsould be able to help. Hope this helps! Tim
... View more
05-27-2014
04:19 AM
|
0
|
0
|
477
|
|
POST
|
Btw, the rest services listed here work for me. Maybe get the links from there?
... View more
05-27-2014
04:17 AM
|
0
|
0
|
1757
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-25-2013 07:58 AM | |
| 1 | 03-06-2014 06:03 AM | |
| 4 | 12-09-2013 03:25 AM | |
| 1 | 04-16-2014 04:11 AM | |
| 1 | 04-24-2014 10:53 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|