POST
|
For Q1: You must configure the Tomcat server.xml file to support UTF-8 character encoding. Below is a link of how to make this change within Tomcat:https://github.com/Esri/geoportal-server/wiki/Deploy-and-Configure-the-Geoportal-Web-Application-in-Tomcat#additional-configuration-to-support-localization-optional
... View more
02-04-2016
10:23 PM
|
0
|
1
|
372
|
POST
|
this was happened to me. Busy indicator never end because there are something wrong in code but it don't inform any error out and it get stuck in somewhere or some part of code. I solved this by, rewrite code or rebuild new one from sample widget that work fine.
... View more
11-23-2015
09:20 PM
|
0
|
2
|
360
|
POST
|
I think it can't add more data-source in this version. you may connect with other data-source by manual coding.
... View more
11-23-2015
08:28 PM
|
0
|
1
|
239
|
POST
|
As I know, there are only map-extent-change event for map. but there are another way to go with your requirement. (May not complete) First, this sample may help you. it will list attribute of select feature from selected datasource on widget when user select feature on map. So, in widget config. let user select region layer with selected option as DataSource. In main widget java-script, use data-source-expired event to capture when user select region on your map. dataSourceExpired: function (dataSource, dataSourceConfig) {
//this event will be fired every time that user select region on map.
} Second way is create widget that let user draw some point to map then query to find region layer with that point. On this way ,if you decide to query with QueryTask , you must fix url of service in code and may encounter with CORS , So you may need proxy here, But I can't find any sample that work with proxy. Well, you still can use ExecuteQuery of datasource instead to avoid CORS probs. But again, ExecuteQuery with geometry's parameter work well in desktop. In browser geometry's parameter was ignore. this may be bug and you may not complete you solution in browser.
... View more
11-23-2015
08:04 PM
|
1
|
0
|
246
|
POST
|
Hi, I make custom widget with Javascript that has simple workflow like below. 1. User select datasouce and field that they want to display 2. User locate location to draw buffer and query selected DataSource with that buffer's geometry to find feature and list them to table. Well, It's work fine in desktop Application. But when I test it on browser. I got different results here with the same widget. It list all feature of selected DataSource to table. So, I inspect query that fire out. and found that geometry's param was ignore in browser so it return all of feature back. ** I use "executeQuery" method of DataSourceProxy Class to query instead of QueryTask because I want to query with selected Datasource without fix service URL. I already attach this widget. You can download and test it with some featureLayer on Dashboard. Thank you.
... View more
11-05-2015
01:01 AM
|
0
|
4
|
3331
|
POST
|
I have a filter by points working so when a user types something into a text box and hits a button it queries the map and zooms them to the queried results. This works fine for multiple points but is not working when the result is just a single point. Below is my code. Thanks in advance! //remove all graphics on the maps graphics layer
map.graphics.clear();
var extent = esri.graphicsExtent(featureSet.features);
map.setExtent(extent.expand(1), true);
You must create new extent and expand that single point like this.
var newExtent = new esri.geometry.Extent();
newExtent.xmin = YourSinglePointX - 100;
newExtent.ymin = YourSinglePointY - 100;
newExtent.xmax = YourSinglePointX + 100;
newExtent.ymax = YourSinglePointY + 100;
newExtent.spatialReference = map.spatialReference;
map.setExtent(newExtent);
... View more
06-06-2014
12:22 AM
|
0
|
0
|
321
|
POST
|
My map has 21 levels, and At begin, I set maxZoom on constructor at level 19. this is my code. var lods = [ {"level" : 0, "resolution" : 156543.03392800014, "scale" : 5.91657527591555E8}, {"level" : 1, "resolution" : 78271.51696399994, "scale" : 2.95828763795777E8}, {"level" : 2, "resolution" : 39135.75848200009, "scale" : 1.47914381897889E8}, {"level" : 3, "resolution" : 19567.87924099992, "scale" : 7.3957190948944E7}, {"level" : 4, "resolution" : 9783.93962049996, "scale" : 3.6978595474472E7}, {"level" : 5, "resolution" : 4891.96981024998, "scale" : 1.8489297737236E7}, {"level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618}, {"level" : 7, "resolution" : 1222.992452562495, "scale" : 4622324.434309}, {"level" : 8, "resolution" : 611.4962262813797, "scale" : 2311162.217155}, {"level" : 9, "resolution" : 305.74811314055756, "scale" : 1155581.108577}, {"level" : 10, "resolution" : 152.87405657041106, "scale" : 577790.554289}, {"level" : 11, "resolution" : 76.43702828507324, "scale" : 288895.277144}, {"level" : 12, "resolution" : 38.21851414253662, "scale" : 144447.638572}, {"level" : 13, "resolution" : 19.10925707126831, "scale" : 72223.819286}, {"level" : 14, "resolution" : 9.554628535634155, "scale" : 36111.909643}, {"level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822}, {"level" : 16, "resolution" : 2.388657133974685, "scale" : 9027.977411}, {"level" : 17, "resolution" : 1.1943285668550503, "scale" : 4513.988705}, {"level" : 18, "resolution" : 0.5971642835598172, "scale" : 2256.994353}, {"level" : 19, "resolution" : 0.29858214164761665, "scale" : 1128.497176}, {"level" : 20, "resolution" : 0.1492910708238083, "scale" : 564.248588}, {"level" : 21, "resolution" : 0.0746455354119042, "scale" : 282.124294} ]; map = new Map("map",{ lods: lods, center:[100.543623,13.703039], zoom: 18, maxZoom: 19, fadeOnZoom: true }); On the later... I need to set maxZoom again to different level. But I can't find the way to set that. In api reference: https://developers.arcgis.com/javascript/jsapi/map-amd.html I found only getMaxZoom() method, but it don't have setMaxZoom() method. Is it possible to set maxZoom again after set it at constructor. thanks for help
... View more
05-05-2014
06:05 PM
|
0
|
1
|
438
|
POST
|
I have a set of coordinates that is loaded from database. I would like to detect all the loaded markers that are close to each others which is within a certain distance. so the code is something like function locatePOI() { // Places of Interest
var Grid_Table = document.getElementById('PrimarySchoolDGV');
var xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET", "/Foreigners@SG/WebService.asmx/getPlacesOfInterests", false);
xmlhttp.send();
var xmlDoc = xmlhttp.responseXML;
var xmlalbums = xmlDoc.documentElement.getElementsByTagName("PlacesOfInterest");
$.each(xmlalbums, function () {
testindex = 0;
var school = $(this).find("Name").text();
var address = $(this).find("Address").text();
var postalcode = $(this).find("PostalCode").text();
var cat = $(this).find("Category").text();
var incidentI = "";
coordX = $(this).find("X").text();
coordY = $(this).find("Y").text();
var point = new esri.geometry.Point({ "x": coordX, "y": coordY, "spatialReference": { "wkid": 3414} });
if(pointsbetweeneachother < 3km)
{
// do something here
}
var symbol = new esri.symbol.PictureMarkerSymbol('images/icons/Interest-icon1.png', 25, 25);
//symbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, safetyLevelRadiusSize * 10, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([r, g, b, 0.5]), 10), new dojo.Color([r, g, b, 0.9]));
var infoTemplate = new esri.InfoTemplate();
infoTemplate.setTitle("<img src='images/icons/interest-icon.png' style='width:25px; height:25px;'/> " + school);
infoTemplate.setContent("<b>Food Establishments : </b>" + school + "</br>"
+ "<b>Address: </b>" + address + "<br/>"
+ "<b>PostalCode: </b>" + postalcode + "<br/>"
+ "<b>Category: </b>" + cat + "<br/>"
);
var graphic = new esri.Graphic(point, symbol);
map.graphics.add(graphic);
graphic.setSymbol(symbol);
graphic.setInfoTemplate(infoTemplate);
}
);
} can anyone help me with this? I don't sure what u need. But this example may be involve with what u want. [ATTACH=CONFIG]33551[/ATTACH] 1. This example is I use geometry service to buffer a point with radius that I want and it return Geometry[] set. https://developers.arcgis.com/javascript/jsapi/geometryservice-amd.html https://developers.arcgis.com/javascript/jsapi/bufferparameters-amd.html 2. then i pass that Geometry set to geometry reference on QueryTask and execute to find what is in that geometry 3. then I highlight all object that is in radius. On the Example's results isn't highlight all object in radius because QueryTask return only max 1000 results.
... View more
05-02-2014
02:06 AM
|
0
|
0
|
391
|
POST
|
Noppadon, The problem I think you will run into trying to use the ZoomStart event is that the map values have not change yet so you cannot check to see if the zoom level is past level 18. Using the ZoomEnd you get the updated values but you end up with this bouncing effect where the map zooms in then jumps back out. Have you tried looking at the zoomDuration attribute which controls the refresh of the map. You could try setting this to zero (to stop the map refreshing) before your check then set it back after this way the user may not see the zoom in and out. https://developers.arcgis.com/javascript/jssamples/mapconfig_smoothzoom.html Just a thought that may work Regardsit Anthony Thanks for your helps, Anthony. After set ZoomDuration to 0, the result is better but it still has some flash in milliseconds. I found the issues that if user quickly repeatedly scroll mouse-wheel to zoom on over limit layer, then it will trigger to event map zoom many times. Then map will zooms in then jumps back out and sometimes they will crash or some graphics isn't immediately redraw.(only if user quickly and repeatedly scroll mouse-wheel too much) In real, user may not do this things. but I still need to clear this issue out. So I think I need to completely block/disable zoom-In on limited level. Like the map that zoom reach to max level, at that level if user zoom more . it will not have any action. and If user want to zoom more, user must click some symbol or button to unlock limited max zoom or receive permission to zoom more to level 20,21. Thanks again.
... View more
05-02-2014
01:37 AM
|
0
|
0
|
741
|
POST
|
My map has limit level at 21 level, and I limit user at level 19 that user can't zoom more on this level. this is my code.
map.on("zoom-end", function(){
if(map.getLevel() > 19 )
{
map.setZoom(19);
}
});// end map zoomEnd
The result is after map zoom over level 19 , my map will continue zoom then re-render and zoom back to level 19. But what i need is map must not zoom anymore at level 19. So, I think i must do something at "zoom-start" event for assign it to stop zoom.
map.on("zoom-start", function(){
if(map.getLevel() > 18 )
{
//do something to break, cancel zoom method
//like disableScrollWheelZoom() results that user can't not zoom anymore
// but i don't want to disable it because I still let user to zoom out.
}
});
But I don't know how. ________________________________________________________________________ On other ways that I try is I set maxZoom on starting create map.
var lods = [
{"level" : 0, "resolution" : 156543.03392800014, "scale" : 5.91657527591555E8},
{"level" : 1, "resolution" : 78271.51696399994, "scale" : 2.95828763795777E8},
{"level" : 2, "resolution" : 39135.75848200009, "scale" : 1.47914381897889E8},
{"level" : 3, "resolution" : 19567.87924099992, "scale" : 7.3957190948944E7},
{"level" : 4, "resolution" : 9783.93962049996, "scale" : 3.6978595474472E7},
{"level" : 5, "resolution" : 4891.96981024998, "scale" : 1.8489297737236E7},
{"level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618},
{"level" : 7, "resolution" : 1222.992452562495, "scale" : 4622324.434309},
{"level" : 8, "resolution" : 611.4962262813797, "scale" : 2311162.217155},
{"level" : 9, "resolution" : 305.74811314055756, "scale" : 1155581.108577},
{"level" : 10, "resolution" : 152.87405657041106, "scale" : 577790.554289},
{"level" : 11, "resolution" : 76.43702828507324, "scale" : 288895.277144},
{"level" : 12, "resolution" : 38.21851414253662, "scale" : 144447.638572},
{"level" : 13, "resolution" : 19.10925707126831, "scale" : 72223.819286},
{"level" : 14, "resolution" : 9.554628535634155, "scale" : 36111.909643},
{"level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822},
{"level" : 16, "resolution" : 2.388657133974685, "scale" : 9027.977411},
{"level" : 17, "resolution" : 1.1943285668550503, "scale" : 4513.988705},
{"level" : 18, "resolution" : 0.5971642835598172, "scale" : 2256.994353},
{"level" : 19, "resolution" : 0.29858214164761665, "scale" : 1128.497176},
{"level" : 20, "resolution" : 0.1492910708238083, "scale" : 564.248588},
{"level" : 21, "resolution" : 0.0746455354119042, "scale" : 282.124294}
];
map = new Map("map",{
lods: lods,
center:[100.543623,13.703039],
zoom: 18,
maxZoom: 19,
fadeOnZoom: true
});
On this way user can't zoom anymore at level 19, but My map concept is outdoor layer and indoor layer that I will limit user to zoom at level 19 because level 0 - 19 is outdoor layer, If user need to zoom in indoor layer(level 20 - 21). User must click something like symbol or button for zoom in to indoor layer. so I need to set maxZoom again after click symbol or button. but i can't find the way to set it. I only found method like getMaxZoom(). but i don't found method setMaxZoom() or something like this. Thanks for helps.
... View more
05-01-2014
09:21 PM
|
0
|
2
|
1799
|
Title | Kudos | Posted |
---|---|---|
1 | 11-23-2015 08:04 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|