|
POST
|
Looks like there are some issues with the download version. We are updating it and the fixed version should be available tomorrow.
... View more
05-18-2011
03:51 PM
|
0
|
0
|
2840
|
|
POST
|
The download version is now available on the ArcGIS API for JavaScript download page. http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_accessapi.html
... View more
05-18-2011
05:50 AM
|
0
|
0
|
2840
|
|
POST
|
Version 2.3 of the ArcGIS API for JavaScript was released this morning. View the Server blog for more details: http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2011/05/16/ArcGIS-API-for-JavaScript-Version-2.3-released_2E00_.aspx
... View more
05-17-2011
08:12 AM
|
0
|
0
|
778
|
|
POST
|
I justed tested it in IE8 and it loaded data into the grid but it took several seconds.
... View more
05-17-2011
07:12 AM
|
0
|
0
|
987
|
|
POST
|
Can you post a link to the sample that is broken in IE?
... View more
05-16-2011
03:30 PM
|
0
|
0
|
987
|
|
POST
|
You were close - you just needed to assign a width to the right pane that contains the tab. You can do this by setting an id for the tab pane to id="rightPane". The sample associates a css style with this id to set the pane's width to 30%. Here's the modified code:
<!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" />
<!--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>
</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.2/js/dojo/dijit/themes/soria/soria.css">
<style type="text/css">
html, body {
height: 100%; width: 100%; margin: 0;
}
body{
background-color:white; overflow:hidden;
font-family: "Trebuchet MS";
}
.roundedCorners{
-moz-border-radius: 4px;
}
#header {
border: solid 2px #7EABCD;
background-color:white; color:peru; font-size:18pt;
text-align:center; font-weight:bold; height:60px;
}
#subheader {
font-size:small;
color: peru;
}
#rightPane{
background-color:white;
color:peru;
border: solid 2px cornflowerblue;
width:30%;
overflow:hidden;
}
#map {
background-color:white;
border:solid 2px cornflowerblue;
padding:0;
}
#footer {
border: solid 2px #7EABCD;
background-color:white;color:peru;font-size:10pt; text-align:center; height:40px;
}
.soria .dojoxGridHeader .dojoxGridCell {
color:peru !important;
}
</style>
<script type="text/javascript">
var djConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2">
</script>
<script type="text/javascript">
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
dojo.require("esri.map");
dojo.require("esri.toolbars.draw");
dojo.require("esri.layers.FeatureLayer");
dojo.require("esri.tasks.query");
dojo.require("dojox.grid.DataGrid");
dojo.require("dojo.data.ItemFileReadStore");
var map, toolbar;
var featureLayer;
function init() {
var initialExtent = new esri.geometry.Extent({
"xmin": -13092200,
"ymin": 3691751,
"xmax": -12538796,
"ymax": 3880092,
"spatialReference": {
"wkid": 102100
}
});
map = new esri.Map("map", {
extent: initialExtent
});
dojo.connect(map, 'onLoad', function(map) {
dojo.connect(dijit.byId('map'), 'resize', resizeMap);
});
var basemapUrl = "http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer";
var featureLayerUrl = "http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/MapServer/0";
var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemapUrl);
featureLayer = new esri.layers.FeatureLayer(featureLayerUrl, {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields: ["region,magnitude,depth,objectid"]
});
featureLayer.setSelectionSymbol(new esri.symbol.SimpleMarkerSymbol().setSize(8).setColor(new dojo.Color([160, 214, 238])));
map.addLayer(basemap);
map.addLayer(featureLayer);
}
function resizeMap() {
//resize the map when the browser resizes - view the 'Resizing and repositioning the map' section in
//the following help topic for more details http://help.esri.com/EN/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/inside_faq.htm
var resizeTimer;
clearTimeout(resizeTimer);
resizeTimer = setTimeout(function() {
map.resize();
map.reposition();
}, 500);
}
//show map on load
dojo.addOnLoad(init);
</script>
</head>
<body class="soria">
<div id="mainWindow" dojotype="dijit.layout.BorderContainer" design="headline" gutters="false"
style="width:100%; height:100%;">
<div id="header" dojotype="dijit.layout.ContentPane" class="roundedCorners" region="top">
HEADER
</div>
<div id="map" dojotype="dijit.layout.ContentPane" class="roundedCorners" region="center">
</div>
<div id="rightPane" dojoType="dijit.layout.TabContainer" region="right" tabStrip="true">
<div dojoType="dijit.layout.ContentPane" title="My first tab" selected="true">
Stuff
</div>
<div dojoType="dijit.layout.ContentPane" title="My second tab">
Lorem ipsum and all around - second...
</div>
<div dojoType="dijit.layout.ContentPane" title="My last tab" closable="true">
Lorem ipsum and all around - last...
</div>
</div>
<!-- end TabContainer -->
<div id="footer" class="roundedCorners" dojotype="dijit.layout.ContentPane" region="bottom">
This is the footer section
</div>
</div>
</body>
</html>
... View more
05-13-2011
03:03 PM
|
0
|
0
|
857
|
|
POST
|
If you are using version 2.2 of the API you can use the new formatting capabilities of the info window to generate a title when the feature is clicked. The 'Formating Info Window content' help topic has details on how to accomplish this - see the 'Deferred Object' section. Here's a code sample that shows how to generate the title, in this case we use an attribute from the graphics for demonstration purposes.
<!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">
<!--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>
</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.2/js/dojo/dijit/themes/Claro/Claro.css">
<style type="text/css">
html, body {
height: 100%; width: 100%;
margin: 0; padding: 0;
}
body{
background-color:white; overflow:hidden;
font-family: "Kimberley", sans-serif
}
#map {
margin:5px;
border:solid 4px #2A2F30;
padding:0px;
}
.shadow{
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
box-shadow: 8px 8px 16px #323834;
-webkit-box-shadow: 8px 8px 16px #323834;
-moz-box-shadow: 8px 8px 16px #323834;
-o-box-shadow: 8px 8px 16px #323834;
}
</style>
<script type="text/javascript">
var djConfig = {
parseOnLoad: true
};
</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2">
</script>
<script type="text/javascript">
dojo.require("dijit.dijit"); // optimize: load dijit layer
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
dojo.require("dojo.number");
dojo.require("esri.layers.FeatureLayer");
var map,trailLayer;
var template;
function init() {
var initExtent = new esri.geometry.Extent({"xmin":-13042392,"ymin":4324579,"xmax":-13021640,"ymax":4335968,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});
map.infoWindow.resize(150, 150);
var basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer");
map.addLayer(basemap);
//add the trails feature layer to the map
template = new esri.InfoTemplate();
template.setTitle(getTitle);
template.setContent(getTextContent);
trailLayer = new esri.layers.FeatureLayer("http://sampleserver5.arcgisonline.com/ArcGIS/rest/services/LocalGovernment/Recreation/MapServer/1", {
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate:template,
outFields: ["*"]
});
//create a new renderer for the feature layer
var lineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([0,255,0,.70]), 5);
trailLayer.setRenderer(new esri.renderer.SimpleRenderer(lineSymbol));
map.addLayer(trailLayer);
//add world place names to the map
var referenceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer");
map.addLayer(referenceLayer);
}
function getTitle(graphic){
var deferred = new dojo.Deferred();
setTimeout(function() {
deferred.callback("Title: " + graphic.attributes["notes"]);
}, 500);
return deferred;
}
//Generate the content for the info window when the feature is clicked.
function getTextContent(graphic) {
return 'My Test Content';
}
dojo.addOnLoad(init);
</script>
</head>
<body class="claro">
<div id="mainWindow" dojotype="dijit.layout.BorderContainer" design="headline" gutters="false" style="width:100%; height:100%;">
<div id="map" dojotype="dijit.layout.ContentPane" class="shadow" region="center"></div>
</div>
</body>
</html>
... View more
05-11-2011
08:42 AM
|
0
|
0
|
1333
|
|
POST
|
The sample Steve pointed you to (Multiple Graphics Layers) is a good one for getting started. In that sample the graphics are generated as the results of a query - so you'll need to modify the code to loop through your database results and add a graphic for each point. An alternate approach might be to use a feature layer. I've attached an example that gets geo-tagged photos from Flickr and displays them on a map. To view the attachment, rename the file extension to .html.
... View more
05-11-2011
08:29 AM
|
0
|
0
|
1200
|
|
POST
|
For Android, you many need to increase the click tolerance. The default value that we use is 5 pixels. You can increase this using the following after the page loads: esri.layers._GraphicsContainer.prototype._tolerance = 15;
... View more
05-10-2011
05:28 PM
|
0
|
0
|
559
|
|
POST
|
samueljon - you are correct, we do need to update the Aptana code assist to work with the newly released version 3.0. We plan to update the code assist and will add it to the resource center once its ready.
... View more
05-08-2011
12:50 PM
|
0
|
0
|
3614
|
|
POST
|
I think you are running into the bug described in the following discussion forum thread: http://forums.esri.com/Thread.asp?c=158&f=2396&t=301691&mc=5 The thread has a patch you can apply if you are using 1.6. The bug is fixed in version 2.0 and the 2.0 samples are located here: http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssamples_start.htm
... View more
04-26-2011
07:25 AM
|
0
|
0
|
880
|
|
POST
|
There's a sample showing feature layer selections here: http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/fl_selectfeatures.html
... View more
04-21-2011
12:41 PM
|
0
|
0
|
2184
|
|
POST
|
You can select from a map service based feature layer - you don't need a feature service.Can you post your code that creates the feature layer and sets the selection symbol.
... View more
04-21-2011
12:33 PM
|
0
|
0
|
2184
|
|
POST
|
Since you are working with a feature layer you shouldn't have to re-add the graphics to the map. Try defining a selection symbol for the feature layer using featureLayer.setSelectionSymbol. Then when features are selected using selectFeatures they should automatically display on the map using the selection symbol you defined.
... View more
04-21-2011
12:20 PM
|
0
|
0
|
2184
|
|
POST
|
This forum post contains details on how to fix this at 2.2.
... View more
04-19-2011
03:15 PM
|
0
|
0
|
721
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 4 weeks ago | |
| 1 | 4 weeks ago | |
| 2 | 07-21-2026 09:30 AM | |
| 2 | 07-21-2026 08:35 AM | |
| 1 | 07-09-2026 08:56 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|