|
POST
|
Fransisco, You can use the setTickCount method. Here is a link: TimeSlider | API Reference | ArcGIS API for JavaScript Regards, Tom
... View more
05-13-2016
03:08 PM
|
1
|
6
|
2136
|
|
POST
|
Francisco, I have not seen that problem before. I see that you are expressly setting your timeExtent too. Which version of the the JSAPI are you using? Regards, Tom
... View more
05-13-2016
10:48 AM
|
0
|
0
|
1028
|
|
POST
|
NM Water, I use the dojo/date/locale module. That allows you to format the date the way you would like. here is an example: //add labels for every other time stop
var labels = arrayUtil.map(timeSlider.timeStops, function(timeStop, i) {
if (i % 2 === 0) {
return locale.format(timeStop, {
datePattern: 'MMYY',
selector: 'date'
});
} else {
return "";
}
}); Regards, Tom
... View more
05-13-2016
08:59 AM
|
0
|
2
|
1028
|
|
POST
|
Linda, Robert is correct. I also have this on my wishlist of enhancements to the measure widget. I will be adding that functionality sometime soon. Regards, Tom
... View more
05-12-2016
08:00 AM
|
2
|
0
|
1897
|
|
POST
|
David, You are welcome! Thanks very much for letting me know. Just a good reminder that I should always test in Internet Explorer. Regards, Tom
... View more
03-25-2016
08:03 AM
|
1
|
0
|
433
|
|
POST
|
David, I found the problem. I had a couple of lines of code that were poorly placed. The setContent for the infoWindow was embedded in the getPanoramaByLocation logic. I moved those two lines outside of that function and it works properly now. You can view the app at: StreetView InfoWindow Here is the code that was changed: streetviewService.getPanoramaByLocation(svLocation, 200, function(result, status) {
if (status == google.maps.StreetViewStatus.OK) {
var panoLocation = result.location.latLng;
var heading = google.maps.geometry.spherical.computeHeading(panoLocation, svLocation);
var panoramaOptions = {
position: panoLocation,
pov: {
heading: heading,
pitch: 0,
zoom: 1
},
visible: true
};
var pano = new google.maps.StreetViewPanorama(svNode, panoramaOptions);
} else {
svNode.innerHTML = "Street view is not available at this location";
}
});
map.infoWindow.setContent(svNode);
map.infoWindow.setTitle("Street View - lat: " + latitude.toFixed(6) + ", lon: " + longitude.toFixed(6)); Regards, Tom
... View more
03-24-2016
11:12 AM
|
2
|
2
|
2643
|
|
POST
|
Luiz, No apologies necessary! I am very happy to help. The findBestSequence would work best on a unsorted (geographically) list of stops. Since your list is already put into a fairly logical sequence, you may see very little difference in the travel time whether using findBestSequence or not. The documentation even states, "The heuristics do not guarantee the optimal sequence (as there is no good/fast way to prove optimality for large number of stops), it returns a solution that is close to optimal if not the optimal.". You may have additional knowledge about setting the sequence that cannot be easily modeled. Compare the results between the two. If they are close in travel time, your additional knowledge of sequence may work better. If the findBestSequence is substantially better, it may be the best way to set your route. Regards, Tom
... View more
03-17-2016
08:50 AM
|
0
|
0
|
2170
|
|
POST
|
Luiz, I am doing well. I hope you are doing well too! In your sample, you may need to experiment with the routeParameters to get the result you are looking for. When you request an optimal path using the findBestSequence parameter, the routeTask as you have it, knows nothing about weight. It is calculating the smallest impedance to make the fastest trip through all of the stops. You will need to add other parameters to your routeParameters setting and more information to your stops to change the outcome. Regards, Tom
... View more
03-16-2016
08:26 AM
|
1
|
1
|
2170
|
|
POST
|
Robert, I was able to make the filter event fire when using the options to "show selected records". I don't see any other method to filter the featuretable. Regards, Tom
... View more
03-15-2016
02:33 PM
|
1
|
0
|
929
|
|
POST
|
Luiz, When the routeParams.findBestSequence is set to false the stops in your image will be 2, 3 & 4 as you are expecting. When the parameter is set to true, the solver will choose an optimum sequence for all the stops considered. Here is a screenshot of the parameters set to false: When set to true, it looks like the image you have. Regards, Tom
... View more
03-15-2016
02:20 PM
|
0
|
3
|
2170
|
|
POST
|
Jason, I have updated the example to ignore the other measure types. It will only provide the segment lengths when measuring a line. Measure Tool Regards, Tom
... View more
03-15-2016
11:30 AM
|
1
|
0
|
694
|
|
POST
|
Ken, Thanks! The sample was not intended to measure areas, only lines per Jason's request. I did notice that the event triggers for areas and lines are different when clicking. I am also running those version of Chrome and FireFox and I am not seeing any weirdness when measuring lines. The last segment measurements look correct. Regards, Tom
... View more
03-15-2016
11:16 AM
|
0
|
0
|
2874
|
|
POST
|
Jason, You are welcome! I did notice that when measuring an area, the measure event triggers on a click instead of interactively like the measure line tool. Regards, Tom
... View more
03-15-2016
09:25 AM
|
0
|
0
|
2873
|
|
POST
|
Ken, Interesting... What browser are you using? The example is meant to be for measuring lines, not polygons (areas). I have tried the line measure on Chrome, IE and FireFox which all measure the segments correctly. Regards, Tom
... View more
03-15-2016
09:11 AM
|
0
|
4
|
2874
|
|
POST
|
Jason, Here is how you might modify the code to get the result you are looking for: var segmentLength = 0; //used in measure tool to track last segment length
var measureLength = 0; // total current length of the line
var PrevM = 0; //used in measure tool to track last total measurement
var Mtype = ''; //used to track measurement units for display
var measurement = new Measurement({
map: map,
defaultAreaUnit: Units.ACRES,
defaultLengthUnit: Units.FEET,
}, dom.byId("measurementDiv"));
measurement.startup();
var measurementHandler;
measurement.on("measure-start", function(evt) {
measurementHandler = map.on('click', measureSegment);
segmentLength = 0;
PrevM = 0;
dom.byId('spanSegment').innerHTML = 'Segment Length: ' + segmentLength.toFixed(1) + ' ' + Mtype;
});
measurement.on("measure", function(evt) {
measureLength = evt.values;
});
measurement.on("measure-end", function(evt) {
measurementHandler.remove();
PrevM = 0
});
measurement.on("tool-change", function(evt) {
dom.byId('spanSegment').innerHTML = ''; //zero out current values
Mtype = evt.unitName;
});
measurement.on("unit-change", function(evt) {
Mtype = evt.unitName;
});
function measureSegment(e) {
segmentLength = measureLength - PrevM; //new segment value
dom.byId('spanSegment').innerHTML = 'Segment Length: ' + segmentLength.toFixed(1) + ' ' + Mtype;
PrevM = measureLength;
} I have a working example posted here: Measure Tool It would be ideal if there were another event in the measurement dijit for a click event. Regards, Tom
... View more
03-15-2016
08:45 AM
|
2
|
3
|
2874
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-24-2023 10:45 AM | |
| 1 | 05-19-2023 08:13 AM | |
| 1 | 02-22-2023 09:12 AM | |
| 1 | 05-15-2015 03:11 PM | |
| 1 | 02-10-2015 11:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
02-26-2024
04:50 PM
|