POST
|
Thanks , it work but placement of infowindow is not proper.if I click on india popup shows in Europe .
... View more
12-17-2013
07:03 AM
|
0
|
0
|
835
|
POST
|
unfortunately it does not work, it adds infotemplate first time next time you click it show infotemplate but position is not proper
... View more
12-17-2013
06:02 AM
|
0
|
0
|
835
|
POST
|
The problem is i don't want to define on-click functionality on map object i want to define on click functionality on feature Layer object . is there any way i can show Infotemplate on the fly i am trying as below
function getData(evt){
try {
require(["esri/InfoTemplate"], function(InfoTemplate){
var graphic = evt.graphic;
var countryName = evt.graphic.attributes.CNTRY_NAME;
var template=new InfoTemplate();
console.log(" got countryName" + countryName);
var alertDetailUrl = getAlertDetailsUrl(countryName);
console.log(" alertDetailUrl " + alertDetailUrl);
dojo.xhrGet({
url: alertDetailUrl,
handleAs: 'json',
load: function(data){
console.log("data ");
var popUpData = getPopUpContent(data);
template.setTitle(countryName);
template.setContent(popUpData);
graphic.setInfoTemplate(template);
map.graphics.add(graphic);
graphic.show();
console.log(" complete ");
},
error: dojo.hitch(this, "failure")
});
});
}
catch (e) {
console.log("error occured " + e);
}
}
... View more
12-15-2013
08:57 PM
|
0
|
0
|
835
|
POST
|
HI All, I don't want to assign infoTemplate when initializing Feature Layer. Since i want to define on-click behavior for feature layer and i am not show Pop up each time hence How can i show Pop up i.e infoTempalte Programitically.
... View more
12-12-2013
04:48 AM
|
0
|
9
|
2214
|
POST
|
HI All, WE have developed an application using ArcGIS js api whichs world, well I know most of the time ArcGIS is useful for real time data and spatial analysis but in our application we need map mostly for user interactivity .Users of our applications mostly click on map and that region of map gets highlighted or else we highlight the map on load and user clicks on the highlighted country and see pop-up.Please let me know if my approach is fine. I am using feature layer with MODE_SNAPSHOT mode , now whenever I want to highlight the country in the map or when user clicks on the map the call goes to server ( which is not required from performance point of view). For highlighting I used :QueryTask where I passed the country name and to the graphics returned I added setSymbol and added the graphics using map.graghics.add(). for user click I used featureLayer.selectFeature . To improve performance I used following since in SNAPSHOT mode all graphics are preloaded. Since query task hits server I used dojo.forEach(featureLayer.graphics,function(graph){
if(graph.attribute.CNTRY_NAME=='India'){
graph.setSymbol(somesymbol);
map.graghics.add(graph);
}
}); On load of page I highlight some countries based on some criteria. now I have toggle button where user clicks a button all the graphics gets cleared and user can click on country to highlight it. sometimes after user clicks on country all previously highlighted countries or graphics are highlighted again this is strange behavior what could be the reason and is my approach fine.
... View more
11-26-2013
06:18 AM
|
0
|
0
|
454
|
POST
|
Yeah I was able to using usePost attributen in esriRequest
... View more
11-22-2013
09:09 PM
|
0
|
0
|
154
|
POST
|
Sorry my code is not solution to ur problem , i have same problem as yours .But for your problem check from desktop tool the projection sysrtem and spatialrefrence to use.
... View more
11-15-2013
07:12 AM
|
0
|
0
|
1184
|
POST
|
I am getting exactly the same problem , map.graphics.add() is not showing the gaphics. I had to change my code to from queryTask.execute() to esri.requst i am faicng this issue ever since. my query had below condition:
var qTask= new QueryTask(queryTaskUrl);
var query = new Query();
query.returnGeometry = true;
query.maxAllowableOffset = 4326;
query.where = executableQuery;
query.spatialRelationship = Query.SPATIAL_REL_CONTAINS;
var spRef = new esri.SpatialReference({
wkid: 102100
});
query.outSpatialReference = spRef hence i changed my code to var spRef = new esri.SpatialReference({
wkid: 102100
});
var queryRequest = esriRequest({
url : queryTaskUrl,
content : {
f : "json",
returnGeometry: true,
where : executableQuery,
outSR:spRef ,
maxAllowableOffset:4326,
spatialRel:"esriSpatialRelContains"
},
callbackParamName : "callback"
}, {usePost : true});
handleAs : "json",
queryRequest.then(showResults, function (error) {
console.log("Error: ", error.message);
});
var color="#919191";
try {
var symbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color("#AED8EC"), 1), new Color(color));
dojo.forEach(featureSet.features, function(feature){
console.log(" iterating each feaures " +feature);
//var graphic = new FeatureSet(feature);
var graphic=new FeatureSet(feature);
//var graph = new Graphic(graphic);
graphic.setSymbol(symbol );
console.log(" graphic feaures " +graphic.symbol.color);
console.log(" graphic visible " +graphic.visible);
map.graphics.add(graphic);
});
}
catch (e) {
console.log(" issue in iterator " + e);
} now map.graphics.add() does not show up but when i change belwo line
outSR:map.spatialReference graphics shows but it not exactly as expected hence how do i know what is exact valuel
... View more
11-15-2013
03:43 AM
|
0
|
0
|
1184
|
POST
|
HI All, We are facing issue in our application where when we queryTask is makes GET request bcoz of this sinqle quote in present in the url which is protected by SiteMinder. Hence we are forced to do POST request. i found no way in query task to do . Hence I am using esriReques to do the same. but the problem is i am not getting the graphic object.Has anybody done this?
... View more
11-15-2013
12:24 AM
|
0
|
2
|
763
|
POST
|
HI all, I have us map , using query task i have selected few states ex texas and sets some symbols which makes it highlighted so some states have some color and other follow normal color.If i want to remove graphics for texas what is the best way to do . I have added feature layer with MODE_SNAPSHOT.
... View more
10-11-2013
06:49 AM
|
0
|
2
|
952
|
POST
|
HI All, When i use query without spatial reference to get graphic object and display it on my map , things(grap are accurate but IE hangs when i query for more data. To resolve this i used maxallowable offset and spatial reference in query which resolved the IE hanging issue things are not accurate i.e when i zoom into these graphic ,the border are not clear. Below is code with Spatail reference and maxallowableoffset
var query = new esri.tasks.Query();
query.returnGeometry = true;
query.maxAllowableOffset = calcOffset();
console.log(" creating query");
var queryStart = "CNTRY_NAME IN ('" + countryName + "')";
query.where = queryStart;
console.log("finalQuery " + queryStart);
query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_CONTAINS;
var spRef = new esri.SpatialReference({
wkid: 102100
});
query.outSpatialReference = spRef; How can i tune query to get proper results
... View more
09-24-2013
12:23 AM
|
0
|
0
|
538
|
POST
|
problem is lets say in world country map , if i want to programitically click on country say south africa then how do i do that.
... View more
09-20-2013
08:03 AM
|
0
|
0
|
195
|
POST
|
HI All, how can i pragmatically invoke on click behavior of feature layer at a particular portion of Map i don't have co ordinates.
... View more
09-20-2013
05:46 AM
|
0
|
3
|
653
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|