POST
|
Our app is now failing with a reference to: <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script> Here is the link to our app: http://map.toronto.ca/maps/map.jsp?app=TOInView It appears that something has changed in the build for the api online? Thanks, Steve
... View more
10-17-2012
10:29 AM
|
0
|
3
|
691
|
POST
|
Hi, Feature layer panning works properly if you add layers that are visible on the map (not scale dependent). If I comment out the extent in the code below, and zoom to the layers, panning will break. Steve
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<!--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>FeatureLayer On Demand</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.0/js/dojo/dijit/themes/claro/claro.css">
<style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
</style>
<script type="text/javascript">djConfig = { parseOnLoad:true };</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.0"></script>
<script type="text/javascript">
dojo.require("esri.map");
dojo.require("esri.layers.FeatureLayer");
dojo.require("dijit.form.Button");
dojo.require("dijit.Dialog");
var map;
function init() {
map = new esri.Map("map");
var extent = new esri.geometry.Extent(316500, 4837500, 317600, 4838500, new esri.SpatialReference({
wkid: 2019
}));
// comment out set extent to break panning!
map.setExtent(extent, true);
dojo.connect(map, "onLoad", initOperationalLayer);
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://gis.toronto.ca/arcgis/rest/services/primary/cot_basemap_mtm/MapServer");
map.addLayer(basemap);
}
function initOperationalLayer(map) {
var featureLayer1 = new esri.layers.FeatureLayer("http://gis.toronto.ca/arcgis/rest/services/primary/cot_geospatial_mtm/MapServer/98",
{mode: esri.layers.FeatureLayer.MODE_ONDEMAND ,displayOnPan:false});
featureLayer1.renderer = new esri.renderer.SimpleRenderer(new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
new dojo.Color([255,0,0]), 1),
new dojo.Color([255,0,0,1])));
map.addLayer(featureLayer1);
var featureLayer2 = new esri.layers.FeatureLayer("http://gis.toronto.ca/arcgis/rest/services/primary/cot_geospatial_mtm/MapServer/112",
{mode: esri.layers.FeatureLayer.MODE_ONDEMAND , displayOnPan:false});
featureLayer2.renderer = new esri.renderer.SimpleRenderer(new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SQUARE, 10,
new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
new dojo.Color([0,255,0]), 1),
new dojo.Color([0,255,0,1])));
map.addLayer(featureLayer2);
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div style="position:relative;width:100%;height:100%;">
<div id="map" style="width:100%;height:100%;">
<div style="position:absolute; left:100px; top:10px; z-Index:999;">
</div>
</div>
</div>
</body>
</html>
... View more
06-21-2012
10:42 AM
|
0
|
0
|
491
|
POST
|
Hi, I have similar problems. I add 2 Feature layers (on Demand mode)- pan the map and only 1 layer is refreshed at 3.0. Switch back to 2.8 and it works. I am hitting server 9.3.1. I have attached sample code as well. Steve
... View more
06-20-2012
04:49 AM
|
0
|
0
|
491
|
POST
|
My fault.. edited the file wrong..it is now working...
... View more
08-05-2010
07:24 AM
|
0
|
0
|
140
|
POST
|
I have downloaded the 2.0 library to run on our severs...we are a Websphere 6.1 shop, and the esri_test.html page fails with: Could not load cross-domain resources: dojox.gfx.svg esri.nls.jsapi_en-us I have tried this workaround from dojo: http://trac.dojotoolkit.org/ticket/4462 Still not working... Any ideas.. Thanks, Steve
... View more
08-05-2010
07:03 AM
|
0
|
1
|
541
|
POST
|
I have noticed that the Query Task and the Identify Task return date field values in a different format. ie.. The id format is returning 10/16/2010 (mm/dd/yyyy) The query format is returning a longer date format such as Mon Oct 04 00:00:00 EDT 2010 How can I control the display format of the date for both id and query without having to parse out each type differently. It will also change when I go to either a UNIX or Windows server. I am using ArcGIS Server 9.3.1 on both windows and unix servers, and the Javascript api 1.6. Thanks in advance for any help.. Steve
... View more
05-05-2010
06:35 AM
|
0
|
1
|
2364
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|