Skip to content

Instantly share code, notes, and snippets.

request.get("http://www.arcgis.com/sharing/rest/search?num=100&start=0&sortField=created&sortOrder=asc&q=snow&f=json", {
handleAs: "json"
}).then(function(data){
console.log('data', data)
},
function(error){
console.log('error!')
});
{
"latitude": 37.8267,
"longitude": -122.423,
"timezone": "Etc/GMT+8",
"offset": -8,
"currently": {
"time": 1365190713,
"summary": "Mostly Cloudy",
"icon": "partly-cloudy-day",
"precipIntensity": 0,
//var mapid = "e3b2c993ae3445acaa16cd5330c3b725";
var mapid = null;
if (mapid) {
esri.arcgis.utils.createMap(mapid, "map").then(function(response) {
self.map = response.map;
dojo.connect(dijit.byId("map"), "resize", self.map, self.map.resize);
});
} else {
this.map = new esri.Map("map",{
extent: extent
var HorizontalRangeSlider = declare([HorizontalSlider, RangeSlider], {
templateString: hTemplate
});
this._slider = new HorizontalRangeSlider({
name: 'histogram-slider',
values: [0, 100],
minimum: 0,
maximum: 100,
showButtons: false,
About the mapping? Well in weather systems like ours you can't change a single point value without also altering all other points. For example, I would want to increase the point value for Broomfield to 4" from 2", but that would increase all values by 2". A mapping software that allowed a weighted value change would be ideal... say you wanted to raise broomfield by 2" and it would blend that into the surrounding data. That would help the broadcast media side immensely to have that kind of control over the gridded data. So often the met just puts up the map that looks good for a few spots, but terrible for others with no ability to change it.
_requestFeatures: function( direction ) {
var layer = this.layers[ 0 ];
var timeExtent = new esri.TimeExtent(new Date(this.fullTimeExtent[0]), new Date(this.fullTimeExtent[1]));
console.log('timeExtent', timeExtent.endTime)
var query = new esri.tasks.Query();
query.timeExtent = timeExtent;
query.outFields = [ "*" ];
var featuresUrl = "http://ec2-54-224-131-33.compute-1.amazonaws.com:6080/arcgis/rest/services/PhillyCrime/MapServer/0";
this.layer = new esri.layers.FeatureLayer(featuresUrl, {
"id": "crimeLayer",
"mode": esri.layers.FeatureLayer.MODE_SNAPSHOT,
"outFields": ["UCRHundred", "STOLEN_VALUE", "RECOVERED_VALUE", "LOCATION", "STATUS", "MODUS_OPERANDI"]
});
this.layer.maxRecordCount = 10;
console.log('INIT LAYER: ', this.layer)
this.map.addLayer( this.layer );
if ( self.options.service.params.db ) {
if ( location.hash === "" ) {
location.hash= "#stream/" + this.svc_name;
} else {
location.hash = location.hash + "/stream/" + this.svc_name;
}
}
dojo.connect(layer, 'onLoad', function( obj ) {
self.layers.push( layer );
console.log('optiosn', self.options.service.params)
self.createSlider( layer, (self.Aggregator) ? true : false, self.options.service.params );
});
created_at: "Sat Oct 27 21:07:39 -0400 2012"
id: 1
id_str: "2.62345E+17"
place_fullname: "Queens, NY"
place_id: "b6ea2e341ba4356f"
posted_time: 1351372059000
retweet_count: null
retweeted: null
stream_id: null
text: "@xKayyKayyx @1dtartheela @itzmejefferly hey guys the hurricane might cause power shortage!!!!"