POST
|
thank you for reply, but unfortunately, nothing change!!
... View more
07-10-2015
11:28 PM
|
0
|
1
|
999
|
POST
|
Hello, I add to my map a popup var popup = new Popup({
fillSymbol: new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
new Color([255, 0, 0]), 2), new Color([255, 255, 0, 0.25])),
titleInBody: true
}, domConstruct.create("div"));
domClass.add(popup.domNode, "myTheme"); and set its content: var information = new PopupTemplate({
"title": "{Field name}",
"fieldInfos": [{
"fieldName": "Field name",
"format": {
"places": 2,
"digitSeparator": true
}
}, {
"fieldName": "Field name",
"format": {
"places": 2,
"digitSeparator": true
}
}],
"description": " html content"
}); and set this popupTemplate object to the featureLayer and set popup object to map the problem is that the position of popup does not fit with screen look to image: as you see if the feature is not on center of screen but on sides, the popup is displayed like this this is a mobile application and mobile screen please help as you fast as you can and if there is another component can do this better please tell me thanks.
... View more
07-09-2015
02:36 AM
|
0
|
6
|
8996
|
POST
|
what is the problem with the code?? I will help if I can
... View more
06-06-2015
09:42 PM
|
0
|
0
|
322
|
POST
|
Hello everybody, I create a map , add feature layer, add mobile popup then I want to make search and draw a circle that cover search area after I draw the circle using this code: featureLayer.add(circle, circleSymbol); the popup does not work and when I click features no popup (infowindow) displayed and if I delete the line for add graphic the popup worked fine why is this happen
... View more
06-04-2015
11:40 AM
|
0
|
0
|
2370
|
POST
|
Hello, it is the same query you helped me with. in the previous post, but now now I want to add a button (search) if it is pressed the query display only the features that exist around a point with specific readius ( the point is the current location of user) long & lat are for this point this is the previous code you wrote : <!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>Query Musanda Project Details</title>
<script src="http://js.arcgis.com/3.13/"></script>
<script>
require([
"dojo/dom", "dojo/on",
"esri/tasks/query", "esri/tasks/QueryTask", "dojo/domReady!"
], function(dom, on, Query, QueryTask) {
on(dom.byId("execute"), "click", execute);
function execute() {
queryTask = new QueryTask("URL to your Map Service");
//build query filter
query = new Query();
query.where = "ESRI_OID > 0";
query.returnGeometry = false;
query.outFields = ["*"];
query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;
queryTask.execute(query, showResults);
}
function showResults(results) {
var resultItems = [];
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features.attributes;
for (var attr in featureAttributes) {
resultItems.push("<b>" + attr + ":</b> " + featureAttributes[attr] + "<br>");
}
resultItems.push("<br>");
}
dom.byId("info").innerHTML = resultItems.join("");
}
});
</script>
</head>
<body>
Projects:
<input id="execute" type="button" value="Get Details">
<br />
<br />
<div id="info" style="padding:5px; margin:5px; background-color:#eee;">
</div>
</body>
</html> and to do what I want (display within a radius) I wrote this code: query = new Query();
query.where = condition;
query.returnGeometry = true;
if(search != fals){ // to check if button is pressede
var qGeom = new Circle({
center: [longitude,latitude], // longitude & latitude of current location ( obtained in another function)
geodesic: true,
radius: radius, // radius to search within ( it is global variable initialized early)
radiusUnit: 9036
});
var circleSymb = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NULL,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SHORTDASHDOTDOT,
new Color([105, 105, 105]),2), new Color([255, 255, 0, 0.25]));
mapMain.graphics.clear();
mapMain.infoWindow.hide();
var graphic = new Graphic(circle, circleSymb);
mapMain.graphics.add(graphic);
query.geometry = qGeom;
}
query.outFields = ["*"];
query.orderByFields = [order];
queryTask.execute(query, showResults); it is not necessary to draw the circle , but when the query did'nt work , I tried to draw it to see what happens, I hope my point is clear now, and thank you very much for keeping answer me
... View more
05-06-2015
08:41 PM
|
0
|
2
|
1083
|
POST
|
I wrote the code like this query = new Query(); query.where = condition; query.returnGeometry = true; if(search != false){ var qGeom = new Circle({ center: [longitude,latitude], geodesic: true, radius: radius, radiusUnit: 9036 }); var circleSymb = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SHORTDASHDOTDOT, new Color([105, 105, 105]),2), new Color([255, 255, 0, 0.25])); mapMain.graphics.clear(); mapMain.infoWindow.hide(); var graphic = new Graphic(circle, circleSymb); mapMain.graphics.add(graphic); query.geometry = qGeom; } query.outFields = ["*"]; query.orderByFields = [order]; queryTask.execute(query, showResults); but the result is nothing.!!!
... View more
05-05-2015
09:47 PM
|
0
|
4
|
1083
|
POST
|
it does not work or I did'nt understant it well I have this code: var circleSymb = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SHORTDASHDOTDOT, new Color([105, 105, 105]),2), new Color([255, 255, 0, 0.25])); var circle = new Circle({ center: [long,lat], // coords for the current location geodesic: true, radius: radius, // radius for the area whic I want to display features radiusUnit: 9036 // unit "kilometer" }); and this code, it does'nt work, and I did'nt know how to apply circle object with it: var geometries = graphicsUtils.getGeometries(lyrFeature.graphics); var bufferedGeometries = geometryEngine.geodesicBuffer(geometries, radius, 9036, true); array.forEach(bufferedGeometries,function(geometry){ map.graphics.add(new Graphic(geometry,circleSymb)); });
... View more
05-04-2015
09:40 PM
|
0
|
7
|
1083
|
POST
|
thank you very much I was mean enable it by programming but I understood that the problem occurs because I run the app on simulator, but when I run it on real device it worked thanks.
... View more
05-04-2015
08:20 PM
|
0
|
0
|
346
|
POST
|
Hello, I have a map with feature layer and I want to press a button and it's event display only the features around the current location within specific radius I want to : define the current location display features that exist around the current location with a specific radius please help me, how could I do this?? thanks alot
... View more
05-04-2015
04:33 AM
|
0
|
9
|
6286
|
POST
|
Hello, I'm developing app on a mobile and I want to obtain the current location of the device I used this code: require(["esri/map", "esri/geometry/webMercatorUtils", "esri/geometry/Point"],function(Map, webMercatorUtils, Point){ if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(zoomToLocation, locationError); navigator.geolocation.watchPosition(showLocation, locationError); } function zoomToLocation(location) { var pt = webMercatorUtils.geographicToWebMercator(new Point(location.coords.longitude, location.coords.latitude)); // map.centerAndZoom(pt, 16); } function showLocation(location) { if (location.coords.accuracy <= 500) { go.alert('<=500'); } else { go.alert('>500'); } } function locationError(error) { switch (error.code) { case error.PERMISSION_DENIED: go.alert("Location not provided"); break; case error.POSITION_UNAVAILABLE: go.alert("Current location not available"); break; case error.TIMEOUT: go.alert("Timeout"); break; default: go.alert("unknown error"); break; } } }); but it returned this error: error.PERMISSION_DENIED which I think mean that geolocation is not enabled How can I enable it and solve the problem???
... View more
05-04-2015
12:52 AM
|
0
|
2
|
3889
|
POST
|
Hello everybody, I want to make a mobile application that display map with feature layer the problem is that map loading and rendering is bad as in the image up when I pan the map part of it will disappear until I make some panning ( which mean the internet connection is not the reason of the problem ) and I added a feature layer on the map but the problem is that the symbols of that feature layer displayed only in the right half of the screen and when I pan the map and reach the middle of screen it start disappear , see the picture below: so please help me what is the problem? , did I miss a specific meta or parameter ??
... View more
04-27-2015
05:19 AM
|
0
|
0
|
2389
|
POST
|
thank you every body, it works well, although I still did'nt know why it did'nt execute the query, is it because I did'nt write where clause ??!! thank you very much
... View more
04-24-2015
11:30 PM
|
0
|
6
|
759
|
POST
|
Hi Mr .Tom thank you for your reply, I have sent you a message of your linkedin account. please send me your feedback could you please send me your email Many thanks
... View more
04-24-2015
11:47 AM
|
0
|
0
|
759
|
POST
|
thank you for replying me I have a map service which contains a layer with one table, I want to reach the table attributes and store its values in an array in order to display them in a list. I need all the data without specification that is why I did'nt use Where clause I wrote an error function but it is also not executed function successFunction(featureSet) { go.alert('sucess','jjj'); } function errorFunction(){ go.alert('error','tt') } function displayProjectList(){ queryTask = new QueryTask("url"); //build query filter query = new Query(); query.returnGeometry = false; query.outFields = ["*"]; query.geometry = geometry.mapPoint; query.spatialRelationship = Query.SPATIAL_REL_INTERSECTS; queryTask.execute(query, successFunction, errorFunction);
... View more
04-24-2015
07:03 AM
|
0
|
2
|
759
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|