|
POST
|
hi Gloria. welcome to our forum! im assuming you're talking about this sample, correct? in addition to clearing the map.graphics, you also need to make sure the stops which were previously added to your RouteParameters objects are removed as well. routeParams.stops.features = []; i first tried setting routeParams.stops and routeParams.stops.features to 'null', but afterward, no additional route requests went out. this seemed a little counterintuitive at first, but the problem with that is that you've unset the object associated with that property completely.
... View more
02-04-2014
09:05 AM
|
0
|
0
|
1558
|
|
POST
|
this is just a guess, but i've seen proxy pages that threw up when they encountered spaces in the url of the resource they are attempting to forward. this is relevant because the out of the box print task includes the operation name 'Export Web Map Task'. what happens when you try and ping the url below directly in the browser? http://localhost/yourproxy.ashx?http://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task
... View more
02-04-2014
08:53 AM
|
0
|
0
|
1401
|
|
POST
|
using fiddler (or browser developer tools) find the request passed to the applyEdits operation of your particular feature service layer and inspect the response itself to make sure that it includes '"success":true' (see attached screenshot). [ATTACH=CONFIG]30997[/ATTACH]
... View more
01-30-2014
12:43 PM
|
0
|
0
|
2295
|
|
POST
|
@ganesh, in addition to checking the response status, it would also be helpful to inspect the response JSON text to confirm whether or not your edit has been completed successfully.
... View more
01-30-2014
06:47 AM
|
0
|
0
|
2295
|
|
POST
|
i went ahead and updated this sample to use AMD/version 3.8 of our API and on style event listeners. http://jsfiddle.net/jagravois/3rZK5/
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<!--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>Basemaps with an Opacity Slider</title>
<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/dojo/dijit/themes/nihilo/nihilo.css">
<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.8/js/esri/css/esri.css">
<style>
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
#map{ padding: 0; }
#sliderWrapper {
position:absolute;
right: 30px;
top:30px;
z-Index: 40;
width: 250px;
height: 50px;
background: #fff;
-moz-box-shadow: 0 0 5px #888;
-webkit-box-shadow: 0 0 5px #888;
box-shadow: 0 0 5px #888;
}
#sliderLabels {
position: relative;
top: -1px;
height: 1.2em;
font-size: 80%;
font-weight: bold;
font-family: arial;
color: #444;
padding: 3px;
margin: 5px 10px 0 10px;
}
</style>
<script type="text/javascript">var dojoConfig = { parseOnLoad: true };</script>
<script type="text/javascript" src="http://js.arcgis.com/3.8/"></script>
<script type="text/javascript">
require([
"esri/map",
"esri/layers/ArcGISTiledMapServiceLayer",
"dojo/on",
"dijit/registry",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/form/HorizontalSlider",
"dijit/form/HorizontalRuleLabels"],
function (Map, ArcGISTiledMapServiceLayer, on, registry) {
var map = new esri.Map("map", {
center: [-80,20],
zoom: 3
});
var oceans = new ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer");
map.addLayer(oceans);
var streets = new ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer");
map.addLayer(streets);
//wire an event handler for the dojo slider
map.on("load", function() {
on(registry.byId('sliderOpacity'), 'change', changeOpacity);
});
function changeOpacity(op) {
var newOp = (op / 100);
streets.setOpacity(1.0 - newOp);
oceans.setOpacity(newOp);
}
});
</script>
</head>
<body class="nihilo">
<div data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="design:'headline',gutters:false"
style="width: 100%; height: 100%; margin: 0;">
<div id="map"
data-dojo-type="dijit/layout/ContentPane"
data-dojo-props="region:'center'"
style="width: 100%; height: 100%; margin: 0;">
<div id="sliderWrapper"> <!-- slider divs -->
<div id="sliderOpacity"
data-dojo-type="dijit/form/HorizontalSlider"
data-dojo-props="showButtons:'true', value:0, minimum:0, maximum:100, discreteValues:101, intermediateChanges:true">
<ol id="sliderLabels"
data-dojo-type="dijit/form/HorizontalRuleLabels"
data-dojo-props="container:'topDecoration'">
<li>Streets</li>
<li>Oceans</li>
</ol>
</div>
</div> <!-- end slider divs -->
</div>
</div>
</body>
</html>
... View more
01-28-2014
10:51 AM
|
1
|
0
|
1750
|
|
POST
|
hi vicki, i hate to be the bearer of bad news, but none of our 'sample' servers are meant to be used in production applications. our new subscription Service Area routing service definitely supports both time and distance impedance, but running the service costs credits. the good news is that if you are still just testing you can sign up for a free arcgis.com developer account which gives you access to 50 free credits per month.
... View more
01-23-2014
06:30 AM
|
0
|
0
|
550
|
|
POST
|
are you trying to overlay a WMS service or an ArcGIS Server tiled map service, because your url example looks a lot more like an ArcGIS Server tiled service than WMS. To answer the question in your first post, as per the documentation in the repository readme, the tiling scheme of your own service definitely has to match Google/Bing/ArcGISOnline. Your map service must be published using the Web Mercator Auxiliary Sphere tiling scheme (WKID 102100/3857) used by Google Maps, Bing Maps and ArcGIS Online. Esri Leaflet will not support any other spatial reference for tile layers.
... View more
01-22-2014
06:48 AM
|
0
|
0
|
3909
|
|
POST
|
if you're trying to load your own service, you're better off just creating a tiledmaplayer than trying to alter the API to substitute a different basemap.
//Initializing the map to start at the east coast
var map = L.map('map').setView([42, -74], 5);
//Add Oceans Basemaps
L.esri.basemapLayer("Oceans").addTo(map);
//Add your own layer
var charts = new L.esri.TiledMapLayer("http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/World_Navigation_Charts/MapServer").addTo(map);
heres a working fiddle. ill see about getting it added to the published samples as well. surprised we didnt already have one!
... View more
01-17-2014
09:06 AM
|
0
|
0
|
3909
|
|
POST
|
with regard to every other query failing, this is a 10.1 SP1 ArcGIS Server specific bug and affects identical queries fired sequentially using a GET. [NIM086349 Alternate Query (Get) requests to some map services fail in ArcGIS Server 10.1 SP1.] The problem has been fixed in 10.2. sorry for the inconvenience.
... View more
01-15-2014
06:58 AM
|
0
|
0
|
507
|
|
POST
|
not positive, but i don't think there is way to get control over the arrow width in the draw toolbar.
... View more
01-14-2014
10:44 AM
|
0
|
0
|
3475
|
|
POST
|
as ken said, the call to the service itself is asynchronous so you have to wait until you know the layer has actually completed loading. map.addLayer(dynamicMapServiceLayer);
console.log(dynamicMapServiceLayer.fullExtent); //this will be null
dynamicMapServiceLayer.on("load", function(evt) {
console.log(evt.layer.fullExtent); //this will be populated
});
... View more
01-13-2014
10:05 AM
|
0
|
0
|
3431
|
|
POST
|
glad to hear it matt. please consider marking this thread as 'answered'.
... View more
01-13-2014
09:58 AM
|
0
|
0
|
1398
|
|
POST
|
hi matt, your 'Graphic is undefined' error is the result of using an AMD code snippet within a sample that uses the legacy loading pattern (ie. esri.Graphic refers to something here, but not 'Graphic' all by itself.) in order to solve this problem you are going to have to avoid creating a new array each time someone clicks on the map. heres a working sample and a description of the logic it uses. 1. create global variables for a variable called 'features' and another called 'facilities'
var map, serviceAreaTask, params, clickpoint, features, facilities;
2. make features an empty array within the function that fires on page load and make facilities a new FeatureSet()
function init() {
...
features = [];
facilities = new esri.tasks.FeatureSet();
}
3. stop clearing the map graphics each time the map is clicked (because we need more than one to display)
function mapClickHandler(evt) {
//map.graphics.clear();
}
4. check how many items can be found within the array of graphics called 'features'. once there are two, call the service area code.
features.push(location);
if (features.length === 2) {
facilities.features = features;
...
ps. in the future, please consider posting your code within CODE tags. it helps with formatting.
... View more
01-13-2014
09:03 AM
|
0
|
0
|
1398
|
|
POST
|
welcome to the forums burton! if you have a reference to an extent object, you could find its center using the method extent.getCenter() afterward, you could pass the point which is returned to map.centerAt()
... View more
01-13-2014
08:37 AM
|
0
|
0
|
3431
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-16-2014 02:35 PM | |
| 1 | 03-15-2013 04:25 PM | |
| 1 | 06-01-2016 10:51 AM | |
| 1 | 12-28-2015 04:46 PM | |
| 1 | 12-28-2015 05:26 PM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:22 AM
|