code
stringlengths 2
1.05M
|
---|
/*
* Module dependencies.
*/
var t = require('t');
var Emitter = require('emitter');
var domify = require('domify');
var empty = require('empty');
var events = require('events');
var classes = require('classes');
var serialize = require('serialize');
var regexps = require('regexps');
var form = require('./resend-validation-email-form');
/**
* Expose FormView.
*/
module.exports = FormView;
/**
* Proposal Comments view
*
* @return {FormView} `FormView` instance.
* @api public
*/
function FormView () {
if (!(this instanceof FormView)) {
return new FormView();
};
this.el = domify(form({ t: t }));
this.events = events(this.el, this);
this.events.bind('submit form');
}
/**
* Mixin `Emitter` with `FormView`
*/
Emitter(FormView.prototype);
/**
* Render proposal comments
*
* @return {FormView} `FormView` instance.
* @api public
*/
FormView.prototype.render = function() {
return this.el;
}
/**
* Handle `onsubmit` form event
*
* @param {Event} ev
* @api private
*/
FormView.prototype.onsubmit = function(ev) {
ev.preventDefault();
// Clean errors list
this.errors();
// Serialize form
var form = this.el.querySelector('form');
var data = serialize.object(form);
// Check for errors in data
var errors = this.validate(data);
// If errors, show and exit
if (errors.length) {
this.errors(errors);
return;
};
// Deliver form submit
this.emit('submit', data);
}
/**
* Validate form's fields
*
* @param {Object} data
* @return {Array} of Errors
* @api public
*/
FormView.prototype.validate = function(data) {
var errors = [];
if (!regexps.email.test(data.email)) {
errors.push(t('Email is not valid'));
};
return errors;
}
/**
* Fill errors list
*
* @param {Array} errors
* @api public
*/
FormView.prototype.errors = function(errors) {
var ul = this.el.querySelector('ul.form-errors');
if (!arguments.length) return empty(ul);
errors.forEach(function(e) {
var li = document.createElement('li');
li.innerHTML = e;
ul.appendChild(li);
});
}
FormView.prototype.showSuccess = function() {
var form = this.el.querySelector('#resend-form');
var success = this.el.querySelector('#resend-message');
classes(form).add('hide');
classes(success).remove('hide');
}
|
const express = require('express');
const path = require('path');
const favicon = require('serve-favicon');
const logger = require('morgan');
const bodyParser = require('body-parser');
const sass = require('node-sass-middleware');
const index = require('./routes/index');
const app = express();
// view engine setup
app.set('views', path.join(__dirname, 'src/views'));
app.set('view engine', 'jade');
app.use(favicon(path.join(__dirname, 'src/public', 'favicon.ico')));
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
/** app.use(express.static(path.join(__dirname, 'public')));
* override the static method above using middleware sass
* adding the sass middleware The reason is that
* we first want sass to compile any sass files that
* has changed, only then serve them (which is done by express.static).
*/
app.use(
sass({
src: path.join(__dirname, '/src/sass'),
dest: path.join(__dirname, '/src/public/css'),
outputStyle: 'compressed',
prefix: '/css',
debug: true,
})
);
// The static middleware must come after the sass middleware
app.use(express.static(path.join(__dirname, 'src/public')));
app.use('/', index);
// catch 404 and forward to error handler
app.use((req, res, next) => {
const err = new Error('Not Found');
err.status = 404;
next(err);
});
// error handler
app.use((err, req, res) => {
// set locals, only providing error in development
res.locals.message = err.message;
res.locals.error = req.app.get('env') === 'development' ? err : {};
// render the error page
res.status(err.status || 500);
res.render('error');
});
module.exports = app;
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var colours = exports.colours = { "viewBox": "0 0 20 20", "children": [{ "name": "path", "attribs": { "d": "M3.179,5.998C2.756,5.648,2.122,5.708,1.771,6.13L0.494,7.669c-0.35,0.423-0.291,1.058,0.131,1.407l7.888,6.542L4.706,7.264\r\n\tL3.179,5.998z M7.013,2.683l-1.82,0.829C4.694,3.74,4.471,4.337,4.698,4.836l4.25,9.325l0.213-9.179L8.339,3.178\r\n\tC8.109,2.678,7.513,2.455,7.013,2.683z M14.211,2.887c0.013-0.55-0.427-1.01-0.976-1.023l-2-0.046\r\n\tc-0.549-0.013-1.009,0.427-1.022,0.976L9.974,13.037l4.19-8.167L14.211,2.887z M19.191,3.837l-1.779-0.913\r\n\tc-0.489-0.25-1.096-0.055-1.347,0.434L9.674,15.814c-0.251,0.489-0.056,1.096,0.434,1.347l1.779,0.913\r\n\tc0.489,0.251,1.095,0.056,1.346-0.433l6.391-12.456C19.875,4.694,19.68,4.088,19.191,3.837z M12.799,16.293\r\n\tc-0.252,0.492-0.855,0.686-1.346,0.434c-0.492-0.252-0.685-0.854-0.433-1.346c0.252-0.492,0.854-0.685,1.346-0.433\r\n\tC12.858,15.199,13.051,15.802,12.799,16.293z" } }] };
|
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "Unnamed: 0": 0, "Incident Number": 72120099, "Date": "07\/31\/2007", "Time": "08:44 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.106651, -87.947691 ], "Address": "4910 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.947690942524247, 43.106650543164605 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1, "Incident Number": 72120100, "Date": "07\/31\/2007", "Time": "10:15 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.114834, -87.956381 ], "Address": "5349 N 35TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.956381150325811, 43.114834005828385 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 2, "Incident Number": 72110097, "Date": "07\/30\/2007", "Time": "10:33 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.095110, -87.943178 ], "Address": "2433 W ROOSEVELT DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.943177823475139, 43.095109674418744 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 3, "Incident Number": 72110129, "Date": "07\/30\/2007", "Time": "12:26 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.093304, -87.929354 ], "Address": "4182 N 15TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.929354411853126, 43.093303658895508 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 4, "Incident Number": 72110254, "Date": "07\/30\/2007", "Time": "08:05 PM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.120342, -87.958603 ], "Address": "5650 N 37TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.958602835247461, 43.120342110739251 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 5, "Incident Number": 72100054, "Date": "07\/29\/2007", "Time": "07:45 AM", "Police District": 5.0, "Offense 1": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 2": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.093693, -87.926014 ], "Address": "1217 W OLIVE ST #LOWER", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.926013670552251, 43.093692546742631 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 6, "Incident Number": 72100110, "Date": "07\/29\/2007", "Time": "01:18 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.141705, -87.959476 ], "Address": "6840 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.959476152939416, 43.141705043361412 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 7, "Incident Number": 72090079, "Date": "07\/28\/2007", "Time": "09:52 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.091220, -87.938206 ], "Address": "2040 W ATKINSON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.938206414767322, 43.091219534018009 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 8, "Incident Number": 72090100, "Date": "07\/28\/2007", "Time": "11:50 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.091650, -87.925799 ], "Address": "4115 N 12TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.925798632003946, 43.091649922009339 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 9, "Incident Number": 72090110, "Date": "07\/28\/2007", "Time": "12:26 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.147031, -87.956447 ], "Address": "7123 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.956447435772247, 43.147030840960284 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 10, "Incident Number": 72090129, "Date": "07\/28\/2007", "Time": "02:03 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.104390, -87.943361 ], "Address": "2475 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.943360667638061, 43.104390480091624 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 11, "Incident Number": 72090224, "Date": "07\/28\/2007", "Time": "11:22 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.148400, -87.958260 ], "Address": "3707 W GOOD HOPE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.95826, 43.148399524525622 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 12, "Incident Number": 72080059, "Date": "07\/27\/2007", "Time": "09:51 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.111054, -87.976351 ], "Address": "5139 N 51ST BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.976351092041995, 43.111053502914189 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 13, "Incident Number": 72080142, "Date": "07\/27\/2007", "Time": "05:58 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.092620, -87.928143 ], "Address": "4154 N 14TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928142937388358, 43.092620381903174 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 14, "Incident Number": 72060154, "Date": "07\/25\/2007", "Time": "04:45 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.096879, -87.946831 ], "Address": "4375 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.94683063589909, 43.096878922009353 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 15, "Incident Number": 72050141, "Date": "07\/24\/2007", "Time": "03:18 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.100323, -87.938096 ], "Address": "2040 W CORNELL ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.938095767413031, 43.100322848779207 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 16, "Incident Number": 72040246, "Date": "07\/23\/2007", "Time": "09:35 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089788, -87.938837 ], "Address": "4000 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.938836893981971, 43.089787621063138 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 17, "Incident Number": 72030021, "Date": "07\/22\/2007", "Time": "02:12 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.112464, -87.951565 ], "Address": "5239 N 31ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.951564581132146, 43.112464266938296 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 18, "Incident Number": 72030022, "Date": "07\/22\/2007", "Time": "02:12 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.111892, -87.951465 ], "Address": "5200 N 31ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.951464913391703, 43.111892093561131 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 19, "Incident Number": 72030119, "Date": "07\/22\/2007", "Time": "01:07 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.091308, -87.939692 ], "Address": "4074 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939692316781375, 43.091308392463418 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 20, "Incident Number": 72020025, "Date": "07\/21\/2007", "Time": "02:12 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.112107, -87.957696 ], "Address": "5209 N 36TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.957695501900943, 43.112107398537617 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 21, "Incident Number": 72020041, "Date": "07\/21\/2007", "Time": "02:01 AM", "Police District": 7.0, "Offense 1": "BURGLARY\/BREAKING AND ENTERING", "Offense 2": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.100106, -87.945599 ], "Address": "4553 N 26TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.945598820733835, 43.100105658058773 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 22, "Incident Number": 72010078, "Date": "07\/20\/2007", "Time": "12:18 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090432, -87.939178 ], "Address": "4030 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939178353760553, 43.090431652877115 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 23, "Incident Number": 72010121, "Date": "07\/20\/2007", "Time": "04:39 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.141224, -87.962792 ], "Address": "4101 W GREEN TREE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.962791583819026, 43.141224472878243 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 24, "Incident Number": 72010151, "Date": "07\/20\/2007", "Time": "05:39 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.134040, -87.973354 ], "Address": "4808 W MILL RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.973353974464771, 43.134040486005972 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 25, "Incident Number": 72000069, "Date": "07\/19\/2007", "Time": "09:54 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.096553, -87.927093 ], "Address": "4385 N GREEN BAY AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92709313976556, 43.096553057447082 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 26, "Incident Number": 72000081, "Date": "07\/19\/2007", "Time": "11:11 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.105896, -87.958964 ], "Address": "4860 N 37TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.958964411853131, 43.105895884817357 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 27, "Incident Number": 72000083, "Date": "07\/19\/2007", "Time": "11:19 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.100126, -87.946672 ], "Address": "4550 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946672444601717, 43.100125826533571 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 28, "Incident Number": 72000104, "Date": "07\/19\/2007", "Time": "12:20 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090389, -87.940844 ], "Address": "4026 N 23RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.940843886317921, 43.090389220093499 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 29, "Incident Number": 72000188, "Date": "07\/19\/2007", "Time": "05:23 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.092234, -87.941864 ], "Address": "4132 N 24TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.941863871891201, 43.092233800998343 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 30, "Incident Number": 72000213, "Date": "07\/19\/2007", "Time": "09:10 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.093288, -87.928199 ], "Address": "4183 N 14TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.92819854097155, 43.093287618096838 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 31, "Incident Number": 71990063, "Date": "07\/18\/2007", "Time": "07:23 AM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.101285, -87.941004 ], "Address": "2300 W CORNELL ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.941004424346616, 43.101284812135503 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 32, "Incident Number": 71990079, "Date": "07\/18\/2007", "Time": "09:57 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090372, -87.923206 ], "Address": "4040 N GREEN BAY AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.923206135980408, 43.090371575366412 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 33, "Incident Number": 71990116, "Date": "07\/18\/2007", "Time": "12:45 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.121446, -87.951036 ], "Address": "5719 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.95103625483263, 43.121445580068134 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 34, "Incident Number": 71980082, "Date": "07\/17\/2007", "Time": "10:42 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.102138, -87.945530 ], "Address": "2505 W CORNELL ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.945530094563878, 43.102137887519135 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 35, "Incident Number": 71980141, "Date": "07\/17\/2007", "Time": "05:54 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.126002, -87.958503 ], "Address": "5956 N 37TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.958502860782687, 43.126002303912514 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 36, "Incident Number": 71970057, "Date": "07\/16\/2007", "Time": "08:39 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.108028, -87.939154 ], "Address": "4968 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939154353569322, 43.108027994171636 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 37, "Incident Number": 71970072, "Date": "07\/16\/2007", "Time": "10:15 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.107029, -87.967754 ], "Address": "4922 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.967753886317922, 43.107029245628723 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 38, "Incident Number": 71970095, "Date": "07\/16\/2007", "Time": "12:34 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.133132, -87.971331 ], "Address": "4721 W WOOLWORTH AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.971331313867182, 43.133131502308608 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 39, "Incident Number": 71950079, "Date": "07\/14\/2007", "Time": "09:47 AM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.106868, -87.978786 ], "Address": "4910 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.97878585356932, 43.106867664723865 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 40, "Incident Number": 71950093, "Date": "07\/14\/2007", "Time": "11:52 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.093020, -87.956248 ], "Address": "3450 W HOPKINS ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.956248323876267, 43.093020031842421 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 41, "Incident Number": 71950170, "Date": "07\/14\/2007", "Time": "07:36 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.101854, -87.936595 ], "Address": "4640 N 20TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.936595430175004, 43.101853910352588 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 42, "Incident Number": 71940156, "Date": "07\/13\/2007", "Time": "06:13 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.149460, -87.959192 ], "Address": "7233 N 38TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.959191774646669, 43.149459516242658 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 43, "Incident Number": 71930067, "Date": "07\/12\/2007", "Time": "08:38 AM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.106373, -87.952889 ], "Address": "4905 N 32ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.952889128685726, 43.106372779906508 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 44, "Incident Number": 71930078, "Date": "07\/12\/2007", "Time": "10:47 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090507, -87.935699 ], "Address": "4039 N 19TH PL", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.935698548184916, 43.090506534277807 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 45, "Incident Number": 71930099, "Date": "07\/12\/2007", "Time": "02:03 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.111484, -87.978723 ], "Address": "5160 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.978722875209414, 43.111484161809699 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 46, "Incident Number": 71910050, "Date": "07\/10\/2007", "Time": "07:40 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.097948, -87.946726 ], "Address": "4428 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946726360782691, 43.09794849708581 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 47, "Incident Number": 71900120, "Date": "07\/09\/2007", "Time": "10:56 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.113915, -87.950171 ], "Address": "5301 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.950170896127403, 43.113914905909191 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 48, "Incident Number": 71900200, "Date": "07\/09\/2007", "Time": "05:19 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.126235, -87.962104 ], "Address": "5964 N 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.962103835247461, 43.126235329447752 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 49, "Incident Number": 71900205, "Date": "07\/09\/2007", "Time": "03:54 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.111299, -87.952708 ], "Address": "5150 N 32ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.952707671648767, 43.111298535662776 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 50, "Incident Number": 71900227, "Date": "07\/09\/2007", "Time": "07:21 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.089739, -87.939641 ], "Address": "2200 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.93964110410279, 43.089739457152518 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 51, "Incident Number": 71890072, "Date": "07\/08\/2007", "Time": "10:21 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.125483, -87.966077 ], "Address": "5930 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.966077211537083, 43.125483255632304 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 52, "Incident Number": 71880096, "Date": "07\/07\/2007", "Time": "11:25 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.114906, -87.960021 ], "Address": "5353 N 38TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.960021132003945, 43.114905754371279 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 53, "Incident Number": 71880151, "Date": "07\/07\/2007", "Time": "05:08 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.099829, -87.946686 ], "Address": "4536 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946685944601725, 43.099828826533553 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 54, "Incident Number": 71880152, "Date": "07\/07\/2007", "Time": "04:51 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.097654, -87.937613 ], "Address": "2040 W ROOSEVELT DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.937613420833372, 43.097653564799714 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 55, "Incident Number": 71870135, "Date": "07\/06\/2007", "Time": "04:34 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.104521, -87.949233 ], "Address": "2900 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.949233, 43.104520507646065 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 56, "Incident Number": 71860091, "Date": "07\/05\/2007", "Time": "10:04 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.141211, -87.959293 ], "Address": "3835 W GREEN TREE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.959293051070446, 43.141210541116735 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 57, "Incident Number": 71860160, "Date": "07\/05\/2007", "Time": "11:07 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.099740, -87.928874 ], "Address": "4565 N GREEN BAY AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.928874362779524, 43.099740360853858 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 58, "Incident Number": 71860235, "Date": "07\/05\/2007", "Time": "08:26 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.104789, -87.975863 ], "Address": "5030 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.975862979615044, 43.104789283480073 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 59, "Incident Number": 71850075, "Date": "07\/04\/2007", "Time": "10:11 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.135101, -87.962126 ], "Address": "6462 N 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.962126340730066, 43.135100800998345 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 60, "Incident Number": 71850095, "Date": "07\/04\/2007", "Time": "12:15 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.092658, -87.923236 ], "Address": "4148 N 10TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.923236360782695, 43.092657586733225 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 61, "Incident Number": 71840111, "Date": "07\/03\/2007", "Time": "01:12 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.145044, -87.955378 ], "Address": "7000 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 0, "g_clusterK5": 4, "e_clusterK6": 1, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.955378378267838, 43.145043830976952 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 62, "Incident Number": 71840195, "Date": "07\/03\/2007", "Time": "08:42 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089685, -87.934478 ], "Address": "1900 W CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.934478034996872, 43.089685423678958 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 63, "Incident Number": 71830063, "Date": "07\/02\/2007", "Time": "09:56 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.100245, -87.939408 ], "Address": "4561 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939408124790575, 43.100244838190321 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 64, "Incident Number": 71830128, "Date": "07\/02\/2007", "Time": "02:53 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.104358, -87.940832 ], "Address": "2309 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.940831667638065, 43.104357546742619 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 65, "Incident Number": 71830138, "Date": "07\/02\/2007", "Time": "04:06 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.145658, -87.968683 ], "Address": "7050 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 2, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.968683375209409, 43.145657664723871 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 66, "Incident Number": 71830150, "Date": "07\/02\/2007", "Time": "04:55 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.097933, -87.927890 ], "Address": "4453 N GREEN BAY AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.927889701944522, 43.097933064660445 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 67, "Incident Number": 71820019, "Date": "07\/01\/2007", "Time": "01:57 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089877, -87.946021 ], "Address": "2604 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.946020723007678, 43.089877486005975 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 68, "Incident Number": 71820154, "Date": "07\/01\/2007", "Time": "07:39 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.092512, -87.939325 ], "Address": "4122 N 22ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.939325437388362, 43.092511575076458 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 69, "Incident Number": 71830013, "Date": "07\/01\/2007", "Time": "10:46 PM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.114827, -87.950240 ], "Address": "5335 N TEUTONIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.950239891655357, 43.114827080760605 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 70, "Incident Number": 72120201, "Date": "07\/31\/2007", "Time": "04:59 PM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.033519, -88.031099 ], "Address": "322 N 95TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.031098557158629, 43.033518544549587 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 71, "Incident Number": 72110076, "Date": "07\/30\/2007", "Time": "09:11 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.075409, -88.002522 ], "Address": "7200 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.002522167638062, 43.075409467684111 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 72, "Incident Number": 72110159, "Date": "07\/30\/2007", "Time": "03:28 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.038854, -87.970874 ], "Address": "4550 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.970874018321851, 43.038854493796251 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 73, "Incident Number": 72110163, "Date": "07\/30\/2007", "Time": "03:55 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.073474, -87.976181 ], "Address": "5000 W CHAMBERS ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.976181259074494, 43.073474483841586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 74, "Incident Number": 72110202, "Date": "07\/30\/2007", "Time": "05:56 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.050024, -87.973623 ], "Address": "1409 N 48TH ST #1", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.973622764272491, 43.050023672896856 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 75, "Incident Number": 72110204, "Date": "07\/30\/2007", "Time": "06:16 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073830, -87.978581 ], "Address": "3015 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.978581080933495, 43.073829754371275 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 76, "Incident Number": 72110217, "Date": "07\/30\/2007", "Time": "06:52 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087614, -88.002072 ], "Address": "7230 W APPLETON AV #5", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.002072346387095, 43.087614025302209 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 77, "Incident Number": 72100093, "Date": "07\/29\/2007", "Time": "11:43 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.081479, -87.987063 ], "Address": "3430 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.987063429598081, 43.081478968636389 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 78, "Incident Number": 72100098, "Date": "07\/29\/2007", "Time": "11:19 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.088854, -88.003387 ], "Address": "7315 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.003386631859726, 43.088854474868818 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 79, "Incident Number": 72100101, "Date": "07\/29\/2007", "Time": "11:12 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071715, -87.989121 ], "Address": "6120 W LOCUST ST #ALLEY", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.989120543857084, 43.071714533181272 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 80, "Incident Number": 72090099, "Date": "07\/28\/2007", "Time": "11:51 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071976, -87.994834 ], "Address": "6625 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.994833751197291, 43.071976248658473 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 81, "Incident Number": 72080083, "Date": "07\/27\/2007", "Time": "11:49 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070180, -87.992434 ], "Address": "2815 N AVONDALE BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.992433783541841, 43.070180363321519 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 82, "Incident Number": 72070053, "Date": "07\/26\/2007", "Time": "07:57 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.057323, -87.977560 ], "Address": "2109 N 51ST ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.977560120895447, 43.057322832361933 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 83, "Incident Number": 72070087, "Date": "07\/26\/2007", "Time": "09:48 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.033986, -87.988738 ], "Address": "239 N 61ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.988738099255357, 43.033985664723872 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 84, "Incident Number": 72070097, "Date": "07\/26\/2007", "Time": "09:58 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.033168, -87.986732 ], "Address": "5918 W PARK HILL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.9867315, 43.033167511541194 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 85, "Incident Number": 72070166, "Date": "07\/26\/2007", "Time": "03:49 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.081585, -87.987271 ], "Address": "3425 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.987270564485698, 43.081584998615021 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 86, "Incident Number": 72070251, "Date": "07\/26\/2007", "Time": "10:01 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.035672, -87.964063 ], "Address": "436 N 40TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.964063079491197, 43.035671766028059 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 87, "Incident Number": 72060043, "Date": "07\/25\/2007", "Time": "07:22 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.075330, -87.979113 ], "Address": "5226 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979112664723871, 43.075329525967916 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 88, "Incident Number": 72050037, "Date": "07\/24\/2007", "Time": "03:51 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072639, -87.980832 ], "Address": "2954 N 54TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.980831863178622, 43.072638905244709 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 89, "Incident Number": 72050120, "Date": "07\/24\/2007", "Time": "01:04 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.067250, -87.979903 ], "Address": "2661 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979902899142999, 43.067249524239806 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 90, "Incident Number": 72040043, "Date": "07\/23\/2007", "Time": "04:30 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.082730, -87.998165 ], "Address": "6860 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.998164682180359, 43.082730397455073 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 91, "Incident Number": 72040076, "Date": "07\/23\/2007", "Time": "08:49 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.053508, -87.977589 ], "Address": "1721 N 51ST ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.977588592041997, 43.053507502914186 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 92, "Incident Number": 72040114, "Date": "07\/23\/2007", "Time": "10:53 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.087395, -88.002197 ], "Address": "7235 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.002196766749194, 43.087394609758292 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 93, "Incident Number": 72030176, "Date": "07\/22\/2007", "Time": "06:17 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.086733, -88.001665 ], "Address": "7177 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.001665478244348, 43.086732737434417 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 94, "Incident Number": 72020066, "Date": "07\/21\/2007", "Time": "08:32 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.037235, -87.960124 ], "Address": "3715 W MICHIGAN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.96012367055225, 43.037235484563659 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 95, "Incident Number": 72020089, "Date": "07\/21\/2007", "Time": "09:52 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.035003, -87.962820 ], "Address": "405 N 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.962819592041996, 43.035002748542922 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 96, "Incident Number": 72010158, "Date": "07\/20\/2007", "Time": "08:20 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.034625, -87.965255 ], "Address": "346 N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.965255371314271, 43.034625 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 97, "Incident Number": 72010186, "Date": "07\/20\/2007", "Time": "11:00 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.025699, -88.017176 ], "Address": "500 S 84TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 3, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 3, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.017175902303435, 43.025699085752272 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 98, "Incident Number": 72000103, "Date": "07\/19\/2007", "Time": "10:45 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.065549, -87.978712 ], "Address": "2561 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.978711602573583, 43.06554869608749 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 99, "Incident Number": 72000117, "Date": "07\/19\/2007", "Time": "01:30 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073517, -87.990813 ], "Address": "6301 W CHAMBERS ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.990813, 43.073517470136956 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 100, "Incident Number": 72000125, "Date": "07\/19\/2007", "Time": "01:52 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070347, -88.002931 ], "Address": "2821 N LEFEBER AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.002931015436317, 43.070347121011025 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 101, "Incident Number": 72000228, "Date": "07\/19\/2007", "Time": "10:17 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.025699, -88.017176 ], "Address": "500 S 84TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 3, "g_clusterK4": 1, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 3, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.017175902303435, 43.025699085752272 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 102, "Incident Number": 71980087, "Date": "07\/17\/2007", "Time": "12:51 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.027449, -88.029720 ], "Address": "9417 W ADLER ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 2, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 1, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 3, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.029719748542902, 43.027448502885548 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 103, "Incident Number": 71980175, "Date": "07\/17\/2007", "Time": "06:19 PM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.059457, -87.981978 ], "Address": "2209 N 55TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.981978084251722, 43.059456502914202 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 104, "Incident Number": 71970137, "Date": "07\/16\/2007", "Time": "04:15 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.034264, -88.006052 ], "Address": "313 N 75TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 3, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.006051632003945, 43.034263941716205 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 105, "Incident Number": 71970202, "Date": "07\/16\/2007", "Time": "10:15 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.028782, -87.978776 ], "Address": "100 N MITCHELL BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 3, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.978775667641045, 43.028781976348085 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 106, "Incident Number": 71950121, "Date": "07\/14\/2007", "Time": "02:30 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.028782, -87.978776 ], "Address": "100 N MITCHELL BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 3, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.978775667641045, 43.028781976348085 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 107, "Incident Number": 71940066, "Date": "07\/13\/2007", "Time": "08:25 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071071, -87.999555 ], "Address": "2848 N 70TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.999555491777031, 43.071070935051104 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 108, "Incident Number": 71940120, "Date": "07\/13\/2007", "Time": "02:57 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.070859, -87.997418 ], "Address": "2833 N 68TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.997417624790586, 43.070858612268438 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 109, "Incident Number": 71930076, "Date": "07\/12\/2007", "Time": "11:58 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.069357, -87.982140 ], "Address": "2761 N 55TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.982139606468721, 43.069356838190316 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 110, "Incident Number": 71920015, "Date": "07\/11\/2007", "Time": "01:11 AM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.088234, -88.002597 ], "Address": "7284 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.00259736522608, 43.088234164319857 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 111, "Incident Number": 71920029, "Date": "07\/11\/2007", "Time": "07:45 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038656, -87.964263 ], "Address": "3943 W BLUE MOUND RD", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.964263, 43.03865551399403 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 112, "Incident Number": 71920046, "Date": "07\/11\/2007", "Time": "08:50 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044013, -87.981666 ], "Address": "5424 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.981666028737877, 43.044013212908801 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 113, "Incident Number": 71920048, "Date": "07\/11\/2007", "Time": "08:56 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.034556, -87.964075 ], "Address": "315 N 40TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.964075379912714, 43.034556183180918 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 114, "Incident Number": 71920080, "Date": "07\/11\/2007", "Time": "10:03 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.036334, -87.962756 ], "Address": "502 N 39TH ST #1", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.962755922384716, 43.036334329447754 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 115, "Incident Number": 71910052, "Date": "07\/10\/2007", "Time": "07:47 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.033824, -88.006052 ], "Address": "235 N 75TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 3, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -88.006051632003945, 43.033823916180978 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 116, "Incident Number": 71910083, "Date": "07\/10\/2007", "Time": "10:14 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074446, -88.001282 ], "Address": "7120 W MOLTKE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.00128220038664, 43.074446467684098 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 117, "Incident Number": 71910127, "Date": "07\/10\/2007", "Time": "09:41 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.068103, -87.984617 ], "Address": "5700 W CENTER ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.98461726602433, 43.068103150561519 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 118, "Incident Number": 71910232, "Date": "07\/10\/2007", "Time": "09:22 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.075330, -87.979113 ], "Address": "5226 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979112664723871, 43.075329525967916 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 119, "Incident Number": 71900085, "Date": "07\/09\/2007", "Time": "08:11 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.065496, -87.982360 ], "Address": "5514 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.982359559524568, 43.065495721911162 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 120, "Incident Number": 71890100, "Date": "07\/08\/2007", "Time": "12:42 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.072372, -87.995586 ], "Address": "6665 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.995586225662066, 43.072372248658468 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 121, "Incident Number": 71890101, "Date": "07\/08\/2007", "Time": "12:56 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.075391, -87.993391 ], "Address": "6515 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.993390944630377, 43.075390528420755 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 122, "Incident Number": 71880079, "Date": "07\/07\/2007", "Time": "10:00 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.072060, -87.996361 ], "Address": "2951 N 67TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.996360804548473, 43.072060206520064 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 123, "Incident Number": 71880082, "Date": "07\/07\/2007", "Time": "10:22 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070490, -87.978639 ], "Address": "2829 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.978638606468721, 43.070490031363619 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 124, "Incident Number": 71870131, "Date": "07\/06\/2007", "Time": "04:08 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.074410, -87.994530 ], "Address": "6619 W MOLTKE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.99453, 43.074410481245444 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 125, "Incident Number": 71860084, "Date": "07\/05\/2007", "Time": "09:55 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072632, -87.976160 ], "Address": "2947 N 50TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.976160080933496, 43.072632335276126 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 126, "Incident Number": 71860180, "Date": "07\/05\/2007", "Time": "04:37 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.035168, -87.964024 ], "Address": "414 N 40TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.964023721594046, 43.035167629753602 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 127, "Incident Number": 71850085, "Date": "07\/04\/2007", "Time": "10:32 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.034535, -87.965253 ], "Address": "334 N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.965253400744643, 43.034535 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 128, "Incident Number": 71840157, "Date": "07\/03\/2007", "Time": "05:12 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073065, -87.974861 ], "Address": "2967 N 49TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.974861073720149, 43.073064586733238 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 129, "Incident Number": 71840161, "Date": "07\/03\/2007", "Time": "05:36 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.057854, -87.981981 ], "Address": "2129 N 55TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.981980613682083, 43.057854 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 130, "Incident Number": 71830039, "Date": "07\/02\/2007", "Time": "06:43 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.078204, -87.979679 ], "Address": "3249 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979679080933494, 43.078204341104509 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 131, "Incident Number": 71830043, "Date": "07\/02\/2007", "Time": "08:12 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.073108, -88.004765 ], "Address": "2964 N 74TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.004764977350305, 43.073108465722214 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 132, "Incident Number": 71830067, "Date": "07\/02\/2007", "Time": "10:16 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.076619, -88.007256 ], "Address": "3154 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.007256400744637, 43.076618748542899 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 133, "Incident Number": 72120101, "Date": "07\/31\/2007", "Time": "10:19 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.985826, -87.984072 ], "Address": "3232 S 56TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.984072484563669, 42.985826329447747 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 134, "Incident Number": 72120172, "Date": "07\/31\/2007", "Time": "04:31 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.983343, -87.955676 ], "Address": "3404 S 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.955676426279851, 42.983342863725539 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 135, "Incident Number": 72110067, "Date": "07\/30\/2007", "Time": "07:55 AM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 42.990915, -87.985296 ], "Address": "2952 S 57TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.985295960009395, 42.990914672485495 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 136, "Incident Number": 72070186, "Date": "07\/26\/2007", "Time": "04:50 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.973788, -87.977034 ], "Address": "5011 W HOWARD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.977034354634512, 42.973787900587418 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 137, "Incident Number": 72070210, "Date": "07\/26\/2007", "Time": "06:29 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.994435, -87.992969 ], "Address": "2754 S 64TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.992968758786034, 42.994435400773291 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 138, "Incident Number": 72070236, "Date": "07\/26\/2007", "Time": "08:45 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.987905, -87.969966 ], "Address": "4440 W FOREST HOME AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.969965792688441, 42.987905244532207 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 139, "Incident Number": 72060097, "Date": "07\/25\/2007", "Time": "12:24 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.992460, -87.982759 ], "Address": "2839 S 55TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.982758573720147, 42.99246019900167 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 140, "Incident Number": 72050074, "Date": "07\/24\/2007", "Time": "09:27 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.992938, -87.985090 ], "Address": "2827 S 57TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.985089573720145, 42.992937670552266 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 141, "Incident Number": 72050215, "Date": "07\/24\/2007", "Time": "07:47 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.984923, -88.027444 ], "Address": "3264 S 92ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.027443720613093, 42.984923333054439 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 142, "Incident Number": 72040263, "Date": "07\/23\/2007", "Time": "11:07 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.979432, -87.949221 ], "Address": "2700 W LOOMIS RD", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.949221216386178, 42.979431769439628 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 143, "Incident Number": 72030080, "Date": "07\/22\/2007", "Time": "09:25 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.998810, -87.972143 ], "Address": "4615 W SUMAC PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.972143248138877, 42.998809538144272 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 144, "Incident Number": 71970135, "Date": "07\/16\/2007", "Time": "03:55 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.997951, -87.991299 ], "Address": "2559 S 63RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.991299055398272, 42.997950586733225 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 145, "Incident Number": 71950139, "Date": "07\/14\/2007", "Time": "04:14 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.970325, -88.010402 ], "Address": "7704 W WATERFORD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.010402390645737, 42.970324509376816 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 146, "Incident Number": 71950160, "Date": "07\/14\/2007", "Time": "06:02 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.984535, -87.952299 ], "Address": "3330 S 30TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.952298651361332, 42.984534995994537 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 147, "Incident Number": 71940078, "Date": "07\/13\/2007", "Time": "10:07 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.978419, -88.033815 ], "Address": "3628 S 97TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.03381494460173, 42.978419077990651 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 148, "Incident Number": 71940081, "Date": "07\/13\/2007", "Time": "10:16 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.982442, -87.998995 ], "Address": "3418 S 69TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.998995437388359, 42.982442413266767 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 149, "Incident Number": 71940104, "Date": "07\/13\/2007", "Time": "01:24 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.976818, -88.032659 ], "Address": "3717 S 96TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.03265907372014, 42.976817863725557 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 150, "Incident Number": 71930167, "Date": "07\/12\/2007", "Time": "07:53 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.985908, -87.963050 ], "Address": "3225 S 39TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.963049548184912, 42.985908115182639 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 151, "Incident Number": 71910045, "Date": "07\/10\/2007", "Time": "07:37 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.973680, -87.979501 ], "Address": "5209 W HOWARD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.979500603475785, 42.973679900724072 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 152, "Incident Number": 71910046, "Date": "07\/10\/2007", "Time": "06:34 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.988328, -87.982281 ], "Address": "5421 W OKLAHOMA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.982281, 42.988328488458819 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 153, "Incident Number": 71900143, "Date": "07\/09\/2007", "Time": "01:11 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.988358, -87.963830 ], "Address": "3925 W OKLAHOMA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.963829774078135, 42.98835849567218 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 154, "Incident Number": 71900001, "Date": "07\/08\/2007", "Time": "08:09 PM", "Police District": 6.0, "Offense 1": "THEFT FROM COIN-OPPERATED MACHINES", "Location": [ 42.984520, -87.975579 ], "Address": "4904 W FOREST HOME AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.975579204570252, 42.984520186248396 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 155, "Incident Number": 71880069, "Date": "07\/07\/2007", "Time": "09:15 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.998448, -88.001225 ], "Address": "2532 S 71ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.001224970136946, 42.998448143487828 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 156, "Incident Number": 71880145, "Date": "07\/07\/2007", "Time": "02:15 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.981939, -88.026158 ], "Address": "3439 S 91ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.026157982687749, 42.981939450458782 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 157, "Incident Number": 71880172, "Date": "07\/07\/2007", "Time": "06:41 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.984535, -87.952299 ], "Address": "3330 S 30TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.952298651361332, 42.984534995994537 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 158, "Incident Number": 71870027, "Date": "07\/06\/2007", "Time": "02:51 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.974914, -87.953333 ], "Address": "3863 S MINER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.953332663059442, 42.974914090588577 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 159, "Incident Number": 71870061, "Date": "07\/06\/2007", "Time": "08:42 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.974927, -88.017753 ], "Address": "3800 S 84TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -88.01775299509525, 42.97492674271453 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 160, "Incident Number": 71860105, "Date": "07\/05\/2007", "Time": "11:14 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.001227, -87.957432 ], "Address": "3422 W HAYES AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 7, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.957432167638061, 43.001227486005973 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 161, "Incident Number": 71860117, "Date": "07\/05\/2007", "Time": "11:47 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.977293, -87.948591 ], "Address": "3701 S 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.948590751666572, 42.977293424608902 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 162, "Incident Number": 71840122, "Date": "07\/03\/2007", "Time": "02:04 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.000928, -87.967748 ], "Address": "2393 S 43RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.967747526544827, 43.00092832944776 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 163, "Incident Number": 71830068, "Date": "07\/02\/2007", "Time": "10:21 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.979946, -87.998450 ], "Address": "6813 W WEDGEWOOD DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.998450474464775, 42.979946481245456 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 164, "Incident Number": 72120109, "Date": "07\/31\/2007", "Time": "11:19 AM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.013698, -87.926834 ], "Address": "1620 S 12TH ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926834495672168, 43.013698407438397 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 165, "Incident Number": 72120168, "Date": "07\/31\/2007", "Time": "04:22 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.010205, -87.928479 ], "Address": "1320 W BURNHAM ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.928479341874748, 43.010205145339143 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 166, "Incident Number": 72110155, "Date": "07\/30\/2007", "Time": "03:01 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.013303, -87.919816 ], "Address": "1638 S 7TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919816466241798, 43.013303298084139 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 167, "Incident Number": 72110156, "Date": "07\/30\/2007", "Time": "03:04 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.012259, -87.931314 ], "Address": "1511 W MITCHELL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931313832361937, 43.01225946681874 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 168, "Incident Number": 72110196, "Date": "07\/30\/2007", "Time": "05:44 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.024300, -87.905713 ], "Address": "700 S WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.90571314233398, 43.024300105718915 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 169, "Incident Number": 72110200, "Date": "07\/30\/2007", "Time": "05:54 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.002838, -87.921932 ], "Address": "821 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92193200291419, 43.002837546742626 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 170, "Incident Number": 72100112, "Date": "07\/29\/2007", "Time": "01:31 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.024591, -87.916889 ], "Address": "625 S 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.916889066506769, 43.024590586733211 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 171, "Incident Number": 72100117, "Date": "07\/29\/2007", "Time": "01:44 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.024591, -87.916889 ], "Address": "625 S 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.916889066506769, 43.024590586733211 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 172, "Incident Number": 72100184, "Date": "07\/29\/2007", "Time": "08:55 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.000226, -87.922396 ], "Address": "2446 S 9TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.922396437388358, 43.000226161809678 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 173, "Incident Number": 72080128, "Date": "07\/27\/2007", "Time": "04:53 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.002827, -87.924060 ], "Address": "959 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92406, 43.00282748845882 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 174, "Incident Number": 72070116, "Date": "07\/26\/2007", "Time": "11:22 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.009802, -87.938014 ], "Address": "1918 S 20TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.938013926279851, 43.00980224562872 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 175, "Incident Number": 72070118, "Date": "07\/26\/2007", "Time": "11:22 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.007083, -87.927073 ], "Address": "2054 S 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927073017312253, 43.007082736886133 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 176, "Incident Number": 72070130, "Date": "07\/26\/2007", "Time": "12:21 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.023319, -87.916938 ], "Address": "500 W NATIONAL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.916937648030881, 43.023318669715508 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 177, "Incident Number": 72050093, "Date": "07\/24\/2007", "Time": "11:00 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.010205, -87.928479 ], "Address": "1320 W BURNHAM ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.928479341874748, 43.010205145339143 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 178, "Incident Number": 72050153, "Date": "07\/24\/2007", "Time": "04:05 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.005600, -87.928398 ], "Address": "2135 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.928397515436316, 43.005600450458758 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 179, "Incident Number": 72030072, "Date": "07\/22\/2007", "Time": "08:28 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.008992, -87.926986 ], "Address": "1952 S 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926986459028441, 43.00899182653356 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 180, "Incident Number": 72030073, "Date": "07\/22\/2007", "Time": "08:52 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.017005, -87.929811 ], "Address": "1413 W GREENFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929811167638064, 43.017005495672187 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 181, "Incident Number": 72020164, "Date": "07\/21\/2007", "Time": "06:24 PM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.029954, -87.912628 ], "Address": "181 S 2ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912627566506771, 43.029953664723877 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 182, "Incident Number": 72010025, "Date": "07\/20\/2007", "Time": "03:28 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.002940, -87.933034 ], "Address": "1570 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93303363918865, 43.002940471579237 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 183, "Incident Number": 72010096, "Date": "07\/20\/2007", "Time": "01:25 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.025337, -87.930670 ], "Address": "1521 W BRUCE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.9306705, 43.025337484563657 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 184, "Incident Number": 72010098, "Date": "07\/20\/2007", "Time": "01:57 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.002827, -87.921003 ], "Address": "733 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921003022621036, 43.00282748845882 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 185, "Incident Number": 72010102, "Date": "07\/20\/2007", "Time": "02:33 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.005779, -87.931054 ], "Address": "2128 S 15TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931054459028445, 43.005778575076476 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 186, "Incident Number": 72010123, "Date": "07\/20\/2007", "Time": "04:41 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.015985, -87.931211 ], "Address": "1513 W ORCHARD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93121091909515, 43.015984513994027 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 187, "Incident Number": 72000073, "Date": "07\/19\/2007", "Time": "10:27 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.017132, -87.919976 ], "Address": "710 W GREENFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.919975623774889, 43.017132466591995 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 188, "Incident Number": 72000096, "Date": "07\/19\/2007", "Time": "10:37 AM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.019658, -87.926704 ], "Address": "1116 S 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926703933493215, 43.019658 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 189, "Incident Number": 72000218, "Date": "07\/19\/2007", "Time": "09:40 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.001433, -87.926091 ], "Address": "2363 S 11TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926091048184915, 43.001432779906509 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 190, "Incident Number": 71990058, "Date": "07\/18\/2007", "Time": "07:37 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.012317, -87.920263 ], "Address": "710 W HISTORIC MITCHELL ST #703", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.920262974464777, 43.012316501009614 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 191, "Incident Number": 71990100, "Date": "07\/18\/2007", "Time": "09:55 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.016581, -87.927959 ], "Address": "1419 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927958569824995, 43.01658125728548 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 192, "Incident Number": 71980068, "Date": "07\/17\/2007", "Time": "11:23 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.004223, -87.927194 ], "Address": "2214 S 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927194433493227, 43.004223 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 193, "Incident Number": 71980073, "Date": "07\/17\/2007", "Time": "11:53 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.006541, -87.931963 ], "Address": "1532 W BECHER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931962723007672, 43.006541489324185 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 194, "Incident Number": 71980112, "Date": "07\/17\/2007", "Time": "03:18 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.027396, -87.912658 ], "Address": "200 W FLORIDA ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912658167939085, 43.027395660500609 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 195, "Incident Number": 71980211, "Date": "07\/17\/2007", "Time": "11:41 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.001126, -87.923595 ], "Address": "2400 S 9TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.923595470136945, 43.001126329447743 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 196, "Incident Number": 71970112, "Date": "07\/16\/2007", "Time": "12:58 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.015978, -87.912203 ], "Address": "123 W ORCHARD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.91220322300768, 43.015977525102535 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 197, "Incident Number": 71970127, "Date": "07\/16\/2007", "Time": "02:07 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.999713, -87.929825 ], "Address": "2468 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929825419066503, 42.999713497085821 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 198, "Incident Number": 71970220, "Date": "07\/16\/2007", "Time": "11:21 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.015572, -87.912631 ], "Address": "1517 S 2ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.912631092042005, 43.015572 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 199, "Incident Number": 71960056, "Date": "07\/15\/2007", "Time": "09:23 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.010352, -87.918564 ], "Address": "1828 S 6TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918564429598092, 43.010351717179304 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 200, "Incident Number": 71960077, "Date": "07\/15\/2007", "Time": "11:57 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.012217, -87.924268 ], "Address": "1007 W HISTORIC MITCHELL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.924268311694703, 43.012216865671199 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 201, "Incident Number": 71960167, "Date": "07\/15\/2007", "Time": "08:26 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.008994, -87.921422 ], "Address": "1951 S 8TH ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921421540971551, 43.008993754371289 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 202, "Incident Number": 71940056, "Date": "07\/13\/2007", "Time": "07:54 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.018030, -87.929482 ], "Address": "1401 W MADISON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929482332361928, 43.018029525102527 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 203, "Incident Number": 71940125, "Date": "07\/13\/2007", "Time": "01:04 PM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.024985, -87.926774 ], "Address": "633 S 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.926773749303209, 43.024985298299747 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 204, "Incident Number": 71930115, "Date": "07\/12\/2007", "Time": "03:29 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.015661, -87.916841 ], "Address": "1519 S 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.916841390120979, 43.015661342367501 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 205, "Incident Number": 71930121, "Date": "07\/12\/2007", "Time": "04:06 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.995674, -87.926199 ], "Address": "2691 S 11TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926199048184912, 42.995673670552264 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 206, "Incident Number": 71930127, "Date": "07\/12\/2007", "Time": "04:34 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.999488, -87.928516 ], "Address": "2478 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.928516396849489, 42.999488329447757 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 207, "Incident Number": 71920114, "Date": "07\/11\/2007", "Time": "03:13 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.009371, -87.936731 ], "Address": "1937 S 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.936730540971553, 43.009371282820695 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 208, "Incident Number": 71920174, "Date": "07\/11\/2007", "Time": "07:43 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.001239, -87.930283 ], "Address": "1411 W HAYES AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930282776992314, 43.001238532315895 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 209, "Incident Number": 71910068, "Date": "07\/10\/2007", "Time": "09:11 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.005248, -87.925735 ], "Address": "2150 S 11TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.925735459028445, 43.005248298084155 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 210, "Incident Number": 71910124, "Date": "07\/10\/2007", "Time": "01:28 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.012315, -87.921703 ], "Address": "808 W HISTORIC MITCHELL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921702806826715, 43.012314511541206 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 211, "Incident Number": 71910154, "Date": "07\/10\/2007", "Time": "03:38 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.031383, -87.931432 ], "Address": "1540 W CANAL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.93143244601535, 43.031382501586528 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 212, "Incident Number": 71910161, "Date": "07\/10\/2007", "Time": "03:57 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.031383, -87.931432 ], "Address": "1540 W CANAL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.93143244601535, 43.031382501586528 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 213, "Incident Number": 71900063, "Date": "07\/09\/2007", "Time": "07:49 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.024347, -87.918268 ], "Address": "645 S 6TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.918268058716492, 43.024347251457101 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 214, "Incident Number": 71900155, "Date": "07\/09\/2007", "Time": "02:25 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.011586, -87.925579 ], "Address": "1729 S 11TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.925578566506772, 43.011585838190314 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 215, "Incident Number": 71900192, "Date": "07\/09\/2007", "Time": "05:00 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.015042, -87.928019 ], "Address": "1543 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92801854097155, 43.015041618096831 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 216, "Incident Number": 71890189, "Date": "07\/08\/2007", "Time": "09:04 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.022779, -87.936146 ], "Address": "1851 W NATIONAL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.936145723459262, 43.022778946944229 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 217, "Incident Number": 71880101, "Date": "07\/07\/2007", "Time": "12:08 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.023840, -87.923960 ], "Address": "737 S 10TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.923959848245318, 43.023839723934927 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 218, "Incident Number": 71880167, "Date": "07\/07\/2007", "Time": "06:31 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.012580, -87.930896 ], "Address": "1627 S 15TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930895718163896, 43.012579870111409 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 219, "Incident Number": 71870087, "Date": "07\/06\/2007", "Time": "11:53 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.017936, -87.912662 ], "Address": "1201 S 2ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.912661552656971, 43.017935667234042 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 220, "Incident Number": 71870095, "Date": "07\/06\/2007", "Time": "12:46 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.001837, -87.924773 ], "Address": "2344 S 10TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.924773495672156, 43.00183691035258 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 221, "Incident Number": 71860136, "Date": "07\/05\/2007", "Time": "01:24 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.009073, -87.920011 ], "Address": "1947 S 7TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.920011092042003, 43.009073444630388 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 222, "Incident Number": 71860200, "Date": "07\/05\/2007", "Time": "05:44 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.027396, -87.912658 ], "Address": "200 W FLORIDA ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912658167939085, 43.027395660500609 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 223, "Incident Number": 71850050, "Date": "07\/04\/2007", "Time": "06:10 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.017074, -87.930360 ], "Address": "1434 W GREENFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 5, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93035983236193, 43.017074453257379 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 224, "Incident Number": 71850128, "Date": "07\/04\/2007", "Time": "03:34 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.013849, -87.914017 ], "Address": "1613 S 3RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.914016711868072, 43.013848616478171 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 225, "Incident Number": 71840158, "Date": "07\/03\/2007", "Time": "05:19 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.012357, -87.933128 ], "Address": "1600 W MITCHELL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.933127914467818, 43.012357346545869 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 226, "Incident Number": 71830095, "Date": "07\/02\/2007", "Time": "12:46 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.019559, -87.931891 ], "Address": "1123 S 15TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.931890595360215, 43.019559 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 227, "Incident Number": 71830133, "Date": "07\/02\/2007", "Time": "03:38 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.029536, -87.911079 ], "Address": "161 S 1ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.911079069824993, 43.029536018321856 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 228, "Incident Number": 71830187, "Date": "07\/02\/2007", "Time": "06:08 PM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.007671, -87.921450 ], "Address": "2025 S 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.921449599255354, 43.007670754371276 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 229, "Incident Number": 71820052, "Date": "07\/01\/2007", "Time": "04:49 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.004223, -87.927194 ], "Address": "2214 S 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927194433493227, 43.004223 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 230, "Incident Number": 71820146, "Date": "07\/01\/2007", "Time": "06:21 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.002006, -87.931309 ], "Address": "1500 W WINDLAKE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931309098230813, 43.002006053102576 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 231, "Incident Number": 72110080, "Date": "07\/30\/2007", "Time": "09:32 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.952517, -87.909870 ], "Address": "5037 S HOWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.909870078769117, 42.952517276992324 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 232, "Incident Number": 72110128, "Date": "07\/30\/2007", "Time": "12:25 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.997522, -87.937264 ], "Address": "1901 W HARRISON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93726403719198, 42.997521532315901 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 233, "Incident Number": 72110136, "Date": "07\/30\/2007", "Time": "12:59 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.945332, -87.948837 ], "Address": "5474 S 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.948837062034713, 42.945332216971131 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 234, "Incident Number": 72100133, "Date": "07\/29\/2007", "Time": "03:34 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.970276, -87.948345 ], "Address": "4100 S 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.948345459462075, 42.970275555369625 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 235, "Incident Number": 72100166, "Date": "07\/29\/2007", "Time": "06:40 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.951438, -87.909868 ], "Address": "5105 S HOWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.909867522216061, 42.951438 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 236, "Incident Number": 72100194, "Date": "07\/29\/2007", "Time": "10:14 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.930483, -87.941885 ], "Address": "2114 W COLLEGE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.94188509585949, 42.930483044479338 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 237, "Incident Number": 72080065, "Date": "07\/27\/2007", "Time": "10:05 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.925202, -87.931432 ], "Address": "1400 W ZELLMAN CT", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.931431639188645, 42.925202493796249 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 238, "Incident Number": 72070083, "Date": "07\/26\/2007", "Time": "09:32 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.924015, -87.939151 ], "Address": "6681 S 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.939151022649696, 42.924014947544578 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 239, "Incident Number": 72070211, "Date": "07\/26\/2007", "Time": "06:32 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.983065, -87.940172 ], "Address": "2076 W HOLT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.940171809751106, 42.983064681564514 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 240, "Incident Number": 72050214, "Date": "07\/24\/2007", "Time": "07:46 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.951985, -87.909909 ], "Address": "100 W EDGERTON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.909908576219337, 42.951984561314205 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 241, "Incident Number": 72040070, "Date": "07\/23\/2007", "Time": "07:52 AM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.940674, -87.948983 ], "Address": "5700 S 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.948982507791214, 42.940674136274453 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 242, "Incident Number": 72040101, "Date": "07\/23\/2007", "Time": "09:52 AM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.940386, -87.949357 ], "Address": "5727 S 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.949357473310002, 42.940385643632048 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 243, "Incident Number": 72020056, "Date": "07\/21\/2007", "Time": "07:03 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.003033, -87.937573 ], "Address": "1918 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.937572913266777, 43.003032525967924 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 244, "Incident Number": 72020183, "Date": "07\/21\/2007", "Time": "08:42 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.988457, -87.944030 ], "Address": "2321 W OKLAHOMA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 7, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.944030360811354, 42.988457495672186 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 245, "Incident Number": 72000095, "Date": "07\/19\/2007", "Time": "11:56 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.973092, -87.918075 ], "Address": "3926 S 5TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918074944601727, 42.973092 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 246, "Incident Number": 72000209, "Date": "07\/19\/2007", "Time": "08:49 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.973680, -87.940063 ], "Address": "3910 S 20TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.940063096368746, 42.973679968047534 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 247, "Incident Number": 71990169, "Date": "07\/18\/2007", "Time": "04:01 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.962283, -87.900835 ], "Address": "4518 S TAYLOR AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.900835444601725, 42.962282664723887 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 248, "Incident Number": 71990181, "Date": "07\/18\/2007", "Time": "06:31 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.964614, -87.930444 ], "Address": "4384 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.930444407957992, 42.964614 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 249, "Incident Number": 71990182, "Date": "07\/18\/2007", "Time": "06:36 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.001451, -87.934550 ], "Address": "2369 S 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.934549555398277, 43.00145128282071 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 250, "Incident Number": 71940037, "Date": "07\/13\/2007", "Time": "05:38 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.944872, -87.931440 ], "Address": "1422 W GRANGE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.931439832361932, 42.944872493219329 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 251, "Incident Number": 71940087, "Date": "07\/13\/2007", "Time": "11:07 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.954291, -87.929256 ], "Address": "4960 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.929256472878251, 42.954291387731558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 252, "Incident Number": 71930157, "Date": "07\/12\/2007", "Time": "07:07 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.930174, -87.936743 ], "Address": "1399 W COLLEGE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.936742544286162, 42.930173955713833 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 253, "Incident Number": 71920204, "Date": "07\/11\/2007", "Time": "10:38 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.973689, -87.934052 ], "Address": "1601 W HOWARD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.934051599287315, 42.973688900712688 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 254, "Incident Number": 71900067, "Date": "07\/09\/2007", "Time": "07:58 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.974936, -87.931559 ], "Address": "3829 S 15TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.931558548184924, 42.974936413266789 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 255, "Incident Number": 71900244, "Date": "07\/09\/2007", "Time": "08:14 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.977665, -87.930322 ], "Address": "3667 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930321566506777, 42.977664670552258 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 256, "Incident Number": 71880068, "Date": "07\/07\/2007", "Time": "07:25 AM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.004025, -87.936765 ], "Address": "2228 S 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.936765498990397, 43.004024633360274 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 257, "Incident Number": 71880138, "Date": "07\/07\/2007", "Time": "03:36 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.003404, -87.934479 ], "Address": "2259 S 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.934479048184912, 43.003404282820696 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 258, "Incident Number": 71880176, "Date": "07\/07\/2007", "Time": "07:06 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.980058, -87.915553 ], "Address": "3540 S 4TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.915552911853126, 42.980058251457109 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 259, "Incident Number": 71850127, "Date": "07\/04\/2007", "Time": "03:34 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.984486, -87.932739 ], "Address": "3307 S 15TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.932738522649686, 42.984485696087489 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 260, "Incident Number": 71840182, "Date": "07\/03\/2007", "Time": "07:37 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.933278, -87.929556 ], "Address": "6102 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.929556477640631, 42.933278336661097 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 261, "Incident Number": 71830019, "Date": "07\/02\/2007", "Time": "01:49 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.938224, -87.953188 ], "Address": "3036 W IONA TR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.953188134606833, 42.938224281506407 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 262, "Incident Number": 71830054, "Date": "07\/02\/2007", "Time": "08:14 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.938222, -87.953030 ], "Address": "3026 W IONA TR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.953029570574543, 42.938221777863788 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 263, "Incident Number": 71830121, "Date": "07\/02\/2007", "Time": "02:32 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.966570, -87.895073 ], "Address": "4295 S WHITNALL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.895072906197655, 42.96656992723215 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 264, "Incident Number": 71830192, "Date": "07\/02\/2007", "Time": "07:45 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.954291, -87.929256 ], "Address": "4960 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.929256472878251, 42.954291387731558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 265, "Incident Number": 71820189, "Date": "07\/01\/2007", "Time": "11:08 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.954291, -87.929256 ], "Address": "4960 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 8, "g_clusterK9": 8, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.929256472878251, 42.954291387731558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 266, "Incident Number": 72120132, "Date": "07\/31\/2007", "Time": "11:30 AM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 42.991930, -87.895569 ], "Address": "2915 S HERMAN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.895569040971552, 42.991929838190316 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 267, "Incident Number": 72120150, "Date": "07\/31\/2007", "Time": "02:52 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.986933, -87.928792 ], "Address": "3156 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.928792451815085, 42.986933413266769 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 268, "Incident Number": 72120185, "Date": "07\/31\/2007", "Time": "05:28 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.981813, -87.918412 ], "Address": "500 W HOLT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918411603000251, 42.981813024073368 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 269, "Incident Number": 72110158, "Date": "07\/30\/2007", "Time": "03:11 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.999057, -87.896758 ], "Address": "2519 S LOGAN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.89675755929342, 42.999057 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 270, "Incident Number": 72090067, "Date": "07\/28\/2007", "Time": "08:49 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.987663, -87.890649 ], "Address": "3119 S HANSON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.890649048184912, 42.987662863725546 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 271, "Incident Number": 72090086, "Date": "07\/28\/2007", "Time": "09:48 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.986124, -87.899286 ], "Address": "3214 S PINE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.899286470136943, 42.986123832361926 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 272, "Incident Number": 72090112, "Date": "07\/28\/2007", "Time": "12:30 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.978292, -87.906951 ], "Address": "319 E WILBUR AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.906951083819024, 42.978291539529259 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 273, "Incident Number": 72090174, "Date": "07\/28\/2007", "Time": "06:30 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.979222, -87.907563 ], "Address": "232 E WARNIMONT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.907562832361933, 42.979221511541198 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 274, "Incident Number": 72070133, "Date": "07\/26\/2007", "Time": "12:36 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.973780, -87.906891 ], "Address": "324 E HOWARD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.906891069392302, 42.973780490478035 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 275, "Incident Number": 72070207, "Date": "07\/26\/2007", "Time": "06:20 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.981813, -87.918412 ], "Address": "500 W HOLT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918411603000251, 42.981813024073368 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 276, "Incident Number": 72060064, "Date": "07\/25\/2007", "Time": "07:22 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.993010, -87.898078 ], "Address": "2831 S LENOX ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.898077573720144, 42.993009502914191 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 277, "Incident Number": 72060114, "Date": "07\/25\/2007", "Time": "01:57 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.981154, -87.929029 ], "Address": "1300 W MORGAN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.929029072025685, 42.981153638307831 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 278, "Incident Number": 72060122, "Date": "07\/25\/2007", "Time": "02:24 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.998589, -87.918910 ], "Address": "2523-A S 6TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918909525967905, 42.998589419095168 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 279, "Incident Number": 72060136, "Date": "07\/25\/2007", "Time": "03:32 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.992943, -87.880202 ], "Address": "2900 S SHORE DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.880201861957616, 42.992942589163711 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 280, "Incident Number": 72050061, "Date": "07\/24\/2007", "Time": "08:29 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.997625, -87.916333 ], "Address": "424 W HARRISON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9163335, 42.997625474897482 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 281, "Incident Number": 72050132, "Date": "07\/24\/2007", "Time": "12:29 PM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 42.999609, -87.904853 ], "Address": "2477 S HOWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.904853169106971, 42.99960878406786 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 282, "Incident Number": 72050188, "Date": "07\/24\/2007", "Time": "06:04 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.000507, -87.898066 ], "Address": "2402 S LENOX ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.898066451815083, 43.000506586733223 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 283, "Incident Number": 72050189, "Date": "07\/24\/2007", "Time": "06:05 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.981813, -87.918412 ], "Address": "500 W HOLT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918411603000251, 42.981813024073368 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 284, "Incident Number": 72030091, "Date": "07\/22\/2007", "Time": "10:31 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.979590, -87.899421 ], "Address": "3563 S PINE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.899421040971546, 42.97958986372555 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 285, "Incident Number": 72160058, "Date": "07\/22\/2007", "Time": "07:16 AM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 42.985945, -87.928888 ], "Address": "3219 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.928888015436328, 42.985944754371275 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 286, "Incident Number": 72020114, "Date": "07\/21\/2007", "Time": "12:35 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.993363, -87.930057 ], "Address": "2815 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.930056586483559, 42.993363125494916 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 287, "Incident Number": 72010175, "Date": "07\/20\/2007", "Time": "09:38 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.990039, -87.894330 ], "Address": "2985 S CLEMENT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.894330048184912, 42.990039 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 288, "Incident Number": 72000196, "Date": "07\/19\/2007", "Time": "07:54 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.981813, -87.918412 ], "Address": "500 W HOLT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.918411603000251, 42.981813024073368 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 289, "Incident Number": 72000201, "Date": "07\/19\/2007", "Time": "08:21 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.982488, -87.914891 ], "Address": "400 W HOLT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.914891078450253, 42.982488472690648 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 290, "Incident Number": 71990088, "Date": "07\/18\/2007", "Time": "10:50 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.984650, -87.925830 ], "Address": "1011 W OHIO AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.925830448929545, 42.984649502308606 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 291, "Incident Number": 71980153, "Date": "07\/17\/2007", "Time": "07:16 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.992278, -87.888118 ], "Address": "2885 S KINNICKINNIC AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.88811756717061, 42.992277644988363 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 292, "Incident Number": 71970059, "Date": "07\/16\/2007", "Time": "08:52 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.004546, -87.904161 ], "Address": "2165 S ALLIS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.904161055398276, 43.004546276992329 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 293, "Incident Number": 71970177, "Date": "07\/16\/2007", "Time": "07:42 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.997968, -87.903652 ], "Address": "2531 S GRAHAM ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.903651602573589, 42.997968335276141 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 294, "Incident Number": 71960096, "Date": "07\/15\/2007", "Time": "02:30 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.992943, -87.880202 ], "Address": "2900 S SHORE DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.880201861957616, 42.992942589163711 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 295, "Incident Number": 71960163, "Date": "07\/15\/2007", "Time": "08:12 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.981785, -87.928906 ], "Address": "3448 S 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 8, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.928905926279853, 42.981785077990651 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 296, "Incident Number": 71960182, "Date": "07\/15\/2007", "Time": "10:09 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.994063, -87.888428 ], "Address": "2734 S LINEBARGER TR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.888427608633108, 42.994062910641048 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 297, "Incident Number": 71930102, "Date": "07\/12\/2007", "Time": "02:31 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.989315, -87.877507 ], "Address": "3030 S WENTWORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.877506825408375, 42.989314765768242 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 298, "Incident Number": 71930143, "Date": "07\/12\/2007", "Time": "06:04 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.992934, -87.929954 ], "Address": "2840 S 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92995417158366, 42.992934185261731 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 299, "Incident Number": 71930163, "Date": "07\/12\/2007", "Time": "06:15 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.000713, -87.903568 ], "Address": "2415 S GRAHAM ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.903567595360215, 43.000713 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 300, "Incident Number": 71920064, "Date": "07\/11\/2007", "Time": "10:27 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.985664, -87.908123 ], "Address": "3236 S BURRELL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.908122977350303, 42.98566441326679 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 301, "Incident Number": 71910205, "Date": "07\/10\/2007", "Time": "07:21 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.982532, -87.922756 ], "Address": "3412 S 9TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.922756437388358, 42.982532245628704 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 302, "Incident Number": 71900103, "Date": "07\/09\/2007", "Time": "09:56 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.004897, -87.907078 ], "Address": "2151 S ROBINSON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.907078355617202, 43.004896693000397 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 303, "Incident Number": 71900110, "Date": "07\/09\/2007", "Time": "10:24 AM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.982986, -87.908152 ], "Address": "3376 S BURRELL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.908151564776006, 42.982986049397013 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 304, "Incident Number": 71900191, "Date": "07\/09\/2007", "Time": "04:58 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.993909, -87.903379 ], "Address": "2779 S HUMBOLDT PARK CT", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.903378595360223, 42.993909335276129 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 305, "Incident Number": 71890073, "Date": "07\/08\/2007", "Time": "10:25 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.996198, -87.886919 ], "Address": "1815 E IRON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.886918655837064, 42.996197598938252 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 306, "Incident Number": 71880057, "Date": "07\/07\/2007", "Time": "07:51 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.998382, -87.891770 ], "Address": "2487 S DELAWARE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.891770370967549, 42.998382169282841 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 307, "Incident Number": 71880060, "Date": "07\/07\/2007", "Time": "08:06 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.998403, -87.891695 ], "Address": "2486 S DELAWARE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.891695121819069, 42.998402754111495 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 308, "Incident Number": 71880090, "Date": "07\/07\/2007", "Time": "09:54 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.997888, -87.900068 ], "Address": "2577 S KINNICKINNIC AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.900068040827321, 42.997888467655457 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 309, "Incident Number": 71880140, "Date": "07\/07\/2007", "Time": "03:41 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.002920, -87.898873 ], "Address": "805 E LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.8988735, 43.002919521207396 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 310, "Incident Number": 71880154, "Date": "07\/07\/2007", "Time": "05:11 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.004974, -87.905946 ], "Address": "2173 S KINNICKINNIC AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.905945999884423, 43.004973835680147 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 311, "Incident Number": 71880166, "Date": "07\/07\/2007", "Time": "05:56 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.992918, -87.888460 ], "Address": "2775 S LINEBARGER TR #LOWER", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.8884595809335, 42.992918329447747 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 312, "Incident Number": 71870104, "Date": "07\/06\/2007", "Time": "01:29 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.987050, -87.879324 ], "Address": "3142 S PENNSYLVANIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.879324491777027, 42.987050381903174 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 313, "Incident Number": 71860126, "Date": "07\/05\/2007", "Time": "12:19 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.972445, -87.905235 ], "Address": "3959 S WHITNALL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.9052353346123, 42.972445079375639 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 314, "Incident Number": 71860150, "Date": "07\/05\/2007", "Time": "02:27 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.982494, -87.913590 ], "Address": "250 W HOLT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.913590123797903, 42.982494110233937 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 315, "Incident Number": 71860182, "Date": "07\/05\/2007", "Time": "04:48 PM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.001138, -87.906508 ], "Address": "318 E SMITH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.906508234579874, 43.001138415987597 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 316, "Incident Number": 71840051, "Date": "07\/03\/2007", "Time": "08:06 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.982181, -87.921555 ], "Address": "3428 S 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.92155493738835, 42.982181497085804 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 317, "Incident Number": 71840093, "Date": "07\/03\/2007", "Time": "11:09 AM", "Police District": 2.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.984926, -87.926376 ], "Address": "3270 S 11TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926376470136944, 42.984926413266777 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 318, "Incident Number": 71840115, "Date": "07\/03\/2007", "Time": "01:21 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.988294, -87.926544 ], "Address": "1104 W OKLAHOMA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.926544, 42.988293511541201 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 319, "Incident Number": 71840170, "Date": "07\/03\/2007", "Time": "05:57 PM", "Police District": 2.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 42.992947, -87.927492 ], "Address": "2831 S 12TH ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.927491522649689, 42.992946586733211 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 320, "Incident Number": 71820103, "Date": "07\/01\/2007", "Time": "01:35 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.005478, -87.897948 ], "Address": "836 E BAY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.897948395377611, 43.005477549021634 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 321, "Incident Number": 71820162, "Date": "07\/01\/2007", "Time": "08:57 PM", "Police District": 2.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 42.992541, -87.925060 ], "Address": "2851 S 10TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 2, "g_clusterK9": 2, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.925059573720148, 42.992541115182632 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 322, "Incident Number": 72120174, "Date": "07\/31\/2007", "Time": "02:52 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.068700, -87.958618 ], "Address": "2733 N 36TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.95861810646872, 43.068699838190327 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 323, "Incident Number": 72120209, "Date": "07\/31\/2007", "Time": "09:20 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.065941, -87.939401 ], "Address": "2117 W CLARKE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.939400919095149, 43.065940506780684 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 324, "Incident Number": 72120216, "Date": "07\/31\/2007", "Time": "08:01 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.071400, -87.963310 ], "Address": "2877 N 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.963309573720139, 43.071400005828394 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 325, "Incident Number": 72120223, "Date": "07\/31\/2007", "Time": "08:50 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.061480, -87.974837 ], "Address": "2333 N 49TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.974836913640729, 43.061479796795325 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 326, "Incident Number": 72110029, "Date": "07\/30\/2007", "Time": "01:09 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060591, -87.951492 ], "Address": "3013 W NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.951491580904843, 43.060590546742617 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 327, "Incident Number": 72110072, "Date": "07\/30\/2007", "Time": "09:04 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070287, -87.922619 ], "Address": "2851 N 9TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.922619260956935, 43.070287104294749 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 328, "Incident Number": 72090137, "Date": "07\/28\/2007", "Time": "03:05 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.057018, -87.957621 ], "Address": "2023 N 35TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.957621139217309, 43.057017502914192 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 329, "Incident Number": 72080013, "Date": "07\/27\/2007", "Time": "01:08 AM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.055955, -87.936430 ], "Address": "1951 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.936430099255361, 43.055955031363624 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 330, "Incident Number": 72080095, "Date": "07\/27\/2007", "Time": "01:11 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.054335, -87.949896 ], "Address": "1822 N 29TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.949895937388362, 43.054334748542914 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 331, "Incident Number": 72080098, "Date": "07\/27\/2007", "Time": "01:26 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060076, -87.926856 ], "Address": "2242 N 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.926855875209412, 43.060076413266785 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 332, "Incident Number": 72080129, "Date": "07\/27\/2007", "Time": "03:46 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.064875, -87.959869 ], "Address": "2525 N 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.95986910646873, 43.064874754371289 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 333, "Incident Number": 72080145, "Date": "07\/27\/2007", "Time": "03:02 PM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.071283, -87.964480 ], "Address": "2873 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.964479573720141, 43.071283005828377 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 334, "Incident Number": 72070156, "Date": "07\/26\/2007", "Time": "02:49 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.062561, -87.957540 ], "Address": "2403 N 35TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.957540055398269, 43.062561199001664 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 335, "Incident Number": 72070227, "Date": "07\/26\/2007", "Time": "08:03 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.053958, -87.933998 ], "Address": "1801 N 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.933997632003951, 43.053957502914187 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 336, "Incident Number": 72070230, "Date": "07\/26\/2007", "Time": "08:15 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.057045, -87.941378 ], "Address": "2029 N 23RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.941378066506772, 43.057044502914181 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 337, "Incident Number": 72060102, "Date": "07\/25\/2007", "Time": "12:51 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.053960, -87.951398 ], "Address": "3000 W LISBON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.951398302239085, 43.053960245657365 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 338, "Incident Number": 72060200, "Date": "07\/25\/2007", "Time": "08:11 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.062840, -87.970039 ], "Address": "2421 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.970039128108795, 43.062840335276121 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 339, "Incident Number": 72050086, "Date": "07\/24\/2007", "Time": "09:25 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.063539, -87.928758 ], "Address": "2463 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928758070805955, 43.063539338882812 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 340, "Incident Number": 72050117, "Date": "07\/24\/2007", "Time": "10:44 AM", "Police District": 3.0, "Offense 1": "THEFT FROM COIN-OPPERATED MACHINES", "Location": [ 43.067940, -87.975233 ], "Address": "4915 W CENTER ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.975233276992313, 43.067940477350319 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 341, "Incident Number": 72050152, "Date": "07\/24\/2007", "Time": "11:57 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.064065, -87.934842 ], "Address": "1735 W WRIGHT ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.93484194754457, 43.064064525102545 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 342, "Incident Number": 72040078, "Date": "07\/23\/2007", "Time": "07:37 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.070058, -87.957438 ], "Address": "2813 N 35TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.957437613682075, 43.070058335276144 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 343, "Incident Number": 72040110, "Date": "07\/23\/2007", "Time": "11:18 AM", "Police District": 3.0, "Offense 1": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 2": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.066314, -87.977426 ], "Address": "2606 N 51ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.977426419066504, 43.066314167638069 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 344, "Incident Number": 72040132, "Date": "07\/23\/2007", "Time": "12:57 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.053365, -87.946077 ], "Address": "2520 W LISBON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.946076577846426, 43.053365376651705 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 345, "Incident Number": 72040166, "Date": "07\/23\/2007", "Time": "03:23 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.062454, -87.947374 ], "Address": "2400 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.947373818766593, 43.062454482406316 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 346, "Incident Number": 72040216, "Date": "07\/23\/2007", "Time": "07:15 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070950, -87.963329 ], "Address": "2857 N 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.96332863200395, 43.070950005828394 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 347, "Incident Number": 72030019, "Date": "07\/22\/2007", "Time": "01:40 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.061636, -87.971308 ], "Address": "2345 N 46TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.971308022649694, 43.061635844018696 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 348, "Incident Number": 72030185, "Date": "07\/22\/2007", "Time": "07:55 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041656, -87.959983 ], "Address": "3707 W KILBOURN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.9599835, 43.041656474032081 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 349, "Incident Number": 72020112, "Date": "07\/21\/2007", "Time": "12:15 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.066430, -87.968820 ], "Address": "2613 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.968819606468728, 43.066430444630384 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 350, "Incident Number": 72010050, "Date": "07\/20\/2007", "Time": "09:09 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070950, -87.963329 ], "Address": "2857 N 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.96332863200395, 43.070950005828394 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 351, "Incident Number": 72010094, "Date": "07\/20\/2007", "Time": "01:54 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.067087, -87.968811 ], "Address": "2645 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.968810606468722, 43.067087444630374 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 352, "Incident Number": 72010116, "Date": "07\/20\/2007", "Time": "03:58 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.061454, -87.921561 ], "Address": "2351 N 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.921560606468717, 43.061453664723871 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 353, "Incident Number": 72010139, "Date": "07\/20\/2007", "Time": "06:05 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.042464, -87.959605 ], "Address": "936 N 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.959604926279852, 43.042463549541225 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 354, "Incident Number": 72000049, "Date": "07\/19\/2007", "Time": "07:43 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.067231, -87.960965 ], "Address": "2650 N 38TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.960965419066497, 43.067231245628705 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 355, "Incident Number": 72000145, "Date": "07\/19\/2007", "Time": "02:19 PM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.067960, -87.947591 ], "Address": "2708 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.947590919095163, 43.067959522072762 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 356, "Incident Number": 71990045, "Date": "07\/18\/2007", "Time": "07:21 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060023, -87.944974 ], "Address": "2234 N 25TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.944973911853126, 43.060023136274452 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 357, "Incident Number": 71990062, "Date": "07\/18\/2007", "Time": "08:53 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.068419, -87.927576 ], "Address": "2734 N 13TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.927575915748278, 43.068419077990654 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 358, "Incident Number": 71990089, "Date": "07\/18\/2007", "Time": "09:32 AM", "Police District": 1.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.053996, -87.929600 ], "Address": "1338 W FOND DU LAC AV #102", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.929599578089338, 43.053995994120029 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 359, "Incident Number": 71990186, "Date": "07\/18\/2007", "Time": "06:53 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.071505, -87.961630 ], "Address": "3821 W LOCUST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.961630332361935, 43.071504539529251 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 360, "Incident Number": 71990189, "Date": "07\/18\/2007", "Time": "06:30 PM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.065244, -87.972452 ], "Address": "2543 N 47TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.97245162479058, 43.065243586733231 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 361, "Incident Number": 71980054, "Date": "07\/17\/2007", "Time": "07:40 AM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.054903, -87.945332 ], "Address": "2502 W VINE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.945332223007682, 43.054903486005969 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 362, "Incident Number": 71980055, "Date": "07\/17\/2007", "Time": "09:58 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.054317, -87.932789 ], "Address": "1821 N 16TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.932789080933503, 43.054316947544578 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 363, "Incident Number": 71980062, "Date": "07\/17\/2007", "Time": "10:48 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.062819, -87.943771 ], "Address": "2455 W MEDFORD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.943771129638023, 43.062819308067468 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 364, "Incident Number": 71980077, "Date": "07\/17\/2007", "Time": "12:18 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.054429, -87.955390 ], "Address": "3300 W LISBON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.955390231057763, 43.054429409400292 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 365, "Incident Number": 71980203, "Date": "07\/17\/2007", "Time": "10:47 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.068844, -87.959808 ], "Address": "2747 N 37TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.95980807703836, 43.068844005828396 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 366, "Incident Number": 71970062, "Date": "07\/16\/2007", "Time": "09:04 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.038832, -87.961513 ], "Address": "3808 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.9615135, 43.038832490478043 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 367, "Incident Number": 71970064, "Date": "07\/16\/2007", "Time": "09:11 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.062551, -87.941472 ], "Address": "2300 W OAK ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.941472147132941, 43.062550787594638 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 368, "Incident Number": 71970190, "Date": "07\/16\/2007", "Time": "08:53 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.068479, -87.948633 ], "Address": "2800 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.948633094789912, 43.068479414453748 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 369, "Incident Number": 71960142, "Date": "07\/15\/2007", "Time": "05:22 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071066, -87.960981 ], "Address": "2863 N 38TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.960980606468723, 43.071065832361938 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 370, "Incident Number": 71950110, "Date": "07\/14\/2007", "Time": "01:30 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.069086, -87.938645 ], "Address": "2756 N 21ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.938645419066503, 43.06908558090484 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 371, "Incident Number": 71950134, "Date": "07\/14\/2007", "Time": "03:46 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.067774, -87.929206 ], "Address": "2700 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.929205921624742, 43.067773618192163 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 372, "Incident Number": 71940027, "Date": "07\/13\/2007", "Time": "01:56 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.068631, -87.941223 ], "Address": "2743 N 23RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.941223048747489, 43.06863063165266 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 373, "Incident Number": 71940053, "Date": "07\/13\/2007", "Time": "06:51 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.055828, -87.945056 ], "Address": "1942 N 25TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.945055886317917, 43.055828497085827 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 374, "Incident Number": 71920091, "Date": "07\/11\/2007", "Time": "12:44 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041747, -87.955646 ], "Address": "3332 W KILBOURN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.955645569078598, 43.041747038532868 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 375, "Incident Number": 71910032, "Date": "07\/10\/2007", "Time": "03:27 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.063306, -87.976176 ], "Address": "2446 N 50TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.976175652153302, 43.063305633541638 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 376, "Incident Number": 71910073, "Date": "07\/10\/2007", "Time": "09:19 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.065097, -87.971144 ], "Address": "2546 N 46TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.971144137238255, 43.065096647417015 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 377, "Incident Number": 71910077, "Date": "07\/10\/2007", "Time": "09:40 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.054829, -87.930773 ], "Address": "1400 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.930772743811033, 43.054829464625698 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 378, "Incident Number": 71910139, "Date": "07\/10\/2007", "Time": "02:49 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.067430, -87.964568 ], "Address": "2663 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.964568080933503, 43.06743 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 379, "Incident Number": 71910146, "Date": "07\/10\/2007", "Time": "03:10 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.065986, -87.949611 ], "Address": "2829 W CLARKE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.949610832361941, 43.065985506780684 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 380, "Incident Number": 71900070, "Date": "07\/09\/2007", "Time": "08:02 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.068889, -87.935564 ], "Address": "2748 N 18TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.935564411853136, 43.068888555369625 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 381, "Incident Number": 71900149, "Date": "07\/09\/2007", "Time": "01:39 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.064613, -87.946178 ], "Address": "2515 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.94617761757722, 43.064613 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 382, "Incident Number": 71900159, "Date": "07\/09\/2007", "Time": "02:39 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.048635, -87.927144 ], "Address": "1200 W VLIET ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.927144194106219, 43.04863519410624 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 383, "Incident Number": 71900171, "Date": "07\/09\/2007", "Time": "03:39 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.058997, -87.955169 ], "Address": "2157 N 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.955168577038364, 43.0589972514571 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 384, "Incident Number": 71900198, "Date": "07\/09\/2007", "Time": "05:16 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.066054, -87.948324 ], "Address": "2730 W CLARKE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.948323832361936, 43.066053533181268 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 385, "Incident Number": 71890085, "Date": "07\/08\/2007", "Time": "11:34 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.065995, -87.949161 ], "Address": "2813 W CLARKE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.94916083236194, 43.065995481245459 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 386, "Incident Number": 71890148, "Date": "07\/08\/2007", "Time": "06:01 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.063658, -87.946144 ], "Address": "2458 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.946143911853127, 43.063657826533557 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 387, "Incident Number": 71890190, "Date": "07\/08\/2007", "Time": "09:45 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.069487, -87.930752 ], "Address": "1451 W HADLEY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.930751667638063, 43.069486506780684 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 388, "Incident Number": 71890192, "Date": "07\/08\/2007", "Time": "10:10 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.060546, -87.946492 ], "Address": "2601 W NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.946491860811349, 43.060546499567309 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 389, "Incident Number": 71880064, "Date": "07\/07\/2007", "Time": "08:39 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.068339, -87.941198 ], "Address": "2721 N 23RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.941198150325803, 43.068339419095167 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 390, "Incident Number": 71880095, "Date": "07\/07\/2007", "Time": "11:14 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.057017, -87.964635 ], "Address": "2022 N 41ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.964635386317923, 43.057017 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 391, "Incident Number": 71870068, "Date": "07\/06\/2007", "Time": "09:41 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.067785, -87.933442 ], "Address": "1600 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.933442468636386, 43.06778549321934 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 392, "Incident Number": 71860127, "Date": "07\/05\/2007", "Time": "12:27 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.066782, -87.922604 ], "Address": "2644 N 9TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.922604411853129, 43.066781664723862 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 393, "Incident Number": 71850066, "Date": "07\/04\/2007", "Time": "08:41 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.064056, -87.930472 ], "Address": "1416 W WRIGHT ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.930472164723867, 43.064055533181282 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 394, "Incident Number": 71850111, "Date": "07\/04\/2007", "Time": "02:00 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056882, -87.965871 ], "Address": "4150 W LISBON AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.965870858156961, 43.056881809625338 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 395, "Incident Number": 71840109, "Date": "07\/03\/2007", "Time": "01:06 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.063740, -87.941379 ], "Address": "2463 N 23RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.941379062611645, 43.063739947544576 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 396, "Incident Number": 71840116, "Date": "07\/03\/2007", "Time": "01:25 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.057494, -87.973578 ], "Address": "2113 N 48TH ST", "e_clusterK2": 0, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 2, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.97357759925535, 43.057494167638055 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 397, "Incident Number": 71840123, "Date": "07\/03\/2007", "Time": "02:17 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.065207, -87.936213 ], "Address": "2546 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.936213386317917, 43.06520730391253 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 398, "Incident Number": 71840155, "Date": "07\/03\/2007", "Time": "05:03 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.066007, -87.940180 ], "Address": "2206 W CLARKE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.940179974464769, 43.066007474897468 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 399, "Incident Number": 71830061, "Date": "07\/02\/2007", "Time": "09:52 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.058410, -87.935097 ], "Address": "2118 N 18TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 5, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.935096663310219, 43.058409789341567 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 400, "Incident Number": 71820180, "Date": "07\/01\/2007", "Time": "10:45 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.067298, -87.961065 ], "Address": "2667 N 38TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.961065476258568, 43.067298055136483 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 401, "Incident Number": 72120135, "Date": "07\/31\/2007", "Time": "01:43 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.110208, -87.997390 ], "Address": "5109 N 69TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.997390106468728, 43.11020783819032 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 402, "Incident Number": 72110170, "Date": "07\/30\/2007", "Time": "04:36 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.089175, -87.978340 ], "Address": "3953 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.978339657539181, 43.089174586733236 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 403, "Incident Number": 72110192, "Date": "07\/30\/2007", "Time": "05:30 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.124148, -87.999616 ], "Address": "5842 N 71ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.999616353569323, 43.124147832361928 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 404, "Incident Number": 72100115, "Date": "07\/29\/2007", "Time": "01:40 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.112042, -87.976485 ], "Address": "5110 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.976485274220096, 43.112041653993387 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 405, "Incident Number": 72100183, "Date": "07\/29\/2007", "Time": "08:46 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.116132, -87.990470 ], "Address": "6313 W CUSTER AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.990470232128388, 43.116131719808941 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 406, "Incident Number": 72090093, "Date": "07\/28\/2007", "Time": "10:57 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.133927, -88.007530 ], "Address": "7701 W MILL RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.00753041618097, 43.133926506780675 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 407, "Incident Number": 72080092, "Date": "07\/27\/2007", "Time": "12:07 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.119667, -88.015761 ], "Address": "8300 W SILVER SPRING DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.015761, 43.119667483264671 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 408, "Incident Number": 72080119, "Date": "07\/27\/2007", "Time": "04:07 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.089805, -87.977731 ], "Address": "5115 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.977731028449412, 43.089804546742613 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 409, "Incident Number": 72070139, "Date": "07\/26\/2007", "Time": "01:33 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.115355, -87.986076 ], "Address": "5384 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.986076352992413, 43.115354580904835 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 410, "Incident Number": 72070173, "Date": "07\/26\/2007", "Time": "04:01 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.112737, -88.024329 ], "Address": "5243 N 90TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.024329404836649, 43.1127373901884 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 411, "Incident Number": 72060049, "Date": "07\/25\/2007", "Time": "07:53 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.096438, -88.005648 ], "Address": "4351 N 75TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.005648146430673, 43.096437586733231 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 412, "Incident Number": 72060241, "Date": "07\/25\/2007", "Time": "10:36 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.103221, -88.006816 ], "Address": "4700 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.006815919066497, 43.103221103525868 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 413, "Incident Number": 72050254, "Date": "07\/24\/2007", "Time": "11:22 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.105681, -87.989076 ], "Address": "6209 W STARK ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.989075533037038, 43.105680714380668 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 414, "Incident Number": 72040084, "Date": "07\/23\/2007", "Time": "09:23 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.097777, -88.003141 ], "Address": "4421 N 73RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.003140566506772, 43.097776658895498 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 415, "Incident Number": 72040178, "Date": "07\/23\/2007", "Time": "04:36 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.096176, -87.976929 ], "Address": "4339 N 51ST BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.976928584828627, 43.096175863725534 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 416, "Incident Number": 72040217, "Date": "07\/23\/2007", "Time": "07:21 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.123742, -87.995906 ], "Address": "5826 N 68TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.995906342460813, 43.123742245628705 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 417, "Incident Number": 72030060, "Date": "07\/22\/2007", "Time": "06:53 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090134, -87.984393 ], "Address": "5700 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.984392972630985, 43.090134401484285 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 418, "Incident Number": 72030063, "Date": "07\/22\/2007", "Time": "07:44 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.103646, -88.000626 ], "Address": "4730 N 71ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.000626386317919, 43.103646 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 419, "Incident Number": 72030111, "Date": "07\/22\/2007", "Time": "12:41 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.112192, -88.019564 ], "Address": "8607 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.0195635, 43.112191509521963 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 420, "Incident Number": 72030155, "Date": "07\/22\/2007", "Time": "04:07 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.093412, -87.984927 ], "Address": "5801 W HOPE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.984926758227232, 43.093411919825314 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 421, "Incident Number": 72020179, "Date": "07\/21\/2007", "Time": "08:00 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.119663, -88.016184 ], "Address": "8400 W SILVER SPRING DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.016184, 43.119662508222973 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 422, "Incident Number": 72010030, "Date": "07\/20\/2007", "Time": "03:49 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.117714, -88.027753 ], "Address": "9216 W BIRCH AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 1, "e_clusterK9": 7, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.02775252553522, 43.117713511541183 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 423, "Incident Number": 72010060, "Date": "07\/20\/2007", "Time": "09:54 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.097242, -88.001590 ], "Address": "7132 W CONGRESS ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.001590332361928, 43.097242493219319 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 424, "Incident Number": 72000146, "Date": "07\/19\/2007", "Time": "03:53 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.106535, -88.015944 ], "Address": "4854 N 84TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.015944140215865, 43.106535342373114 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 425, "Incident Number": 71990054, "Date": "07\/18\/2007", "Time": "08:16 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.109594, -88.001380 ], "Address": "7169 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.00138015072983, 43.109593524265811 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 426, "Incident Number": 71990110, "Date": "07\/18\/2007", "Time": "12:21 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.094863, -87.972260 ], "Address": "4269 N 47TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.972259660857389, 43.094862586733228 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 427, "Incident Number": 71990193, "Date": "07\/18\/2007", "Time": "07:25 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.102171, -87.996862 ], "Address": "4663 N 68TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.996861595360215, 43.102171089647413 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 428, "Incident Number": 71980031, "Date": "07\/17\/2007", "Time": "04:52 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.123302, -88.019063 ], "Address": "8665 W FOND DU LAC AV #4", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.019062867072421, 43.123302147642761 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 429, "Incident Number": 71980081, "Date": "07\/17\/2007", "Time": "12:23 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087445, -87.978295 ], "Address": "3856 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.978295353569322, 43.087445245628714 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 430, "Incident Number": 71980090, "Date": "07\/17\/2007", "Time": "01:04 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.103982, -87.992371 ], "Address": "6429 W LEON TR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.992370611316161, 43.103982322494183 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 431, "Incident Number": 71980178, "Date": "07\/17\/2007", "Time": "09:01 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.133979, -88.002299 ], "Address": "7301 W MILL RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.002299334023249, 43.133979234912665 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 432, "Incident Number": 71970069, "Date": "07\/16\/2007", "Time": "10:09 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.102267, -87.991752 ], "Address": "6414 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.991751647354306, 43.102266819608666 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 433, "Incident Number": 71970148, "Date": "07\/16\/2007", "Time": "04:58 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.119675, -88.003510 ], "Address": "7400 W SILVER SPRING DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.003509736886144, 43.119675449362255 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 434, "Incident Number": 71970169, "Date": "07\/16\/2007", "Time": "06:45 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.093609, -87.991981 ], "Address": "4141 N 64TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.991980517743997, 43.09360902997863 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 435, "Incident Number": 71960064, "Date": "07\/15\/2007", "Time": "10:02 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.109794, -88.014769 ], "Address": "5053 N 83RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.014769106468719, 43.109793586733218 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 436, "Incident Number": 71960087, "Date": "07\/15\/2007", "Time": "01:16 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.098756, -87.989273 ], "Address": "6162 W MEDFORD AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.989272749495186, 43.098755845143891 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 437, "Incident Number": 71940095, "Date": "07\/13\/2007", "Time": "12:12 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.105635, -88.003234 ], "Address": "4826 N 73RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.003233835247471, 43.105634832361943 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 438, "Incident Number": 71930072, "Date": "07\/12\/2007", "Time": "11:43 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090057, -87.991272 ], "Address": "6312 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.99127225145709, 43.090057486005975 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 439, "Incident Number": 71910095, "Date": "07\/10\/2007", "Time": "11:09 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.101653, -87.990973 ], "Address": "6324 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.990973414219056, 43.101652703041047 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 440, "Incident Number": 71910100, "Date": "07\/10\/2007", "Time": "10:43 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.094841, -87.980744 ], "Address": "5374 W LEON TR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.980744275030418, 43.094840845143885 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 441, "Incident Number": 71910111, "Date": "07\/10\/2007", "Time": "12:02 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.109505, -87.986321 ], "Address": "5053 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.986321164752525, 43.109504612268438 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 442, "Incident Number": 71910115, "Date": "07\/10\/2007", "Time": "12:51 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.106193, -88.000698 ], "Address": "4857 N 71ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.000698124790574, 43.106192832361927 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 443, "Incident Number": 71910119, "Date": "07\/10\/2007", "Time": "09:17 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.133880, -88.020662 ], "Address": "8713 W MILL RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.0206615, 43.133880470136951 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 444, "Incident Number": 71910171, "Date": "07\/10\/2007", "Time": "04:29 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.091106, -87.980700 ], "Address": "4061 N 54TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.980700143689376, 43.091105915949839 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 445, "Incident Number": 71910235, "Date": "07\/10\/2007", "Time": "10:08 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.091982, -87.995811 ], "Address": "4103 N 67TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.995810606468723, 43.09198241909516 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 446, "Incident Number": 71900076, "Date": "07\/09\/2007", "Time": "08:28 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.108302, -87.999679 ], "Address": "7027 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.999678710542852, 43.108302154856126 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 447, "Incident Number": 71900117, "Date": "07\/09\/2007", "Time": "10:42 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.093466, -87.985053 ], "Address": "5825 W HOPE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.985053251457089, 43.093465513994033 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 448, "Incident Number": 71900232, "Date": "07\/09\/2007", "Time": "06:35 PM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.122638, -88.023210 ], "Address": "5757 N 89TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.023209592042008, 43.122637508742571 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 449, "Incident Number": 71890125, "Date": "07\/08\/2007", "Time": "02:25 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.121970, -88.034501 ], "Address": "5729 N 98TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.034500632003954, 43.121970282820712 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 450, "Incident Number": 71870056, "Date": "07\/06\/2007", "Time": "08:12 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090045, -87.995111 ], "Address": "6620 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.995110562178951, 43.090045497691385 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 451, "Incident Number": 71870080, "Date": "07\/06\/2007", "Time": "10:54 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.110612, -88.002779 ], "Address": "7325 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.002778643124856, 43.110612292160397 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 452, "Incident Number": 71870153, "Date": "07\/06\/2007", "Time": "06:35 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.117557, -88.030325 ], "Address": "9402 W BECKETT AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 1, "e_clusterK9": 7, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.030325275030421, 43.117556845143888 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 453, "Incident Number": 71870182, "Date": "07\/06\/2007", "Time": "09:35 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.118188, -87.994680 ], "Address": "6713 W SHERIDAN AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.994680453721244, 43.118188050420464 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 454, "Incident Number": 71860093, "Date": "07\/05\/2007", "Time": "10:42 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.095465, -87.979460 ], "Address": "4303 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979460073720148, 43.095465031363602 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 455, "Incident Number": 71860116, "Date": "07\/05\/2007", "Time": "11:47 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.116353, -88.006168 ], "Address": "5401 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.006168154220944, 43.116352522621042 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 456, "Incident Number": 71860119, "Date": "07\/05\/2007", "Time": "11:58 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.113118, -88.013191 ], "Address": "8203 W CUSTER AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.013191332361927, 43.113117532315883 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 457, "Incident Number": 71850072, "Date": "07\/04\/2007", "Time": "07:41 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.112310, -88.011884 ], "Address": "8104 W VILLARD AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.011883978108102, 43.112310275120983 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 458, "Incident Number": 71840038, "Date": "07\/03\/2007", "Time": "06:12 AM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.105146, -88.006992 ], "Address": "7616 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.006991899711224, 43.105146265992886 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 459, "Incident Number": 71840173, "Date": "07\/03\/2007", "Time": "06:24 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090042, -87.999791 ], "Address": "7000 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.999790667638067, 43.090041518754568 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 460, "Incident Number": 71830047, "Date": "07\/02\/2007", "Time": "08:27 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.087456, -87.979569 ], "Address": "3857 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979569132003945, 43.087455754371291 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 461, "Incident Number": 71830097, "Date": "07\/02\/2007", "Time": "12:56 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.101624, -87.987780 ], "Address": "6015 W SPENCER PL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.987780359859059, 43.101624154856133 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 462, "Incident Number": 71830169, "Date": "07\/02\/2007", "Time": "05:52 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087963, -87.984574 ], "Address": "3878 N 57TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.984574091407765, 43.087963043308832 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 463, "Incident Number": 71830190, "Date": "07\/02\/2007", "Time": "07:25 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.120395, -87.991111 ], "Address": "5639 N 64TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.991110657539181, 43.120395 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 464, "Incident Number": 72120113, "Date": "07\/31\/2007", "Time": "11:29 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074333, -87.900309 ], "Address": "3065 N BREMEN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.900308599255354, 43.074332696087481 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 465, "Incident Number": 72110231, "Date": "07\/30\/2007", "Time": "08:02 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.047065, -87.914349 ], "Address": "1320 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914348543921236, 43.047064844984206 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 466, "Incident Number": 72100027, "Date": "07\/29\/2007", "Time": "02:11 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.047136, -87.910682 ], "Address": "124 E KNAPP ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.910681936505441, 43.047136110672071 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 467, "Incident Number": 72100091, "Date": "07\/29\/2007", "Time": "11:30 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.081548, -87.888855 ], "Address": "1700 E PROVIDENCE AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.888854764051104, 43.081548235948894 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 468, "Incident Number": 72090019, "Date": "07\/28\/2007", "Time": "01:56 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060181, -87.886744 ], "Address": "2300 N CRAMER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.886743953353388, 43.060180633414909 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 469, "Incident Number": 72090122, "Date": "07\/28\/2007", "Time": "12:21 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049743, -87.913863 ], "Address": "255 W CHERRY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.913863317694634, 43.049742622307363 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 470, "Incident Number": 72090133, "Date": "07\/28\/2007", "Time": "02:30 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048145, -87.906654 ], "Address": "455 E OGDEN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.906654167638067, 43.048144521207412 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 471, "Incident Number": 72090134, "Date": "07\/28\/2007", "Time": "02:55 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.064083, -87.885546 ], "Address": "2510 N MURRAY AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.885545875209417, 43.064082922009362 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 472, "Incident Number": 72090219, "Date": "07\/28\/2007", "Time": "11:04 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.072118, -87.884186 ], "Address": "2954 N FREDERICK AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.88418637852763, 43.072117994171634 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 473, "Incident Number": 72080099, "Date": "07\/27\/2007", "Time": "12:50 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.070238, -87.880551 ], "Address": "2837 N PROSPECT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.880551132003944, 43.07023794754457 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 474, "Incident Number": 72070016, "Date": "07\/26\/2007", "Time": "02:16 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.059697, -87.887265 ], "Address": "1821 E KENILWORTH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.887264851786, 43.059696783583455 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 475, "Incident Number": 72070163, "Date": "07\/26\/2007", "Time": "03:44 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060096, -87.880300 ], "Address": "2300 N LAKE DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.880299928243161, 43.060096374205315 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 476, "Incident Number": 72070184, "Date": "07\/26\/2007", "Time": "04:41 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.046988, -87.896787 ], "Address": "1200 E KNAPP ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.896787323504682, 43.046988192014226 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 477, "Incident Number": 72060053, "Date": "07\/25\/2007", "Time": "08:07 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.069878, -87.899112 ], "Address": "2826 N WEIL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.899112400744642, 43.069877832361954 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 478, "Incident Number": 72060057, "Date": "07\/25\/2007", "Time": "08:00 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.066378, -87.884308 ], "Address": "2605 N FREDERICK AV #106", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.884308092042005, 43.066377838190334 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 479, "Incident Number": 72060065, "Date": "07\/25\/2007", "Time": "09:11 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071327, -87.890336 ], "Address": "2910 N NEWHALL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.890336426279859, 43.07132666472387 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 480, "Incident Number": 72060093, "Date": "07\/25\/2007", "Time": "12:07 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.062624, -87.888092 ], "Address": "2459 N OAKLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.888091577038367, 43.062624251457095 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 481, "Incident Number": 72060158, "Date": "07\/25\/2007", "Time": "05:04 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.066378, -87.884308 ], "Address": "2605 N FREDERICK AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.884308092042005, 43.066377838190334 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 482, "Incident Number": 72060245, "Date": "07\/25\/2007", "Time": "11:14 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.067391, -87.904887 ], "Address": "533 E CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.90488708316002, 43.067390924857506 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 483, "Incident Number": 72050063, "Date": "07\/24\/2007", "Time": "08:38 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.050966, -87.892566 ], "Address": "1609 N PROSPECT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.89256618336286, 43.050965928414662 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 484, "Incident Number": 72050175, "Date": "07\/24\/2007", "Time": "03:58 PM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.066927, -87.883108 ], "Address": "2637 N MARYLAND AV #31", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.883108106468725, 43.066926586733217 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 485, "Incident Number": 72050207, "Date": "07\/24\/2007", "Time": "07:10 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.061004, -87.879436 ], "Address": "2350 N LAKE DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.879436306909113, 43.061003637449083 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 486, "Incident Number": 72040067, "Date": "07\/23\/2007", "Time": "07:07 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.076719, -87.873310 ], "Address": "3255 N MARIETTA AV #UPPER", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.87331005150314, 43.076719257285475 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 487, "Incident Number": 72040140, "Date": "07\/23\/2007", "Time": "01:36 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.066070, -87.882651 ], "Address": "2205 E BELLEVIEW PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.882651, 43.06607048845882 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 488, "Incident Number": 72040258, "Date": "07\/23\/2007", "Time": "10:44 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.046838, -87.911208 ], "Address": "1247 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.911208077038367, 43.046837518725901 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 489, "Incident Number": 72030029, "Date": "07\/22\/2007", "Time": "01:36 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.046507, -87.910935 ], "Address": "1240 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.910934651985187, 43.046506918291342 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 490, "Incident Number": 72030078, "Date": "07\/22\/2007", "Time": "09:21 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.059396, -87.882700 ], "Address": "2260 N SUMMIT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.882699747821761, 43.059396049945271 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 491, "Incident Number": 72030095, "Date": "07\/22\/2007", "Time": "10:48 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.046838, -87.911208 ], "Address": "1247 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.911208077038367, 43.046837518725901 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 492, "Incident Number": 72030122, "Date": "07\/22\/2007", "Time": "01:17 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.054847, -87.890509 ], "Address": "1840 N FARWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.890508641381686, 43.054846838450132 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 493, "Incident Number": 72030143, "Date": "07\/22\/2007", "Time": "01:40 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.055537, -87.889840 ], "Address": "1920 N FARWELL AV #406", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.88983967121608, 43.055537166512899 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 494, "Incident Number": 72030154, "Date": "07\/22\/2007", "Time": "04:47 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.050195, -87.903468 ], "Address": "1535 N VAN BUREN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.90346759925535, 43.05019528282071 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 495, "Incident Number": 72030196, "Date": "07\/22\/2007", "Time": "08:59 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.060232, -87.899583 ], "Address": "924 E NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.899583106440062, 43.060231507646044 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 496, "Incident Number": 72020104, "Date": "07\/21\/2007", "Time": "11:10 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.065873, -87.897822 ], "Address": "2612 N HUMBOLDT BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.897822352992407, 43.065872664723884 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 497, "Incident Number": 72020110, "Date": "07\/21\/2007", "Time": "11:23 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.057247, -87.888265 ], "Address": "2019 N FARWELL AV #209", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.888264698193609, 43.057247227047064 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 498, "Incident Number": 72020121, "Date": "07\/21\/2007", "Time": "12:00 PM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.072442, -87.889112 ], "Address": "2964 N BARTLETT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.889112426279851, 43.072442245628707 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 499, "Incident Number": 72010038, "Date": "07\/20\/2007", "Time": "07:42 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.077383, -87.898976 ], "Address": "3236 N WEIL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.898976426279859, 43.077382826533551 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 500, "Incident Number": 72000012, "Date": "07\/19\/2007", "Time": "12:14 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060154, -87.886660 ], "Address": "1910 E NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.8866605, 43.060154489324198 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 501, "Incident Number": 72000061, "Date": "07\/19\/2007", "Time": "09:23 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.062516, -87.900395 ], "Address": "2418 N BREMEN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.900394900744644, 43.062515832361953 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 502, "Incident Number": 72000131, "Date": "07\/19\/2007", "Time": "02:14 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.072393, -87.884158 ], "Address": "2976 N FREDERICK AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.884158144953318, 43.072392748258089 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 503, "Incident Number": 71990160, "Date": "07\/18\/2007", "Time": "04:43 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.049457, -87.903227 ], "Address": "708 E LYON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.903227391346192, 43.049456765837888 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 504, "Incident Number": 71980042, "Date": "07\/17\/2007", "Time": "07:42 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.066826, -87.886778 ], "Address": "2631 N CRAMER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.886778073720137, 43.066826360811348 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 505, "Incident Number": 71980049, "Date": "07\/17\/2007", "Time": "08:58 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.073199, -87.881663 ], "Address": "3018 N FARWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.881663371314261, 43.073199303912531 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 506, "Incident Number": 71970167, "Date": "07\/16\/2007", "Time": "07:00 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074556, -87.881963 ], "Address": "2223 E KENWOOD BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.8819625, 43.07455553952925 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 507, "Incident Number": 71970170, "Date": "07\/16\/2007", "Time": "07:29 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.054539, -87.890896 ], "Address": "1827 N FARWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.890895789225993, 43.054539117692791 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 508, "Incident Number": 71950067, "Date": "07\/14\/2007", "Time": "09:43 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049454, -87.914293 ], "Address": "1470 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.91429333516362, 43.049454312340949 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 509, "Incident Number": 71940052, "Date": "07\/13\/2007", "Time": "07:54 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.052356, -87.902169 ], "Address": "1673 N CASS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.902169132003948, 43.052355586733228 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 510, "Incident Number": 71940060, "Date": "07\/13\/2007", "Time": "08:19 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.079771, -87.898464 ], "Address": "1006 E TOWNSEND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.898463832361941, 43.079771482110829 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 511, "Incident Number": 71940063, "Date": "07\/13\/2007", "Time": "08:38 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.064190, -87.905314 ], "Address": "2516 N HOLTON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.905314396849491, 43.064189832361933 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 512, "Incident Number": 71940073, "Date": "07\/13\/2007", "Time": "08:50 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.077510, -87.901501 ], "Address": "3255 N FRATNEY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.90150113979422, 43.077509863725538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 513, "Incident Number": 71930149, "Date": "07\/12\/2007", "Time": "04:38 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.051594, -87.893538 ], "Address": "1614 N FARWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.893537780570341, 43.051594108229075 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 514, "Incident Number": 71920051, "Date": "07\/11\/2007", "Time": "09:05 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.074045, -87.874465 ], "Address": "3058 N SHEPARD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.874464842460824, 43.074044832361949 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 515, "Incident Number": 71920053, "Date": "07\/11\/2007", "Time": "08:31 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.055567, -87.889810 ], "Address": "1920 N FARWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.889809664002726, 43.055567089907228 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 516, "Incident Number": 71920113, "Date": "07\/11\/2007", "Time": "12:48 PM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.060546, -87.904187 ], "Address": "2315A N BOOTH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.904187455758674, 43.060546187389328 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 517, "Incident Number": 71910041, "Date": "07\/10\/2007", "Time": "06:23 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.075368, -87.897819 ], "Address": "3127 N HUMBOLDT BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.897819124790587, 43.075368115182641 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 518, "Incident Number": 71910089, "Date": "07\/10\/2007", "Time": "10:34 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.080319, -87.898900 ], "Address": "3425 N WEIL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.898899580933502, 43.080319005828386 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 519, "Incident Number": 71910182, "Date": "07\/10\/2007", "Time": "05:29 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.065664, -87.876756 ], "Address": "2605 N SUMMIT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.87675635472317, 43.06566409215759 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 520, "Incident Number": 71910246, "Date": "07\/10\/2007", "Time": "08:41 PM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.072937, -87.881672 ], "Address": "3002 N FARWELL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.881672411853131, 43.072937413266772 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 521, "Incident Number": 71900130, "Date": "07\/09\/2007", "Time": "11:50 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.078590, -87.897730 ], "Address": "3309 N HUMBOLDT BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.897730099255355, 43.078590199001667 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 522, "Incident Number": 71900131, "Date": "07\/09\/2007", "Time": "11:52 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049360, -87.904692 ], "Address": "605 E LYON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.904692040538862, 43.049360476773401 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 523, "Incident Number": 71900187, "Date": "07\/09\/2007", "Time": "04:47 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.077018, -87.873323 ], "Address": "3271 N MARIETTA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.87332344951254, 43.077018089883801 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 524, "Incident Number": 71900224, "Date": "07\/09\/2007", "Time": "06:53 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071444, -87.876859 ], "Address": "2919 N HACKETT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.876858580933501, 43.071444419095172 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 525, "Incident Number": 71890056, "Date": "07\/08\/2007", "Time": "06:53 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.050489, -87.898750 ], "Address": "1027 E PLEASANT ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.898750470165609, 43.05048949899038 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 526, "Incident Number": 71890071, "Date": "07\/08\/2007", "Time": "10:10 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.068159, -87.886769 ], "Address": "2739 N CRAMER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.886768577038367, 43.068159335276135 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 527, "Incident Number": 71890103, "Date": "07\/08\/2007", "Time": "12:58 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.046131, -87.907263 ], "Address": "1228 N MILWAUKEE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.907262651983572, 43.046131045859219 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 528, "Incident Number": 71890197, "Date": "07\/08\/2007", "Time": "10:35 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.068717, -87.884281 ], "Address": "2761 N FREDERICK AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.884281092042002, 43.068717167638056 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 529, "Incident Number": 71880111, "Date": "07\/07\/2007", "Time": "01:14 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.077815, -87.897586 ], "Address": "3258 N HUMBOLDT BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.897585926279845, 43.077815077990664 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 530, "Incident Number": 71880120, "Date": "07\/07\/2007", "Time": "02:08 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.061113, -87.899262 ], "Address": "2345 N WEIL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.899261635322162, 43.061112586733231 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 531, "Incident Number": 71880184, "Date": "07\/07\/2007", "Time": "08:39 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070632, -87.901482 ], "Address": "2860 N FRATNEY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.901482470136955, 43.07063240743841 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 532, "Incident Number": 71870012, "Date": "07\/06\/2007", "Time": "01:23 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.047431, -87.911215 ], "Address": "1335 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.911215093076152, 43.047431229917315 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 533, "Incident Number": 71870094, "Date": "07\/06\/2007", "Time": "12:29 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.069475, -87.900412 ], "Address": "2805 N BREMEN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.900411580933493, 43.069474592561619 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 534, "Incident Number": 71870179, "Date": "07\/06\/2007", "Time": "09:07 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.073829, -87.885460 ], "Address": "3047 N MURRAY AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.885459573720141, 43.073829167638053 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 535, "Incident Number": 71860135, "Date": "07\/05\/2007", "Time": "01:02 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049423, -87.905430 ], "Address": "514 E LYON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.905429832361932, 43.049423482110825 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 536, "Incident Number": 71860148, "Date": "07\/05\/2007", "Time": "02:21 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049836, -87.896819 ], "Address": "1500 N WARREN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.896819433256596, 43.0498363741305 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 537, "Incident Number": 71860220, "Date": "07\/05\/2007", "Time": "06:52 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.057286, -87.884612 ], "Address": "2106 E WOODSTOCK PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.88461220590402, 43.057286028817224 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 538, "Incident Number": 71840065, "Date": "07\/03\/2007", "Time": "09:24 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056447, -87.890665 ], "Address": "1935 N OAKLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.890665163079078, 43.056447421605327 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 539, "Incident Number": 71840066, "Date": "07\/03\/2007", "Time": "09:25 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056447, -87.890665 ], "Address": "1935 N OAKLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.890665163079078, 43.056447421605327 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 540, "Incident Number": 71840217, "Date": "07\/03\/2007", "Time": "10:21 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.051293, -87.903372 ], "Address": "1630 N VAN BUREN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.903372429598079, 43.051293136274467 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 541, "Incident Number": 71830172, "Date": "07\/02\/2007", "Time": "06:09 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.052228, -87.894579 ], "Address": "1640 N WARREN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.894578993450466, 43.052227534537607 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 542, "Incident Number": 71820067, "Date": "07\/01\/2007", "Time": "10:07 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.080679, -87.887741 ], "Address": "3449 N OAKLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.88774107372015, 43.080679089647418 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 543, "Incident Number": 71820194, "Date": "07\/01\/2007", "Time": "07:04 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049360, -87.904692 ], "Address": "605 E LYON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.904692040538862, 43.049360476773401 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 544, "Incident Number": 72120147, "Date": "07\/31\/2007", "Time": "02:30 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044640, -87.951672 ], "Address": "2936 W HIGHLAND BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.95167191618097, 43.044640457152525 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 545, "Incident Number": 72120157, "Date": "07\/31\/2007", "Time": "03:20 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.051041, -87.955242 ], "Address": "1542 N 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.955242393531279, 43.051041387731544 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 546, "Incident Number": 72120181, "Date": "07\/31\/2007", "Time": "05:05 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.044640, -87.951991 ], "Address": "3006 W HIGHLAND BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.95199141618096, 43.044640457152525 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 547, "Incident Number": 72120222, "Date": "07\/31\/2007", "Time": "08:45 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.027974, -87.903388 ], "Address": "509 E ERIE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 2, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 1, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.903388066362552, 43.027974493190662 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 548, "Incident Number": 72120239, "Date": "07\/31\/2007", "Time": "11:08 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.045418, -87.955251 ], "Address": "1135 N 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.955250529863051, 43.04541759256162 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 549, "Incident Number": 72110122, "Date": "07\/30\/2007", "Time": "12:15 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.042687, -87.931530 ], "Address": "953 N 15TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.93153007703836, 43.04268747016561 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 550, "Incident Number": 72110181, "Date": "07\/30\/2007", "Time": "03:53 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.041949, -87.905630 ], "Address": "833 N JEFFERSON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.905629752870738, 43.041949009435065 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 551, "Incident Number": 72110198, "Date": "07\/30\/2007", "Time": "05:49 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.034171, -87.902176 ], "Address": "300 N VAN BUREN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.902175932512279, 43.03417050732893 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 552, "Incident Number": 72110209, "Date": "07\/30\/2007", "Time": "06:38 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038875, -87.923043 ], "Address": "700 N 9TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.923042613533866, 43.038874787178429 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 553, "Incident Number": 72100079, "Date": "07\/29\/2007", "Time": "10:25 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044640, -87.951672 ], "Address": "2936 W HIGHLAND BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.95167191618097, 43.044640457152525 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 554, "Incident Number": 72100095, "Date": "07\/29\/2007", "Time": "11:58 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.049465, -87.946196 ], "Address": "1436 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.946196419066496, 43.04946524562871 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 555, "Incident Number": 72100138, "Date": "07\/29\/2007", "Time": "04:41 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.041671, -87.940580 ], "Address": "2200 W KILBOURN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.940580269778948, 43.041671491054942 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 556, "Incident Number": 72100144, "Date": "07\/29\/2007", "Time": "05:00 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038682, -87.922281 ], "Address": "819 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.922280618933542, 43.038681561169355 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 557, "Incident Number": 72100201, "Date": "07\/29\/2007", "Time": "10:50 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038780, -87.919934 ], "Address": "633 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.919933919095158, 43.038779505626835 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 558, "Incident Number": 72090033, "Date": "07\/28\/2007", "Time": "02:56 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.042446, -87.905092 ], "Address": "543 E KILBOURN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.905091936617055, 43.042446485123101 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 559, "Incident Number": 72090056, "Date": "07\/28\/2007", "Time": "02:07 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.050349, -87.937813 ], "Address": "1527 N 20TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.937812917333545, 43.050348544333637 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 560, "Incident Number": 72090116, "Date": "07\/28\/2007", "Time": "12:36 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.038570, -87.940631 ], "Address": "2201 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.940630681522634, 43.038569818477349 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 561, "Incident Number": 72090158, "Date": "07\/28\/2007", "Time": "04:55 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.038753, -87.931162 ], "Address": "1442 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.931161558860722, 43.038753458306367 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 562, "Incident Number": 72090164, "Date": "07\/28\/2007", "Time": "05:24 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.045862, -87.955852 ], "Address": "3319 W JUNEAU AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.955851776992318, 43.045861528420758 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 563, "Incident Number": 72090165, "Date": "07\/28\/2007", "Time": "05:28 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.047393, -87.950286 ], "Address": "2916 W MC KINLEY BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.95028631333561, 43.047393192528638 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 564, "Incident Number": 72100006, "Date": "07\/28\/2007", "Time": "11:30 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043874, -87.912193 ], "Address": "1050 N EDISON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912193024764335, 43.04387350028437 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 565, "Incident Number": 72080037, "Date": "07\/27\/2007", "Time": "05:14 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.044640, -87.950893 ], "Address": "2900 W HIGHLAND BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.950893416180961, 43.044640457152525 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 566, "Incident Number": 72080156, "Date": "07\/27\/2007", "Time": "07:18 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.036460, -87.904950 ], "Address": "500 N JEFFERSON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.904950134522224, 43.036460107892225 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 567, "Incident Number": 72070154, "Date": "07\/26\/2007", "Time": "01:29 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.037656, -87.908923 ], "Address": "618 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.908923152418154, 43.037656493330331 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 568, "Incident Number": 72070190, "Date": "07\/26\/2007", "Time": "02:36 PM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.041968, -87.937833 ], "Address": "912 N 20TH ST #3", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.937833013994037, 43.041967878988999 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 569, "Incident Number": 72060050, "Date": "07\/25\/2007", "Time": "07:56 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.036352, -87.940697 ], "Address": "515 N 22ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.940697175019778, 43.036351727970946 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 570, "Incident Number": 72060061, "Date": "07\/25\/2007", "Time": "08:51 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.036188, -87.940730 ], "Address": "2200 W CLYBOURN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.940729516972425, 43.036188339023916 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 571, "Incident Number": 72060152, "Date": "07\/25\/2007", "Time": "04:40 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.045224, -87.907308 ], "Address": "1121 N MILWAUKEE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.907307796727821, 43.045224370246416 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 572, "Incident Number": 72050072, "Date": "07\/24\/2007", "Time": "09:21 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.042861, -87.950758 ], "Address": "953 N 29TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.950758209850378, 43.042861341104498 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 573, "Incident Number": 72050079, "Date": "07\/24\/2007", "Time": "08:20 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048175, -87.895179 ], "Address": "1400 N PROSPECT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.895178576865476, 43.048175228691846 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 574, "Incident Number": 72050100, "Date": "07\/24\/2007", "Time": "11:27 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.037521, -87.939873 ], "Address": "2114 W MICHIGAN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.939873, 43.03752147879262 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 575, "Incident Number": 72050177, "Date": "07\/24\/2007", "Time": "05:23 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043317, -87.931558 ], "Address": "1500 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.931558184808893, 43.043316683970431 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 576, "Incident Number": 72040059, "Date": "07\/23\/2007", "Time": "07:35 AM", "Police District": 1.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.043233, -87.923137 ], "Address": "900 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.92313671923516, 43.043233052002165 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 577, "Incident Number": 72040082, "Date": "07\/23\/2007", "Time": "08:59 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.047331, -87.942858 ], "Address": "2400 W MC KINLEY AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.942857642124736, 43.047330735675807 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 578, "Incident Number": 72040121, "Date": "07\/23\/2007", "Time": "11:52 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.042114, -87.933237 ], "Address": "927 N RENEE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.933237010588897, 43.042114142102832 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 579, "Incident Number": 72040147, "Date": "07\/23\/2007", "Time": "02:07 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.041558, -87.935709 ], "Address": "1821 W KILBOURN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.935708650493424, 43.041557814683536 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 580, "Incident Number": 72040186, "Date": "07\/23\/2007", "Time": "04:08 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.035724, -87.949290 ], "Address": "443 N 28TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.949289522649693, 43.035724257285466 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 581, "Incident Number": 72040213, "Date": "07\/23\/2007", "Time": "04:24 PM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.045139, -87.939089 ], "Address": "1131 N 21ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.939088997114467, 43.045138844018709 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 582, "Incident Number": 72030023, "Date": "07\/22\/2007", "Time": "02:13 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038776, -87.946952 ], "Address": "2616 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.946952474464766, 43.038776460470736 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 583, "Incident Number": 72030076, "Date": "07\/22\/2007", "Time": "09:09 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049007, -87.935059 ], "Address": "1410 N 18TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.935058513734234, 43.049006635005064 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 584, "Incident Number": 72030115, "Date": "07\/22\/2007", "Time": "12:59 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.043204, -87.934932 ], "Address": "1725 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.934932419095162, 43.043204495672178 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 585, "Incident Number": 72030164, "Date": "07\/22\/2007", "Time": "04:12 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048600, -87.938271 ], "Address": "2028 W VLIET ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.938270832361937, 43.04859952596793 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 586, "Incident Number": 72030191, "Date": "07\/22\/2007", "Time": "08:21 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043010, -87.916191 ], "Address": "400 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.916191186962166, 43.043010186962178 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 587, "Incident Number": 72030212, "Date": "07\/22\/2007", "Time": "11:21 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.045139, -87.939089 ], "Address": "1131 N 21ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.939088997114467, 43.045138844018709 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 588, "Incident Number": 72020088, "Date": "07\/21\/2007", "Time": "09:18 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.032807, -87.906955 ], "Address": "204 N BROADWAY", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.906954835734595, 43.0328066928436 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 589, "Incident Number": 72020116, "Date": "07\/21\/2007", "Time": "12:20 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038775, -87.919402 ], "Address": "611 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.91940194463038, 43.038774549483918 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 590, "Incident Number": 72020157, "Date": "07\/21\/2007", "Time": "04:31 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.040313, -87.923239 ], "Address": "910 W WELLS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.923238622685631, 43.040312686364857 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 591, "Incident Number": 72010037, "Date": "07\/20\/2007", "Time": "07:40 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.037390, -87.919833 ], "Address": "633 W MICHIGAN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.919832970165615, 43.037389502308606 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 592, "Incident Number": 72010105, "Date": "07\/20\/2007", "Time": "03:00 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.048574, -87.943872 ], "Address": "2433 W VLIET ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.943871923394326, 43.048574488458826 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 593, "Incident Number": 72010143, "Date": "07\/20\/2007", "Time": "06:52 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.045872, -87.956000 ], "Address": "3325 W JUNEAU AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.956000276992313, 43.045871502885532 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 594, "Incident Number": 72010185, "Date": "07\/20\/2007", "Time": "10:59 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038928, -87.903940 ], "Address": "700 N JACKSON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.903939701820661, 43.038927959413222 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 595, "Incident Number": 72020004, "Date": "07\/20\/2007", "Time": "11:10 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.039341, -87.912994 ], "Address": "724 N 2ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912993991200111, 43.039340769634727 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 596, "Incident Number": 72000148, "Date": "07\/19\/2007", "Time": "04:03 PM", "Police District": 1.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.043811, -87.903942 ], "Address": "626 E STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.903942359426367, 43.043811482687744 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 597, "Incident Number": 71990053, "Date": "07\/18\/2007", "Time": "08:11 AM", "Police District": 1.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.043055, -87.920964 ], "Address": "750 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.920964339616305, 43.043055032406663 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 598, "Incident Number": 71990188, "Date": "07\/18\/2007", "Time": "07:11 PM", "Police District": 1.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.040729, -87.910695 ], "Address": "125 E WELLS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.910695468928267, 43.040728521028328 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 599, "Incident Number": 71990196, "Date": "07\/18\/2007", "Time": "07:45 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041705, -87.931975 ], "Address": "1530 W KILBOURN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.931975422004527, 43.041704990126412 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 600, "Incident Number": 71990251, "Date": "07\/18\/2007", "Time": "10:33 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.053595, -87.883423 ], "Address": "1800 N LINCOLN MEMORIAL DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.883422550225987, 43.053594601450101 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 601, "Incident Number": 71980069, "Date": "07\/17\/2007", "Time": "11:42 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.042269, -87.935345 ], "Address": "938 N 18TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.935345469974706, 43.042269090277088 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 602, "Incident Number": 71980120, "Date": "07\/17\/2007", "Time": "04:03 PM", "Police District": 1.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.040196, -87.904068 ], "Address": "600 E MASON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.904067774189173, 43.040195946404808 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 603, "Incident Number": 71980167, "Date": "07\/17\/2007", "Time": "08:05 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.047218, -87.954210 ], "Address": "3223 W MC KINLEY BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.954210083819035, 43.047217542847477 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 604, "Incident Number": 71980206, "Date": "07\/17\/2007", "Time": "11:22 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038804, -87.942866 ], "Address": "700 N 24TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.942865869253325, 43.038803559645402 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 605, "Incident Number": 71970091, "Date": "07\/16\/2007", "Time": "11:31 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041096, -87.957655 ], "Address": "834 N 35TH ST #307", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.957654933493217, 43.041095748542915 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 606, "Incident Number": 71970182, "Date": "07\/16\/2007", "Time": "08:19 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044472, -87.940282 ], "Address": "1100 N 22ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.940281675010155, 43.044472333706146 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 607, "Incident Number": 71960130, "Date": "07\/15\/2007", "Time": "03:34 PM", "Police District": 3.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.050059, -87.952032 ], "Address": "3023 W CHERRY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.952032419095161, 43.050058513994031 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 608, "Incident Number": 71950086, "Date": "07\/14\/2007", "Time": "10:35 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043275, -87.932511 ], "Address": "1530 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.932510832361928, 43.043274533181282 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 609, "Incident Number": 71950128, "Date": "07\/14\/2007", "Time": "03:15 PM", "Police District": 1.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.045682, -87.900489 ], "Address": "913 E JUNEAU AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.900489387731554, 43.045682481245443 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 610, "Incident Number": 71950163, "Date": "07\/14\/2007", "Time": "04:58 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.046251, -87.927193 ], "Address": "1235 N 12TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.927193369465783, 43.04625092148688 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 611, "Incident Number": 71950194, "Date": "07\/14\/2007", "Time": "10:27 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.051887, -87.891599 ], "Address": "1660 N PROSPECT AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.891599298315285, 43.05188708601208 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 612, "Incident Number": 71940058, "Date": "07\/13\/2007", "Time": "08:17 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044830, -87.932330 ], "Address": "1125 N CALLAHAN PL #210", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.932329712092894, 43.04483010407877 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 613, "Incident Number": 71940091, "Date": "07\/13\/2007", "Time": "11:42 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.045819, -87.921672 ], "Address": "800 W JUNEAU AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.921671676400521, 43.045818698458419 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 614, "Incident Number": 71940196, "Date": "07\/13\/2007", "Time": "10:25 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.039341, -87.912994 ], "Address": "724 N 2ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912993991200111, 43.039340769634727 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 615, "Incident Number": 71930032, "Date": "07\/12\/2007", "Time": "05:44 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.042455, -87.934159 ], "Address": "937 N 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.93415857372014, 43.042455335276117 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 616, "Incident Number": 71930043, "Date": "07\/12\/2007", "Time": "08:47 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.037494, -87.919858 ], "Address": "600 W MICHIGAN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.91985754849641, 43.037494281786167 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 617, "Incident Number": 71930045, "Date": "07\/12\/2007", "Time": "09:01 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.047357, -87.952094 ], "Address": "3030 W MC KINLEY BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.952093606440059, 43.047357463788963 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 618, "Incident Number": 71930070, "Date": "07\/12\/2007", "Time": "11:32 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038829, -87.925862 ], "Address": "1100 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.925862331774781, 43.038828695085698 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 619, "Incident Number": 71930073, "Date": "07\/12\/2007", "Time": "11:47 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038840, -87.923781 ], "Address": "900 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.923781, 43.038839519908393 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 620, "Incident Number": 71930075, "Date": "07\/12\/2007", "Time": "11:55 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043002, -87.914521 ], "Address": "300 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914521217594213, 43.043001651138887 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 621, "Incident Number": 71930090, "Date": "07\/12\/2007", "Time": "12:14 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043686, -87.912261 ], "Address": "1005 N EDISON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912260735529827, 43.043686030526892 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 622, "Incident Number": 71930128, "Date": "07\/12\/2007", "Time": "04:46 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.037418, -87.940305 ], "Address": "2111 W MICHIGAN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.940305203993233, 43.037417819939883 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 623, "Incident Number": 71930133, "Date": "07\/12\/2007", "Time": "04:14 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043639, -87.908630 ], "Address": "276 E STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.908630434890455, 43.043639469981947 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 624, "Incident Number": 71930142, "Date": "07\/12\/2007", "Time": "05:56 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041657, -87.930095 ], "Address": "900 N 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.930095020166689, 43.041656712514573 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 625, "Incident Number": 71930196, "Date": "07\/12\/2007", "Time": "10:45 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041657, -87.930095 ], "Address": "900 N 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.930095020166689, 43.041656712514573 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 626, "Incident Number": 71920052, "Date": "07\/11\/2007", "Time": "09:08 AM", "Police District": 1.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.043063, -87.923802 ], "Address": "955 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.923801974005002, 43.043062525761833 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 627, "Incident Number": 71920055, "Date": "07\/11\/2007", "Time": "09:33 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041204, -87.925851 ], "Address": "845 N 11TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.925851055398269, 43.041204419095152 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 628, "Incident Number": 71920061, "Date": "07\/11\/2007", "Time": "10:23 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041922, -87.932994 ], "Address": "920 N RENEE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.93299441595866, 43.041922317063126 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 629, "Incident Number": 71920090, "Date": "07\/11\/2007", "Time": "12:43 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.042815, -87.934160 ], "Address": "953 N 17TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.934159632003954, 43.042815 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 630, "Incident Number": 71910034, "Date": "07\/10\/2007", "Time": "01:33 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043434, -87.900704 ], "Address": "940 N MARSHALL ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.900703551569094, 43.043434427764076 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 631, "Incident Number": 71910070, "Date": "07\/10\/2007", "Time": "08:49 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.044898, -87.911135 ], "Address": "1123 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.911135239213422, 43.044897813983326 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 632, "Incident Number": 71910071, "Date": "07\/10\/2007", "Time": "08:49 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.044898, -87.911135 ], "Address": "1123 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.911135239213422, 43.044897813983326 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 633, "Incident Number": 71910076, "Date": "07\/10\/2007", "Time": "09:33 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.043956, -87.901573 ], "Address": "812 E STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.901572808355922, 43.043955504327833 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 634, "Incident Number": 71910088, "Date": "07\/10\/2007", "Time": "10:41 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.037037, -87.949194 ], "Address": "542 N 28TH ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.949194436811439, 43.037036748542903 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 635, "Incident Number": 71910196, "Date": "07\/10\/2007", "Time": "06:19 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.032752, -87.905200 ], "Address": "417 E CHICAGO ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.905200002769959, 43.032751516735338 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 636, "Incident Number": 71900065, "Date": "07\/09\/2007", "Time": "07:51 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.045129, -87.907223 ], "Address": "1108 N MILWAUKEE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.907223253188775, 43.045128597004997 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 637, "Incident Number": 71900113, "Date": "07\/09\/2007", "Time": "10:30 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.040493, -87.942876 ], "Address": "808 N 24TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.942875959028441, 43.040493115182642 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 638, "Incident Number": 71890110, "Date": "07\/08\/2007", "Time": "01:46 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.033131, -87.899688 ], "Address": "200 N HARBOR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.899688203318973, 43.033131354982004 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 639, "Incident Number": 71880011, "Date": "07\/07\/2007", "Time": "12:04 AM", "Police District": 3.0, "Offense 1": "THEFT FROM COIN-OPPERATED MACHINES", "Location": [ 43.040315, -87.939540 ], "Address": "2106 W WELLS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.93953983236193, 43.040315482110827 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 640, "Incident Number": 71880084, "Date": "07\/07\/2007", "Time": "09:42 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.045396, -87.898530 ], "Address": "1121 N WAVERLY PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.898530329476401, 43.045395873160601 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 641, "Incident Number": 71870079, "Date": "07\/06\/2007", "Time": "10:52 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044937, -87.939025 ], "Address": "1120 N 21ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.939025451815084, 43.044937155981302 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 642, "Incident Number": 71870167, "Date": "07\/06\/2007", "Time": "07:54 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.040717, -87.935392 ], "Address": "816 N 18TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.935392459028449, 43.040717161809681 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 643, "Incident Number": 71860149, "Date": "07\/05\/2007", "Time": "02:23 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.045836, -87.924576 ], "Address": "1000 W JUNEAU AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.924576312160994, 43.045836190551093 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 644, "Incident Number": 71860184, "Date": "07\/05\/2007", "Time": "03:17 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.039142, -87.909097 ], "Address": "720 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.909096823375279, 43.039142023363119 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 645, "Incident Number": 71860246, "Date": "07\/05\/2007", "Time": "09:48 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041221, -87.950760 ], "Address": "845 N 29TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.950759613682081, 43.041221497085814 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 646, "Incident Number": 71850063, "Date": "07\/04\/2007", "Time": "08:15 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.044958, -87.910863 ], "Address": "1114 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.910863272664486, 43.044958016100161 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 647, "Incident Number": 71850129, "Date": "07\/04\/2007", "Time": "03:41 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.038672, -87.954431 ], "Address": "3205 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.954430562178956, 43.038672498990401 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 648, "Incident Number": 71850139, "Date": "07\/04\/2007", "Time": "12:29 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038650, -87.953274 ], "Address": "3121 W WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.953273696087479, 43.03864954284748 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 649, "Incident Number": 71840061, "Date": "07\/03\/2007", "Time": "09:06 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044451, -87.929051 ], "Address": "1308 W HIGHLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.929051375238075, 43.044450525967918 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 650, "Incident Number": 71840125, "Date": "07\/03\/2007", "Time": "02:29 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.044386, -87.915849 ], "Address": "400 W HIGHLAND AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.915848897308663, 43.044385725485647 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 651, "Incident Number": 71840143, "Date": "07\/03\/2007", "Time": "04:14 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.044451, -87.929051 ], "Address": "1308 W HIGHLAND AV #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.929051375238075, 43.044450525967918 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 652, "Incident Number": 71840144, "Date": "07\/03\/2007", "Time": "04:24 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.039142, -87.909097 ], "Address": "720 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.909096823375279, 43.039142023363119 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 653, "Incident Number": 71840151, "Date": "07\/03\/2007", "Time": "04:56 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.045255, -87.943909 ], "Address": "1137 N 24TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.943909037076409, 43.04525500582838 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 654, "Incident Number": 71830093, "Date": "07\/02\/2007", "Time": "12:35 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041078, -87.930191 ], "Address": "833 N 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.930190632003942, 43.041078 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 655, "Incident Number": 71830107, "Date": "07\/02\/2007", "Time": "01:34 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.050515, -87.935593 ], "Address": "1830 W CHERRY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.9355935, 43.050515467684122 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 656, "Incident Number": 71830112, "Date": "07\/02\/2007", "Time": "01:40 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.038590, -87.909450 ], "Address": "111 E WISCONSIN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.909449930607693, 43.038589531162053 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 657, "Incident Number": 71830114, "Date": "07\/02\/2007", "Time": "01:47 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.041653, -87.937412 ], "Address": "1922 W KILBOURN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.937411919095155, 43.041653453257396 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 658, "Incident Number": 71830134, "Date": "07\/02\/2007", "Time": "03:42 PM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049187, -87.951208 ], "Address": "1434 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.951207680276752, 43.049186539781068 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 659, "Incident Number": 71830139, "Date": "07\/02\/2007", "Time": "04:09 PM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.040367, -87.909246 ], "Address": "770 N WATER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 2, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.909245962728292, 43.040367087796959 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 660, "Incident Number": 71820071, "Date": "07\/01\/2007", "Time": "10:38 AM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.046631, -87.930065 ], "Address": "1236 N 14TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.930065411853136, 43.046630884817375 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 661, "Incident Number": 71820085, "Date": "07\/01\/2007", "Time": "11:49 AM", "Police District": 1.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.042861, -87.903152 ], "Address": "900 N VAN BUREN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.903152463190892, 43.042861188633893 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 662, "Incident Number": 71820166, "Date": "07\/01\/2007", "Time": "09:27 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.043261, -87.930751 ], "Address": "1418 W STATE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 7, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.930751248542904, 43.043261467684104 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 663, "Incident Number": 71820170, "Date": "07\/01\/2007", "Time": "08:48 PM", "Police District": 1.0, "Offense 1": "THEFT FROM COIN-OPPERATED MACHINES", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.043533, -87.902077 ], "Address": "935 N CASS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.902077486986926, 43.043533145709524 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 664, "Incident Number": 72120049, "Date": "07\/31\/2007", "Time": "07:15 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.095142, -88.011167 ], "Address": "4271 N 78TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.011167383865072, 43.095141619193356 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 665, "Incident Number": 72120054, "Date": "07\/31\/2007", "Time": "08:13 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.136621, -88.036071 ], "Address": "9961 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.036071444854116, 43.136620745606145 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 666, "Incident Number": 72120184, "Date": "07\/31\/2007", "Time": "05:12 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089787, -88.011864 ], "Address": "7927 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.011863664723876, 43.08978654674263 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 667, "Incident Number": 72110109, "Date": "07\/30\/2007", "Time": "10:54 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.086018, -88.022674 ], "Address": "3801 N 88TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.022673710554201, 43.086018078916815 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 668, "Incident Number": 72110124, "Date": "07\/30\/2007", "Time": "12:19 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.104864, -88.019643 ], "Address": "8537 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.019642734167647, 43.104863734167644 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 669, "Incident Number": 72090064, "Date": "07\/28\/2007", "Time": "08:23 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.070310, -88.018724 ], "Address": "2822 N 85TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.018723893531273, 43.070310419095165 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 670, "Incident Number": 72090172, "Date": "07\/28\/2007", "Time": "06:14 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.070229, -88.023770 ], "Address": "2823 N 89TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.023769624790575, 43.070228832361948 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 671, "Incident Number": 72080025, "Date": "07\/27\/2007", "Time": "02:56 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.083342, -88.011051 ], "Address": "3533 N 79TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.011051132003942, 43.083342 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 672, "Incident Number": 72070052, "Date": "07\/26\/2007", "Time": "07:55 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.146377, -88.035092 ], "Address": "7048 N 99TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.035092342460814, 43.146377413266777 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 673, "Incident Number": 72070060, "Date": "07\/26\/2007", "Time": "08:15 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.143543, -88.032117 ], "Address": "9533 W DEBBIE LA", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.032117372756574, 43.143543075192042 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 674, "Incident Number": 72070112, "Date": "07\/26\/2007", "Time": "11:00 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.100667, -88.012499 ], "Address": "8014 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.012498963395117, 43.100667224281992 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 675, "Incident Number": 72070131, "Date": "07\/26\/2007", "Time": "09:23 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.085726, -88.021276 ], "Address": "3766 N 87TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.021275911853124, 43.08572585789716 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 676, "Incident Number": 72070132, "Date": "07\/26\/2007", "Time": "12:34 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.096372, -88.014806 ], "Address": "4346 N 82ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.014806426279847, 43.096372239800331 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 677, "Incident Number": 72060056, "Date": "07\/25\/2007", "Time": "08:32 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.119838, -88.055615 ], "Address": "5601 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055615311183203, 43.119837533729545 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 678, "Incident Number": 72060191, "Date": "07\/25\/2007", "Time": "07:25 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.101504, -88.010670 ], "Address": "4619 N 79TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.010670124790579, 43.101503612268459 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 679, "Incident Number": 72060221, "Date": "07\/25\/2007", "Time": "09:17 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.091252, -88.020064 ], "Address": "4064 N 86TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.020063919066502, 43.091252245628709 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 680, "Incident Number": 72060240, "Date": "07\/25\/2007", "Time": "11:08 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.119523, -88.039642 ], "Address": "10202 W SILVER SPRING DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.039641525535217, 43.119523461624581 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 681, "Incident Number": 72050064, "Date": "07\/24\/2007", "Time": "08:47 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.137512, -88.038778 ], "Address": "6622 N BOURBON ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.038777732414076, 43.137511986092889 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 682, "Incident Number": 72050067, "Date": "07\/24\/2007", "Time": "08:31 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.082611, -88.009142 ], "Address": "7714 W KEEFE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.009141919095157, 43.082610504327839 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 683, "Incident Number": 72040081, "Date": "07\/23\/2007", "Time": "08:58 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.100455, -88.022617 ], "Address": "8808 W PALMETTO AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.022616797968567, 43.100454623665414 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 684, "Incident Number": 72030046, "Date": "07\/22\/2007", "Time": "04:40 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.102187, -88.008193 ], "Address": "4650 N 77TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.008193353569325, 43.102187245628727 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 685, "Incident Number": 72030066, "Date": "07\/22\/2007", "Time": "07:43 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.078705, -88.029774 ], "Address": "9333 W CONCORDIA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.029774167638067, 43.078704517889179 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 686, "Incident Number": 72030083, "Date": "07\/22\/2007", "Time": "09:11 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.137065, -88.039747 ], "Address": "6540 N BOURBON ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.039747495798778, 43.137064863446632 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 687, "Incident Number": 72010088, "Date": "07\/20\/2007", "Time": "12:33 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.136132, -88.041912 ], "Address": "10419 W JONEN ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.041911782416676, 43.13613187342041 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 688, "Incident Number": 72010089, "Date": "07\/20\/2007", "Time": "01:32 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.090999, -88.022564 ], "Address": "4052 N 88TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.022563886317911, 43.09099918734492 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 689, "Incident Number": 72010167, "Date": "07\/20\/2007", "Time": "08:48 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.138922, -88.039101 ], "Address": "10201 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.039101120071422, 43.138921590702672 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 690, "Incident Number": 72000059, "Date": "07\/19\/2007", "Time": "08:24 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.134908, -88.040350 ], "Address": "6438 N 103RD CT", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.040350227566648, 43.134907654423436 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 691, "Incident Number": 72000064, "Date": "07\/19\/2007", "Time": "09:45 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.070336, -88.022452 ], "Address": "2828 N 88TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.022452360782694, 43.070336444630385 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 692, "Incident Number": 72000066, "Date": "07\/19\/2007", "Time": "09:20 AM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.096374, -88.025094 ], "Address": "4358 N 90TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.02509386078269, 43.096373832361934 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 693, "Incident Number": 72000072, "Date": "07\/19\/2007", "Time": "10:20 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071457, -88.020382 ], "Address": "8605 W LOCUST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.020382080904838, 43.071456510675823 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 694, "Incident Number": 72000129, "Date": "07\/19\/2007", "Time": "02:09 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.097728, -88.010184 ], "Address": "7828 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.010184365226081, 43.097728189855069 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 695, "Incident Number": 72000171, "Date": "07\/19\/2007", "Time": "05:46 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.079340, -88.011413 ], "Address": "7918 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.01141289549318, 43.079339764383271 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 696, "Incident Number": 71990048, "Date": "07\/18\/2007", "Time": "07:51 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.099603, -88.012031 ], "Address": "7963 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.012031335336886, 43.099602841364266 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 697, "Incident Number": 71990130, "Date": "07\/18\/2007", "Time": "01:22 PM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.137512, -88.038778 ], "Address": "6622 N BOURBON ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.038777732414076, 43.137511986092889 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 698, "Incident Number": 71990153, "Date": "07\/18\/2007", "Time": "04:17 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.106157, -88.040889 ], "Address": "4857 N 103RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.040888599255354, 43.106157083819028 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 699, "Incident Number": 71980089, "Date": "07\/17\/2007", "Time": "01:03 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.075637, -88.031196 ], "Address": "3120 N 95TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.031196462923575, 43.075636575076459 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 700, "Incident Number": 71970049, "Date": "07\/16\/2007", "Time": "07:41 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.137263, -88.039361 ], "Address": "6574 N BOURBON ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.039361060621076, 43.137263381037798 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 701, "Incident Number": 71970052, "Date": "07\/16\/2007", "Time": "08:12 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.135795, -88.034882 ], "Address": "9838 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.034882356339281, 43.135795444370601 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 702, "Incident Number": 71970077, "Date": "07\/16\/2007", "Time": "10:48 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.079499, -88.022598 ], "Address": "3329 N 88TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.022598132003949, 43.079498832361935 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 703, "Incident Number": 71970114, "Date": "07\/16\/2007", "Time": "02:01 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.102740, -88.014195 ], "Address": "8200 W APPLETON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.014195091147954, 43.102740299209323 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 704, "Incident Number": 71970126, "Date": "07\/16\/2007", "Time": "03:20 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.097054, -88.040372 ], "Address": "4410 N 103RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.040372356887545, 43.097053956142915 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 705, "Incident Number": 71960059, "Date": "07\/15\/2007", "Time": "09:46 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.116541, -88.055556 ], "Address": "5442 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055555652690288, 43.116540501001758 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 706, "Incident Number": 71960088, "Date": "07\/15\/2007", "Time": "09:52 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.116541, -88.055556 ], "Address": "5442 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055555652690288, 43.116540501001758 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 707, "Incident Number": 71950075, "Date": "07\/14\/2007", "Time": "10:34 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.071166, -88.011152 ], "Address": "2863 N 79TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.011151624790585, 43.07116614210284 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 708, "Incident Number": 71950107, "Date": "07\/14\/2007", "Time": "01:19 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073702, -88.009816 ], "Address": "3008 N 78TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.009816360782693, 43.073701857897163 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 709, "Incident Number": 71950148, "Date": "07\/14\/2007", "Time": "05:37 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.126005, -88.034466 ], "Address": "9827 W MENOMONEE PARK CT #5", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.034465793900537, 43.126005374949621 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 710, "Incident Number": 71940049, "Date": "07\/13\/2007", "Time": "07:47 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.116541, -88.055556 ], "Address": "5442 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055555652690288, 43.116540501001758 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 711, "Incident Number": 71940051, "Date": "07\/13\/2007", "Time": "07:54 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.119838, -88.055615 ], "Address": "5601 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055615311183203, 43.119837533729545 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 712, "Incident Number": 71940163, "Date": "07\/13\/2007", "Time": "06:39 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.098323, -88.010956 ], "Address": "7859 W APPLETON AV #1", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.010955715678747, 43.098322558687848 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 713, "Incident Number": 71930166, "Date": "07\/12\/2007", "Time": "07:51 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.100009, -88.007170 ], "Address": "4547 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.007170379917724, 43.100008501680428 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 714, "Incident Number": 71920028, "Date": "07\/11\/2007", "Time": "07:40 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.095916, -88.027536 ], "Address": "4334 N 92ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.02753586799605, 43.095915555369629 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 715, "Incident Number": 71920111, "Date": "07\/11\/2007", "Time": "03:07 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.150258, -88.037223 ], "Address": "10006 W JUNIPER ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.037222558283801, 43.150257511541184 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 716, "Incident Number": 71910117, "Date": "07\/10\/2007", "Time": "01:14 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087895, -88.037656 ], "Address": "3900 N 100TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.037655911853136, 43.087895360811359 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 717, "Incident Number": 71910130, "Date": "07\/10\/2007", "Time": "01:47 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.135604, -88.045213 ], "Address": "6502 N 107TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.045212885740995, 43.135604497085808 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 718, "Incident Number": 71910144, "Date": "07\/10\/2007", "Time": "03:01 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.104926, -88.008930 ], "Address": "7719 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.008929916180961, 43.104925521207413 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 719, "Incident Number": 71900048, "Date": "07\/09\/2007", "Time": "04:58 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.104916, -88.013263 ], "Address": "8105 W HAMPTON AV #5", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.0132635, 43.104915546742632 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 720, "Incident Number": 71900079, "Date": "07\/09\/2007", "Time": "07:57 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.104918, -88.011244 ], "Address": "7919 W HAMPTON AV #6", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.011243974464776, 43.104918470136944 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 721, "Incident Number": 71900098, "Date": "07\/09\/2007", "Time": "09:03 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.104916, -88.013544 ], "Address": "8115 W HAMPTON AV #4", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.013544076605669, 43.104915546742632 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 722, "Incident Number": 71900100, "Date": "07\/09\/2007", "Time": "09:03 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.104914, -88.014081 ], "Address": "8133 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.014080923394317, 43.104914488458803 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 723, "Incident Number": 71900167, "Date": "07\/09\/2007", "Time": "03:28 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.074009, -88.007511 ], "Address": "3021 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.007510606468728, 43.074009251457085 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 724, "Incident Number": 71900218, "Date": "07\/09\/2007", "Time": "06:25 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.111713, -88.055574 ], "Address": "5188 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 1, "e_clusterK9": 7, "g_clusterK9": 5, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055574134402903, 43.111713001272847 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 725, "Incident Number": 71890030, "Date": "07\/08\/2007", "Time": "03:13 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.135557, -88.038032 ], "Address": "10112 W KIEHNAU AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.0380315, 43.135557463788963 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 726, "Incident Number": 71880013, "Date": "07\/07\/2007", "Time": "12:09 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.077519, -88.008658 ], "Address": "3231 N 77TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.008658106468729, 43.077518779906512 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 727, "Incident Number": 71870063, "Date": "07\/06\/2007", "Time": "09:06 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.104727, -88.051550 ], "Address": "11101 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 7, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.051550139188649, 43.104726546742626 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 728, "Incident Number": 71870085, "Date": "07\/06\/2007", "Time": "11:40 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.112331, -88.055574 ], "Address": "5218 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 0, "e_clusterK8": 6, "g_clusterK8": 1, "e_clusterK9": 7, "g_clusterK9": 5, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055573652645421, 43.112330797911795 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 729, "Incident Number": 71870088, "Date": "07\/06\/2007", "Time": "11:55 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.081236, -88.008610 ], "Address": "3429 N 77TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.008609580933495, 43.081235664723863 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 730, "Incident Number": 71860134, "Date": "07\/05\/2007", "Time": "01:21 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.093447, -88.017922 ], "Address": "8405 W HOPE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.017922366235709, 43.093446539529246 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 731, "Incident Number": 71850053, "Date": "07\/04\/2007", "Time": "04:52 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.137263, -88.039361 ], "Address": "6590 N BOURBON ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.039361060621076, 43.137263381037798 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 732, "Incident Number": 71850062, "Date": "07\/04\/2007", "Time": "08:00 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.119838, -88.055615 ], "Address": "5601 N LOVERS LANE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.055615311183203, 43.119837533729545 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 733, "Incident Number": 71850083, "Date": "07\/04\/2007", "Time": "09:47 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.137263, -88.039361 ], "Address": "6580 N BOURBON ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.039361060621076, 43.137263381037798 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 734, "Incident Number": 71850087, "Date": "07\/04\/2007", "Time": "10:50 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.097797, -88.012187 ], "Address": "4427 N 80TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.012187409977216, 43.097797152374618 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 735, "Incident Number": 71840037, "Date": "07\/03\/2007", "Time": "06:33 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.108779, -88.022835 ], "Address": "8854 W FAIRMOUNT AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.022834868892048, 43.108778708079093 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 736, "Incident Number": 71840054, "Date": "07\/03\/2007", "Time": "08:34 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.072713, -88.008709 ], "Address": "2949 N 77TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.008708580933501, 43.07271283236193 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 737, "Incident Number": 71830211, "Date": "07\/02\/2007", "Time": "05:48 PM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.083649, -88.013732 ], "Address": "3609 N 81ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -88.013731617577221, 43.083648838190328 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 738, "Incident Number": 71820074, "Date": "07\/01\/2007", "Time": "10:54 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087781, -88.034371 ], "Address": "9760 W LISBON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 2, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -88.034370942120219, 43.087781429107146 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 739, "Incident Number": 72120051, "Date": "07\/31\/2007", "Time": "07:51 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.052907, -87.911218 ], "Address": "1726 N 1ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.911217508204771, 43.052907350572113 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 740, "Incident Number": 72120067, "Date": "07\/31\/2007", "Time": "09:15 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089123, -87.901290 ], "Address": "709 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.901290391972481, 43.089122501154783 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 741, "Incident Number": 72120104, "Date": "07\/31\/2007", "Time": "11:02 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072668, -87.918368 ], "Address": "2967 N 6TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.918367617577232, 43.072668167638057 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 742, "Incident Number": 72120121, "Date": "07\/31\/2007", "Time": "12:12 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.073219, -87.929811 ], "Address": "1420 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.929811387731547, 43.073219460470746 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 743, "Incident Number": 72120129, "Date": "07\/31\/2007", "Time": "01:10 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.051354, -87.922319 ], "Address": "828 W GALENA ST #C", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.922318904749744, 43.051353816175592 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 744, "Incident Number": 72120190, "Date": "07\/31\/2007", "Time": "05:50 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.078426, -87.912548 ], "Address": "3287 N 2ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.912548431617296, 43.078426061342228 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 745, "Incident Number": 72110055, "Date": "07\/30\/2007", "Time": "06:00 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.047540, -87.915814 ], "Address": "1300 N 4TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.915813933493226, 43.047539748542903 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 746, "Incident Number": 72110152, "Date": "07\/30\/2007", "Time": "02:11 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077510, -87.905180 ], "Address": "3241 N HOLTON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.905179548184918, 43.077510366639729 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 747, "Incident Number": 72110168, "Date": "07\/30\/2007", "Time": "02:21 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.050219, -87.915860 ], "Address": "1525 N 4TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.915859624790585, 43.050218521236069 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 748, "Incident Number": 72110173, "Date": "07\/30\/2007", "Time": "04:47 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089396, -87.905945 ], "Address": "356 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.905944940916228, 43.089396245936584 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 749, "Incident Number": 72110180, "Date": "07\/30\/2007", "Time": "05:03 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087392, -87.934403 ], "Address": "3864 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.934403411853125, 43.08739196863641 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 750, "Incident Number": 72100086, "Date": "07\/29\/2007", "Time": "11:13 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.053377, -87.907313 ], "Address": "415 E VINE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.907313014599609, 43.05337696751122 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 751, "Incident Number": 72100158, "Date": "07\/29\/2007", "Time": "05:51 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060345, -87.915200 ], "Address": "324 W NORTH AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.915200223007673, 43.060345497691394 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 752, "Incident Number": 72090072, "Date": "07\/28\/2007", "Time": "08:53 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.080471, -87.940993 ], "Address": "3372 N 23RD ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.940993360782699, 43.080471052455437 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 753, "Incident Number": 72090074, "Date": "07\/28\/2007", "Time": "09:35 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.055766, -87.917191 ], "Address": "1925 N 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.91719108482863, 43.055766251457101 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 754, "Incident Number": 72080043, "Date": "07\/27\/2007", "Time": "08:04 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.076943, -87.931025 ], "Address": "3206 N 16TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.93102490795799, 43.076943471550578 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 755, "Incident Number": 72080093, "Date": "07\/27\/2007", "Time": "12:58 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.074127, -87.906498 ], "Address": "3053 N BUFFUM ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.906498153644023, 43.074126586733229 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 756, "Incident Number": 72080154, "Date": "07\/27\/2007", "Time": "06:56 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.050170, -87.921468 ], "Address": "1546 N 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.921468483279526, 43.050170224723445 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 757, "Incident Number": 72080182, "Date": "07\/27\/2007", "Time": "02:52 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.058900, -87.898765 ], "Address": "1003 E GARFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.898764691461665, 43.058899949187968 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 758, "Incident Number": 71950076, "Date": "07\/26\/2007", "Time": "06:13 AM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.079023, -87.930563 ], "Address": "1522 W CONCORDIA AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.930562803912522, 43.07902348600598 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 759, "Incident Number": 72070086, "Date": "07\/26\/2007", "Time": "09:47 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.104095, -87.913634 ], "Address": "306 W HAMPTON AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.9136335, 43.104095453257401 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 760, "Incident Number": 72070102, "Date": "07\/26\/2007", "Time": "10:22 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.051901, -87.924262 ], "Address": "1624 N 10TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.924261758236725, 43.05190057830896 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 761, "Incident Number": 72070110, "Date": "07\/26\/2007", "Time": "08:50 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.050738, -87.922971 ], "Address": "1551 N 9TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.92297144398519, 43.050737825068985 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 762, "Incident Number": 72060124, "Date": "07\/25\/2007", "Time": "02:34 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.052632, -87.916320 ], "Address": "416 W WALNUT ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.916320335276126, 43.052631525967925 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 763, "Incident Number": 72060177, "Date": "07\/25\/2007", "Time": "04:31 PM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.057964, -87.914221 ], "Address": "2101 N MARTIN L KING JR DR #206", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914221001009608, 43.057963927837733 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 764, "Incident Number": 72060198, "Date": "07\/25\/2007", "Time": "08:03 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.078796, -87.909398 ], "Address": "3313 N PALMER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.909398080933499, 43.078795994171628 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 765, "Incident Number": 72050089, "Date": "07\/24\/2007", "Time": "10:39 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.083188, -87.924702 ], "Address": "3574 N 11TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.924702407957994, 43.083188161809687 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 766, "Incident Number": 72050109, "Date": "07\/24\/2007", "Time": "12:23 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056564, -87.914283 ], "Address": "300 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914283204179981, 43.056564204179992 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 767, "Incident Number": 72050140, "Date": "07\/24\/2007", "Time": "01:35 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.079945, -87.916838 ], "Address": "3356 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.916837842605062, 43.079945437417017 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 768, "Incident Number": 72040093, "Date": "07\/23\/2007", "Time": "09:56 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049111, -87.920178 ], "Address": "1443 N 7TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.92017846109853, 43.049110588336355 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 769, "Incident Number": 72040167, "Date": "07\/23\/2007", "Time": "03:24 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.067550, -87.906119 ], "Address": "430 E CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.906118904726426, 43.067550232661276 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 770, "Incident Number": 72040180, "Date": "07\/23\/2007", "Time": "04:04 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.089169, -87.906000 ], "Address": "401 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.906000069392306, 43.089168518899719 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 771, "Incident Number": 72030085, "Date": "07\/22\/2007", "Time": "09:57 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.079805, -87.928504 ], "Address": "3336 N 14TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.928503911853127, 43.079804633360283 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 772, "Incident Number": 72030123, "Date": "07\/22\/2007", "Time": "11:27 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.075855, -87.921321 ], "Address": "3145 N 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.921321132003953, 43.075855005828373 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 773, "Incident Number": 72020060, "Date": "07\/21\/2007", "Time": "07:44 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048535, -87.920196 ], "Address": "1401 N 7TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.920196078435779, 43.04853508865277 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 774, "Incident Number": 72020084, "Date": "07\/21\/2007", "Time": "09:41 AM", "Police District": 7.0, "Offense 1": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Offense 2": "THEFT FROM COIN-OPPERATED MACHINES", "Location": [ 43.083145, -87.935364 ], "Address": "3565 N TEUTONIA AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.935364018898781, 43.083145425471812 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 775, "Incident Number": 72020106, "Date": "07\/21\/2007", "Time": "11:40 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056479, -87.920672 ], "Address": "753 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.920671835276124, 43.056479495672171 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 776, "Incident Number": 72020167, "Date": "07\/21\/2007", "Time": "06:55 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048930, -87.921462 ], "Address": "1430 N 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.921461746352151, 43.048929846581245 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 777, "Incident Number": 72020192, "Date": "07\/21\/2007", "Time": "08:05 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073022, -87.919165 ], "Address": "623 W CHAMBERS ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.919164502914185, 43.073021557851135 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 778, "Incident Number": 72010031, "Date": "07\/20\/2007", "Time": "05:28 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048559, -87.920081 ], "Address": "1402 N 7TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.920080572426414, 43.048558983182609 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 779, "Incident Number": 72010079, "Date": "07\/20\/2007", "Time": "08:52 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.047684, -87.915892 ], "Address": "1303 N 4TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.91589164311246, 43.047684251457099 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 780, "Incident Number": 72010113, "Date": "07\/20\/2007", "Time": "03:35 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.049905, -87.914418 ], "Address": "300 W CHERRY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914417716234666, 43.049904669808093 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 781, "Incident Number": 72010141, "Date": "07\/20\/2007", "Time": "06:17 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.085997, -87.917225 ], "Address": "3818 N PORT WASHINGTON AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.917225419066497, 43.085996717179313 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 782, "Incident Number": 72000087, "Date": "07\/19\/2007", "Time": "11:35 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089703, -87.918325 ], "Address": "4010 N 6TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.918324828034102, 43.089703051070437 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 783, "Incident Number": 72000137, "Date": "07\/19\/2007", "Time": "03:00 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072812, -87.936706 ], "Address": "2964 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.936706353569321, 43.072811664723872 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 784, "Incident Number": 71990083, "Date": "07\/18\/2007", "Time": "10:17 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.053860, -87.909970 ], "Address": "140 E VINE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.909970332361937, 43.053860482110821 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 785, "Incident Number": 71990095, "Date": "07\/18\/2007", "Time": "11:19 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.062671, -87.914007 ], "Address": "2430 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.914006923295076, 43.062671199162288 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 786, "Incident Number": 71980098, "Date": "07\/17\/2007", "Time": "01:59 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087671, -87.913609 ], "Address": "3881 N 3RD ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.913608566506781, 43.087671031363612 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 787, "Incident Number": 71970015, "Date": "07\/16\/2007", "Time": "01:04 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049289, -87.914389 ], "Address": "1407 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914388643112446, 43.049288988314586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 788, "Incident Number": 71970054, "Date": "07\/16\/2007", "Time": "08:20 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049289, -87.914389 ], "Address": "1407 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914388643112446, 43.049288988314586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 789, "Incident Number": 71960069, "Date": "07\/15\/2007", "Time": "11:03 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.085736, -87.917234 ], "Address": "3800 N PORT WASHINGTON AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.917234419066503, 43.08573571717929 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 790, "Incident Number": 71950120, "Date": "07\/14\/2007", "Time": "02:28 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072542, -87.916969 ], "Address": "2961 N 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.916969092041995, 43.072541832361935 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 791, "Incident Number": 71950137, "Date": "07\/14\/2007", "Time": "04:02 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073604, -87.904010 ], "Address": "3029 N BOOTH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.904010066506771, 43.073603863725538 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 792, "Incident Number": 71950145, "Date": "07\/14\/2007", "Time": "05:18 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087599, -87.914809 ], "Address": "3877 N 4TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.914808573720137, 43.087599282820719 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 793, "Incident Number": 71950168, "Date": "07\/14\/2007", "Time": "06:50 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048548, -87.916379 ], "Address": "434 W VLIET ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.916378540967244, 43.04854845969615 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 794, "Incident Number": 71940106, "Date": "07\/13\/2007", "Time": "01:42 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.055639, -87.908303 ], "Address": "1924 N HUBBARD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.908302893531271, 43.055639161809694 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 795, "Incident Number": 71940175, "Date": "07\/13\/2007", "Time": "08:30 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056592, -87.922949 ], "Address": "900 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.922949113094376, 43.056591588795108 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 796, "Incident Number": 71930064, "Date": "07\/12\/2007", "Time": "10:43 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056485, -87.922872 ], "Address": "911 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.922871522217008, 43.056485496682704 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 797, "Incident Number": 71930113, "Date": "07\/12\/2007", "Time": "03:25 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.067612, -87.918970 ], "Address": "614 W CENTER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.918969829447747, 43.067612460470748 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 798, "Incident Number": 71930162, "Date": "07\/12\/2007", "Time": "07:41 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.084988, -87.923432 ], "Address": "3722 N 10TH ST #A", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.923432411853128, 43.084988381903173 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 799, "Incident Number": 71920124, "Date": "07\/11\/2007", "Time": "04:16 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074910, -87.924303 ], "Address": "1020 W BURLEIGH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.924303, 43.074909533181277 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 800, "Incident Number": 71920147, "Date": "07\/11\/2007", "Time": "05:44 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.057924, -87.914241 ], "Address": "2109 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914240868144844, 43.057923590711503 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 801, "Incident Number": 71910169, "Date": "07\/10\/2007", "Time": "04:25 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.068504, -87.913976 ], "Address": "2740 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.913976102226812, 43.068503794958453 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 802, "Incident Number": 71910216, "Date": "07\/10\/2007", "Time": "08:14 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.079581, -87.905131 ], "Address": "3355 N HOLTON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.90513110646873, 43.07958083819031 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 803, "Incident Number": 71900064, "Date": "07\/09\/2007", "Time": "07:51 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056449, -87.912071 ], "Address": "125 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.912071360811353, 43.056448513994042 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 804, "Incident Number": 71900080, "Date": "07\/09\/2007", "Time": "08:44 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049289, -87.914389 ], "Address": "1407 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914388643112446, 43.049288988314586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 805, "Incident Number": 71900194, "Date": "07\/09\/2007", "Time": "05:01 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.089376, -87.909733 ], "Address": "100 E CAPITOL DR", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.909733015003638, 43.089375518754544 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 806, "Incident Number": 71900217, "Date": "07\/09\/2007", "Time": "06:24 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.069597, -87.931319 ], "Address": "1500 W HADLEY ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 0, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.931319454535938, 43.069596973252352 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 807, "Incident Number": 71900235, "Date": "07\/09\/2007", "Time": "08:00 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.079805, -87.923650 ], "Address": "3341 N 10TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.923650099255354, 43.079805031363605 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 808, "Incident Number": 71900260, "Date": "07\/09\/2007", "Time": "10:26 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.086537, -87.930784 ], "Address": "3828 N 16TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.930784437388354, 43.086537052455441 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 809, "Incident Number": 71890069, "Date": "07\/08\/2007", "Time": "10:05 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072272, -87.936716 ], "Address": "2936 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.936716411853126, 43.072271664723871 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 810, "Incident Number": 71890077, "Date": "07\/08\/2007", "Time": "11:11 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.088787, -87.929584 ], "Address": "3965 N 15TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.929584203891153, 43.088786646353512 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 811, "Incident Number": 71890083, "Date": "07\/08\/2007", "Time": "11:33 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070697, -87.933153 ], "Address": "2852 N 16TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.933152867996043, 43.070697167638059 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 812, "Incident Number": 71890151, "Date": "07\/08\/2007", "Time": "06:28 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073252, -87.936093 ], "Address": "1814 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.936092580904841, 43.073251500432704 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 813, "Incident Number": 71890170, "Date": "07\/08\/2007", "Time": "08:05 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.056408, -87.914417 ], "Address": "311 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914416938020807, 43.056407795820022 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 814, "Incident Number": 71890175, "Date": "07\/08\/2007", "Time": "08:19 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.056408, -87.914417 ], "Address": "311 W BROWN ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914416938020807, 43.056407795820022 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 815, "Incident Number": 71880065, "Date": "07\/07\/2007", "Time": "08:54 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.084452, -87.921850 ], "Address": "828 W NASH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.921849745628705, 43.084452456575605 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 816, "Incident Number": 71880105, "Date": "07\/07\/2007", "Time": "12:29 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.076134, -87.908818 ], "Address": "3163 N PALMER ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.908818099255356, 43.076133754371284 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 817, "Incident Number": 71880118, "Date": "07\/07\/2007", "Time": "01:51 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.087428, -87.942060 ], "Address": "3861 N 24TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.942059577615282, 43.087428282820696 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 818, "Incident Number": 71880165, "Date": "07\/07\/2007", "Time": "05:28 PM", "Police District": 5.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.076826, -87.905208 ], "Address": "3209 N HOLTON ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.905207606468721, 43.07682636663975 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 819, "Incident Number": 71870071, "Date": "07\/06\/2007", "Time": "10:04 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.085240, -87.895701 ], "Address": "1209 E SINGER CR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.895701, 43.085239513994026 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 820, "Incident Number": 71870081, "Date": "07\/06\/2007", "Time": "10:56 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.048583, -87.921831 ], "Address": "818 W VLIET ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 1, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.921831328538559, 43.048583158256143 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 821, "Incident Number": 71870106, "Date": "07\/06\/2007", "Time": "01:33 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.066008, -87.917031 ], "Address": "2609 N 5TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.917030620895446, 43.066008419095169 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 822, "Incident Number": 71870108, "Date": "07\/06\/2007", "Time": "01:44 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.056219, -87.904444 ], "Address": "532 E GLOVER AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.904444420220329, 43.05621898447675 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 823, "Incident Number": 71870190, "Date": "07\/06\/2007", "Time": "10:29 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072976, -87.905781 ], "Address": "418 E CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.905780832361941, 43.072975507646042 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 824, "Incident Number": 71860080, "Date": "07\/05\/2007", "Time": "09:24 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.086708, -87.924679 ], "Address": "3803 N 11TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.924678650325802, 43.086707696087473 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 825, "Incident Number": 71860124, "Date": "07\/05\/2007", "Time": "12:18 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.071841, -87.921431 ], "Address": "2927 N 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 0, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.921431080933502, 43.071840838190326 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 826, "Incident Number": 71860167, "Date": "07\/05\/2007", "Time": "03:37 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049289, -87.914389 ], "Address": "1407 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914388643112446, 43.049288988314586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 827, "Incident Number": 71860170, "Date": "07\/05\/2007", "Time": "03:59 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.072272, -87.936716 ], "Address": "2936 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.936716411853126, 43.072271664723871 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 828, "Incident Number": 71860203, "Date": "07\/05\/2007", "Time": "05:55 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.049289, -87.914389 ], "Address": "1407 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914388643112446, 43.049288988314586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 829, "Incident Number": 71860204, "Date": "07\/05\/2007", "Time": "05:57 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.049289, -87.914389 ], "Address": "1407 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914388643112446, 43.049288988314586 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 830, "Incident Number": 71860229, "Date": "07\/05\/2007", "Time": "07:40 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.071534, -87.936725 ], "Address": "2900 N 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.936725411853132, 43.071533664723887 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 831, "Incident Number": 71850160, "Date": "07\/04\/2007", "Time": "07:59 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077995, -87.929896 ], "Address": "1500 W RING ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.929896477705853, 43.077994914906121 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 832, "Incident Number": 71830124, "Date": "07\/03\/2007", "Time": "02:30 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.048783, -87.921577 ], "Address": "1419 N 8TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.921577447405468, 43.048782671047078 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 833, "Incident Number": 71840084, "Date": "07\/03\/2007", "Time": "11:00 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077161, -87.902708 ], "Address": "3225 N PIERCE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.902708073720149, 43.077160508742566 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 834, "Incident Number": 71840097, "Date": "07\/03\/2007", "Time": "10:29 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.060378, -87.915638 ], "Address": "2301 N 4TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.915638475475916, 43.060378213182851 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 835, "Incident Number": 71840102, "Date": "07\/03\/2007", "Time": "12:45 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.058565, -87.904128 ], "Address": "2135 N BOOTH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.904127522649688, 43.058565450458758 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 836, "Incident Number": 71840104, "Date": "07\/03\/2007", "Time": "10:01 AM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.077707, -87.922726 ], "Address": "920 W RING ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 3, "g_clusterK9": 0, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.922725597901291, 43.07770740551598 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 837, "Incident Number": 71840208, "Date": "07\/03\/2007", "Time": "09:53 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.053218, -87.914246 ], "Address": "1724 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 3, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 0 }, "geometry": { "type": "Point", "coordinates": [ -87.914246440706577, 43.053217826533569 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 838, "Incident Number": 71830163, "Date": "07\/02\/2007", "Time": "05:30 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.071750, -87.915406 ], "Address": "2920 N 4TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.915405842460814, 43.07175 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 839, "Incident Number": 71830173, "Date": "07\/02\/2007", "Time": "06:21 PM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070174, -87.907673 ], "Address": "2836 N RICHARDS ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.907673411853125, 43.070174161809689 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 840, "Incident Number": 71830177, "Date": "07\/02\/2007", "Time": "06:34 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.068473, -87.914983 ], "Address": "328 W CHRISTINE LA", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 1, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.9149835, 43.06847349653755 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 841, "Incident Number": 71830224, "Date": "07\/02\/2007", "Time": "11:04 PM", "Police District": 5.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.063633, -87.914015 ], "Address": "2470 N MARTIN L KING JR DR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 2, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 3, "g_clusterK7": 3, "e_clusterK8": 5, "g_clusterK8": 5, "e_clusterK9": 3, "g_clusterK9": 3, "e_clusterK10": 0, "g_clusterK10": 1 }, "geometry": { "type": "Point", "coordinates": [ -87.914015426279846, 43.063632555369622 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 842, "Incident Number": 71820053, "Date": "07\/01\/2007", "Time": "08:36 AM", "Police District": 5.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.088769, -87.929560 ], "Address": "3949 N 15TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 2, "g_clusterK4": 3, "e_clusterK5": 3, "g_clusterK5": 3, "e_clusterK6": 0, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.929559573720141, 43.088768947544565 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 843, "Incident Number": 72120117, "Date": "07\/31\/2007", "Time": "11:56 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.103296, -87.955591 ], "Address": "4731 N 34TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.955590664752535, 43.103295586733225 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 844, "Incident Number": 72120194, "Date": "07\/31\/2007", "Time": "06:13 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.100822, -87.953770 ], "Address": "3322 W GLENDALE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.953770240343815, 43.100821748354271 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 845, "Incident Number": 72120213, "Date": "07\/31\/2007", "Time": "07:44 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.074361, -87.957359 ], "Address": "3043 N 35TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.9573590809335, 43.074360586733235 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 846, "Incident Number": 72110081, "Date": "07\/30\/2007", "Time": "09:00 AM", "Police District": 3.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.066784, -87.946551 ], "Address": "2652 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.946551106208929, 43.06678356598718 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 847, "Incident Number": 72110087, "Date": "07\/30\/2007", "Time": "09:50 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.092755, -87.969806 ], "Address": "4150 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.969805886317914, 43.092755413266786 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 848, "Incident Number": 72110106, "Date": "07\/30\/2007", "Time": "11:07 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.101697, -87.966032 ], "Address": "4228 W PECK PL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.966032306826705, 43.101696518754558 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 849, "Incident Number": 72110110, "Date": "07\/30\/2007", "Time": "11:22 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.075255, -87.971220 ], "Address": "4600 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.971219832361939, 43.075254518754555 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 850, "Incident Number": 72110139, "Date": "07\/30\/2007", "Time": "01:15 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089922, -87.969393 ], "Address": "4424 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.96939266472387, 43.089922486005975 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 851, "Incident Number": 72110188, "Date": "07\/30\/2007", "Time": "04:29 PM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.110829, -87.985010 ], "Address": "5129 N 58TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.985009632003951, 43.11082858673322 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 852, "Incident Number": 72100100, "Date": "07\/29\/2007", "Time": "12:27 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.099506, -87.966756 ], "Address": "4500 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.966756403485945, 43.099505884817376 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 853, "Incident Number": 72100141, "Date": "07\/29\/2007", "Time": "04:53 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.086401, -87.964164 ], "Address": "3818 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.964164379104545, 43.086400826533549 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 854, "Incident Number": 72100165, "Date": "07\/29\/2007", "Time": "06:32 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.085286, -87.962125 ], "Address": "3740 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.962124842460824, 43.085285832361933 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 855, "Incident Number": 72090090, "Date": "07\/28\/2007", "Time": "10:45 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.093469, -87.971241 ], "Address": "4614 W HOPE AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.971240551070451, 43.093469454988146 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 856, "Incident Number": 72090188, "Date": "07\/28\/2007", "Time": "08:45 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.078211, -87.967176 ], "Address": "3254 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.96717585356933, 43.078211497085817 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 857, "Incident Number": 72080073, "Date": "07\/27\/2007", "Time": "10:59 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.073216, -87.945986 ], "Address": "2976 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.945986411853127, 43.073216413266778 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 858, "Incident Number": 72080157, "Date": "07\/27\/2007", "Time": "07:18 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089147, -87.945771 ], "Address": "3951 N 26TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.945771124790582, 43.08914716763806 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 859, "Incident Number": 72070113, "Date": "07\/26\/2007", "Time": "10:01 AM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.103351, -87.966937 ], "Address": "4735 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.966937380546852, 43.10335146211554 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 860, "Incident Number": 72070146, "Date": "07\/26\/2007", "Time": "02:00 PM", "Police District": 7.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.100054, -87.961535 ], "Address": "4550 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.961534886317921, 43.100053994171617 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 861, "Incident Number": 72070194, "Date": "07\/26\/2007", "Time": "05:35 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073766, -87.962055 ], "Address": "3020 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.962055415171363, 43.073765664723879 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 862, "Incident Number": 72070220, "Date": "07\/26\/2007", "Time": "07:24 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.079319, -87.965511 ], "Address": "3307 N 42ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.965511132003954, 43.079319419095157 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 863, "Incident Number": 72060054, "Date": "07\/25\/2007", "Time": "08:19 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.086699, -87.944716 ], "Address": "3822 N 25TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.944716437388351, 43.086698968636398 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 864, "Incident Number": 72060206, "Date": "07\/25\/2007", "Time": "08:36 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077011, -87.945493 ], "Address": "2522 W AUER AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.9454935, 43.077011467684102 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 865, "Incident Number": 72050053, "Date": "07\/24\/2007", "Time": "06:58 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.080408, -87.958450 ], "Address": "3363 N 36TH ST #LOWER", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.958450135322167, 43.080408167638069 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 866, "Incident Number": 72050056, "Date": "07\/24\/2007", "Time": "07:25 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.080300, -87.958450 ], "Address": "3357 N 36TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.958450135322167, 43.080300167638057 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 867, "Incident Number": 72050102, "Date": "07\/24\/2007", "Time": "11:43 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077394, -87.942279 ], "Address": "3219 N 24TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.942279124790588, 43.077393502914191 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 868, "Incident Number": 72050103, "Date": "07\/24\/2007", "Time": "11:43 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077394, -87.942279 ], "Address": "3219 N 24TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 3, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.942279124790588, 43.077393502914191 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 869, "Incident Number": 72050118, "Date": "07\/24\/2007", "Time": "10:17 AM", "Police District": 7.0, "Offense 1": "THEFT FROM COIN-OPPERATED MACHINES", "Location": [ 43.075255, -87.970820 ], "Address": "4532 W BURLEIGH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.970820474464773, 43.075254518754555 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 870, "Incident Number": 72050119, "Date": "07\/24\/2007", "Time": "01:03 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.099309, -87.981829 ], "Address": "4503 N 55TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.981829106468723, 43.099308754371293 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 871, "Incident Number": 72050121, "Date": "07\/24\/2007", "Time": "01:04 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.102466, -87.979032 ], "Address": "4676 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.979032379104552, 43.102465910352578 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 872, "Incident Number": 72050123, "Date": "07\/24\/2007", "Time": "01:15 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.076754, -87.968584 ], "Address": "3170 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.968584353569327, 43.076753664723867 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 873, "Incident Number": 72040050, "Date": "07\/23\/2007", "Time": "03:39 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "AGGRAVATED ASSAULT", "Location": [ 43.088544, -87.964122 ], "Address": "3928 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.964122407958001, 43.088543664723886 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 874, "Incident Number": 72030189, "Date": "07\/22\/2007", "Time": "08:09 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.091073, -87.966934 ], "Address": "4054 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.966934389636137, 43.091072748542899 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 875, "Incident Number": 72040011, "Date": "07\/22\/2007", "Time": "10:56 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.080175, -87.964390 ], "Address": "3349 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.964390113682072, 43.08017450291419 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 876, "Incident Number": 72020068, "Date": "07\/21\/2007", "Time": "08:09 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.075548, -87.968679 ], "Address": "3115 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.968679132003956, 43.075548419095156 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 877, "Incident Number": 72010009, "Date": "07\/20\/2007", "Time": "12:09 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.072004, -87.953302 ], "Address": "3115 W FOND DU LAC AV", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.953302433550533, 43.072004012753276 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 878, "Incident Number": 72010108, "Date": "07\/20\/2007", "Time": "03:11 PM", "Police District": 3.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.066325, -87.967640 ], "Address": "2613 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.96764003621557, 43.066324702666705 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 879, "Incident Number": 72000132, "Date": "07\/19\/2007", "Time": "02:21 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070554, -87.943640 ], "Address": "2843 N 24TH PL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.943640095360223, 43.070553754371275 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 880, "Incident Number": 72000211, "Date": "07\/19\/2007", "Time": "09:03 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.085665, -87.945829 ], "Address": "3743 N 26TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.945828650325808, 43.085664754371294 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 881, "Incident Number": 71990060, "Date": "07\/18\/2007", "Time": "08:53 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073245, -87.969909 ], "Address": "2977 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.969908606468721, 43.073244586733239 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 882, "Incident Number": 71990071, "Date": "07\/18\/2007", "Time": "09:27 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.078429, -87.958469 ], "Address": "3265 N 36TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.958468632003942, 43.078428502914193 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 883, "Incident Number": 71990078, "Date": "07\/18\/2007", "Time": "09:50 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.104761, -87.980351 ], "Address": "5400 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.9803505, 43.104760500432704 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 884, "Incident Number": 71990082, "Date": "07\/18\/2007", "Time": "10:08 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.101460, -87.962762 ], "Address": "4629 N 40TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.962761632003946, 43.101459586733228 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 885, "Incident Number": 71980044, "Date": "07\/17\/2007", "Time": "08:02 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.078526, -87.948426 ], "Address": "3268 N 28TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.948426386317919, 43.078525994171628 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 886, "Incident Number": 71980050, "Date": "07\/17\/2007", "Time": "06:31 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.094070, -87.957011 ], "Address": "4221 N 35TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.957011150325812, 43.09407 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 887, "Incident Number": 71980075, "Date": "07\/17\/2007", "Time": "12:02 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.084899, -87.947032 ], "Address": "3700 N 27TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.947032360782686, 43.084899471550585 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 888, "Incident Number": 71980096, "Date": "07\/17\/2007", "Time": "01:58 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.102587, -87.966100 ], "Address": "4232 W COURTLAND AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.966099639188641, 43.10258749711447 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 889, "Incident Number": 71970056, "Date": "07\/16\/2007", "Time": "08:36 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.079886, -87.947208 ], "Address": "3333 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.94720759925535, 43.079885779906505 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 890, "Incident Number": 71970085, "Date": "07\/16\/2007", "Time": "11:46 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.078743, -87.964410 ], "Address": "3281 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.964410081510408, 43.078743167638066 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 891, "Incident Number": 71970116, "Date": "07\/16\/2007", "Time": "02:33 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.083055, -87.983370 ], "Address": "3515 N 56TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.983369620895445, 43.083054502914194 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 892, "Incident Number": 71970161, "Date": "07\/16\/2007", "Time": "06:42 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073019, -87.949808 ], "Address": "2971 N 29TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.949808102573584, 43.073019419095175 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 893, "Incident Number": 71970162, "Date": "07\/16\/2007", "Time": "06:46 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073504, -87.959686 ], "Address": "3000 N 37TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.959686360782698, 43.073504413266789 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 894, "Incident Number": 71960086, "Date": "07\/15\/2007", "Time": "12:59 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.098065, -87.985384 ], "Address": "4434 N 58TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.985384367996048, 43.098065329447763 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 895, "Incident Number": 71950087, "Date": "07\/14\/2007", "Time": "11:18 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.089701, -87.945362 ], "Address": "2517 W CAPITOL DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.945362444630376, 43.089701481245463 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 896, "Incident Number": 71940109, "Date": "07\/13\/2007", "Time": "01:46 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.086543, -87.973843 ], "Address": "4829 W MEDFORD AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.97384255011815, 43.086543078250443 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 897, "Incident Number": 71930037, "Date": "07\/12\/2007", "Time": "08:15 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.083073, -87.965471 ], "Address": "3523 N 42ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.965471044866703, 43.08307317346646 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 898, "Incident Number": 71930062, "Date": "07\/12\/2007", "Time": "10:34 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.081716, -87.965991 ], "Address": "4233 W FOND DU LAC AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.965991291447693, 43.081715987218054 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 899, "Incident Number": 71930079, "Date": "07\/12\/2007", "Time": "10:39 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.105364, -87.981381 ], "Address": "4829 N 55TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.98138059925536, 43.105364444630396 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 900, "Incident Number": 71920063, "Date": "07\/11\/2007", "Time": "09:56 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.072480, -87.969921 ], "Address": "2941 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.969921132003947, 43.072479586733238 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 901, "Incident Number": 71920068, "Date": "07\/11\/2007", "Time": "10:52 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.088049, -87.964133 ], "Address": "3900 N 41ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.964132879104554, 43.088048664723885 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 902, "Incident Number": 71910072, "Date": "07\/10\/2007", "Time": "08:49 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.104611, -87.982060 ], "Address": "5507 W HAMPTON AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.982059981678134, 43.104610521207412 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 903, "Incident Number": 71900105, "Date": "07\/09\/2007", "Time": "10:02 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074251, -87.950945 ], "Address": "3038 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.950945411853127, 43.074251245628716 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 904, "Incident Number": 71900122, "Date": "07\/09\/2007", "Time": "11:11 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.080273, -87.969798 ], "Address": "3353 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.969798139217303, 43.080273335276132 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 905, "Incident Number": 71900146, "Date": "07\/09\/2007", "Time": "01:25 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.081677, -87.962165 ], "Address": "3424 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.962165342460821, 43.081676748542918 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 906, "Incident Number": 71900165, "Date": "07\/09\/2007", "Time": "03:19 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.081397, -87.962165 ], "Address": "3410 N 39TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.962165342460821, 43.081396774078144 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 907, "Incident Number": 71900256, "Date": "07\/09\/2007", "Time": "10:13 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.071812, -87.969864 ], "Address": "2906 N 45TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.969864386317923, 43.07181241326677 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 908, "Incident Number": 71890080, "Date": "07\/08\/2007", "Time": "11:29 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074693, -87.950946 ], "Address": "3056 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.950946386317923, 43.074692664723869 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 909, "Incident Number": 71890081, "Date": "07\/08\/2007", "Time": "11:31 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074693, -87.950946 ], "Address": "3056 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.950946386317923, 43.074692664723869 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 910, "Incident Number": 71890082, "Date": "07\/08\/2007", "Time": "11:32 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074567, -87.950946 ], "Address": "3052 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.950946386317923, 43.074566664723875 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 911, "Incident Number": 71890093, "Date": "07\/08\/2007", "Time": "12:12 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.074693, -87.950946 ], "Address": "3056 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.950946386317923, 43.074692664723869 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 912, "Incident Number": 71890161, "Date": "07\/08\/2007", "Time": "07:04 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.076069, -87.950922 ], "Address": "3136 N 30TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.950922393531272, 43.076069413266794 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 913, "Incident Number": 71880177, "Date": "07\/07\/2007", "Time": "07:19 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.073347, -87.944544 ], "Address": "2484 W CHAMBERS ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.94454383236193, 43.073346518754569 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 914, "Incident Number": 71880213, "Date": "07\/07\/2007", "Time": "11:29 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.075302, -87.947322 ], "Address": "2700 W BURLEIGH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.947322228002847, 43.075302228002833 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 915, "Incident Number": 71890007, "Date": "07\/07\/2007", "Time": "07:57 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.092692, -87.965214 ], "Address": "4148 N 42ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.965213853569324, 43.092692413266775 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 916, "Incident Number": 71870099, "Date": "07\/06\/2007", "Time": "12:56 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.070094, -87.968683 ], "Address": "2812 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 4, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.968683353569318, 43.070094167638075 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 917, "Incident Number": 71870196, "Date": "07\/06\/2007", "Time": "11:27 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.078438, -87.955079 ], "Address": "3263 N 33RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.955079095360219, 43.078437670552262 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 918, "Incident Number": 71860179, "Date": "07\/05\/2007", "Time": "04:35 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.081777, -87.957251 ], "Address": "3427 N 35TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.957250624790575, 43.081777005828371 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 919, "Incident Number": 71850069, "Date": "07\/04\/2007", "Time": "09:13 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.078589, -87.967173 ], "Address": "3272 N SHERMAN BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.967172867996041, 43.078588522621033 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 920, "Incident Number": 71850098, "Date": "07\/04\/2007", "Time": "12:31 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.098549, -87.957397 ], "Address": "4470 N HOPKINS ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 8, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.957397196751302, 43.098548531507831 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 921, "Incident Number": 71850171, "Date": "07\/04\/2007", "Time": "09:23 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077439, -87.955098 ], "Address": "3217 N 33RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.95509815364403, 43.077438670552255 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 922, "Incident Number": 71840154, "Date": "07\/03\/2007", "Time": "05:02 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.080974, -87.959546 ], "Address": "3384 N 37TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.959545886317912, 43.080974329447741 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 923, "Incident Number": 71840156, "Date": "07\/03\/2007", "Time": "05:09 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.077474, -87.956053 ], "Address": "3218 N 34TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.956052911853135, 43.077473580904837 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 924, "Incident Number": 71840215, "Date": "07\/03\/2007", "Time": "10:12 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.074873, -87.956115 ], "Address": "3068 N 34TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.956115393531277, 43.07487266472387 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 925, "Incident Number": 71830036, "Date": "07\/02\/2007", "Time": "06:43 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.079670, -87.978403 ], "Address": "3316 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.97840335356932, 43.07967 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 926, "Incident Number": 71830037, "Date": "07\/02\/2007", "Time": "06:43 AM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.078526, -87.978416 ], "Address": "3266 N 52ND ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.978415879104546, 43.078526329447755 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 927, "Incident Number": 71830106, "Date": "07\/02\/2007", "Time": "01:33 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.082964, -87.987022 ], "Address": "3508 N 60TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 1, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 3, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.987022346355971, 43.082963580904845 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 928, "Incident Number": 71830116, "Date": "07\/02\/2007", "Time": "02:12 PM", "Police District": 7.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.074550, -87.947289 ], "Address": "3057 N 27TH ST", "e_clusterK2": 1, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 0, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.947288620895449, 43.074549586733212 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 929, "Incident Number": 71830126, "Date": "07\/02\/2007", "Time": "02:48 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.081642, -87.960736 ], "Address": "3426 N 38TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.960736353569317, 43.081641974464787 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 930, "Incident Number": 71830132, "Date": "07\/02\/2007", "Time": "03:29 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.080039, -87.977214 ], "Address": "3336 N 51ST BL", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.977213882422774, 43.080038968636387 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 931, "Incident Number": 71820062, "Date": "07\/01\/2007", "Time": "09:32 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.071219, -87.946015 ], "Address": "2874 N 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 3, "e_clusterK6": 3, "g_clusterK6": 0, "e_clusterK7": 1, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 4, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.946015382422772, 43.071218664723887 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 932, "Incident Number": 71820077, "Date": "07\/01\/2007", "Time": "11:08 AM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.083468, -87.979650 ], "Address": "3537 N 53RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 2, "e_clusterK8": 3, "g_clusterK8": 1, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 5, "g_clusterK10": 3 }, "geometry": { "type": "Point", "coordinates": [ -87.979650048184922, 43.08346836663975 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 933, "Incident Number": 71820089, "Date": "07\/01\/2007", "Time": "12:17 PM", "Police District": 7.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.081245, -87.968601 ], "Address": "3403 N 44TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 0, "g_clusterK3": 0, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 2, "e_clusterK8": 7, "g_clusterK8": 0, "e_clusterK9": 0, "g_clusterK9": 0, "e_clusterK10": 5, "g_clusterK10": 5 }, "geometry": { "type": "Point", "coordinates": [ -87.968601139217299, 43.081245251457091 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 934, "Incident Number": 72120057, "Date": "07\/31\/2007", "Time": "08:41 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.023249, -87.942154 ], "Address": "738 S 23RD ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.942153947919948, 43.023249303912536 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 935, "Incident Number": 72120180, "Date": "07\/31\/2007", "Time": "01:15 PM", "Police District": 6.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.016924, -87.957883 ], "Address": "3524 W GREENFIELD AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.957882577759506, 43.016923507646048 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 936, "Incident Number": 72110015, "Date": "07\/30\/2007", "Time": "12:29 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.996906, -87.951852 ], "Address": "2631 S 30TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 6, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 7, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.951851599255349, 42.996906167638059 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 937, "Incident Number": 72110090, "Date": "07\/30\/2007", "Time": "10:06 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.991568, -87.973973 ], "Address": "2916 S 48TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.973972970136955, 42.991567994171618 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 938, "Incident Number": 72110195, "Date": "07\/30\/2007", "Time": "05:33 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.994962, -87.971531 ], "Address": "2729 S 46TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.971531073720143, 42.994962335276142 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 939, "Incident Number": 72100089, "Date": "07\/29\/2007", "Time": "11:23 AM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.019622, -87.959982 ], "Address": "1104 S 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.959982386317918, 43.01962158090484 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 940, "Incident Number": 72100126, "Date": "07\/29\/2007", "Time": "02:51 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.018784, -87.951433 ], "Address": "1204 S 30TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.951433444601719, 43.018784360811367 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 941, "Incident Number": 72090011, "Date": "07\/28\/2007", "Time": "12:52 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.006637, -87.938431 ], "Address": "2000 W FOREST HOME AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.938430926415805, 43.006637245039244 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 942, "Incident Number": 72080050, "Date": "07\/27\/2007", "Time": "08:45 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.005158, -87.946496 ], "Address": "2174 S 26TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.946496466818715, 43.00515841326677 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 943, "Incident Number": 72080071, "Date": "07\/27\/2007", "Time": "10:24 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.010965, -87.960391 ], "Address": "1805 S 37TH ST #107", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.960390566506774, 43.010965173466445 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 944, "Incident Number": 72070202, "Date": "07\/26\/2007", "Time": "06:02 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.019685, -87.955161 ], "Address": "1115 S 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.95516104818492, 43.019685083819041 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 945, "Incident Number": 72060233, "Date": "07\/25\/2007", "Time": "10:29 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.006637, -87.938731 ], "Address": "2016 W BECHER ST #REAR", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.93873072300768, 43.006637460470763 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 946, "Incident Number": 72020151, "Date": "07\/21\/2007", "Time": "05:06 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.006418, -87.954092 ], "Address": "2104 S 32ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.954092447919948, 43.006417994171613 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 947, "Incident Number": 72000115, "Date": "07\/19\/2007", "Time": "01:18 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.021969, -87.952222 ], "Address": "3022 W NATIONAL AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.95222170191586, 43.021969478792606 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 948, "Incident Number": 72000195, "Date": "07\/19\/2007", "Time": "07:49 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.019079, -87.949159 ], "Address": "2800 W SCOTT ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.94915875346291, 43.019078551119968 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 949, "Incident Number": 71990106, "Date": "07\/18\/2007", "Time": "12:02 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.016005, -87.953932 ], "Address": "1445 S 32ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.953931592618915, 43.016004754371295 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 950, "Incident Number": 71990108, "Date": "07\/18\/2007", "Time": "12:13 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.020072, -87.952516 ], "Address": "1038 S 31ST ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.952515933493217, 43.020072083819031 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 951, "Incident Number": 71990149, "Date": "07\/18\/2007", "Time": "04:00 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.998175, -87.950506 ], "Address": "2556 S 29TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 7, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.950505904639769, 42.99817483236194 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 952, "Incident Number": 71980030, "Date": "07\/17\/2007", "Time": "05:20 AM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.013565, -87.955204 ], "Address": "1620 S 33RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.95520392627985, 43.013564633360261 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 953, "Incident Number": 71980134, "Date": "07\/17\/2007", "Time": "04:22 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.013942, -87.952654 ], "Address": "1600 S 31ST ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.952654437388361, 43.013942161809695 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 954, "Incident Number": 71970104, "Date": "07\/16\/2007", "Time": "01:11 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.023873, -87.952245 ], "Address": "3022 W PIERCE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 7, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.952244537191987, 43.023873434935531 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 955, "Incident Number": 71970132, "Date": "07\/16\/2007", "Time": "02:10 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.003130, -87.942700 ], "Address": "2300 W LINCOLN AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.942699974464773, 43.00312951485941 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 956, "Incident Number": 71960043, "Date": "07\/15\/2007", "Time": "02:37 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.028697, -87.936423 ], "Address": "300 S 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 2, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.936422651808627, 43.028697348191372 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 957, "Incident Number": 71960072, "Date": "07\/15\/2007", "Time": "10:18 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.007705, -87.936758 ], "Address": "2027 S 19TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.936757562611646, 43.007705025535216 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 958, "Incident Number": 71940131, "Date": "07\/13\/2007", "Time": "03:49 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.014047, -87.955950 ], "Address": "3323 W LAPHAM ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.955950106440071, 43.014047481245449 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 959, "Incident Number": 71930069, "Date": "07\/12\/2007", "Time": "10:44 AM", "Police District": 6.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 42.988589, -87.949431 ], "Address": "2900 W OKLAHOMA AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.94943116290527, 42.98858948831365 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 960, "Incident Number": 71930126, "Date": "07\/12\/2007", "Time": "04:24 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.008038, -87.942360 ], "Address": "2063 S 23RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.942360348402246, 43.0080382352904 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 961, "Incident Number": 71930181, "Date": "07\/12\/2007", "Time": "08:33 PM", "Police District": 6.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.019775, -87.947684 ], "Address": "1118 S LAYTON BL", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 6, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.947684426279849, 43.019775 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 962, "Incident Number": 71910135, "Date": "07\/10\/2007", "Time": "02:29 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.994903, -87.967833 ], "Address": "2741 S 43RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 4, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 4, "g_clusterK8": 4, "e_clusterK9": 6, "g_clusterK9": 6, "e_clusterK10": 7, "g_clusterK10": 7 }, "geometry": { "type": "Point", "coordinates": [ -87.967832521964766, 42.994903278065188 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 963, "Incident Number": 71900118, "Date": "07\/09\/2007", "Time": "10:48 AM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.006418, -87.954092 ], "Address": "2104 S 32ND ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.954092447919948, 43.006417994171613 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 964, "Incident Number": 71880102, "Date": "07\/07\/2007", "Time": "10:30 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 42.998861, -87.951565 ], "Address": "2932 W FOREST HOME AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 7, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.951565131282791, 42.998861208465385 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 965, "Incident Number": 71860015, "Date": "07\/05\/2007", "Time": "12:33 AM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.017150, -87.960096 ], "Address": "1355 S 37TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.960096351375498, 43.017150181576298 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 966, "Incident Number": 71860151, "Date": "07\/05\/2007", "Time": "02:37 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.020225, -87.942173 ], "Address": "1038 S 23RD ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.942172900744637, 43.020224664723884 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 967, "Incident Number": 71860237, "Date": "07\/05\/2007", "Time": "08:54 PM", "Police District": 6.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.014607, -87.956444 ], "Address": "1560 S 34TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 6, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.956443977350304, 43.014607155981309 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 968, "Incident Number": 71860245, "Date": "07\/05\/2007", "Time": "06:48 PM", "Police District": 6.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.001261, -87.952000 ], "Address": "3003 W HAYES AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 4, "e_clusterK7": 6, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 7, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.952000080904838, 43.00126146681874 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 969, "Incident Number": 71850116, "Date": "07\/04\/2007", "Time": "02:05 PM", "Police District": 6.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.024124, -87.948761 ], "Address": "2730 W PIERCE ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.948761086733214, 43.024124482110835 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 970, "Incident Number": 71840119, "Date": "07\/03\/2007", "Time": "01:46 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.012088, -87.938225 ], "Address": "1709 S MUSKEGO AV", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.938224961163243, 43.012088318079435 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 971, "Incident Number": 71840228, "Date": "07\/03\/2007", "Time": "11:18 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.022997, -87.945000 ], "Address": "749 S 25TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 2, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 1, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 7, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.944999613682072, 43.022997167638067 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 972, "Incident Number": 71830111, "Date": "07\/02\/2007", "Time": "01:39 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.008353, -87.943785 ], "Address": "2007 S 24TH ST", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 1, "e_clusterK6": 5, "g_clusterK6": 5, "e_clusterK7": 4, "g_clusterK7": 4, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 6, "g_clusterK10": 6 }, "geometry": { "type": "Point", "coordinates": [ -87.943784541853816, 43.008352651336565 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 973, "Incident Number": 71830194, "Date": "07\/02\/2007", "Time": "08:05 PM", "Police District": 6.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.015970, -87.941042 ], "Address": "2201 W ORCHARD ST #A", "e_clusterK2": 1, "g_clusterK2": 1, "e_clusterK3": 2, "g_clusterK3": 2, "e_clusterK4": 1, "g_clusterK4": 1, "e_clusterK5": 1, "g_clusterK5": 2, "e_clusterK6": 3, "g_clusterK6": 3, "e_clusterK7": 4, "g_clusterK7": 1, "e_clusterK8": 2, "g_clusterK8": 2, "e_clusterK9": 1, "g_clusterK9": 1, "e_clusterK10": 2, "g_clusterK10": 2 }, "geometry": { "type": "Point", "coordinates": [ -87.941042025535225, 43.015970474032102 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 974, "Incident Number": 72120050, "Date": "07\/31\/2007", "Time": "07:43 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.181885, -88.001397 ], "Address": "7318 W MARINE DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.001397073467146, 43.181884702177619 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 975, "Incident Number": 72120053, "Date": "07\/31\/2007", "Time": "08:12 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.165116, -88.016412 ], "Address": "8500 W TOWER AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.016412174851411, 43.165116460037119 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 976, "Incident Number": 72120105, "Date": "07\/31\/2007", "Time": "10:56 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.138585, -87.980762 ], "Address": "6643 N 55TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.980761632003947, 43.138584838190326 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 977, "Incident Number": 72120120, "Date": "07\/31\/2007", "Time": "12:10 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.151904, -88.005394 ], "Address": "7323 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005393860051015, 43.151903895089781 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 978, "Incident Number": 72120214, "Date": "07\/31\/2007", "Time": "07:47 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.168607, -88.033656 ], "Address": "8252 N 97TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.033656479860468, 43.168607309452455 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 979, "Incident Number": 72100075, "Date": "07\/29\/2007", "Time": "09:32 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.172509, -88.045100 ], "Address": "8499 N 107TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.045100114490154, 43.172508520399333 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 980, "Incident Number": 72090212, "Date": "07\/28\/2007", "Time": "10:45 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.187295, -88.002731 ], "Address": "9217 N 75TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.00273116694683, 43.187294836764423 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 981, "Incident Number": 72080096, "Date": "07\/27\/2007", "Time": "12:36 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.174721, -88.027417 ], "Address": "9400 W HEATHER AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.027416998499447, 43.174721412804502 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 982, "Incident Number": 72080163, "Date": "07\/27\/2007", "Time": "08:05 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.167684, -88.044517 ], "Address": "8251 N 107TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.044517149871922, 43.167683969687069 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 983, "Incident Number": 72070106, "Date": "07\/26\/2007", "Time": "10:45 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.143539, -88.020174 ], "Address": "8724 W SPOKANE ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.020173787668142, 43.143538964769917 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 984, "Incident Number": 72070244, "Date": "07\/26\/2007", "Time": "09:29 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.165139, -88.012684 ], "Address": "8200 W TOWER AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.012684225921873, 43.165139499999071 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 985, "Incident Number": 72060130, "Date": "07\/25\/2007", "Time": "12:12 PM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.174154, -88.041196 ], "Address": "8605 N GRANVILLE RD #7", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.041195696981504, 43.174153563391044 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 986, "Incident Number": 72060175, "Date": "07\/25\/2007", "Time": "06:05 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.137831, -88.009243 ], "Address": "7900 W ACACIA ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.009243218708519, 43.137831486149274 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 987, "Incident Number": 72060185, "Date": "07\/25\/2007", "Time": "06:22 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.134043, -87.979014 ], "Address": "5318 W MILL RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.979014335276119, 43.134043493219316 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 988, "Incident Number": 72050092, "Date": "07\/24\/2007", "Time": "10:52 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.178594, -88.030361 ], "Address": "8843 N 96TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.030361341245779, 43.178594046344401 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 989, "Incident Number": 72040066, "Date": "07\/23\/2007", "Time": "08:02 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.142382, -88.025015 ], "Address": "6844 N 91ST ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.025014831352337, 43.142382 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 990, "Incident Number": 72040160, "Date": "07\/23\/2007", "Time": "03:06 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.123702, -87.989574 ], "Address": "5839 N 63RD ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.989573625792943, 43.123702462599034 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 991, "Incident Number": 72030062, "Date": "07\/22\/2007", "Time": "07:42 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.157720, -88.041326 ], "Address": "10282 W FOUNTAIN AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.04132588819013, 43.157719834136934 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 992, "Incident Number": 72030104, "Date": "07\/22\/2007", "Time": "11:51 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.168989, -88.046946 ], "Address": "11018 W VILLA AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.046945883720838, 43.168989224017302 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 993, "Incident Number": 72030107, "Date": "07\/22\/2007", "Time": "11:55 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.148770, -87.998000 ], "Address": "7000 W GOOD HOPE RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.998000055369616, 43.148769504327838 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 994, "Incident Number": 72030162, "Date": "07\/22\/2007", "Time": "05:21 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.181780, -88.004550 ], "Address": "8875 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.004550346652309, 43.181780263573906 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 995, "Incident Number": 72010068, "Date": "07\/20\/2007", "Time": "11:11 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.129462, -87.986873 ], "Address": "6060 W DOUGLAS AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 0, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.986872529834386, 43.129462468837936 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 996, "Incident Number": 72000094, "Date": "07\/19\/2007", "Time": "11:54 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.136940, -88.005562 ], "Address": "6550 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005562376219956, 43.13694042576028 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 997, "Incident Number": 71990049, "Date": "07\/18\/2007", "Time": "07:53 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.157481, -88.040755 ], "Address": "10222 W FOUNTAIN AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.0407554835393, 43.157480807538391 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 998, "Incident Number": 71990065, "Date": "07\/18\/2007", "Time": "07:43 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.156482, -87.994075 ], "Address": "6747 W CALUMET RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.99407535215569, 43.156481649431761 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 999, "Incident Number": 71990080, "Date": "07\/18\/2007", "Time": "10:01 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.178256, -88.030674 ], "Address": "9622 W BROWN DEER RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.030673920364052, 43.178255869694922 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1000, "Incident Number": 71990173, "Date": "07\/18\/2007", "Time": "05:59 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.180635, -88.030025 ], "Address": "8940 N MICHELE ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.030024746217094, 43.180634638914604 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1001, "Incident Number": 71990194, "Date": "07\/18\/2007", "Time": "07:26 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.171696, -88.005833 ], "Address": "7625 W DONNA CT", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005832963356269, 43.171695506203761 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1002, "Incident Number": 71970125, "Date": "07\/16\/2007", "Time": "03:14 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.163190, -88.019024 ], "Address": "8701 W BRADLEY RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.019023850683794, 43.163190468406185 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1003, "Incident Number": 71970131, "Date": "07\/16\/2007", "Time": "03:22 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.181780, -88.004550 ], "Address": "8875 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.004550346652309, 43.181780263573906 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1004, "Incident Number": 71960092, "Date": "07\/15\/2007", "Time": "12:20 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.170522, -88.002863 ], "Address": "7415 W DEAN RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.002862904668433, 43.170521516592039 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1005, "Incident Number": 71950088, "Date": "07\/14\/2007", "Time": "11:32 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.177609, -88.023573 ], "Address": "9005 W BROWN DEER RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.023572748542904, 43.177608546742619 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1006, "Incident Number": 71950126, "Date": "07\/14\/2007", "Time": "02:55 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.151904, -88.005394 ], "Address": "7323 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005393860051015, 43.151903895089781 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1007, "Incident Number": 71940003, "Date": "07\/13\/2007", "Time": "12:13 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.177231, -88.057391 ], "Address": "11800 W BROWN DEER RD", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.057391090224328, 43.177230511250862 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1008, "Incident Number": 71930039, "Date": "07\/12\/2007", "Time": "08:27 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.171148, -88.042139 ], "Address": "10509 W DONNA DR", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.042139497085813, 43.171148495672163 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1009, "Incident Number": 71930182, "Date": "07\/12\/2007", "Time": "09:20 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.152995, -88.005016 ], "Address": "7440 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005016426713482, 43.152995053840421 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1010, "Incident Number": 71940004, "Date": "07\/12\/2007", "Time": "09:49 PM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.143567, -87.993162 ], "Address": "6537 W SPOKANE ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -87.993162152230397, 43.143566502885548 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1011, "Incident Number": 71910101, "Date": "07\/10\/2007", "Time": "11:15 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.184210, -88.013834 ], "Address": "8341 W NORTHRIDGE CT", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.013834187489138, 43.184209528420766 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1012, "Incident Number": 71900083, "Date": "07\/09\/2007", "Time": "08:46 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.169147, -88.044459 ], "Address": "8301 N 107TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.044458651479658, 43.169147056898815 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1013, "Incident Number": 71900086, "Date": "07\/09\/2007", "Time": "08:57 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.169147, -88.044459 ], "Address": "8301 N 107TH ST #N", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.044458651479658, 43.169147056898815 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1014, "Incident Number": 71900254, "Date": "07\/09\/2007", "Time": "08:44 PM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.174403, -88.042813 ], "Address": "8626 N 106TH ST #4", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.042812828034101, 43.174403413266788 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1015, "Incident Number": 71880114, "Date": "07\/07\/2007", "Time": "01:35 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.118152, -87.988026 ], "Address": "6031 W SHERIDAN AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 4, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.988025989614371, 43.118152474520983 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1016, "Incident Number": 71880187, "Date": "07\/07\/2007", "Time": "05:53 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.152995, -88.005016 ], "Address": "7440 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005016426713482, 43.152995053840421 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1017, "Incident Number": 71870073, "Date": "07\/06\/2007", "Time": "10:17 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.117137, -87.985061 ], "Address": "5469 N 58TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.985060646430668, 43.117137419095172 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1018, "Incident Number": 71860056, "Date": "07\/05\/2007", "Time": "07:44 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.160308, -88.044456 ], "Address": "7850 N 107TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.044455892377442, 43.160308323619375 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1019, "Incident Number": 71860057, "Date": "07\/05\/2007", "Time": "07:45 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.134632, -87.995119 ], "Address": "6421 N 67TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.995118643112448, 43.13463202553524 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1020, "Incident Number": 71860111, "Date": "07\/05\/2007", "Time": "11:06 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.170255, -88.040231 ], "Address": "10330 W DEAN RD #103", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.040231360811347, 43.170255489901116 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1021, "Incident Number": 71850120, "Date": "07\/04\/2007", "Time": "02:42 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.152995, -88.005016 ], "Address": "7440 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005016426713482, 43.152995053840421 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1022, "Incident Number": 71840163, "Date": "07\/03\/2007", "Time": "05:40 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.161835, -88.044371 ], "Address": "7942 N 107TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.044371236221224, 43.16183538498364 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1023, "Incident Number": 71840184, "Date": "07\/03\/2007", "Time": "06:00 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.152995, -88.005016 ], "Address": "7440 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005016426713482, 43.152995053840421 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1024, "Incident Number": 71840184, "Date": "07\/03\/2007", "Time": "06:00 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.152995, -88.005016 ], "Address": "7440 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005016426713482, 43.152995053840421 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1025, "Incident Number": 71840203, "Date": "07\/03\/2007", "Time": "09:36 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.158988, -88.043337 ], "Address": "10554 W FOUNTAIN AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.043337458191274, 43.158987782046275 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1026, "Incident Number": 71830059, "Date": "07\/02\/2007", "Time": "09:10 AM", "Police District": 4.0, "Offense 1": "THEFT FROM BUILDING", "Location": [ 43.161508, -88.044385 ], "Address": "7904 N 107TH ST #5", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.044385024442803, 43.161507914721213 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1027, "Incident Number": 71830072, "Date": "07\/02\/2007", "Time": "10:49 AM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.115683, -87.984824 ], "Address": "5734 W CUSTER AV", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 0, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 5, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 4 }, "geometry": { "type": "Point", "coordinates": [ -87.9848235, 43.115682518754546 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1028, "Incident Number": 71830110, "Date": "07\/02\/2007", "Time": "01:08 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Offense 2": "DESTRUCTION\/DAMAGE\/VANDALISM OF PROPERTY", "Location": [ 43.165121, -88.004483 ], "Address": "8086 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.00448334794342, 43.165121465491069 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1029, "Incident Number": 71830119, "Date": "07\/02\/2007", "Time": "09:45 AM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.151904, -88.005394 ], "Address": "7323 N 76TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.005393860051015, 43.151903895089781 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1030, "Incident Number": 71820098, "Date": "07\/01\/2007", "Time": "01:07 PM", "Police District": 4.0, "Offense 1": "THEFT OF MOTOR VEHICLE PARTS\/ACCESSORIES", "Location": [ 43.114842, -87.971361 ], "Address": "5347 N 47TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 3, "g_clusterK4": 3, "e_clusterK5": 0, "g_clusterK5": 0, "e_clusterK6": 1, "g_clusterK6": 1, "e_clusterK7": 2, "g_clusterK7": 0, "e_clusterK8": 3, "g_clusterK8": 3, "e_clusterK9": 0, "g_clusterK9": 5, "e_clusterK10": 4, "g_clusterK10": 8 }, "geometry": { "type": "Point", "coordinates": [ -87.971361132003949, 43.114841664723883 ] } },
{ "type": "Feature", "properties": { "Unnamed: 0": 1031, "Incident Number": 71820100, "Date": "07\/01\/2007", "Time": "01:12 PM", "Police District": 4.0, "Offense 1": "THEFT FROM MOTOR VEHICLE", "Location": [ 43.184471, -88.002775 ], "Address": "9108 N 75TH ST", "e_clusterK2": 0, "g_clusterK2": 0, "e_clusterK3": 1, "g_clusterK3": 1, "e_clusterK4": 0, "g_clusterK4": 0, "e_clusterK5": 4, "g_clusterK5": 4, "e_clusterK6": 2, "g_clusterK6": 2, "e_clusterK7": 5, "g_clusterK7": 5, "e_clusterK8": 6, "g_clusterK8": 6, "e_clusterK9": 7, "g_clusterK9": 7, "e_clusterK10": 9, "g_clusterK10": 9 }, "geometry": { "type": "Point", "coordinates": [ -88.002775153371772, 43.1844705 ] } }
]
}
|
// Karma configuration
'use strict';
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '../',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai-as-promised', 'chai'],
// list of files / patterns to load in the browser
files: [
{pattern: 'build/assets/js/dependencies.js', watched: false},
{pattern: 'build/assets/js/templates.js', watched: false},
{pattern: 'bower_components/angular-mocks/angular-mocks.js', watched: false},
'build/assets/js/routes.js',
'build/assets/js/app.js',
'test/client/**/*.test.js'
],
// list of files to exclude
exclude: [],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
});
};
|
import React from 'react';
import { NavLink } from 'react-router-dom';
import pathToRegexp from 'path-to-regexp';
const ParamLink = ({
children,
match: { url = '', path = '', params: currentParams = {} } = {},
location: { pathname = '' } = {},
params = {},
}) => {
const urlPartToInsert = pathToRegexp.compile(path)({
...currentParams,
...params,
});
const to = pathname.replace(url, urlPartToInsert);
return <NavLink to={to}>{children}</NavLink>;
};
export default ParamLink;
|
"use strict"
var iota = require("iota-array")
var arrayMethods = [
"concat",
"join",
"slice",
"toString",
"indexOf",
"lastIndexOf",
"forEach",
"every",
"some",
"filter",
"map",
"reduce",
"reduceRight"
]
function compare1st(a, b) {
return a[0] - b[0]
}
function order() {
var stride = this.stride
var terms = new Array(stride.length)
var i
for(i=0; i<terms.length; ++i) {
terms[i] = [Math.abs(stride[i]), i]
}
terms.sort(compare1st)
var result = new Array(terms.length)
for(i=0; i<result.length; ++i) {
result[i] = terms[i][1]
}
return result
}
function compileConstructor(dtype, dimension) {
var className = ["View", dimension, "d", dtype].join("")
var useGetters = (dtype === "generic")
//Special case for 0d arrays
if(dimension === 0) {
var code = [
"function ", className, "(a,d) {\
this.data = a;\
this.offset = d\
};\
var proto=", className, ".prototype;\
proto.dtype='", dtype, "';\
proto.index=function(){return this.offset};\
proto.dimension=0;\
proto.size=1;\
proto.shape=\
proto.stride=\
proto.order=[];\
proto.lo=\
proto.hi=\
proto.transpose=\
proto.step=\
proto.pick=function ", className, "_copy() {\
return new ", className, "(this.data,this.offset)\
};\
proto.get=function ", className, "_get(){\
return ", (useGetters ? "this.data.get(this.offset)" : "this.data[this.offset]"),
"};\
proto.set=function ", className, "_set(v){\
return ", (useGetters ? "this.data.get(this.offset)" : "this.data[this.offset]"), "=v\
};\
return function construct_", className, "(a,b,c,d){return new ", className, "(a,d)}"].join("")
var procedure = new Function(code)
return procedure()
}
var code = ["'use strict'"]
//Create constructor for view
var indices = iota(dimension)
var args = indices.map(function(i) { return "i"+i })
var index_str = "this.offset+" + indices.map(function(i) {
return ["this._stride", i, "*i",i].join("")
}).join("+")
code.push(["function ", className, "(a,",
indices.map(function(i) {
return "b"+i
}).join(","), ",",
indices.map(function(i) {
return "c"+i
}).join(","), ",d){this.data=a"].join(""))
for(var i=0; i<dimension; ++i) {
code.push(["this._shape",i,"=b",i,"|0"].join(""))
}
for(var i=0; i<dimension; ++i) {
code.push(["this._stride",i,"=c",i,"|0"].join(""))
}
code.push("this.offset=d|0}")
//Get prototype
code.push(["var proto=",className,".prototype"].join(""))
//view.dtype:
code.push(["proto.dtype='", dtype, "'"].join(""))
code.push("proto.dimension="+dimension)
//view.stride and view.shape
var strideClassName = ["VStride", dimension, "d", dtype].join("")
var shapeClassName = ["VShape", dimension, "d", dtype].join("")
var props = {"stride":strideClassName, "shape":shapeClassName}
for(var prop in props) {
var arrayName = props[prop]
code.push(["function ", arrayName, "(v) {this._v=v} var aproto=", arrayName, ".prototype"].join(""))
code.push(["aproto.length=",dimension].join(""))
var array_elements = []
for(var i=0; i<dimension; ++i) {
array_elements.push(["this._v._", prop, i].join(""))
}
code.push(["aproto.toJSON=function ", arrayName, "_toJSON(){return [", array_elements.join(","), "]}"].join(""))
code.push(["aproto.toString=function ", arrayName, "_toString(){return [", array_elements.join(","), "].join()}"].join(""))
for(var i=0; i<dimension; ++i) {
code.push(["Object.defineProperty(aproto,", i, ",{get:function(){return this._v._", prop, i, "},set:function(v){return this._v._", prop, i, "=v|0},enumerable:true})"].join(""))
}
for(var i=0; i<arrayMethods.length; ++i) {
if(arrayMethods[i] in Array.prototype) {
code.push(["aproto.", arrayMethods[i], "=Array.prototype.", arrayMethods[i]].join(""))
}
}
code.push(["Object.defineProperty(proto,'",prop,"',{get:function ", arrayName, "_get(){return new ", arrayName, "(this)},set: function ", arrayName, "_set(v){"].join(""))
for(var i=0; i<dimension; ++i) {
code.push(["this._", prop, i, "=v[", i, "]|0"].join(""))
}
code.push("return v}})")
}
//view.size:
code.push(["Object.defineProperty(proto,'size',{get:function ",className,"_size(){\
return ", indices.map(function(i) { return ["this._shape", i].join("") }).join("*"),
"}})"].join(""))
//view.order:
if(dimension === 1) {
code.push("proto.order=[0]")
} else {
code.push("Object.defineProperty(proto,'order',{get:")
if(dimension < 4) {
code.push(["function ",className,"_order(){"].join(""))
if(dimension === 2) {
code.push("return (Math.abs(this._stride0)>Math.abs(this._stride1))?[1,0]:[0,1]}})")
} else if(dimension === 3) {
code.push(
"var s0=Math.abs(this._stride0),s1=Math.abs(this._stride1),s2=Math.abs(this._stride2);\
if(s0>s1){\
if(s1>s2){\
return [2,1,0];\
}else if(s0>s2){\
return [1,2,0];\
}else{\
return [1,0,2];\
}\
}else if(s0>s2){\
return [2,0,1];\
}else if(s2>s1){\
return [0,1,2];\
}else{\
return [0,2,1];\
}}})")
}
} else {
code.push("ORDER})")
}
}
//view.set(i0, ..., v):
code.push([
"proto.set=function ",className,"_set(", args.join(","), ",v){"].join(""))
if(useGetters) {
code.push(["return this.data.set(", index_str, ",v)}"].join(""))
} else {
code.push(["return this.data[", index_str, "]=v}"].join(""))
}
//view.get(i0, ...):
code.push(["proto.get=function ",className,"_get(", args.join(","), "){"].join(""))
if(useGetters) {
code.push(["return this.data.get(", index_str, ")}"].join(""))
} else {
code.push(["return this.data[", index_str, "]}"].join(""))
}
//view.index:
code.push([
"proto.index=function ",
className,
"_index(", args.join(), "){return ",
index_str, "}"].join(""))
//view.hi():
code.push(["proto.hi=function ",className,"_hi(",args.join(","),"){return new ", className, "(this.data,",
indices.map(function(i) {
return ["(typeof i",i,"!=='number'||i",i,"<0)?this._shape", i, ":i", i,"|0"].join("")
}).join(","), ",",
indices.map(function(i) {
return "this._stride"+i
}).join(","), ",this.offset)}"].join(""))
//view.lo():
var a_vars = indices.map(function(i) { return "a"+i+"=this._shape"+i })
var c_vars = indices.map(function(i) { return "c"+i+"=this._stride"+i })
code.push(["proto.lo=function ",className,"_lo(",args.join(","),"){var b=this.offset,d=0,", a_vars.join(","), ",", c_vars.join(",")].join(""))
for(var i=0; i<dimension; ++i) {
code.push([
"if(typeof i",i,"==='number'&&i",i,">=0){\
d=i",i,"|0;\
b+=c",i,"*d;\
a",i,"-=d}"].join(""))
}
code.push(["return new ", className, "(this.data,",
indices.map(function(i) {
return "a"+i
}).join(","),",",
indices.map(function(i) {
return "c"+i
}).join(","), ",b)}"].join(""))
//view.step():
code.push(["proto.step=function ",className,"_step(",args.join(","),"){var ",
indices.map(function(i) {
return "a"+i+"=this._shape"+i
}).join(","), ",",
indices.map(function(i) {
return "b"+i+"=this._stride"+i
}).join(","),",c=this.offset,d=0,ceil=Math.ceil"].join(""))
for(var i=0; i<dimension; ++i) {
code.push([
"if(typeof i",i,"==='number'){\
d=i",i,"|0;\
if(d<0){\
c+=b",i,"*(a",i,"-1);\
a",i,"=ceil(-a",i,"/d)\
}else{\
a",i,"=ceil(a",i,"/d)\
}\
b",i,"*=d\
}"].join(""))
}
code.push(["return new ", className, "(this.data,",
indices.map(function(i) {
return "a" + i
}).join(","), ",",
indices.map(function(i) {
return "b" + i
}).join(","), ",c)}"].join(""))
//view.transpose():
var tShape = new Array(dimension)
var tStride = new Array(dimension)
for(var i=0; i<dimension; ++i) {
tShape[i] = ["a[i", i, "|0]"].join("")
tStride[i] = ["b[i", i, "|0]"].join("")
}
code.push(["proto.transpose=function ",className,"_transpose(",args,"){var a=this.shape,b=this.stride;return new ", className, "(this.data,", tShape.join(","), ",", tStride.join(","), ",this.offset)}"].join(""))
//view.pick():
code.push(["proto.pick=function ",className,"_pick(",args,"){var a=[],b=[],c=this.offset"].join(""))
for(var i=0; i<dimension; ++i) {
code.push(["if(typeof i",i,"==='number'&&i",i,">=0){c=(c+this._stride",i,"*i",i,")|0}else{a.push(this._shape",i,");b.push(this._stride",i,")}"].join(""))
}
code.push("var ctor=CTOR_LIST[a.length];return ctor(this.data,a,b,c)}")
//Add return statement
code.push(["return function construct_",className,"(data,shape,stride,offset){return new ", className,"(data,",
indices.map(function(i) {
return "shape["+i+"]"
}).join(","), ",",
indices.map(function(i) {
return "stride["+i+"]"
}).join(","), ",offset)}"].join(""))
//Compile procedure
var procedure = new Function("CTOR_LIST", "ORDER", code.join("\n"))
return procedure(CACHED_CONSTRUCTORS[dtype], order)
}
function arrayDType(data) {
if(data instanceof Float64Array) {
return "float64";
} else if(data instanceof Float32Array) {
return "float32"
} else if(data instanceof Int32Array) {
return "int32"
} else if(data instanceof Uint32Array) {
return "uint32"
} else if(data instanceof Uint8Array) {
return "uint8"
} else if(data instanceof Uint16Array) {
return "uint16"
} else if(data instanceof Int16Array) {
return "int16"
} else if(data instanceof Int8Array) {
return "int8"
} else if(data instanceof Uint8ClampedArray) {
return "uint8_clamped"
} else if((typeof Buffer !== "undefined") && (data instanceof Buffer)) {
return "buffer"
} else if(data instanceof Array) {
return "array"
}
return "generic"
}
var CACHED_CONSTRUCTORS = {
"float32":[],
"float64":[],
"int8":[],
"int16":[],
"int32":[],
"uint8":[],
"uint16":[],
"uint32":[],
"array":[],
"uint8_clamped":[],
"buffer":[],
"generic":[]
}
function wrappedNDArrayCtor(data, shape, stride, offset) {
if(shape === undefined) {
shape = [ data.length ]
}
var d = shape.length
if(stride === undefined) {
stride = new Array(d)
for(var i=d-1, sz=1; i>=0; --i) {
stride[i] = sz
sz *= shape[i]
}
}
if(offset === undefined) {
offset = 0
for(var i=0; i<d; ++i) {
if(stride[i] < 0) {
offset -= (shape[i]-1)*stride[i]
}
}
}
var dtype = arrayDType(data)
var ctor_list = CACHED_CONSTRUCTORS[dtype]
while(ctor_list.length <= d) {
ctor_list.push(compileConstructor(dtype, ctor_list.length))
}
var ctor = ctor_list[d]
return ctor(data, shape, stride, offset)
}
module.exports = wrappedNDArrayCtor
|
module.exports = function stats () {
return {
vaoCount: 0,
bufferCount: 0,
elementsCount: 0,
framebufferCount: 0,
shaderCount: 0,
textureCount: 0,
cubeCount: 0,
renderbufferCount: 0,
maxTextureUnits: 0
}
}
|
webpackJsonp([2,10,9],{
/***/ 85:
/***/ function(module, exports, __webpack_require__) {
'use strict';
var t = __webpack_require__(86);
module.exports = t;
/***/ },
/***/ 86:
/***/ function(module, exports) {
"use strict";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function noop() {}
var TDGA = window.TDGA;
if (!TDGA) {
TDGA = {
Account: noop,
onPageLeave: noop,
onReward: noop,
onChargeRequest: noop,
onChargeSuccess: noop,
onItemPurchase: noop,
onMissionBegin: noop,
onMissionCompleted: noop,
onEvent: noop
};
TDGA.Account.setLevel = noop;
}
var Stat = function () {
function Stat() {
_classCallCheck(this, Stat);
this._delayOp = [];
this._inited = true;
}
_createClass(Stat, [{
key: "init",
value: function init(key) {
this._inited = true;
return;
}
}, {
key: "_delay",
value: function _delay(f) {
if (!this._inited) {
return this._delayOp.push({ f: f });
}
f();
}
}, {
key: "userin",
value: function userin(me) {
this._delay(function () {
var qudao = 0;
if (!!window.cordova) {
var o = { "Android": 1, "BlackBerry 10": 2, "browser": 3, "iOS": 4, "WinCE": 5, "Tizen": 6, "Mac OS X": 7 };
qudao = o[device.platform] || 8;
} else if (startup_param.pf == 'wechat') qudao = 101;
TDGA.Account({
accountId: me.id,
level: me.level,
accountName: me.nickname,
gameServer: '通用',
accountType: qudao,
gender: startup_param.sex
});
});
}
}, {
key: "userout",
value: function userout() {
this._delay(TDGA.onPageLeave.bind(TDGA));
}
}, {
key: "levelup",
value: function levelup(n) {
this._delay(TDGA.Account.setLevel.bind(TDGA.Account, n));
}
}, {
key: "reward",
value: function reward(n, reason) {
this._delay(TDGA.onReward.bind(TDGA, n, reason));
}
}, {
key: "beginCharge",
value: function beginCharge(orderid, money, tickets, desc, payment) {
if (typeof tickets == 'string') {
payment = desc;
desc = tickets;
tickets = Math.floor(money / 3);
}
this._delay(function () {
TDGA.onChargeRequest({
orderId: orderid,
iapId: desc,
currencyAmount: money,
currencyType: 'CNY',
virtualCurrencyAmount: tickets,
paymentType: payment
});
});
}
}, {
key: "endCharge",
value: function endCharge(orderid, payment) {
this._delay(function () {
TDGA.onChargeSuccess({
orderId: orderid,
paymentType: payment
});
});
}
}, {
key: "enterGame",
value: function enterGame(tableid) {
this._delay(function () {
TDGA.onMissionBegin(tableid.toString());
});
}
}, {
key: "startGame",
value: function startGame(tableid, name, tickets) {
this._delay(function () {
TDGA.onItemPurchase({ item: name, itemNumber: 1, priceInVirtualCurrency: tickets });
TDGA.onEvent(name, {});
});
}
}, {
key: "endGame",
value: function endGame(tableid) {
this._delay(function () {
TDGA.onMissionCompleted(tableid.toString());
});
}
}, {
key: "share",
value: function share() {
this._delay(function () {
TDGA.onEvent('share', { user: { id: me.id, nickname: me.nickname } });
});
}
}, {
key: "invite",
value: function invite(tableid, tabledesc) {
this._delay(function () {
TDGA.onEvent('invite', { user: { id: me.id, nickname: me.nickname }, table: { id: tableid, msg: tabledesc } });
});
}
}, {
key: "event",
value: function event(name, data) {
this._delay(function () {
TDGA.onEvent(name, (typeof data === "undefined" ? "undefined" : _typeof(data)) == 'object' ? data : { data: data });
});
}
/**
*
* @param {number} n , 换多少币
* @param {number} m ,上级币的数量
* @param {string|null} n_name, 本级货币名称,默认金币
* @param {string|null} m_name, 上级货币名称,默认钻石
*/
}, {
key: "changeToVirtualCurrency",
value: function changeToVirtualCurrency(n, m, n_name, m_name) {
n_name = n_name || '金币';m_name = m_name || '钻石';
this._delay(function () {
var detail = {};
detail[n_name] = n;
detail[m_name] = m;
TDGA.onEvent('buyCoin', detail);
});
}
/**
* 消耗虚拟币,如果有3个参数,那么是消耗n*price的币,
* @param {string} name
* @param {number} n
* @param {number|null} price
*/
}, {
key: "consume",
value: function consume(name, n, price) {
this._delay(function () {
TDGA.onItemPurchase(name, n, price);
});
}
}]);
return Stat;
}();
var tongji = new Stat();
window.onunload = tongji.userout.bind(tongji);
module.exports = tongji;
/***/ },
/***/ 88:
/***/ function(module, exports, __webpack_require__) {
'use strict';
var tongji = window.tongji = __webpack_require__(85);
var _ = __webpack_require__(22),
noop = _._noop;
switch (device.platform) {
case 'iOS':
__webpack_require__(89);
break;
case 'android':
__webpack_require__(269);
break;
default:
window.pay = function (orderid, money, desc, cb) {
!cb && (cb = _noop);
if (tipon) {
tipon(device.platfomr + '未实现').popup();
}
cb('not impl');
};
window.share = function () {
if (tipon) {
tipon(device.platfomr + '未实现').popup();
}
};
window.preShareResult = function (roomid, setnum, participants, winners, img) {
if (tipon) {
tipon(device.platfomr + '未实现').popup();
}
};
break;
}
/***/ },
/***/ 89:
/***/ function(module, exports, __webpack_require__) {
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var merge = __webpack_require__(21);
if (!window.store) alert('cc.fovea.cordova.purchase not installed');else {
var _realInAppPurchase = function _realInAppPurchase(orderid, money, desc, cb) {
tongji.beginCharge(orderid, appleProducts[orderid].actureMoney, appleProducts[orderid].actureCoins, desc, '苹果商店支付');
store.order(orderid);
};
var appleProducts = {
'low': { bundle: 'com.1357g.niuniu.5tickets' },
'middle': { bundle: 'com.bjl2000.bacc.middleprice' },
'high': { bundle: 'com.bjl2000.bacc.highprice' }
};
for (var p in appleProducts) {
store.register({
id: appleProducts[p].bundle, // id without package name!
alias: p,
type: store.CONSUMABLE
});
store.when(p).updated(function (pinfo) {
console.log(p, 'price', pinfo.price);
appleProducts[p] = merge(appleProducts[p], pinfo);
if (pinfo.state == 'invalid') return;
appleProducts[p].actureMoney = Number(pinfo.price.substr(1));
appleProducts[p].actureCoins = pinfo.description.substr(pinfo.description.indexOf('=') + 1);
}).approved(function (order) {
order.verify();
}).verified(function (order) {
console.log('finally', order);
if (!appleOrderid) return appleOrderCb && appleOrderCb('appleOrderid was not set');
var data = { actureMoney: appleProducts[p].actureMoney, orderid: appleOrderid, receipt: order.transaction.appStoreReceipt };
getAjax('/g/niuniu.app/pay/apple', data, function (err, r) {
err = err || r.err;
if (err) {
console.log(err, r);
tipon(err).popup();
} else tipon('购买成功').popup();
order.finish();
tongji.endCharge(appleOrderid, '苹果商店支付');
var _cb = appleOrderCb;
appleOrderCb = null;
_cb && _cb();
});
}).cancelled(function (order) {
var _cb = appleOrderCb;
appleOrderCb = null;
_cb && _cb();
});
}
store.validator = function (product, callback) {
console.log('verify', product);
callback(true);
};
store.error(function (err) {
console.log(err);
});
store.refresh();
var payQ = async.queue(function (f, cb) {
if (typeof f == 'function') f(cb);else cb();
});
window.pay = function (orderid, money, desc, cb) {
!cb && (cb = _noop);
payQ.push(_realInAppPurchase.bind(null, orderid, money, desc), cb);
};
// change rechargeWin impl
var wins = __webpack_require__(94);
var RechargeWin = function (_wins$Win) {
_inherits(RechargeWin, _wins$Win);
function RechargeWin() {
_classCallCheck(this, RechargeWin);
return _possibleConstructorReturn(this, (RechargeWin.__proto__ || Object.getPrototypeOf(RechargeWin)).call(this, 'recharge'));
}
_createClass(RechargeWin, [{
key: 'onInit',
value: function onInit() {
_get(RechargeWin.prototype.__proto__ || Object.getPrototypeOf(RechargeWin.prototype), 'onInit', this).call(this);
var l = this.contentPane.getChild('n87');
var idx = 0;
var _loop = function _loop(_p) {
pane = l.getChildAt(idx);
appleProducts[_p].price && (pane.getChild('n85').text = appleProducts[_p].price);
pane.onClick(null, function () {
getAjax('createOrder', { productId: appleProducts[_p].bundle }, function (err, r) {
pay(appleProducts[_p].bundle);
});
});
l.addChild(pane);
};
for (var _p in appleProducts) {
var pane;
_loop(_p);
}
}
}]);
return RechargeWin;
}(wins.Win);
;
wins.RechargeWin = RechargeWin;
}
/***/ },
/***/ 269:
/***/ function(module, exports) {
"use strict";
/***/ }
});
|
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("react"), require("react-redux"), require("vue"), require("react-dom"), require("redux"), require("vue-router"), require("vuex"));
else if(typeof define === 'function' && define.amd)
define(["react", "react-redux", "vue", "react-dom", "redux", "vue-router", "vuex"], factory);
else if(typeof exports === 'object')
exports["BillundSupportor"] = factory(require("react"), require("react-redux"), require("vue"), require("react-dom"), require("redux"), require("vue-router"), require("vuex"));
else
root["BillundSupportor"] = factory(root["React"], root["ReactRedux"], root["Vue"], root["ReactDom"], root["Redux"], root["VueRouter"], root["Vuex"]);
})(this, function(__WEBPACK_EXTERNAL_MODULE_9__, __WEBPACK_EXTERNAL_MODULE_10__, __WEBPACK_EXTERNAL_MODULE_11__, __WEBPACK_EXTERNAL_MODULE_41__, __WEBPACK_EXTERNAL_MODULE_42__, __WEBPACK_EXTERNAL_MODULE_43__, __WEBPACK_EXTERNAL_MODULE_44__) {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 19);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var renderType = __webpack_require__(23);
var state = __webpack_require__(24);
var widget = __webpack_require__(26);
var render = __webpack_require__(22);
var supportor = __webpack_require__(25);
var external = __webpack_require__(21);
module.exports = {
renderType: renderType,
state: state,
widget: widget,
render: render,
supportor: supportor,
external: external
};
/***/ }),
/* 1 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var Util = __webpack_require__(20);
function extend(obj) {
var args = Array.prototype.slice.call(arguments, 1);
args.forEach(function (source) {
if (source) {
for (var prop in source) {
obj[prop] = source[prop];
}
}
});
return obj;
}
function has(obj, key) {
return obj != null && Object.prototype.hasOwnProperty.call(obj, key);
}
function keys(obj) {
if (!isObject(obj)) {
return [];
}
var nativeKeys = Object.keys;
if (nativeKeys) {
return nativeKeys(obj);
}
var keyArr = [];
for (var key in obj) {
if (has(obj, key)) {
keyArr.push(key);
}
}return keyArr;
}
function isObject(obj) {
var type = typeof obj === 'undefined' ? 'undefined' : _typeof(obj);
return type === 'function' || type === 'object' && !!obj;
}
function isString(obj) {
return Object.prototype.toString.call(obj) == '[object String]';
}
function after(n, func) {
if (typeof func != 'function') {
throw new TypeError('func shouldbe a function');
}
n = parseInt(n);
return function () {
if (--n < 1) {
return func.apply(this, arguments);
}
};
}
var isArray = Array.isArray || function (obj) {
return Object.prototype.toString.call(obj) == '[object Array]';
};
function isFunction(obj) {
return obj && Object.prototype.toString.call(obj) == '[object Function]';
}
function removeDom(dom) {
if (!dom) {
return;
}
if (dom.parentNode != null) {
dom.parentNode.removeChild(dom);
}
}
var addEventListener = function () {
var _events = document.addEventListener ? 'addEventListener' : 'attachEvent';
return function (el, type, fn) {
el[_events]((document.addEventListener ? '' : 'on') + type, fn);
};
}();
var removeEventListener = function () {
var _events = document.removeEventListener ? 'removeEventListener' : 'detachEvent';
return function (el, type, fn) {
el[_events](type, fn);
};
}();
/**
* 初始化getComputedStyle方法
*/
function initGetComputedStyle() {
try {
getComputedStyle(undefined);
} catch (e) {
var nativeGetComputedStyle = getComputedStyle;
window.getComputedStyle = function (element) {
try {
return nativeGetComputedStyle(element);
} catch (e) {
return null;
}
};
}
}
/**
* copy自zepto的方法,如果value存在的话,就是为节点设置className,不存在的话就是拿取className
*
* @param {HtmlElement} node - html节点
* @param {String} value - 设值
* @return {String|Void}
*/
function className(node, value) {
var klass = node.className;
var svg = klass && klass.baseVal !== undefined;
if (value === undefined) {
return svg ? klass.baseVal : klass;
}
svg ? klass.baseVal = value : node.className = value;
}
/**
* 简单版的增加className方法
*
* @param {HtmlElement} node - html节点
* @param {String} value - 设值
*/
function addClass(node, value) {
var originCls = className(node);
// 直接加入,不判断hasClass
className(node, originCls + ' ' + value);
}
module.exports = {
extend: extend,
has: has,
keys: keys,
isObject: isObject,
isString: isString,
isFunction: isFunction,
isArray: isArray,
after: after,
showDiv: Util.showDiv,
hideDiv: Util.hideDiv,
removeDom: removeDom,
addEventListener: addEventListener,
removeEventListener: removeEventListener,
initGetComputedStyle: initGetComputedStyle,
addClass: addClass
};
/***/ }),
/* 2 */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || Function("return this")() || (1,eval)("this");
} catch(e) {
// This works if the window reference is available
if(typeof window === "object")
g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/* 3 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Util = __webpack_require__(1);
var render = __webpack_require__(4);
/**
* widget在前端的配置管理基类
*/
var BaseWidgetBridge = function () {
/**
* 初始化函数
*
* @param {String} id - 组件id
* @param {Object} store - redux的store
* @param {Object} initialState - 初始的状态
* @param {Object} supportor - 支持组件
*/
function BaseWidgetBridge(id, store, initialState, supportor) {
_classCallCheck(this, BaseWidgetBridge);
this.widgetId = id;
this.store = store;
this.initialState = initialState;
this.supportor = supportor;
// warpper element
this.rootContainer = document.getElementById(id);
if (!this.rootContainer) {
console.warn('missing container who\'s id match widget name');
}
this.initialProps = null;
this.prevProps = null;
this.propsInited = false;
this.onPropsInited = [];
this.routers = null; // router配置
this.routersInited = false;
this.onRouterInited = [];
this.templateInited = false;
this.onTemplateRegister = [];
/*
留待插入的mapStateToProps方法
因为可能js先到达的话,那么这个时候先注册了mapState方法,那么就不是initialProps了
*/
this.toInsertMapStateToProps = null;
// start与change的监听,允许注册多个
this.onStartListeners = [];
this.onChangeListeners = [];
this.isStarted = false;
this.getRouterPromise = null;
this.getComponentPromise = null;
this.wait4Start();
}
/**
* 接受对应的配置
*
* @param {Object} config - 对应的配置,里面的参数如下:
* {
* id: [String],// widgetId
* renderType: [Number]// 渲染类型
* }
*/
_createClass(BaseWidgetBridge, [{
key: 'initConfig',
value: function initConfig(config) {
if (!Util.isObject(config)) return;
this.renderType = config.renderType;
}
/**
* 初始化组件的属性
*
* @param {Object} props - 对应的内容
*/
}, {
key: 'initProps',
value: function initProps(props) {
throw new Error('you should implement initProps method & set propsInited');
}
/**
* 获取组价的初始状态
*
* @return {Object}
*/
}, {
key: 'getInitialProps',
value: function getInitialProps() {
var ret = this.initialProps || {};
return Util.extend({}, ret);
}
/**
* 注册当组件创建成功的方法
*
* @param {Function} fn - 成功启动后的回调函数
*/
}, {
key: 'registerOnPropsInitedListener',
value: function registerOnPropsInitedListener(fn) {
if (!fn) return;
if (!this.propsInited) {
// props还未注册,加入队列,等待调用
this.onPropsInited.push(fn);
return;
}
// 已经启动了,直接调用
window.setTimeout(function () {
fn();
}, 5);
}
}, {
key: 'wait4Component',
value: function wait4Component() {
throw new Error('you should implement wait4Component function');
}
/**
* 接受对应的配置
*
* @param {Object} routers - 对应的路由配置,里面的参数如下:
*/
}, {
key: 'initRouters',
value: function initRouters(routers) {
if (this.routersInited) return;
/*
区分情况,可能并不存在router
*/
if (routers) {
this.routers = routers;
} else {
this.routers = null;
}
this.routersInited = true;
if (this.onRouterInited && this.onRouterInited.length) {
this.onRouterInited.forEach(function (fn) {
fn && fn(routers);
});
}
}
/**
* 注册当组件路由创建成功的方法
*
* @param {Function} fn - 成功启动后的回调函数
*/
}, {
key: 'registerOnRouterInitedListener',
value: function registerOnRouterInitedListener(fn) {
var _this = this;
if (!fn) return;
if (!this.routersInited) {
// props还未注册,加入队列,等待调用
this.onRouterInited.push(fn);
return;
}
// 已经启动了,直接调用
window.setTimeout(function () {
fn(_this.routers);
}, 5);
}
}, {
key: 'wait4Router',
value: function wait4Router() {
var _this2 = this;
if (!this.getRouterPromise) {
this.getRouterPromise = new Promise(function (resolve) {
_this2.registerOnRouterInitedListener(function (routers) {
resolve(routers);
});
});
}
return this.getRouterPromise;
}
/**
* 注册组件的代码js
*
* @param {Object} widgetModule - 组件内容
*/
}, {
key: 'registWidgetModule',
value: function registWidgetModule(widgetModule) {
if (this.templateInited) return;
this.template = widgetModule.template;
this.storeConfig = widgetModule.storeConfig;
this.templateInited = true;
if (this.onTemplateRegister && this.onTemplateRegister.length) {
this.onTemplateRegister.forEach(function (fn) {
fn && fn();
});
}
}
/**
* 注册当组件创建成功的方法
*
* @param {Function} fn - 成功启动后的回调函数
*/
}, {
key: 'registeronTemplateRegisterListener',
value: function registeronTemplateRegisterListener(fn) {
if (!fn) return;
if (!this.templateInited) {
// template还未注册,加入队列,等待调用
this.onTemplateRegister.push(fn);
return;
}
// 已经启动了,直接调用
window.setTimeout(function () {
fn();
}, 5);
}
/**
* 获取组件的私有state
*
* @return {Object}
*/
}, {
key: 'getOwnState',
value: function getOwnState() {
throw new Error('you should implement getOwnState method.');
}
/**
* 获取组价的容器
*
* @return {HtmlElement}
*/
}, {
key: 'getContainer',
value: function getContainer() {
return this.rootContainer;
}
/**
* 提供给connect的统一实现,会返回组件渲染需要的props
*
* @param {Object} state - 来自store的state
* @return {Object} - 渲染用的数据
*/
}, {
key: 'mapStateToProps',
value: function mapStateToProps(state) {
var self = this;
/*
默认去调用我们自己的mapStateToProps,会多传入ownState参数,initialProps参数
我们始终不会去更改initialProps参数,目的是希望能支持时间旅行
*/
var ownState = this.getOwnState();
var initialProps = this.initialProps;
// 默认会去调用prototype上的,如果有自己的实现会优先调用
var selfMapStateToProps = this.selfMapStateToProps;
var newProps = selfMapStateToProps(state, ownState, initialProps);
// 判断新的props与老的props的内存地址,如果不同,则更新props,并且触发onChange
if (newProps != this.prevProps) {
// 如果有回调监听,那么执行
if (this.onChangeListeners && this.onChangeListeners.length) {
this.onChangeListeners.forEach(function (fn) {
fn && fn(newProps, self.prevProps, initialProps);
});
}
this.prevProps = newProps;
}
return newProps;
}
/**
* 默认对MapStateToProps的拓展实现,有必要的话需要外部注册实现
*
* @param {*} state - 来自store的数据
* @param {*} ownState - 来自store的数据,但是是在组件的私有key下的
* @param {Object} initialProps - 初始化的props
* @return {Object} - 给组件使用的props
*/
}, {
key: 'selfMapStateToProps',
value: function selfMapStateToProps(state, ownState, initialProps) {
// 优先返回ownState
return ownState || initialProps;
}
/**
* 启动后的回调
*/
}, {
key: 'onStart',
value: function onStart() {
var self = this;
// 判断,是否有留待插入的mapStateToProps
if (this.toInsertMapStateToProps) {
this.selfMapStateToProps = this.toInsertMapStateToProps;
this.toInsertMapStateToProps = null;
}
if (this.onStartListeners && this.onStartListeners.length) {
this.onStartListeners.forEach(function (fn) {
fn && fn(self.prevProps);
});
}
}
/**
* 对widgetBridge注册启动监听,如果已经启动会直接调用
*
* @param {Function} fn - 成功启动后的回调函数
*/
}, {
key: 'registOnStartListener',
value: function registOnStartListener(fn) {
if (!fn) return;
if (!this.isStarted) {
// 尚未启动,加入start队列,等待调用
this.onStartListeners.push(fn);
return;
}
// 已经启动了,直接调用
var props = this.prevProps;
window.setTimeout(function () {
fn(props);
}, 5);
}
/**
* 对widgetBridge注册失败listener,如果已经启动不做任何处理
* 如果还未启动,在一定时间内仍然没有启动的话,认定为失败,那么会回调这个监听
*
* @param {Function} fn - 成功启动后的回调函数
* @param {Object} option - 对应的失败配置,目前字段如下:
* {
* timeout: [Number] // 超时毫秒数
* }
*/
}, {
key: 'registOnFailListener',
value: function registOnFailListener(fn, option) {
if (!fn) return;
if (this.isStarted) return;
var self = this;
option = Util.extend({
timeout: 5000
}, option);
window.setTimeout(function () {
if (self.isStarted) return;
// 执行失败回调
fn();
}, option.timeout);
}
/**
* 当组件的props发生变化时的调用函数
*
* @param {Function} fn - 当变化后调用的函数
*/
}, {
key: 'registOnChangeListener',
value: function registOnChangeListener(fn) {
if (!fn) return;
// 加入等待队列
this.onChangeListeners.push(fn);
}
/**
* 提供外部注册mapStateToProps的方法
*
* @param {Function} fn - 对应的selfMapStateToProps
*/
}, {
key: 'registMapStateToProps',
value: function registMapStateToProps(fn) {
if (!fn) return;
// 如果已经启动了,那么直接替换,将覆盖原来的prototype中的方法
if (this.isStarted) {
this.selfMapStateToProps = fn;
return;
}
// 还没启动,先存起来,一会插入
this.toInsertMapStateToProps = fn;
}
/**
* 校验启动组件,满足条件就进行启动
*/
}, {
key: 'wait4Start',
value: function wait4Start() {
var _this3 = this;
if (this.isStarted) return;
this.wait4Component().then(function () {
render(_this3);
});
}
}]);
return BaseWidgetBridge;
}();
module.exports = BaseWidgetBridge;
/***/ }),
/* 4 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var Enums = __webpack_require__(0);
var RenderTypeEnums = Enums.renderType;
var StateEnums = Enums.state;
var VueRender = __webpack_require__(17);
var ReactRender = __webpack_require__(16);
/**
* 启动操作,启动后会更改widgetBridge中的状态
*
* @param {Object} widgetBridge - WidgetBridge的实例
*/
function render(widgetBridge) {
if (!widgetBridge) return;
if (widgetBridge.isStarted) return;
/*
根据渲染情况进行区分:
1.react的话,使用react-redux的connect进行连接
2.vue的话,使用包装渲染
*/
var renderType = widgetBridge.renderType;
if (renderType == RenderTypeEnums.RENDER_TYPE_VUE) {
VueRender(widgetBridge);
} else {
ReactRender(widgetBridge);
}
widgetBridge.isStarted = true;
// 启动监听回调
widgetBridge.onStart();
// 启动强制刷新
widgetBridge.store.dispatch({
type: StateEnums.LEGO_ACTION_TYPE_REFRESH
});
}
module.exports = render;
/***/ }),
/* 5 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
__webpack_require__(6).polyfill();
window.regeneratorRuntime = __webpack_require__(39);
// https://www.npmjs.com/package/browser-cookies
var Cookies = __webpack_require__(28);
var qs = __webpack_require__(36);
var co = __webpack_require__(30);
var Enums = __webpack_require__(0);
var WidgetEnums = Enums.widget;
var StateEnums = Enums.state;
var RenderEnums = Enums.render;
var SupportorEnums = Enums.supportor;
var RenderTypeEnums = Enums.renderType;
var ReactWidgetBridge = __webpack_require__(15);
var VueWidgetBridge = __webpack_require__(18);
var Util = __webpack_require__(1);
/*
注册api关联
*/
var API_ALIAS_CONFIG = {
registerMapStateToProps: 'registMapStateToProps',
registerOnStartListener: 'registOnStartListener',
registerOnFailListener: 'registOnFailListener',
registerOnChangeListener: 'registOnChangeListener'
};
/**
* 基础的前端支持组件
*/
var BaseFESupportor = function () {
function BaseFESupportor() {
_classCallCheck(this, BaseFESupportor);
// lego不能初始化两次
if (window[SupportorEnums.BROWSER_SUPPORTOR]) {
console.error('duplicate init fe supportor!please check the billund-supportor version!');
return;
}
/*
基础中间件
*/
this.registBaseMiddlewares();
/*
数据相关
*/
this.initialState = window[StateEnums.INITIAL_STATE] || {};
this.store = null; // store根据具体类型初始化
this.widgetConfigs = null;
/*
组件相关
*/
// 重要的组件
this.importantWidgets = [];
// 成功的重要组件
this.successImportantWidgets = [];
// 失败的组件
this.fallbackWidgets = [];
// widgetName到widget实例们的关联
this.name2Widgets = {};
// widgetName到widget-module的关联
this.name2WidgetModules = {};
// 关于widgetBridge缓存
this.widgetBridgeCache = {};
// 收集到的参数
this.collectedParams = {};
// 是否页面已经展示
this.hasTakedViewToFrontEnd = false;
// 组件id和渲染类型的mapping
this.id2RenderTypeMapping = {};
// 组件的id和单页面路径的映射
this.id2PathsMapping = {};
// 一些与上下文强相关的事件是否已经处理
this.sthDependentOnContextProcessed = false;
// 是否被注册过router
this.routerRegistered = false;
this.router = null;
var self = this;
/**
* 实例中的启动方法
*/
function init() {
Util.initGetComputedStyle();
// 先进行启动,尝试展示pageView
self.tryTakeViewToFrontEnd();
// 记录id与渲染类型的对应关系
self.remId2RenderType();
// 关联api
self.aliasApi();
}
init();
}
_createClass(BaseFESupportor, [{
key: 'aliasApi',
value: function aliasApi() {
var _this = this;
Object.keys(API_ALIAS_CONFIG).forEach(function (newApi) {
var apiName = API_ALIAS_CONFIG[newApi];
_this[newApi] = _this[apiName];
});
}
/**
* 挂载基本的中间件
*/
}, {
key: 'registBaseMiddlewares',
value: function registBaseMiddlewares() {
var self = this;
this.cookies = Cookies;
function querystring() {
var search = window.location.search || '';
if (search.indexOf('?') == -1) return '';
return search.slice(1, search.length);
}
this.querystring = querystring();
function query() {
var str = self.querystring;
return qs.parse(str);
}
this.query = query();
}
/**
* 记录id与renderType的对应关系
*/
}, {
key: 'remId2RenderType',
value: function remId2RenderType() {
var _this2 = this;
var configs = window[WidgetEnums.WIDGET_CONFIGS] || [];
configs.forEach(function (config) {
_this2.id2RenderTypeMapping[config.id] = config.renderType;
});
}
/**
* 尝试展示当前的pageview
*/
}, {
key: 'tryTakeViewToFrontEnd',
value: function tryTakeViewToFrontEnd() {
var _this3 = this;
var self = this;
/**
* 抓取重要模块,判断是否应该启动
*/
function extractImportantWidgets() {
self.importantWidgets = window[WidgetEnums.WIDGETS_IMPORTANT] || [];
self.successImportantWidgets = window[WidgetEnums.WIDGETS_IMPORTANT_SUCCESSED] || [];
self.successImportantWidgets.forEach(function (widgetId) {
self.shouldTakeViewToFrontEnd(widgetId);
});
}
extractImportantWidgets();
// 兜底,如果3000ms后还没有启动
window.setTimeout(function () {
_this3.takeViewToFrontEnd();
}, 3000);
}
/**
* 解析与组件配置的内容
*/
}, {
key: 'parseWidgetConfigs',
value: function parseWidgetConfigs() {
var configs = this.widgetConfigs = window[WidgetEnums.WIDGET_CONFIGS] || [];
var self = this;
/**
* 关联widget的id与name
*
* @param {String} id - 组件id
* @param {String} name - 组件name
*/
function relatedWidget2Name(id, name) {
if (!self.name2Widgets[name]) {
self.name2Widgets[name] = [];
}
var widgetBridge = self.getWidgetBridgeById(id);
if (!widgetBridge) return;
self.name2Widgets[name].push(widgetBridge);
}
/**
* 关联组件的id与paths
*
* @param {String} id - 组件id
* @param {Array} paths - 路径列表
*/
function relatedWidgetId2Paths(id, paths) {
self.id2PathsMapping[id] = paths;
}
/**
* 单个widgetConfig的初始化操作
*
* @param {Object} config - 目前字段如下:
* {
* id: [String],// widget的id
* name: [String],// widget的名称,
* renderType: [Number]// 渲染类型
* }
*/
function parseWidgetConfig(config) {
if (!(config && config.id)) return;
var widgetBridge = self.getWidgetBridgeById(config.id);
if (!widgetBridge) return;
widgetBridge.initConfig(config);
}
configs.forEach(function (config) {
parseWidgetConfig(config);
relatedWidget2Name(config.id, config.name);
relatedWidgetId2Paths(config.id, config.paths);
});
}
/**
* 注册上下文预处理器
*
* @param {GeneratorFunction} fn - 预处理器函数
*/
}, {
key: SupportorEnums.BROWSER_SUPPORTOR_REGIST_PREPROCESSOR_NAME,
value: function value(fn) {
if (!fn) return;
var self = this;
co( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return fn(self);
case 2:
return _context.abrupt('return', _context.sent);
case 3:
case 'end':
return _context.stop();
}
}
}, _callee, this);
})).then(function () {
self.doSthDependentOnContext();
}).catch(function (err) {
if (!err) return;
console.log(err.stack);
});
}
/**
* 注册store配置
*/
}, {
key: SupportorEnums.BROWSER_SUPPORTOR_REGIST_STORE_CONFIG,
value: function value() {
throw new Error('you should impletement ' + SupportorEnums.BROWSER_SUPPORTOR_REGIST_STORE_CONFIG + ' function.');
}
/**
* 注册router配置
* important!!! 如果有这个方法,需要提前预设!
*/
}, {
key: SupportorEnums.BROWSER_SUPPORTOR_REGISTER_ROUTER_CONFIG,
value: function value() {
throw new Error('you should impletement ' + SupportorEnums.BROWSER_SUPPORTOR_REGISTER_ROUTER_CONFIG + ' function.');
}
/**
* 尝试执行一些与上下文强相关的事,是useContextPreProcessor的兜底
*/
}, {
key: 'tryDoSthDependentOnContext',
value: function tryDoSthDependentOnContext() {
var _this4 = this;
window.setTimeout(function () {
var processedByMe = _this4.doSthDependentOnContext();
if (processedByMe) {
console.warn('passing 1000ms without call useContextPreProcessor,so run directly.maybe you should regist a context pre-processor');
}
}, 1000);
}
/**
* 执行一些与上下文强相关的事情,可能强依赖预处理的注册
*
* @return {Boolean} - 是否被调用方法处理
*/
}, {
key: 'doSthDependentOnContext',
value: function doSthDependentOnContext() {
if (this.sthDependentOnContextProcessed) return false;
this.sthDependentOnContextProcessed = true;
this.loadFallWidgets();
return true;
}
/**
* 解析失败模块
*/
}, {
key: 'loadFallWidgets',
value: function loadFallWidgets() {
var self = this;
var isExecuted = false;
/**
* 解析失败的模块
*/
function resolve() {
// 确认只支持一次
if (isExecuted) return;
isExecuted = true;
self.fallbackWidgets = window[WidgetEnums.WIDGETS_FALLBACK] || [];
self.traversalFallWidgets();
}
/**
* domContentLoaded监听,过或不过能接收
*
* @return {Function}
*/
function domReady() {
var fns = [];
var _listener = null;
var hack = document.documentElement.doScroll;
var domContentLoaded = 'DOMContentLoaded';
var loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(document.readyState);
if (!loaded) {
Util.addEventListener(window, domContentLoaded, _listener = function listener() {
Util.removeEventListener(window, domContentLoaded, _listener);
loaded = 1;
while (_listener = fns.shift()) {
_listener();
}
});
}
return function (fn) {
loaded ? setTimeout(fn, 0) : fns.push(fn);
};
}
// 先判断是否已经是load的了,如果是的话直接执行
if (document.readyState === 'complete') {
window.setTimeout(function () {
resolve();
}, 5);
return;
}
domReady()(function () {
window.setTimeout(function () {
resolve();
}, 1500);
});
Util.addEventListener(window, 'load', function () {
window.setTimeout(function () {
resolve();
}, 5);
});
}
/**
* widget的props初始化操作
*/
}, {
key: 'initWidgetProps',
value: function initWidgetProps() {
var widgetProps = window[WidgetEnums.WIDGET_PROPS] || [];
var self = this;
function pushProps(config) {
self.parseWidgetProp.call(self, config);
}
widgetProps.forEach(pushProps);
// 将props接收对象向全局暴露
window[WidgetEnums.WIDGET_PROPS] = {
push: pushProps
};
}
/**
* 初始化widget的props信息
*
* @param {Object} config - 目前字段如下:
* {
* id: [String],// widget的id,
* meta: [Object], // widget的元数据信息
* props: [Object]// widget的props
* }
*/
}, {
key: 'parseWidgetProp',
value: function parseWidgetProp(config) {
if (!(config && config.id)) return;
// 查看之前是否有对应的widget配置
var widgetBridge = this.getWidgetBridgeById(config.id);
if (!widgetBridge) return;
widgetBridge.initProps(_extends({}, config.meta, config.props));
}
/**
* 遍历失败的模块
*/
}, {
key: 'traversalFallWidgets',
value: function traversalFallWidgets() {
var _this5 = this;
/*
尝试遍历过滤失败的模块,满足以下两个条件的才能运行
1.widget-module已经注册
2.参数满足条件
*/
this.fallbackWidgets = this.fallbackWidgets.filter(function (widget) {
var name = widget.name;
var widgetModule = _this5.name2WidgetModules[name];
if (!widgetModule) return true;
var requireParams = widget.fallbackParams;
var params = Util.extend({}, widget.params, _this5.collectedParams);
var meetRequireParams = _this5.isMeetRequireParams(params, requireParams);
if (!meetRequireParams) return true;
_this5.executeWidget(widget.id, widgetModule, params, widget.meta).then(function () {
// 尝试去将页面放入前端
_this5.shouldTakeViewToFrontEnd(widget.id);
});
});
}
/**
* 检查参数是否满足条件
*
* @param {Object} params - 可以发送的参数
* @param {Array} requireParams - 要求的参数和校验规则
* @return {Boolean} - 是否满足条件
*/
}, {
key: 'isMeetRequireParams',
value: function isMeetRequireParams(params, requireParams) {
if (!(requireParams && requireParams.length)) return true;
return requireParams.every(function (requireParam) {
/*
这里现在可以支持一些校验规则
requireParam可以用 {paramname}!0!false!''!null来判断
*/
requireParam = requireParam.split('!');
var value = params[requireParam[0]];
if (value === undefined) return false;
var rules = requireParam.slice(1);
if (!(rules && rules.length)) return true;
return rules.every(function (rule) {
if (rule === '0') return value !== 0 || value !== '0';
if (rule === '""' || rule === '\'\'') return value !== '';
if (rule === 'null') return value !== null;
if (rule === 'false') return value !== false;
return true;
});
});
}
/**
* 执行单个widget
*
* @param {String} id - 当在页面上时的widgetId
* @param {Object} widgetModule - widget的module内容
* @param {Object} params - 参数
* @param {Object} meta - 组件的元数据
* @return {Promise}
*/
}, {
key: 'executeWidget',
value: function executeWidget(id, widgetModule, params, meta) {
params = params || {};
/*
判断有没有dataGenerator
1.没有,直接将params作为数据传入
2.有 作为dataGenerator使用
*/
var self = this;
return co( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
var hasDataGenerator, props;
return regeneratorRuntime.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
hasDataGenerator = !!widgetModule.dataGenerator;
props = params;
if (!hasDataGenerator) {
_context2.next = 6;
break;
}
_context2.next = 5;
return widgetModule.dataGenerator.call(self, params);
case 5:
props = _context2.sent;
case 6:
window.setTimeout(function () {
self.parseWidgetProp({
id: id,
meta: meta,
props: props
});
}, 5);
return _context2.abrupt('return', props);
case 8:
case 'end':
return _context2.stop();
}
}
}, _callee2, this);
})).catch(function (err) {
if (!err) err = new Error('unknown error');
console.log(err.stack);
throw err;
});
}
/**
* 将已经存在的重要模块出栈,如果全部存在了,那么将页面展示到前端
*
* @param {String} id - 组件id
*/
}, {
key: 'shouldTakeViewToFrontEnd',
value: function shouldTakeViewToFrontEnd(id) {
if (this.hasTakedViewToFrontEnd) return;
this.importantWidgets = this.importantWidgets.filter(function (widgetId) {
return id != widgetId;
});
if (this.importantWidgets.length) return;
this.takeViewToFrontEnd();
}
/**
* 将页面展示给前端
*/
}, {
key: 'takeViewToFrontEnd',
value: function takeViewToFrontEnd() {
if (this.hasTakedViewToFrontEnd) return;
var contentPage = document.getElementById(RenderEnums.ID_MAIN_PAGE);
if (contentPage) {
Util.showDiv(contentPage);
}
if (window.performance && window.performance.timing) {
window[RenderEnums.FIRST_SHOW_POINT] = new Date() - window.performance.timing.navigationStart;
}
this.hasTakedViewToFrontEnd = true;
}
/**
* 根据id查找对应的widget信息
* 如果没有的话会尝试初始化
* !important(保证对应的store已经初始化)
*
* @param {String} id - widget的id
* @return {Object} - 组件信息
*/
}, {
key: 'getWidgetBridgeById',
value: function getWidgetBridgeById(id) {
// 先尝试从缓存中获取
var widgetBridge = this.widgetBridgeCache[id];
if (widgetBridge) return widgetBridge;
// 这里需要确保store已经初始化
var renderType = this.id2RenderTypeMapping[id] || RenderTypeEnums.RENDER_TYPE_REACT;
var WidgetClass = renderType == RenderTypeEnums.RENDER_TYPE_VUE ? VueWidgetBridge : ReactWidgetBridge;
widgetBridge = new WidgetClass(id, this.store, this.initialState, this);
this.widgetBridgeCache[id] = widgetBridge;
return widgetBridge;
}
/**
* 根据name查找对应的widget们的信息
*
* @param {String} name - widget的名称
* @return {Array}
*/
}, {
key: 'getWidgetBridgesByName',
value: function getWidgetBridgesByName(name) {
return this.name2Widgets[name] || [];
}
/**
* 分发action的操作
*/
}, {
key: 'dispatch',
value: function dispatch() {
throw new Error('you should impletement dispatch function.');
}
/**
* 获取当前的state
*/
}, {
key: 'getState',
value: function getState() {
throw new Error('you should impletement getState function.');
}
}, {
key: 'getRouter',
value: function getRouter() {
return this.router;
}
/**
* 注册store变更数据监听
*/
}, {
key: 'registStoreOnChangeListener',
value: function registStoreOnChangeListener() {
throw new Error('you should impletement registStoreOnChangeListener function.');
}
/**
* 注册widget的mapStateToProps方法,是通过name来注册的
*
* @param {String} name - widget的名称
* @param {Function} mapStateToProps - 函数名称
*/
}, {
key: 'registMapStateToProps',
value: function registMapStateToProps(name, mapStateToProps) {
var relatedWidgets = this.getWidgetBridgesByName(name);
relatedWidgets.forEach(function (widget) {
if (!widget) return true;
widget.registMapStateToProps(mapStateToProps);
});
}
/**
* 根据名称注册widget的onStartListener回调,启动了会立即调用(多个相同组件会被调用多次)
*
* @param {String} name - widget的名称
* @param {Function} onStartListener - 启动函数
*/
}, {
key: 'registOnStartListener',
value: function registOnStartListener(name, onStartListener) {
var relatedWidgets = this.getWidgetBridgesByName(name);
relatedWidgets.forEach(function (widget) {
if (!widget) return true;
widget.registOnStartListener(onStartListener);
});
}
/**
* 注册widget的onFailListener回调,从注册开始,超过一定时间仍然没有启动组件,认定为失败
*
* @param {String} name - widget的名称
* @param {Function} onFailListener - 组件失败的回调方法
* @param {Object} option - 对应的失败配置,目前字段如下:
* {
* timeout: [Number] // 超时毫秒数
* }
*/
}, {
key: 'registOnFailListener',
value: function registOnFailListener(name, onFailListener, option) {
var relatedWidgets = this.getWidgetBridgesByName(name);
relatedWidgets.forEach(function (widget) {
if (!widget) return true;
widget.registOnFailListener(onFailListener, option);
});
}
/**
* 注册widget的onChangeListener回调
*
* @param {String} name - widget的名称
* @param {Function} onChangeListener - 组件props变更回调方法
*/
}, {
key: 'registOnChangeListener',
value: function registOnChangeListener(name, onChangeListener) {
var relatedWidgets = this.getWidgetBridgesByName(name);
relatedWidgets.forEach(function (widget) {
if (!widget) return true;
widget.registOnChangeListener(onChangeListener);
});
}
/**
* 注册组件模块
*
* @param {Object} widgetModule - 组件内容
*/
}, {
key: 'registWidgetModule',
value: function registWidgetModule(widgetModule) {
if (!(widgetModule && widgetModule.name)) return;
var name = widgetModule.name;
var relatedWidgets = this.getWidgetBridgesByName(name);
relatedWidgets.forEach(function (widget) {
if (!widget) return true;
widget.registWidgetModule(widgetModule);
});
// 记录到mapping中
this.name2WidgetModules[name] = widgetModule;
// 尝试遍历失败的模块
this.traversalFallWidgets();
}
/**
* 设置参数函数,设置后会去检查是否应该执行调用方法
*
* 1:只有一个参数时的情况
* Object data = {
* "key1": "val1"
* "key2": "val2"
* }
* 2:两个参数时的情况 key,value
*/
}, {
key: 'setSharedParams',
value: function setSharedParams() {
var argsLength = arguments.length;
if (!argsLength) {
return;
}
// 大于两个参数时,以key value形式加入,忽视其他参数
if (argsLength > 1) {
var paraObj = {};
paraObj[arguments[0]] = arguments[1];
arguments[0] = paraObj;
}
this.collectedParams = Util.extend(this.collectedParams, arguments[0]);
// 尝试遍历失败的模块
this.traversalFallWidgets();
}
/**
* 获取组件的初始化状态,但是很有可能拿不到(bigpipe)
* 建议在组件自身的回调里使用
*
* @param {String} id - 组件id
* @return {Object}
*/
}, {
key: 'getWidgetBridgeInitialProps',
value: function getWidgetBridgeInitialProps(id) {
var widgetBridge = this.getWidgetBridgeById(id);
if (!widgetBridge) return {};
return widgetBridge.getInitialProps() || {};
}
/**
* 获取组件的私有state状态.
*
* @param {String} id - 组件id
* @return {Object}
*/
}, {
key: 'getWidgetBridgeOwnState',
value: function getWidgetBridgeOwnState(id) {
var widgetBridge = this.getWidgetBridgeById(id);
if (!widgetBridge) return {};
return widgetBridge.getOwnState() || {};
}
/**
* 获取组件的容器
*
* @param {String} id - 组件id
* @return {HtmlElement}
*/
}, {
key: 'getWidgetBridgeContainer',
value: function getWidgetBridgeContainer(id) {
var widgetBridge = this.getWidgetBridgeById(id);
if (!widgetBridge) return null;
return widgetBridge.getContainer();
}
/**
* 隐藏widget模块
*
* @param {String|Array} widgetNames - 组件名称
*/
}, {
key: 'hideWidgets',
value: function hideWidgets(widgetNames) {
if (Util.isString(widgetNames)) {
widgetNames = [widgetNames];
}
if (!Util.isArray(widgetNames) && widgetNames.length) return;
widgetNames.forEach(function (widgetName) {
var containers = document.querySelectorAll('[data-widget-name="' + widgetName + '"]');
if (!(containers && containers.length)) return true;
Array.prototype.slice.call(containers).forEach(function (container) {
Util.hideDiv(container);
});
});
}
/**
* 展示widget模块
*
* @param {String|Array} widgetNames - 组件名称
*/
}, {
key: 'showWidgets',
value: function showWidgets(widgetNames) {
if (Util.isString(widgetNames)) {
widgetNames = [widgetNames];
}
if (!Util.isArray(widgetNames) && widgetNames.length) return;
widgetNames.forEach(function (widgetName) {
var containers = document.querySelectorAll('[data-widget-name="' + widgetName + '"]');
if (!(containers && containers.length)) return true;
Array.prototype.slice.call(containers).forEach(function (container) {
Util.showDiv(container);
});
});
}
}]);
return BaseFESupportor;
}();
module.exports = BaseFESupportor;
/***/ }),
/* 6 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process, global) {var require;/*!
* @overview es6-promise - a tiny implementation of Promises/A+.
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
* @license Licensed under MIT license
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
* @version v4.2.2+97478eb6
*/
(function (global, factory) {
true ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.ES6Promise = factory());
}(this, (function () { 'use strict';
function objectOrFunction(x) {
var type = typeof x;
return x !== null && (type === 'object' || type === 'function');
}
function isFunction(x) {
return typeof x === 'function';
}
var _isArray = void 0;
if (Array.isArray) {
_isArray = Array.isArray;
} else {
_isArray = function (x) {
return Object.prototype.toString.call(x) === '[object Array]';
};
}
var isArray = _isArray;
var len = 0;
var vertxNext = void 0;
var customSchedulerFn = void 0;
var asap = function asap(callback, arg) {
queue[len] = callback;
queue[len + 1] = arg;
len += 2;
if (len === 2) {
// If len is 2, that means that we need to schedule an async flush.
// If additional callbacks are queued before the queue is flushed, they
// will be processed by this flush that we are scheduling.
if (customSchedulerFn) {
customSchedulerFn(flush);
} else {
scheduleFlush();
}
}
};
function setScheduler(scheduleFn) {
customSchedulerFn = scheduleFn;
}
function setAsap(asapFn) {
asap = asapFn;
}
var browserWindow = typeof window !== 'undefined' ? window : undefined;
var browserGlobal = browserWindow || {};
var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
// test for web worker but not in IE10
var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
// node
function useNextTick() {
// node version 0.10.x displays a deprecation warning when nextTick is used recursively
// see https://github.com/cujojs/when/issues/410 for details
return function () {
return process.nextTick(flush);
};
}
// vertx
function useVertxTimer() {
if (typeof vertxNext !== 'undefined') {
return function () {
vertxNext(flush);
};
}
return useSetTimeout();
}
function useMutationObserver() {
var iterations = 0;
var observer = new BrowserMutationObserver(flush);
var node = document.createTextNode('');
observer.observe(node, { characterData: true });
return function () {
node.data = iterations = ++iterations % 2;
};
}
// web worker
function useMessageChannel() {
var channel = new MessageChannel();
channel.port1.onmessage = flush;
return function () {
return channel.port2.postMessage(0);
};
}
function useSetTimeout() {
// Store setTimeout reference so es6-promise will be unaffected by
// other code modifying setTimeout (like sinon.useFakeTimers())
var globalSetTimeout = setTimeout;
return function () {
return globalSetTimeout(flush, 1);
};
}
var queue = new Array(1000);
function flush() {
for (var i = 0; i < len; i += 2) {
var callback = queue[i];
var arg = queue[i + 1];
callback(arg);
queue[i] = undefined;
queue[i + 1] = undefined;
}
len = 0;
}
function attemptVertx() {
try {
var r = require;
var vertx = __webpack_require__(45);
vertxNext = vertx.runOnLoop || vertx.runOnContext;
return useVertxTimer();
} catch (e) {
return useSetTimeout();
}
}
var scheduleFlush = void 0;
// Decide what async method to use to triggering processing of queued callbacks:
if (isNode) {
scheduleFlush = useNextTick();
} else if (BrowserMutationObserver) {
scheduleFlush = useMutationObserver();
} else if (isWorker) {
scheduleFlush = useMessageChannel();
} else if (browserWindow === undefined && "function" === 'function') {
scheduleFlush = attemptVertx();
} else {
scheduleFlush = useSetTimeout();
}
function then(onFulfillment, onRejection) {
var parent = this;
var child = new this.constructor(noop);
if (child[PROMISE_ID] === undefined) {
makePromise(child);
}
var _state = parent._state;
if (_state) {
var callback = arguments[_state - 1];
asap(function () {
return invokeCallback(_state, child, callback, parent._result);
});
} else {
subscribe(parent, child, onFulfillment, onRejection);
}
return child;
}
/**
`Promise.resolve` returns a promise that will become resolved with the
passed `value`. It is shorthand for the following:
```javascript
let promise = new Promise(function(resolve, reject){
resolve(1);
});
promise.then(function(value){
// value === 1
});
```
Instead of writing the above, your code now simply becomes the following:
```javascript
let promise = Promise.resolve(1);
promise.then(function(value){
// value === 1
});
```
@method resolve
@static
@param {Any} value value that the returned promise will be resolved with
Useful for tooling.
@return {Promise} a promise that will become fulfilled with the given
`value`
*/
function resolve$1(object) {
/*jshint validthis:true */
var Constructor = this;
if (object && typeof object === 'object' && object.constructor === Constructor) {
return object;
}
var promise = new Constructor(noop);
resolve(promise, object);
return promise;
}
var PROMISE_ID = Math.random().toString(36).substring(16);
function noop() {}
var PENDING = void 0;
var FULFILLED = 1;
var REJECTED = 2;
var GET_THEN_ERROR = new ErrorObject();
function selfFulfillment() {
return new TypeError("You cannot resolve a promise with itself");
}
function cannotReturnOwn() {
return new TypeError('A promises callback cannot return that same promise.');
}
function getThen(promise) {
try {
return promise.then;
} catch (error) {
GET_THEN_ERROR.error = error;
return GET_THEN_ERROR;
}
}
function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
try {
then$$1.call(value, fulfillmentHandler, rejectionHandler);
} catch (e) {
return e;
}
}
function handleForeignThenable(promise, thenable, then$$1) {
asap(function (promise) {
var sealed = false;
var error = tryThen(then$$1, thenable, function (value) {
if (sealed) {
return;
}
sealed = true;
if (thenable !== value) {
resolve(promise, value);
} else {
fulfill(promise, value);
}
}, function (reason) {
if (sealed) {
return;
}
sealed = true;
reject(promise, reason);
}, 'Settle: ' + (promise._label || ' unknown promise'));
if (!sealed && error) {
sealed = true;
reject(promise, error);
}
}, promise);
}
function handleOwnThenable(promise, thenable) {
if (thenable._state === FULFILLED) {
fulfill(promise, thenable._result);
} else if (thenable._state === REJECTED) {
reject(promise, thenable._result);
} else {
subscribe(thenable, undefined, function (value) {
return resolve(promise, value);
}, function (reason) {
return reject(promise, reason);
});
}
}
function handleMaybeThenable(promise, maybeThenable, then$$1) {
if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
handleOwnThenable(promise, maybeThenable);
} else {
if (then$$1 === GET_THEN_ERROR) {
reject(promise, GET_THEN_ERROR.error);
GET_THEN_ERROR.error = null;
} else if (then$$1 === undefined) {
fulfill(promise, maybeThenable);
} else if (isFunction(then$$1)) {
handleForeignThenable(promise, maybeThenable, then$$1);
} else {
fulfill(promise, maybeThenable);
}
}
}
function resolve(promise, value) {
if (promise === value) {
reject(promise, selfFulfillment());
} else if (objectOrFunction(value)) {
handleMaybeThenable(promise, value, getThen(value));
} else {
fulfill(promise, value);
}
}
function publishRejection(promise) {
if (promise._onerror) {
promise._onerror(promise._result);
}
publish(promise);
}
function fulfill(promise, value) {
if (promise._state !== PENDING) {
return;
}
promise._result = value;
promise._state = FULFILLED;
if (promise._subscribers.length !== 0) {
asap(publish, promise);
}
}
function reject(promise, reason) {
if (promise._state !== PENDING) {
return;
}
promise._state = REJECTED;
promise._result = reason;
asap(publishRejection, promise);
}
function subscribe(parent, child, onFulfillment, onRejection) {
var _subscribers = parent._subscribers;
var length = _subscribers.length;
parent._onerror = null;
_subscribers[length] = child;
_subscribers[length + FULFILLED] = onFulfillment;
_subscribers[length + REJECTED] = onRejection;
if (length === 0 && parent._state) {
asap(publish, parent);
}
}
function publish(promise) {
var subscribers = promise._subscribers;
var settled = promise._state;
if (subscribers.length === 0) {
return;
}
var child = void 0,
callback = void 0,
detail = promise._result;
for (var i = 0; i < subscribers.length; i += 3) {
child = subscribers[i];
callback = subscribers[i + settled];
if (child) {
invokeCallback(settled, child, callback, detail);
} else {
callback(detail);
}
}
promise._subscribers.length = 0;
}
function ErrorObject() {
this.error = null;
}
var TRY_CATCH_ERROR = new ErrorObject();
function tryCatch(callback, detail) {
try {
return callback(detail);
} catch (e) {
TRY_CATCH_ERROR.error = e;
return TRY_CATCH_ERROR;
}
}
function invokeCallback(settled, promise, callback, detail) {
var hasCallback = isFunction(callback),
value = void 0,
error = void 0,
succeeded = void 0,
failed = void 0;
if (hasCallback) {
value = tryCatch(callback, detail);
if (value === TRY_CATCH_ERROR) {
failed = true;
error = value.error;
value.error = null;
} else {
succeeded = true;
}
if (promise === value) {
reject(promise, cannotReturnOwn());
return;
}
} else {
value = detail;
succeeded = true;
}
if (promise._state !== PENDING) {
// noop
} else if (hasCallback && succeeded) {
resolve(promise, value);
} else if (failed) {
reject(promise, error);
} else if (settled === FULFILLED) {
fulfill(promise, value);
} else if (settled === REJECTED) {
reject(promise, value);
}
}
function initializePromise(promise, resolver) {
try {
resolver(function resolvePromise(value) {
resolve(promise, value);
}, function rejectPromise(reason) {
reject(promise, reason);
});
} catch (e) {
reject(promise, e);
}
}
var id = 0;
function nextId() {
return id++;
}
function makePromise(promise) {
promise[PROMISE_ID] = id++;
promise._state = undefined;
promise._result = undefined;
promise._subscribers = [];
}
function validationError() {
return new Error('Array Methods must be provided an Array');
}
function validationError() {
return new Error('Array Methods must be provided an Array');
}
var Enumerator = function () {
function Enumerator(Constructor, input) {
this._instanceConstructor = Constructor;
this.promise = new Constructor(noop);
if (!this.promise[PROMISE_ID]) {
makePromise(this.promise);
}
if (isArray(input)) {
this.length = input.length;
this._remaining = input.length;
this._result = new Array(this.length);
if (this.length === 0) {
fulfill(this.promise, this._result);
} else {
this.length = this.length || 0;
this._enumerate(input);
if (this._remaining === 0) {
fulfill(this.promise, this._result);
}
}
} else {
reject(this.promise, validationError());
}
}
Enumerator.prototype._enumerate = function _enumerate(input) {
for (var i = 0; this._state === PENDING && i < input.length; i++) {
this._eachEntry(input[i], i);
}
};
Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
var c = this._instanceConstructor;
var resolve$$1 = c.resolve;
if (resolve$$1 === resolve$1) {
var _then = getThen(entry);
if (_then === then && entry._state !== PENDING) {
this._settledAt(entry._state, i, entry._result);
} else if (typeof _then !== 'function') {
this._remaining--;
this._result[i] = entry;
} else if (c === Promise$1) {
var promise = new c(noop);
handleMaybeThenable(promise, entry, _then);
this._willSettleAt(promise, i);
} else {
this._willSettleAt(new c(function (resolve$$1) {
return resolve$$1(entry);
}), i);
}
} else {
this._willSettleAt(resolve$$1(entry), i);
}
};
Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
var promise = this.promise;
if (promise._state === PENDING) {
this._remaining--;
if (state === REJECTED) {
reject(promise, value);
} else {
this._result[i] = value;
}
}
if (this._remaining === 0) {
fulfill(promise, this._result);
}
};
Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
var enumerator = this;
subscribe(promise, undefined, function (value) {
return enumerator._settledAt(FULFILLED, i, value);
}, function (reason) {
return enumerator._settledAt(REJECTED, i, reason);
});
};
return Enumerator;
}();
/**
`Promise.all` accepts an array of promises, and returns a new promise which
is fulfilled with an array of fulfillment values for the passed promises, or
rejected with the reason of the first passed promise to be rejected. It casts all
elements of the passed iterable to promises as it runs this algorithm.
Example:
```javascript
let promise1 = resolve(1);
let promise2 = resolve(2);
let promise3 = resolve(3);
let promises = [ promise1, promise2, promise3 ];
Promise.all(promises).then(function(array){
// The array here would be [ 1, 2, 3 ];
});
```
If any of the `promises` given to `all` are rejected, the first promise
that is rejected will be given as an argument to the returned promises's
rejection handler. For example:
Example:
```javascript
let promise1 = resolve(1);
let promise2 = reject(new Error("2"));
let promise3 = reject(new Error("3"));
let promises = [ promise1, promise2, promise3 ];
Promise.all(promises).then(function(array){
// Code here never runs because there are rejected promises!
}, function(error) {
// error.message === "2"
});
```
@method all
@static
@param {Array} entries array of promises
@param {String} label optional string for labeling the promise.
Useful for tooling.
@return {Promise} promise that is fulfilled when all `promises` have been
fulfilled, or rejected if any of them become rejected.
@static
*/
function all(entries) {
return new Enumerator(this, entries).promise;
}
/**
`Promise.race` returns a new promise which is settled in the same way as the
first passed promise to settle.
Example:
```javascript
let promise1 = new Promise(function(resolve, reject){
setTimeout(function(){
resolve('promise 1');
}, 200);
});
let promise2 = new Promise(function(resolve, reject){
setTimeout(function(){
resolve('promise 2');
}, 100);
});
Promise.race([promise1, promise2]).then(function(result){
// result === 'promise 2' because it was resolved before promise1
// was resolved.
});
```
`Promise.race` is deterministic in that only the state of the first
settled promise matters. For example, even if other promises given to the
`promises` array argument are resolved, but the first settled promise has
become rejected before the other promises became fulfilled, the returned
promise will become rejected:
```javascript
let promise1 = new Promise(function(resolve, reject){
setTimeout(function(){
resolve('promise 1');
}, 200);
});
let promise2 = new Promise(function(resolve, reject){
setTimeout(function(){
reject(new Error('promise 2'));
}, 100);
});
Promise.race([promise1, promise2]).then(function(result){
// Code here never runs
}, function(reason){
// reason.message === 'promise 2' because promise 2 became rejected before
// promise 1 became fulfilled
});
```
An example real-world use case is implementing timeouts:
```javascript
Promise.race([ajax('foo.json'), timeout(5000)])
```
@method race
@static
@param {Array} promises array of promises to observe
Useful for tooling.
@return {Promise} a promise which settles in the same way as the first passed
promise to settle.
*/
function race(entries) {
/*jshint validthis:true */
var Constructor = this;
if (!isArray(entries)) {
return new Constructor(function (_, reject) {
return reject(new TypeError('You must pass an array to race.'));
});
} else {
return new Constructor(function (resolve, reject) {
var length = entries.length;
for (var i = 0; i < length; i++) {
Constructor.resolve(entries[i]).then(resolve, reject);
}
});
}
}
/**
`Promise.reject` returns a promise rejected with the passed `reason`.
It is shorthand for the following:
```javascript
let promise = new Promise(function(resolve, reject){
reject(new Error('WHOOPS'));
});
promise.then(function(value){
// Code here doesn't run because the promise is rejected!
}, function(reason){
// reason.message === 'WHOOPS'
});
```
Instead of writing the above, your code now simply becomes the following:
```javascript
let promise = Promise.reject(new Error('WHOOPS'));
promise.then(function(value){
// Code here doesn't run because the promise is rejected!
}, function(reason){
// reason.message === 'WHOOPS'
});
```
@method reject
@static
@param {Any} reason value that the returned promise will be rejected with.
Useful for tooling.
@return {Promise} a promise rejected with the given `reason`.
*/
function reject$1(reason) {
/*jshint validthis:true */
var Constructor = this;
var promise = new Constructor(noop);
reject(promise, reason);
return promise;
}
function needsResolver() {
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
}
function needsNew() {
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
}
/**
Promise objects represent the eventual result of an asynchronous operation. The
primary way of interacting with a promise is through its `then` method, which
registers callbacks to receive either a promise's eventual value or the reason
why the promise cannot be fulfilled.
Terminology
-----------
- `promise` is an object or function with a `then` method whose behavior conforms to this specification.
- `thenable` is an object or function that defines a `then` method.
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
- `exception` is a value that is thrown using the throw statement.
- `reason` is a value that indicates why a promise was rejected.
- `settled` the final resting state of a promise, fulfilled or rejected.
A promise can be in one of three states: pending, fulfilled, or rejected.
Promises that are fulfilled have a fulfillment value and are in the fulfilled
state. Promises that are rejected have a rejection reason and are in the
rejected state. A fulfillment value is never a thenable.
Promises can also be said to *resolve* a value. If this value is also a
promise, then the original promise's settled state will match the value's
settled state. So a promise that *resolves* a promise that rejects will
itself reject, and a promise that *resolves* a promise that fulfills will
itself fulfill.
Basic Usage:
------------
```js
let promise = new Promise(function(resolve, reject) {
// on success
resolve(value);
// on failure
reject(reason);
});
promise.then(function(value) {
// on fulfillment
}, function(reason) {
// on rejection
});
```
Advanced Usage:
---------------
Promises shine when abstracting away asynchronous interactions such as
`XMLHttpRequest`s.
```js
function getJSON(url) {
return new Promise(function(resolve, reject){
let xhr = new XMLHttpRequest();
xhr.open('GET', url);
xhr.onreadystatechange = handler;
xhr.responseType = 'json';
xhr.setRequestHeader('Accept', 'application/json');
xhr.send();
function handler() {
if (this.readyState === this.DONE) {
if (this.status === 200) {
resolve(this.response);
} else {
reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
}
}
};
});
}
getJSON('/posts.json').then(function(json) {
// on fulfillment
}, function(reason) {
// on rejection
});
```
Unlike callbacks, promises are great composable primitives.
```js
Promise.all([
getJSON('/posts'),
getJSON('/comments')
]).then(function(values){
values[0] // => postsJSON
values[1] // => commentsJSON
return values;
});
```
@class Promise
@param {Function} resolver
Useful for tooling.
@constructor
*/
var Promise$1 = function () {
function Promise(resolver) {
this[PROMISE_ID] = nextId();
this._result = this._state = undefined;
this._subscribers = [];
if (noop !== resolver) {
typeof resolver !== 'function' && needsResolver();
this instanceof Promise ? initializePromise(this, resolver) : needsNew();
}
}
/**
The primary way of interacting with a promise is through its `then` method,
which registers callbacks to receive either a promise's eventual value or the
reason why the promise cannot be fulfilled.
```js
findUser().then(function(user){
// user is available
}, function(reason){
// user is unavailable, and you are given the reason why
});
```
Chaining
--------
The return value of `then` is itself a promise. This second, 'downstream'
promise is resolved with the return value of the first promise's fulfillment
or rejection handler, or rejected if the handler throws an exception.
```js
findUser().then(function (user) {
return user.name;
}, function (reason) {
return 'default name';
}).then(function (userName) {
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
// will be `'default name'`
});
findUser().then(function (user) {
throw new Error('Found user, but still unhappy');
}, function (reason) {
throw new Error('`findUser` rejected and we're unhappy');
}).then(function (value) {
// never reached
}, function (reason) {
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
});
```
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
```js
findUser().then(function (user) {
throw new PedagogicalException('Upstream error');
}).then(function (value) {
// never reached
}).then(function (value) {
// never reached
}, function (reason) {
// The `PedgagocialException` is propagated all the way down to here
});
```
Assimilation
------------
Sometimes the value you want to propagate to a downstream promise can only be
retrieved asynchronously. This can be achieved by returning a promise in the
fulfillment or rejection handler. The downstream promise will then be pending
until the returned promise is settled. This is called *assimilation*.
```js
findUser().then(function (user) {
return findCommentsByAuthor(user);
}).then(function (comments) {
// The user's comments are now available
});
```
If the assimliated promise rejects, then the downstream promise will also reject.
```js
findUser().then(function (user) {
return findCommentsByAuthor(user);
}).then(function (comments) {
// If `findCommentsByAuthor` fulfills, we'll have the value here
}, function (reason) {
// If `findCommentsByAuthor` rejects, we'll have the reason here
});
```
Simple Example
--------------
Synchronous Example
```javascript
let result;
try {
result = findResult();
// success
} catch(reason) {
// failure
}
```
Errback Example
```js
findResult(function(result, err){
if (err) {
// failure
} else {
// success
}
});
```
Promise Example;
```javascript
findResult().then(function(result){
// success
}, function(reason){
// failure
});
```
Advanced Example
--------------
Synchronous Example
```javascript
let author, books;
try {
author = findAuthor();
books = findBooksByAuthor(author);
// success
} catch(reason) {
// failure
}
```
Errback Example
```js
function foundBooks(books) {
}
function failure(reason) {
}
findAuthor(function(author, err){
if (err) {
failure(err);
// failure
} else {
try {
findBoooksByAuthor(author, function(books, err) {
if (err) {
failure(err);
} else {
try {
foundBooks(books);
} catch(reason) {
failure(reason);
}
}
});
} catch(error) {
failure(err);
}
// success
}
});
```
Promise Example;
```javascript
findAuthor().
then(findBooksByAuthor).
then(function(books){
// found books
}).catch(function(reason){
// something went wrong
});
```
@method then
@param {Function} onFulfilled
@param {Function} onRejected
Useful for tooling.
@return {Promise}
*/
/**
`catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
as the catch block of a try/catch statement.
```js
function findAuthor(){
throw new Error('couldn't find that author');
}
// synchronous
try {
findAuthor();
} catch(reason) {
// something went wrong
}
// async with promises
findAuthor().catch(function(reason){
// something went wrong
});
```
@method catch
@param {Function} onRejection
Useful for tooling.
@return {Promise}
*/
Promise.prototype.catch = function _catch(onRejection) {
return this.then(null, onRejection);
};
/**
`finally` will be invoked regardless of the promise's fate just as native
try/catch/finally behaves
Synchronous example:
```js
findAuthor() {
if (Math.random() > 0.5) {
throw new Error();
}
return new Author();
}
try {
return findAuthor(); // succeed or fail
} catch(error) {
return findOtherAuther();
} finally {
// always runs
// doesn't affect the return value
}
```
Asynchronous example:
```js
findAuthor().catch(function(reason){
return findOtherAuther();
}).finally(function(){
// author was either found, or not
});
```
@method finally
@param {Function} callback
@return {Promise}
*/
Promise.prototype.finally = function _finally(callback) {
var promise = this;
var constructor = promise.constructor;
return promise.then(function (value) {
return constructor.resolve(callback()).then(function () {
return value;
});
}, function (reason) {
return constructor.resolve(callback()).then(function () {
throw reason;
});
});
};
return Promise;
}();
Promise$1.prototype.then = then;
Promise$1.all = all;
Promise$1.race = race;
Promise$1.resolve = resolve$1;
Promise$1.reject = reject$1;
Promise$1._setScheduler = setScheduler;
Promise$1._setAsap = setAsap;
Promise$1._asap = asap;
/*global self*/
function polyfill() {
var local = void 0;
if (typeof global !== 'undefined') {
local = global;
} else if (typeof self !== 'undefined') {
local = self;
} else {
try {
local = Function('return this')();
} catch (e) {
throw new Error('polyfill failed because global object is unavailable in this environment');
}
}
var P = local.Promise;
if (P) {
var promiseToString = null;
try {
promiseToString = Object.prototype.toString.call(P.resolve());
} catch (e) {
// silently ignored
}
if (promiseToString === '[object Promise]' && !P.cast) {
return;
}
}
local.Promise = Promise$1;
}
// Strange compat..
Promise$1.polyfill = polyfill;
Promise$1.Promise = Promise$1;
return Promise$1;
})));
//# sourceMappingURL=es6-promise.map
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(35), __webpack_require__(2)))
/***/ }),
/* 7 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var replace = String.prototype.replace;
var percentTwenties = /%20/g;
module.exports = {
'default': 'RFC3986',
formatters: {
RFC1738: function (value) {
return replace.call(value, percentTwenties, '+');
},
RFC3986: function (value) {
return value;
}
},
RFC1738: 'RFC1738',
RFC3986: 'RFC3986'
};
/***/ }),
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var has = Object.prototype.hasOwnProperty;
var hexTable = (function () {
var array = [];
for (var i = 0; i < 256; ++i) {
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
}
return array;
}());
var compactQueue = function compactQueue(queue) {
var obj;
while (queue.length) {
var item = queue.pop();
obj = item.obj[item.prop];
if (Array.isArray(obj)) {
var compacted = [];
for (var j = 0; j < obj.length; ++j) {
if (typeof obj[j] !== 'undefined') {
compacted.push(obj[j]);
}
}
item.obj[item.prop] = compacted;
}
}
return obj;
};
exports.arrayToObject = function arrayToObject(source, options) {
var obj = options && options.plainObjects ? Object.create(null) : {};
for (var i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
obj[i] = source[i];
}
}
return obj;
};
exports.merge = function merge(target, source, options) {
if (!source) {
return target;
}
if (typeof source !== 'object') {
if (Array.isArray(target)) {
target.push(source);
} else if (typeof target === 'object') {
if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) {
target[source] = true;
}
} else {
return [target, source];
}
return target;
}
if (typeof target !== 'object') {
return [target].concat(source);
}
var mergeTarget = target;
if (Array.isArray(target) && !Array.isArray(source)) {
mergeTarget = exports.arrayToObject(target, options);
}
if (Array.isArray(target) && Array.isArray(source)) {
source.forEach(function (item, i) {
if (has.call(target, i)) {
if (target[i] && typeof target[i] === 'object') {
target[i] = exports.merge(target[i], item, options);
} else {
target.push(item);
}
} else {
target[i] = item;
}
});
return target;
}
return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
if (has.call(acc, key)) {
acc[key] = exports.merge(acc[key], value, options);
} else {
acc[key] = value;
}
return acc;
}, mergeTarget);
};
exports.assign = function assignSingleSource(target, source) {
return Object.keys(source).reduce(function (acc, key) {
acc[key] = source[key];
return acc;
}, target);
};
exports.decode = function (str) {
try {
return decodeURIComponent(str.replace(/\+/g, ' '));
} catch (e) {
return str;
}
};
exports.encode = function encode(str) {
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
// It has been adapted here for stricter adherence to RFC 3986
if (str.length === 0) {
return str;
}
var string = typeof str === 'string' ? str : String(str);
var out = '';
for (var i = 0; i < string.length; ++i) {
var c = string.charCodeAt(i);
if (
c === 0x2D // -
|| c === 0x2E // .
|| c === 0x5F // _
|| c === 0x7E // ~
|| (c >= 0x30 && c <= 0x39) // 0-9
|| (c >= 0x41 && c <= 0x5A) // a-z
|| (c >= 0x61 && c <= 0x7A) // A-Z
) {
out += string.charAt(i);
continue;
}
if (c < 0x80) {
out = out + hexTable[c];
continue;
}
if (c < 0x800) {
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
continue;
}
if (c < 0xD800 || c >= 0xE000) {
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
continue;
}
i += 1;
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
out += hexTable[0xF0 | (c >> 18)]
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
+ hexTable[0x80 | (c & 0x3F)];
}
return out;
};
exports.compact = function compact(value) {
var queue = [{ obj: { o: value }, prop: 'o' }];
var refs = [];
for (var i = 0; i < queue.length; ++i) {
var item = queue[i];
var obj = item.obj[item.prop];
var keys = Object.keys(obj);
for (var j = 0; j < keys.length; ++j) {
var key = keys[j];
var val = obj[key];
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
queue.push({ obj: obj, prop: key });
refs.push(val);
}
}
}
return compactQueue(queue);
};
exports.isRegExp = function isRegExp(obj) {
return Object.prototype.toString.call(obj) === '[object RegExp]';
};
exports.isBuffer = function isBuffer(obj) {
if (obj === null || typeof obj === 'undefined') {
return false;
}
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};
/***/ }),
/* 9 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_9__;
/***/ }),
/* 10 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_10__;
/***/ }),
/* 11 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_11__;
/***/ }),
/* 12 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* 增加find的polyfill
*/
function arrayFind() {
if (Array.prototype.find) return;
Array.prototype.find = function (predicate) {
'use strict';
if (this == null) {
throw new TypeError('Array.prototype.find called on null or undefined');
}
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var list = Object(this);
var length = list.length >>> 0;
var thisArg = arguments[1];
var value = void 0;
for (var i = 0; i < length; i++) {
value = list[i];
if (predicate.call(thisArg, value, i, list)) {
return value;
}
}
return undefined;
};
}
function arrayFindIndex() {
if (!Array.prototype.findIndex) {
Object.defineProperty(Array.prototype, 'findIndex', {
value: function value(predicate) {
if (this == null) {
throw new TypeError('"this" is null or not defined');
}
var o = Object(this);
var len = o.length >>> 0;
if (typeof predicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var thisArg = arguments[1];
var k = 0;
while (k < len) {
var kValue = o[k];
if (predicate.call(thisArg, kValue, k, o)) {
return k;
}
k++;
}
return -1;
}
});
}
}
arrayFind();
arrayFindIndex();
/***/ }),
/* 13 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var React = __webpack_require__(9);
var Redux = __webpack_require__(42);
var ReactRedux = __webpack_require__(10);
var BaseSupportor = __webpack_require__(5);
var Enums = __webpack_require__(0);
var StateEnums = Enums.state;
var SupportorEnums = Enums.supportor;
var Util = __webpack_require__(1);
/*
注册api关联
*/
var API_ALIAS_CONFIG = {
registerOwnReducer: 'registOwnReducer'
};
/**
* 默认的reducer,什么都不处理直接返回
*
* @param {*} state - 对应的store数据
* @param {Object} action - 变更action操作
* @return {Object}
*/
function DEFAULT_REDUCER(state, action) {
/*
检查action的type,如果设置自有state的action,应当默认处理
*/
if (action.type == StateEnums.LEGO_ACTION_TYPE_SET_OWN_STATE) {
// 设置组件的自有state
state = Util.extend({}, state, _defineProperty({}, '' + StateEnums.PREFIX_WIDGET_OWN_STATE_KEY + action.id, action.data));
}
return state;
}
/**
* react全家桶的支持组件
*/
var ReactSupportor = function (_BaseSupportor) {
_inherits(ReactSupportor, _BaseSupportor);
function ReactSupportor() {
_classCallCheck(this, ReactSupportor);
var _this = _possibleConstructorReturn(this, (ReactSupportor.__proto__ || Object.getPrototypeOf(ReactSupportor)).call(this));
_this.currentReducer = DEFAULT_REDUCER;
// 回放机制的action列表
_this.toDispatchActions = [];
/*
为什么放在这里执行?因为后面两项方法都依赖store的初始化
*/
_this.injectLegoWidgetId();
_this.initStore();
_this.parseWidgetConfigs();
_this.initWidgetProps();
_this.initExtraFunctions();
_this.tryDoSthDependentOnContext();
return _this;
}
_createClass(ReactSupportor, [{
key: 'aliasApi',
value: function aliasApi() {
var _this2 = this;
_get(ReactSupportor.prototype.__proto__ || Object.getPrototypeOf(ReactSupportor.prototype), 'aliasApi', this).call(this);
Object.keys(API_ALIAS_CONFIG).forEach(function (newApi) {
var apiName = API_ALIAS_CONFIG[newApi];
_this2[newApi] = _this2[apiName];
});
}
/**
* 注入lego的widgetId
*/
}, {
key: 'injectLegoWidgetId',
value: function injectLegoWidgetId() {
var Provider = ReactRedux.Provider;
Provider.prototype.getChildContext = function () {
return {
store: this.store,
legoWidgetId: this.props.legoWidgetId
};
};
Provider.childContextTypes.legoWidgetId = React.PropTypes.string;
}
/**
* 初始化store
*/
}, {
key: 'initStore',
value: function initStore() {
/*
* 默认没有reducer,留待后面进行替换
* 这么做的原因是,reducer是与业务逻辑强关联的
* 当注册reducer时一定已经通过require引入了当前的包了
*/
this.store = Redux.createStore(DEFAULT_REDUCER, this.initialState, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());
}
/**
* 提供原生的向外的暴露方法
*/
}, {
key: 'initExtraFunctions',
value: function initExtraFunctions() {
this.combineReducers = Redux.combineReducers;
this.compose = Redux.compose;
}
/**
* 注册组件自身的reducer
* *Important*把组件自身发出的,可以解决的reducer写在这里
*
* @param {String} id - 组件的id,动态拿到
* @param {Function} reducer - reducer处理函数
*/
}, {
key: 'registOwnReducer',
value: function registOwnReducer(id, reducer) {
var reducerKey = '' + StateEnums.PREFIX_WIDGET_OWN_STATE_KEY + id;
/**
* 对reducer进行装配,只处理我们对应组件的内容
*
* @param {Object} state - 私有数据
* @param {Object} action - 动作
* @return {Object}
*/
function decoratedReducer(state, action) {
var ownState = state[reducerKey];
var newOwnState = reducer(ownState, action);
// 按照约定,无法处理的action要返回原来的state
if (ownState == newOwnState) {
return state;
}
// 现在这种情况,是state已经被处理过
return Util.extend({}, state, _defineProperty({}, reducerKey, newOwnState));
}
this.decorateReducer(decoratedReducer);
}
/**
* 注册store配置
*
* @param {Function} reducer - 注册reducers
*/
}, {
key: SupportorEnums.BROWSER_SUPPORTOR_REGIST_STORE_CONFIG,
value: function value(reducer) {
this.decorateReducer(reducer);
}
/**
* 注册router配置
* important!!! 如果有这个方法,需要提前预设!
* 这个api一定会被调用,因为也需要告知没有router的情况
*
* @param {Object} routerConfig - 配置
*/
}, {
key: SupportorEnums.BROWSER_SUPPORTOR_REGISTER_ROUTER_CONFIG,
value: function value(routerConfig) {
var _this3 = this;
if (this.routerRegistered) return;
this.routerRegistered = true;
var id2WidgetBridge = {};
(this.widgetConfigs || []).forEach(function (config) {
var id = config.id;
var widgetBridge = _this3.getWidgetBridgeById(id);
if (!widgetBridge) return null;
id2WidgetBridge[id] = widgetBridge;
});
// TODO React需要支持react-router
Object.keys(id2WidgetBridge).forEach(function (id) {
id2WidgetBridge[id].initRouters();
});
}
/**
* 替换Reducers
*
* @param {Function} reducer - 注册reducers
*/
}, {
key: 'replaceReducer',
value: function replaceReducer(reducer) {
if (!this.store) return;
var store = this.store;
this.currentReducer = reducer;
// 包装reducers,因为需要响应刷新action
function reducerWrapper(state, action) {
var newState = reducer(state, action);
// 如果action是指定的刷新action
if (action.type == StateEnums.LEGO_ACTION_TYPE_REFRESH) {
newState = Util.extend({}, newState);
}
return newState;
}
store.replaceReducer(reducerWrapper);
// 开始准备进行回放action,因为widget间的js不存在关联,所以无法保证加载顺序
this.toDispatchActions = this.toDispatchActions.filter(function (action) {
var curState = store.getState();
// 直接dispatch,以防有非幂等的reducer
store.dispatch(action);
var newState = store.getState();
/*
判断现有的reducer是否能够处理action,根据当前state与计算后的state的比较
特别注意,我们只比较了内存地址,主要是出于性能方面的考量
另外,对于redux有一个约定,如果你处理不了这个action,就需要返回默认的state!
*/
var isHandled = !(newState === curState);
// 经过处理的action就丢弃掉
return !isHandled;
});
}
/**
* 装饰Reducers.本质上是将原来的reducer拿出来,然后再上面进行一层包装
* 设计思路来自装饰器模式
* 这个方法可能会在widget中使用,默认告诉别人如何处理它的数据
*
* @param {Function} reducer - 注册reducer
*/
}, {
key: 'decorateReducer',
value: function decorateReducer(reducer) {
if (!this.store) return;
var prevReducer = this.currentReducer;
function decoratedReducer(state, action) {
var newState = prevReducer(state, action);
return reducer(newState, action);
}
this.replaceReducer(decoratedReducer);
}
/**
* 分发action的操作
*
* @param {Object} action - 描述应用变化的普通对象
*/
}, {
key: 'dispatch',
value: function dispatch(action) {
if (!this.store) return;
var store = this.store;
var curState = store.getState();
store.dispatch(action);
/*
判断现有的reducer是否能够处理action,根据当前state与计算后的state的比较
特别注意,我们只比较了内存地址,主要是出于性能方面的考量
另外,对于redux有一个约定,如果你处理不了这个action,就需要返回默认的state!
*/
var isHandled = !(store.getState() === curState);
if (!isHandled) {
this.toDispatchActions.push(action);
}
}
/**
* 获取当前的state
*
* @return {Object} - 当前的state
*/
}, {
key: 'getState',
value: function getState() {
if (!this.store) return null;
return this.store.getState();
}
/**
* 注册store变更数据监听
*
* @param {Function} onChangeListener - 改变时的监听
*/
}, {
key: 'registStoreOnChangeListener',
value: function registStoreOnChangeListener(onChangeListener) {
if (!this.store) return;
var store = this.store;
store.subscribe(function () {
onChangeListener(store.getState());
});
}
}]);
return ReactSupportor;
}(BaseSupportor);
module.exports = ReactSupportor;
/***/ }),
/* 14 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _vueRouter = __webpack_require__(43);
var _vueRouter2 = _interopRequireDefault(_vueRouter);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
__webpack_require__(6).polyfill();
var Vue = __webpack_require__(11);
var Vuex = __webpack_require__(44);
var compareVersions = __webpack_require__(31);
var deepExtend = __webpack_require__(32);
var BaseSupportor = __webpack_require__(5);
var Enums = __webpack_require__(0);
var renderEnums = Enums.render;
var WidgetEnums = Enums.widget;
var StateEnums = Enums.state;
var SupportorEnums = Enums.supportor;
var Util = __webpack_require__(1);
/**
重刷字段,以此来让整个store更新,目的是在onStart方法里 我们会将mapStateToProps方法注册,然后触发更新重新渲染一次,
以防有漏过什么事件
*/
var KEY_REFRESH_COUNT = 'refreshCount';
/*
注册api关联
*/
var API_ALIAS_CONFIG = {
registerOwnModule: 'registOwnModule'
};
function findRouteByPath(routes, path) {
return routes.find(function (route) {
return path === route.path;
});
}
/**
* 返回新的vue-router-config
*
* @param {Object} to - 用以覆盖的对象
* @param {Object} source - 来源对象
* @return {Object}
*/
function mixVueRouterConfig(to, source) {
// 如果两个都不存在的话 返回null
if (!(to || source)) return null;
to = _extends({}, to);
var routes = [];
/*
先对to的routes进行遍历,mixin加入
再对source的routes进行遍历补漏
*/
(to.routes || []).forEach(function (route) {
var path = route.path;
var relatedRoute = findRouteByPath(source.routes || [], path);
routes.push(deepExtend(_extends({}, route), relatedRoute));
});
(source.routes || []).forEach(function (route) {
var path = route.path;
var inIndex = routes.findIndex(function (r) {
return r.path === path;
});
if (inIndex !== -1) return;
var relatedRoute = findRouteByPath(to.routes || [], path);
routes.push(deepExtend(_extends({}, relatedRoute), route));
});
deepExtend(to, source);
deepExtend(to, {
routes: routes
});
return to;
}
/**
* vue的前端支持组件
*/
var VueSupportor = function (_BaseSupportor) {
_inherits(VueSupportor, _BaseSupportor);
function VueSupportor() {
_classCallCheck(this, VueSupportor);
var _this = _possibleConstructorReturn(this, (VueSupportor.__proto__ || Object.getPrototypeOf(VueSupportor)).call(this));
_this.storeConfig = null;
/*
为什么放在这里执行?因为后面两项方法都依赖store的初始化
*/
_this.useVuePlugins();
_this.initStore();
_this.parseWidgetConfigs();
_this.initWidgetProps();
_this.initExtraFunctions();
_this.tryDoSthDependentOnContext();
return _this;
}
_createClass(VueSupportor, [{
key: 'useVuePlugins',
value: function useVuePlugins() {
Vue.use(Vuex);
Vue.use(_vueRouter2.default);
}
}, {
key: 'aliasApi',
value: function aliasApi() {
var _this2 = this;
_get(VueSupportor.prototype.__proto__ || Object.getPrototypeOf(VueSupportor.prototype), 'aliasApi', this).call(this);
Object.keys(API_ALIAS_CONFIG).forEach(function (newApi) {
var apiName = API_ALIAS_CONFIG[newApi];
_this2[newApi] = _this2[apiName];
});
}
/**
* 初始化vuex的store
*/
}, {
key: 'initStore',
value: function initStore() {
var initialState = Util.extend({}, this.initialState, _defineProperty({}, KEY_REFRESH_COUNT, 0));
/**
* 构建基础的module对象
*
* @return {Object}
*/
function buildInitialModules() {
var ret = {};
var configs = window[WidgetEnums.WIDGET_CONFIGS] || [];
configs.forEach(function (config) {
ret['' + StateEnums.PREFIX_WIDGET_OWN_STATE_KEY + config.id] = {};
});
return ret;
}
var storeConfig = this.storeConfig = {
modules: buildInitialModules(),
actions: _defineProperty({}, StateEnums.LEGO_ACTION_TYPE_REFRESH, function (context) {
context.commit(StateEnums.LEGO_ACTION_TYPE_REFRESH);
}),
mutations: _defineProperty({}, StateEnums.LEGO_ACTION_TYPE_REFRESH, function (state) {
state[KEY_REFRESH_COUNT]++;
})
};
this.store = new Vuex.Store(Util.extend({}, storeConfig, {
state: initialState
}));
this.doSthTricky();
}
/**
* 替换原来的hotUpdate的实现,因为需要cache内容
*/
}, {
key: 'doSthTricky',
value: function doSthTricky() {
this.store.legoOriginalHotUpdate = this.store.hotUpdate;
this.store.hotUpdate = this.hotUpdate.bind(this);
}
/**
* 提供原生的向外的暴露方法
*/
}, {
key: 'initExtraFunctions',
value: function initExtraFunctions() {
/*
* 我们将dispatch直接暴露出来,因为好像没有什么好做的,action可能会返回promise,导致我们无法比较mutation是否成功
* 目前根据webpack的打包方式,也不会导致js分批次到达
*/
this.dispatch = this.store.dispatch;
this.getEmptyComponent = function () {
var element = null;
return function () {
if (!element) {
element = {
render: function render(h) {
return h('i', {
'class': {
'empty-component': true
}
});
}
};
}
return element;
};
}();
}
/**
* 向外层的vuex注册module,注意因为我们存在组件嵌套关系,所以可能有多个module.需要extend
*
* @param {String} id - 组件id
* @param {Object} newModule - module内容
*/
}, {
key: 'registOwnModule',
value: function registOwnModule(id, newModule) {
if (!Util.isObject(newModule)) return;
var moduleId = StateEnums.PREFIX_WIDGET_OWN_STATE_KEY + id;
var modules = this.storeConfig.modules || {};
var prevModule = modules[moduleId] ? modules[moduleId] : {};
var moduleState = Util.extend({}, prevModule.state, newModule.state);
/*
action,mutations,getter用来register的时候只要加新的
但是cache时需要拿完整的数据
*/
var toInsertModule = {
state: moduleState,
actions: newModule.actions,
mutations: newModule.mutations,
getters: newModule.getters
};
var toStoredModule = {
state: moduleState,
actions: Util.extend({}, prevModule.mutations, newModule.mutations),
mutations: Util.extend({}, prevModule.mutations, newModule.mutations),
getters: Util.extend({}, prevModule.getters, newModule.getters)
};
this.storeConfig.modules = Util.extend({}, modules, _defineProperty({}, moduleId, toStoredModule));
this.store.registerModule(moduleId, toInsertModule);
}
/**
* 注册store配置,包括actions,mutations,getters
*
* @param {Object} config - 注册对应的mutation
*/
}, {
key: SupportorEnums.BROWSER_SUPPORTOR_REGIST_STORE_CONFIG,
value: function value(config) {
this.hotUpdate(config);
}
/**
* 注册router配置
* important!!! 如果有这个方法,需要提前预设!
* 这个api一定会被调用,因为也需要告知没有router的情况
*
* @param {Object} routerConfig - 配置
*/
}, {
key: SupportorEnums.BROWSER_SUPPORTOR_REGISTER_ROUTER_CONFIG,
value: function value(routerConfig) {
var _this3 = this;
if (this.routerRegistered) return;
this.routerRegistered = true;
var id2WidgetBridge = {};
(this.widgetConfigs || []).forEach(function (config) {
var id = config.id;
var widgetBridge = _this3.getWidgetBridgeById(id);
if (!widgetBridge) return null;
id2WidgetBridge[id] = widgetBridge;
});
if (!(routerConfig || window[renderEnums.KEY_ROUTER_CONFIG])) {
Object.keys(id2WidgetBridge).forEach(function (id) {
id2WidgetBridge[id].initRouters();
});
return;
}
var prevRouterConfig = window[renderEnums.KEY_ROUTER_CONFIG] || {};
(prevRouterConfig.routes || []).forEach(function (route) {
delete route.props;
});
routerConfig = mixVueRouterConfig(routerConfig, prevRouterConfig);
var routes = routerConfig.routes;
var rootPathIndex = routes.findIndex(function (route) {
return route.path === '/';
});
if (rootPathIndex === -1) {
routes.push({
path: '/'
});
}
/*
1.从ssr成功的组件中,获取对应的componentPromise
2.成功后设置routers
*/
var wait4SuccessComponents = this.successImportantWidgets.map(function (id) {
return id2WidgetBridge[id].wait4Component();
});
Promise.all(wait4SuccessComponents).then(function (components) {
routes.forEach(function (route) {
route.components = route.components || {};
var path = route.path;
var props = route.props;
if (props) {
route.props = {};
if (compareVersions(Vue.version, '2.4.0') !== 1) {
console.error('error: for vue version below 2.4.0 so that you can\'t use route prop');
}
}
Object.keys(_this3.id2PathsMapping).forEach(function (id) {
// 没有设置的话,代表默认首页出现
var paths = _this3.id2PathsMapping[id] || ['/'];
if (paths.indexOf(path) !== -1) {
var successComponent = components.find(function (component) {
return component.widgetId === id;
});
var component = successComponent || function () {
return id2WidgetBridge[id].wait4Component();
};
route.components[id] = component;
if (props) {
route.props[id] = props;
}
} else {
route.components[id] = _this3.getEmptyComponent();
}
});
});
var routers = new _vueRouter2.default(routerConfig);
_this3.router = routers;
Object.keys(id2WidgetBridge).forEach(function (id) {
id2WidgetBridge[id].initRouters(routers);
});
});
}
/**
* 页面级别注册自己的配置,包括actions,mutations,getters
*
* @param {Object} config - 注册对应的mutation
*/
}, {
key: 'hotUpdate',
value: function hotUpdate(config) {
if (!Util.isObject(config)) return;
var prevOptions = this.storeConfig || {};
var prevActions = prevOptions.actions || {};
var prevMutations = prevOptions.mutations || {};
var prevGetters = prevOptions.getters || {};
// mixin,根节点的action和mutation与getters不可重复,module的允许重复
var newActions = Util.extend({}, prevActions, config.actions);
var newMutations = Util.extend({}, prevMutations, config.mutations);
var newGetters = Util.extend({}, prevGetters, config.getters);
var newStoreConfig = {
actions: newActions,
mutations: newMutations,
getters: newGetters
};
this.storeConfig = Util.extend({}, this.storeConfig, newStoreConfig);
/*
收集getters
*/
var collectedGetters = {};
var modules = this.storeConfig.modules || {};
Object.keys(modules).forEach(function (moduleId) {
var moduleInfo = modules[moduleId];
if (!(moduleInfo && moduleInfo.getters)) return true;
Util.extend(collectedGetters, moduleInfo.getters);
});
Util.extend(collectedGetters, this.storeConfig.getters);
this.store.legoOriginalHotUpdate(Util.extend({}, newStoreConfig, {
getters: collectedGetters
}));
}
/**
* 获取当前的state
*
* @return {Object} - 当前的state
*/
}, {
key: 'getState',
value: function getState() {
if (!this.store) return null;
return this.store.state;
}
/**
* 注册store变更数据监听
*
* @param {Function} onChangeListener - 改变时的监听,参数分别是mutation与state
*/
}, {
key: 'registStoreOnChangeListener',
value: function registStoreOnChangeListener(onChangeListener) {
if (!this.store) return;
var store = this.store;
store.subscribe(onChangeListener);
}
}]);
return VueSupportor;
}(BaseSupportor);
module.exports = VueSupportor;
/***/ }),
/* 15 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var BaseWidgetBridge = __webpack_require__(3);
var Util = __webpack_require__(1);
var Enums = __webpack_require__(0);
var StateEnums = Enums.state;
/**
* react-widget的桥接类
*/
var ReactWidgetBridge = function (_BaseWidgetBridge) {
_inherits(ReactWidgetBridge, _BaseWidgetBridge);
function ReactWidgetBridge() {
_classCallCheck(this, ReactWidgetBridge);
return _possibleConstructorReturn(this, (ReactWidgetBridge.__proto__ || Object.getPrototypeOf(ReactWidgetBridge)).apply(this, arguments));
}
_createClass(ReactWidgetBridge, [{
key: 'initProps',
/**
* 初始化组件的属性
*
* @param {Object} props - 对应的内容
*/
value: function initProps(props) {
if (!Util.isObject(props)) return;
var self = this;
this.initialProps = props;
this.prevProps = props;
// 将自身的小属性放入store
this.store.dispatch({
type: StateEnums.LEGO_ACTION_TYPE_SET_OWN_STATE,
id: self.widgetId,
data: props
});
this.propsInited = true;
if (this.onPropsInited && this.onPropsInited.length) {
this.onPropsInited.forEach(function (fn) {
fn && fn(props);
});
}
}
/**
* 获取组件的component-promise,目前主要用在vue-router中
*
* @return {Promise}
*/
}, {
key: 'wait4Component',
value: function wait4Component() {
var _this2 = this;
if (!this.getComponentPromise) {
/*
目前需要等待两个状态,promise才能resolved
1.widget.template
2.widget.props
*/
this.getComponentPromise = new Promise(function (resolve) {
var after = Util.after(2, function () {
_this2.baseComponent = _this2.template;
resolve(_this2.baseComponent);
});
_this2.registerOnPropsInitedListener(after);
_this2.registeronTemplateRegisterListener(after);
});
}
return this.getComponentPromise;
}
/**
* 获取组件的私有state
*
* @return {Object}
*/
}, {
key: 'getOwnState',
value: function getOwnState() {
var widgetId = this.widgetId;
var store = this.store;
return store.getState()[StateEnums.PREFIX_WIDGET_OWN_STATE_KEY + widgetId] || {};
}
}]);
return ReactWidgetBridge;
}(BaseWidgetBridge);
module.exports = ReactWidgetBridge;
/***/ }),
/* 16 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var React = __webpack_require__(9);
var ReactDom = __webpack_require__(41);
var ReactRedux = __webpack_require__(10);
/**
* 直接连接react 组件
*
* @param {Object} widgetBridge - WidgetBridge的实例
*/
function connectReactElement(widgetBridge) {
if (!widgetBridge.store) return;
if (!widgetBridge.rootContainer) return;
if (!(widgetBridge.initialProps && widgetBridge.template)) return;
// 使用闭包进行调用
function mapStateToProps(state) {
return widgetBridge.mapStateToProps.call(widgetBridge, state);
}
/**
* 连接store的一些配置
*/
function connectStore() {
var storeConfig = widgetBridge.storeConfig;
if (!storeConfig) return;
var ownReducer = storeConfig.ownReducer;
if (ownReducer) {
widgetBridge.supportor.registOwnReducer(widgetBridge.widgetId, ownReducer);
}
if (storeConfig.mapStateToProps) {
widgetBridge.registMapStateToProps(storeConfig.mapStateToProps);
}
}
/*
1.先通过react-connect进行包装
2.关联store
3.与provider进行连接
*/
var connectedElement = ReactRedux.connect(mapStateToProps)(widgetBridge.baseComponent);
connectStore();
ReactDom.render(React.createElement(ReactRedux.Provider, {
store: widgetBridge.store,
legoWidgetId: widgetBridge.widgetId
}, React.createElement(connectedElement, null)), widgetBridge.rootContainer);
}
module.exports = connectReactElement;
/***/ }),
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var Vue = __webpack_require__(11);
var Enums = __webpack_require__(0);
/**
* 链接vue的组件
*
* @param {Object} widgetBridge - WidgetBridge的实例
*/
function connectVueTemplateElement(widgetBridge) {
if (!widgetBridge.store) return;
if (!widgetBridge.rootContainer) return;
if (!widgetBridge.initialProps) return;
/*
* 创建一个组件,
* el是rootContainer,data里会有一个legoWidgetId,然后store是使用module过的store
*/
/*
* vue2.0有一个比较坑的点,就是会把挂载的el整个替换掉,那么对于我们,就分为两种情况
* 1:server端有渲染,那么找到那个div
* 2:没有的话,创建一个临时div
*/
var node = null;
function findFirstChild(dom) {
if (!dom) return null;
if (!dom.childNodes) return null;
return Array.prototype.slice.call(dom.childNodes).find(function (child) {
return child && !(child.nodeName == '#text' && !/\S/.test(child.nodeValue));
});
}
node = findFirstChild(widgetBridge.rootContainer);
if (!node) {
node = document.createElement('div');
widgetBridge.rootContainer.appendChild(node);
}
/*
先进行注册子组件的store
*/
if (widgetBridge.storeConfig && widgetBridge.supportor) {
widgetBridge.supportor.registOwnModule(widgetBridge.widgetId, widgetBridge.storeConfig);
}
var needRouter = !!widgetBridge.routers;
if (needRouter) {
new Vue({
el: node,
router: widgetBridge.routers,
data: function data() {
return {
legoWidgetId: widgetBridge.widgetId
};
},
store: widgetBridge.store,
render: function render(h) {
return h('router-view', {
props: {
name: widgetBridge.widgetId
}
});
}
});
return;
}
new Vue(_extends({}, widgetBridge.baseComponent, {
el: node,
data: function data() {
return {
legoWidgetId: widgetBridge.widgetId
};
},
store: widgetBridge.store
}));
}
module.exports = connectVueTemplateElement;
/***/ }),
/* 18 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var render = __webpack_require__(4);
var BaseWidgetBridge = __webpack_require__(3);
var Util = __webpack_require__(1);
var Enums = __webpack_require__(0);
var StateEnums = Enums.state;
/**
* vue的桥接组件
*/
var VueWidgetBridge = function (_BaseWidgetBridge) {
_inherits(VueWidgetBridge, _BaseWidgetBridge);
function VueWidgetBridge() {
_classCallCheck(this, VueWidgetBridge);
return _possibleConstructorReturn(this, (VueWidgetBridge.__proto__ || Object.getPrototypeOf(VueWidgetBridge)).apply(this, arguments));
}
_createClass(VueWidgetBridge, [{
key: 'initProps',
/**
* 初始化组件的属性
*
* @param {Object} props - 对应的内容
*/
value: function initProps(props) {
if (!Util.isObject(props)) return;
this.initialProps = props;
this.prevProps = props;
this.propsInited = true;
if (this.onPropsInited && this.onPropsInited.length) {
this.onPropsInited.forEach(function (fn) {
fn && fn(props);
});
}
}
/**
* 校验启动条件,满足条件就启动
*/
}, {
key: 'wait4Start',
value: function wait4Start() {
var _this2 = this;
if (this.isStarted) return;
Promise.all([this.wait4Component(), this.wait4Router()]).then(function () {
_this2.createWidgetStore();
}).then(function () {
render(_this2);
});
}
/**
* 获取组件的私有state
*
* @return {Object}
*/
}, {
key: 'getOwnState',
value: function getOwnState() {
var widgetId = this.widgetId;
var store = this.store;
var state = store.state || {};
return state[StateEnums.PREFIX_WIDGET_OWN_STATE_KEY + widgetId] || {};
}
}, {
key: 'createWidgetStore',
value: function createWidgetStore() {
var self = this;
/*
因为vue的特性,需要对存在的字段加入setter,getter,所以我们需要对那些不存在的字段做一个兼容
*/
var declareProps = this.template.props || {};
var tplProps = {};
var defaultPropKeys = Util.isArray(declareProps) ? declareProps : Object.keys(declareProps);
defaultPropKeys.forEach(function (propKey) {
var prop = declareProps[propKey];
if (!(Util.isObject(prop) && prop.default !== undefined)) {
tplProps[propKey] = null;
return true;
}
tplProps[propKey] = undefined;
});
var props = Util.extend({}, tplProps, this.initialProps);
// 这里可以尝试注册自己的module,module名称就是
this.supportor.registOwnModule(this.widgetId, {
state: props,
getters: _defineProperty({}, StateEnums.WIDGET_VUEX_GETTERS_PREFIX + self.widgetId, function (state, getters, rootState) {
return self.mapStateToProps(rootState);
})
});
}
/**
* 获取组件的component-promise,目前主要用在vue-router中
*
* @return {Promise}
*/
}, {
key: 'wait4Component',
value: function wait4Component() {
var _this3 = this;
if (!this.getComponentPromise) {
/*
目前需要等待两个状态,promise才能resolved
1.widget.template
2.widget.props
*/
var self = this;
this.getComponentPromise = new Promise(function (resolve) {
var after = Util.after(2, function () {
_this3.baseComponent = {
widgetId: _this3.widgetId,
components: {
'wrapped-element': self.template
},
computed: {
widgetProps: function widgetProps() {
return this.$store.getters[StateEnums.WIDGET_VUEX_GETTERS_PREFIX + self.widgetId];
}
},
render: function render(h) {
var attrs = this.$attrs || {}; // for router
var props = this.widgetProps;
return h('wrapped-element', {
props: _extends({}, props, attrs),
attrs: attrs
});
}
};
resolve(_this3.baseComponent);
});
_this3.registerOnPropsInitedListener(after);
_this3.registeronTemplateRegisterListener(after);
});
}
return this.getComponentPromise;
}
}]);
return VueWidgetBridge;
}(BaseWidgetBridge);
module.exports = VueWidgetBridge;
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(12);
var Enums = __webpack_require__(0);
var RenderTypeEnums = Enums.renderType;
var WidgetEnums = Enums.widget;
var SupportorEnums = Enums.supportor;
var ReactSupportor = __webpack_require__(13);
var VueSupportor = __webpack_require__(14);
/**
* 计算当前页面上的渲染配置
*
* @return {Object}
*/
function addupRenderType() {
var configs = window[WidgetEnums.WIDGET_CONFIGS] || [];
var react = 0;
var vue = 0;
configs.forEach(function (config) {
var renderType = config.renderType;
if (renderType == RenderTypeEnums.RENDER_TYPE_REACT) {
react++;
}
if (renderType == RenderTypeEnums.RENDER_TYPE_VUE) {
vue++;
}
});
return {
react: react,
vue: vue
};
}
/**
* 初始化方法
*
* @return {Object}
*/
function init() {
if (window[SupportorEnums.BROWSER_SUPPORTOR]) {
console.warn('there are several different billund-supportor versions,please check.');
return window[SupportorEnums.BROWSER_SUPPORTOR];
}
var renderTypeCounts = addupRenderType();
var reactCount = renderTypeCounts.react;
var vueCount = renderTypeCounts.vue;
/*
判断vue和react的组件数量,来决定使用哪一个patch的supportor
1.两者数量都不为0的情况下,初始化较大的那个,并且给出警告
2.两者至少一个为0的情况下,初始化较大的那个,默认是react
*/
var shouldUseReact = reactCount >= vueCount;
if (reactCount && vueCount) {
console.warn('The current page at the same time there are a variety of rendering types, we used ' + (shouldUseReact ? 'react-supportor' : 'vue-supportor'));
}
window[SupportorEnums.BROWSER_SUPPORTOR] = shouldUseReact ? new ReactSupportor() : new VueSupportor();
return window[SupportorEnums.BROWSER_SUPPORTOR];
}
module.exports = init();
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* 展示dom
*
* @param {HtmlElement} div - div元素
*/
function showDiv(div) {
if (!div) {
return;
}
if (div.style.display == 'none') {
div.style.display = '';
}
if (getComputedStyle(div, '').getPropertyValue('display') == 'none') {
div.style.display = 'block';
}
}
/**
* 隐藏dom
*
* @param {HtmlElement} div - div元素
*/
function hideDiv(div) {
if (!div) {
return;
}
if (div.style.display != 'none') {
div.style.display = 'none';
}
if (getComputedStyle(div, '').getPropertyValue('display') != 'none') {
div.style.display = 'none';
}
}
module.exports = {
showDiv: showDiv,
hideDiv: hideDiv
};
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var REACT_ROOT_EXTERNAL = 'window React';
var REACT_DOM_ROOT_EXTERNAL = 'window ReactDom';
var REACT_CSS_TRANSITION_GROUP_ROOT_EXTERNAL = 'window ReactAddonsCssTransitionGroup';
var REDUX_ROOT_EXTERNAL = 'window Redux';
var REACT_REDUX_ROOT_EXTERNAL = 'window ReactRedux';
var VUE_ROOT_EXTERNAL = 'window Vue';
var VUEX_ROOT_EXTERNAL = 'window Vuex';
var VUE_ROUTER_ROOT_EXTERNAL = 'window VueRouter';
module.exports = {
REACT_ROOT_EXTERNAL: REACT_ROOT_EXTERNAL,
REACT_DOM_ROOT_EXTERNAL: REACT_DOM_ROOT_EXTERNAL,
REACT_CSS_TRANSITION_GROUP_ROOT_EXTERNAL: REACT_CSS_TRANSITION_GROUP_ROOT_EXTERNAL,
REDUX_ROOT_EXTERNAL: REDUX_ROOT_EXTERNAL,
REACT_REDUX_ROOT_EXTERNAL: REACT_REDUX_ROOT_EXTERNAL,
VUE_ROOT_EXTERNAL: VUE_ROOT_EXTERNAL,
VUEX_ROOT_EXTERNAL: VUEX_ROOT_EXTERNAL,
VUE_ROUTER_ROOT_EXTERNAL: VUE_ROUTER_ROOT_EXTERNAL
};
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 展示内容的div,不要在意拼错了...
var ID_MAIN_PAGE = 'lego-mian-page';
// 服务器当前时间ID
var ID_SERVER_TIME = '__LEGO_SERVER_TIME_';
// 页面上的version
var KEY_PAGE_VERSION = '__LEGO_PAGE_VERSION_';
// 测速点
var FIRST_SHOW_POINT = '__LEGO_FIRST_SHOW_POINT';
// routerConfig
var KEY_ROUTER_CONFIG = '__LEGO_ROUTER_CONFIG_';
module.exports = {
ID_MAIN_PAGE: ID_MAIN_PAGE,
ID_SERVER_TIME: ID_SERVER_TIME,
KEY_PAGE_VERSION: KEY_PAGE_VERSION,
FIRST_SHOW_POINT: FIRST_SHOW_POINT,
KEY_ROUTER_CONFIG: KEY_ROUTER_CONFIG
};
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// html的渲染方式
var RENDER_TYPE_HTML_TEMPLATE = 1;
// react的渲染方式
var RENDER_TYPE_REACT = 2;
// vue的渲染方式
var RENDER_TYPE_VUE = 3;
module.exports = {
RENDER_TYPE_HTML_TEMPLATE: RENDER_TYPE_HTML_TEMPLATE,
RENDER_TYPE_REACT: RENDER_TYPE_REACT,
RENDER_TYPE_VUE: RENDER_TYPE_VUE
};
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 初始的state状态的key
var INITIAL_STATE = '__LEGO_INITIAL_STATE__';
// 设置自有state的ACTION_TYPE
var LEGO_ACTION_TYPE_SET_OWN_STATE = '__LEGO_ACTION_TYPE_SET_OWN_STATE__';
// WIDGET在state中的oneState的前缀
var PREFIX_WIDGET_OWN_STATE_KEY = '__WIDGET_ID_';
// 刷新的ACTION_TYPE
var LEGO_ACTION_TYPE_REFRESH = '__LEGO_ACTION_TYPE_REFRESH__';
// 拿取属性方法的前缀
var WIDGET_VUEX_GETTERS_PREFIX = '__legoGetOwnprops-';
module.exports = {
INITIAL_STATE: INITIAL_STATE,
LEGO_ACTION_TYPE_SET_OWN_STATE: LEGO_ACTION_TYPE_SET_OWN_STATE,
PREFIX_WIDGET_OWN_STATE_KEY: PREFIX_WIDGET_OWN_STATE_KEY,
LEGO_ACTION_TYPE_REFRESH: LEGO_ACTION_TYPE_REFRESH,
WIDGET_VUEX_GETTERS_PREFIX: WIDGET_VUEX_GETTERS_PREFIX
};
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 对外暴露的全局的支持工具
var BROWSER_SUPPORTOR = '__LEGO_BROWSER_SUPPORTOR__';
// 支持组件的包名
var BROWSER_SUPPORTOR_PACKAGE_NAME = 'billund-supportor';
// 注册预处理的方法
var BROWSER_SUPPORTOR_REGIST_PREPROCESSOR_NAME = 'useContextPreProcessor';
// 注册store配置
var BROWSER_SUPPORTOR_REGIST_STORE_CONFIG = 'registStoreConfig';
// 注册router配置
var BROWSER_SUPPORTOR_REGISTER_ROUTER_CONFIG = 'registerRouterConfig';
module.exports = {
BROWSER_SUPPORTOR: BROWSER_SUPPORTOR,
BROWSER_SUPPORTOR_PACKAGE_NAME: BROWSER_SUPPORTOR_PACKAGE_NAME,
BROWSER_SUPPORTOR_REGIST_PREPROCESSOR_NAME: BROWSER_SUPPORTOR_REGIST_PREPROCESSOR_NAME,
BROWSER_SUPPORTOR_REGIST_STORE_CONFIG: BROWSER_SUPPORTOR_REGIST_STORE_CONFIG,
BROWSER_SUPPORTOR_REGISTER_ROUTER_CONFIG: BROWSER_SUPPORTOR_REGISTER_ROUTER_CONFIG
};
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// widgets配置
var WIDGET_CONFIGS = '__LEGO_WIDGET_CONFIGS__';
// widgets的属性
var WIDGET_PROPS = '__LEGO_WIDGET_PROPS__';
// 最重要的模块列表
var WIDGETS_IMPORTANT = '__LEGO_WIDGETS_IMPORTANT__';
// 分组时小组的className
var CLASS_WIDGET_SUB = 'lego-widget-sub';
// 分组时的大组className
var CLASS_WIDGET_GROUP = 'lego-widget-group';
// 最重要的模块成功列表
var WIDGETS_IMPORTANT_SUCCESSED = '__LEGO_WIDGETS_IMPORTANT_SUCCESSED__';
// 对外暴露的全局的支持工具
var WIDGETS_FALLBACK = '__LEGO_WIDGETS_FALLBACK__';
// 降级模块的前缀
var FALLBACK_WIDGET_ID_PREFIX = 'lego-widget-fallback-';
module.exports = {
WIDGET_CONFIGS: WIDGET_CONFIGS,
WIDGET_PROPS: WIDGET_PROPS,
WIDGETS_IMPORTANT: WIDGETS_IMPORTANT,
CLASS_WIDGET_SUB: CLASS_WIDGET_SUB,
CLASS_WIDGET_GROUP: CLASS_WIDGET_GROUP,
WIDGETS_IMPORTANT_SUCCESSED: WIDGETS_IMPORTANT_SUCCESSED,
WIDGETS_FALLBACK: WIDGETS_FALLBACK,
FALLBACK_WIDGET_ID_PREFIX: FALLBACK_WIDGET_ID_PREFIX
};
/***/ }),
/* 27 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.byteLength = byteLength
exports.toByteArray = toByteArray
exports.fromByteArray = fromByteArray
var lookup = []
var revLookup = []
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i]
revLookup[code.charCodeAt(i)] = i
}
revLookup['-'.charCodeAt(0)] = 62
revLookup['_'.charCodeAt(0)] = 63
function placeHoldersCount (b64) {
var len = b64.length
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// the number of equal signs (place holders)
// if there are two placeholders, than the two characters before it
// represent one byte
// if there is only one, then the three characters before it represent 2 bytes
// this is just a cheap hack to not do indexOf twice
return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0
}
function byteLength (b64) {
// base64 is 4/3 + up to two characters of the original data
return (b64.length * 3 / 4) - placeHoldersCount(b64)
}
function toByteArray (b64) {
var i, l, tmp, placeHolders, arr
var len = b64.length
placeHolders = placeHoldersCount(b64)
arr = new Arr((len * 3 / 4) - placeHolders)
// if there are placeholders, only get up to the last complete 4 chars
l = placeHolders > 0 ? len - 4 : len
var L = 0
for (i = 0; i < l; i += 4) {
tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)]
arr[L++] = (tmp >> 16) & 0xFF
arr[L++] = (tmp >> 8) & 0xFF
arr[L++] = tmp & 0xFF
}
if (placeHolders === 2) {
tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4)
arr[L++] = tmp & 0xFF
} else if (placeHolders === 1) {
tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2)
arr[L++] = (tmp >> 8) & 0xFF
arr[L++] = tmp & 0xFF
}
return arr
}
function tripletToBase64 (num) {
return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp
var output = []
for (var i = start; i < end; i += 3) {
tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])
output.push(tripletToBase64(tmp))
}
return output.join('')
}
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var output = ''
var parts = []
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1]
output += lookup[tmp >> 2]
output += lookup[(tmp << 4) & 0x3F]
output += '=='
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + (uint8[len - 1])
output += lookup[tmp >> 10]
output += lookup[(tmp >> 4) & 0x3F]
output += lookup[(tmp << 2) & 0x3F]
output += '='
}
parts.push(output)
return parts.join('')
}
/***/ }),
/* 28 */
/***/ (function(module, exports) {
exports.defaults = {};
exports.set = function(name, value, options) {
// Retrieve options and defaults
var opts = options || {};
var defaults = exports.defaults;
// Apply default value for unspecified options
var expires = opts.expires || defaults.expires;
var domain = opts.domain || defaults.domain;
var path = opts.path !== undefined ? opts.path : (defaults.path !== undefined ? defaults.path : '/');
var secure = opts.secure !== undefined ? opts.secure : defaults.secure;
var httponly = opts.httponly !== undefined ? opts.httponly : defaults.httponly;
var samesite = opts.samesite !== undefined ? opts.samesite : defaults.samesite;
// Determine cookie expiration date
// If succesful the result will be a valid Date, otherwise it will be an invalid Date or false(ish)
var expDate = expires ? new Date(
// in case expires is an integer, it should specify the number of days till the cookie expires
typeof expires === 'number' ? new Date().getTime() + (expires * 864e5) :
// else expires should be either a Date object or in a format recognized by Date.parse()
expires
) : 0;
// Set cookie
document.cookie = name.replace(/[^+#$&^`|]/g, encodeURIComponent) // Encode cookie name
.replace('(', '%28')
.replace(')', '%29') +
'=' + value.replace(/[^+#$&/:<-\[\]-}]/g, encodeURIComponent) + // Encode cookie value (RFC6265)
(expDate && expDate.getTime() >= 0 ? ';expires=' + expDate.toUTCString() : '') + // Add expiration date
(domain ? ';domain=' + domain : '') + // Add domain
(path ? ';path=' + path : '') + // Add path
(secure ? ';secure' : '') + // Add secure option
(httponly ? ';httponly' : '') + // Add httponly option
(samesite ? ';samesite=' + samesite : ''); // Add samesite option
};
exports.get = function(name) {
var cookies = document.cookie.split(';');
// Iterate all cookies
while(cookies.length) {
var cookie = cookies.pop();
// Determine separator index ("name=value")
var separatorIndex = cookie.indexOf('=');
// IE<11 emits the equal sign when the cookie value is empty
separatorIndex = separatorIndex < 0 ? cookie.length : separatorIndex;
var cookie_name = decodeURIComponent(cookie.slice(0, separatorIndex).replace(/^\s+/, ''));
// Return cookie value if the name matches
if (cookie_name === name) {
return decodeURIComponent(cookie.slice(separatorIndex + 1));
}
}
// Return `null` as the cookie was not found
return null;
};
exports.erase = function(name, options) {
exports.set(name, '', {
expires: -1,
domain: options && options.domain,
path: options && options.path,
secure: 0,
httponly: 0}
);
};
exports.all = function() {
var all = {};
var cookies = document.cookie.split(';');
// Iterate all cookies
while(cookies.length) {
var cookie = cookies.pop();
// Determine separator index ("name=value")
var separatorIndex = cookie.indexOf('=');
// IE<11 emits the equal sign when the cookie value is empty
separatorIndex = separatorIndex < 0 ? cookie.length : separatorIndex;
// add the cookie name and value to the `all` object
var cookie_name = decodeURIComponent(cookie.slice(0, separatorIndex).replace(/^\s+/, ''));
all[cookie_name] = decodeURIComponent(cookie.slice(separatorIndex + 1));
}
return all;
};
/***/ }),
/* 29 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
var base64 = __webpack_require__(27)
var ieee754 = __webpack_require__(33)
var isArray = __webpack_require__(34)
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
? global.TYPED_ARRAY_SUPPORT
: typedArraySupport()
/*
* Export kMaxLength after typed array support is determined.
*/
exports.kMaxLength = kMaxLength()
function typedArraySupport () {
try {
var arr = new Uint8Array(1)
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
}
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
? 0x7fffffff
: 0x3fffffff
}
function createBuffer (that, length) {
if (kMaxLength() < length) {
throw new RangeError('Invalid typed array length')
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array(length)
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
if (that === null) {
that = new Buffer(length)
}
that.length = length
}
return that
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer (arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length)
}
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error(
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe(this, arg)
}
return from(this, arg, encodingOrOffset, length)
}
Buffer.poolSize = 8192 // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer._augment = function (arr) {
arr.__proto__ = Buffer.prototype
return arr
}
function from (that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number')
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length)
}
if (typeof value === 'string') {
return fromString(that, value, encodingOrOffset)
}
return fromObject(that, value)
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(null, value, encodingOrOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
if (typeof Symbol !== 'undefined' && Symbol.species &&
Buffer[Symbol.species] === Buffer) {
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
Object.defineProperty(Buffer, Symbol.species, {
value: null,
configurable: true
})
}
}
function assertSize (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
}
function alloc (that, size, fill, encoding) {
assertSize(size)
if (size <= 0) {
return createBuffer(that, size)
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer(that, size).fill(fill, encoding)
: createBuffer(that, size).fill(fill)
}
return createBuffer(that, size)
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(null, size, fill, encoding)
}
function allocUnsafe (that, size) {
assertSize(size)
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0
}
}
return that
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(null, size)
}
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(null, size)
}
function fromString (that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8'
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding')
}
var length = byteLength(string, encoding) | 0
that = createBuffer(that, length)
var actual = that.write(string, encoding)
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that.slice(0, actual)
}
return that
}
function fromArrayLike (that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0
that = createBuffer(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
function fromArrayBuffer (that, array, byteOffset, length) {
array.byteLength // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds')
}
if (byteOffset === undefined && length === undefined) {
array = new Uint8Array(array)
} else if (length === undefined) {
array = new Uint8Array(array, byteOffset)
} else {
array = new Uint8Array(array, byteOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = array
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike(that, array)
}
return that
}
function fromObject (that, obj) {
if (Buffer.isBuffer(obj)) {
var len = checked(obj.length) | 0
that = createBuffer(that, len)
if (that.length === 0) {
return that
}
obj.copy(that, 0, 0, len)
return that
}
if (obj) {
if ((typeof ArrayBuffer !== 'undefined' &&
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
if (typeof obj.length !== 'number' || isnan(obj.length)) {
return createBuffer(that, 0)
}
return fromArrayLike(that, obj)
}
if (obj.type === 'Buffer' && isArray(obj.data)) {
return fromArrayLike(that, obj.data)
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}
function checked (length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength().toString(16) + ' bytes')
}
return length | 0
}
function SlowBuffer (length) {
if (+length != length) { // eslint-disable-line eqeqeq
length = 0
}
return Buffer.alloc(+length)
}
Buffer.isBuffer = function isBuffer (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function compare (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i]
y = b[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function concat (list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i
if (length === undefined) {
length = 0
for (i = 0; i < list.length; ++i) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
for (i = 0; i < list.length; ++i) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer, pos)
pos += buf.length
}
return buffer
}
function byteLength (string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string
}
var len = string.length
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.byteLength = byteLength
function slowToString (encoding, start, end) {
var loweredCase = false
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return ''
}
if (end === undefined || end > this.length) {
end = this.length
}
if (end <= 0) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0
start >>>= 0
if (end <= start) {
return ''
}
if (!encoding) encoding = 'utf8'
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'latin1':
case 'binary':
return latin1Slice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer.prototype._isBuffer = true
function swap (b, n, m) {
var i = b[n]
b[n] = b[m]
b[m] = i
}
Buffer.prototype.swap16 = function swap16 () {
var len = this.length
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits')
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1)
}
return this
}
Buffer.prototype.swap32 = function swap32 () {
var len = this.length
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits')
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3)
swap(this, i + 1, i + 2)
}
return this
}
Buffer.prototype.swap64 = function swap64 () {
var len = this.length
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits')
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7)
swap(this, i + 1, i + 6)
swap(this, i + 2, i + 5)
swap(this, i + 3, i + 4)
}
return this
}
Buffer.prototype.toString = function toString () {
var length = this.length | 0
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this, 0, length)
return slowToString.apply(this, arguments)
}
Buffer.prototype.equals = function equals (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function inspect () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max) str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
if (!Buffer.isBuffer(target)) {
throw new TypeError('Argument must be a Buffer')
}
if (start === undefined) {
start = 0
}
if (end === undefined) {
end = target ? target.length : 0
}
if (thisStart === undefined) {
thisStart = 0
}
if (thisEnd === undefined) {
thisEnd = this.length
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index')
}
if (thisStart >= thisEnd && start >= end) {
return 0
}
if (thisStart >= thisEnd) {
return -1
}
if (start >= end) {
return 1
}
start >>>= 0
end >>>= 0
thisStart >>>= 0
thisEnd >>>= 0
if (this === target) return 0
var x = thisEnd - thisStart
var y = end - start
var len = Math.min(x, y)
var thisCopy = this.slice(thisStart, thisEnd)
var targetCopy = target.slice(start, end)
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i]
y = targetCopy[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1
// Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset
byteOffset = 0
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000
}
byteOffset = +byteOffset // Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1)
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
if (byteOffset >= buffer.length) {
if (dir) return -1
else byteOffset = buffer.length - 1
} else if (byteOffset < 0) {
if (dir) byteOffset = 0
else return -1
}
// Normalize val
if (typeof val === 'string') {
val = Buffer.from(val, encoding)
}
// Finally, search either indexOf (if dir is true) or lastIndexOf
if (Buffer.isBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1
}
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
} else if (typeof val === 'number') {
val = val & 0xFF // Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT &&
typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
}
}
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
}
throw new TypeError('val must be string, number or Buffer')
}
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
var indexSize = 1
var arrLength = arr.length
var valLength = val.length
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase()
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1
}
indexSize = 2
arrLength /= 2
valLength /= 2
byteOffset /= 2
}
}
function read (buf, i) {
if (indexSize === 1) {
return buf[i]
} else {
return buf.readUInt16BE(i * indexSize)
}
}
var i
if (dir) {
var foundIndex = -1
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex
foundIndex = -1
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
for (i = byteOffset; i >= 0; i--) {
var found = true
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false
break
}
}
if (found) return i
}
}
return -1
}
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1
}
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
}
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; ++i) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(parsed)) return i
buf[offset + i] = parsed
}
return i
}
function utf8Write (buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}
function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length)
}
function ucs2Write (buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8'
length = this.length
offset = 0
// Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset
length = this.length
offset = 0
// Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset | 0
if (isFinite(length)) {
length = length | 0
if (encoding === undefined) encoding = 'utf8'
} else {
encoding = length
length = undefined
}
// legacy write(string, encoding, offset, length) - remove in v0.13
} else {
throw new Error(
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
)
}
var remaining = this.length - offset
if (length === undefined || length > remaining) length = remaining
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
throw new RangeError('Attempt to write outside buffer bounds')
}
if (!encoding) encoding = 'utf8'
var loweredCase = false
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length)
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length)
case 'ascii':
return asciiWrite(this, string, offset, length)
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.toJSON = function toJSON () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end)
var res = []
var i = start
while (i < end) {
var firstByte = buf[i]
var codePoint = null
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
: (firstByte > 0xBF) ? 2
: 1
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte
}
break
case 2:
secondByte = buf[i + 1]
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint
}
}
break
case 3:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint
}
}
break
case 4:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
fourthByte = buf[i + 3]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD
bytesPerSequence = 1
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
codePoint = 0xDC00 | codePoint & 0x3FF
}
res.push(codePoint)
i += bytesPerSequence
}
return decodeCodePointsArray(res)
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000
function decodeCodePointsArray (codePoints) {
var len = codePoints.length
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = ''
var i = 0
while (i < len) {
res += String.fromCharCode.apply(
String,
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
)
}
return res
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
}
function latin1Slice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i])
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; ++i) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
}
return res
}
Buffer.prototype.slice = function slice (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len
if (start < 0) start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0) end = 0
} else if (end > len) {
end = len
}
if (end < start) end = start
var newBuf
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = this.subarray(start, end)
newBuf.__proto__ = Buffer.prototype
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined)
for (var i = 0; i < sliceLen; ++i) {
newBuf[i] = this[i + start]
}
}
return newBuf
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
return val
}
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
checkOffset(offset, byteLength, this.length)
}
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul
}
return val
}
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80)) return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
if (offset + ext > buf.length) throw new RangeError('Index out of range')
}
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
this[offset] = (value & 0xff)
return offset + 1
}
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = 0
var mul = 1
var sub = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = byteLength - 1
var mul = 1
var sub = 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
this[offset] = (value & 0xff)
return offset + 1
}
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range')
if (offset < 0) throw new RangeError('Index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
}
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
}
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
if (!targetStart) targetStart = 0
if (end > 0 && end < start) end = start
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || this.length === 0) return 0
// Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length) end = this.length
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start
}
var len = end - start
var i
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
for (i = 0; i < len; ++i) {
target[i + targetStart] = this[i + start]
}
} else {
Uint8Array.prototype.set.call(
target,
this.subarray(start, start + len),
targetStart
)
}
return len
}
// Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill (val, start, end, encoding) {
// Handle string cases:
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start
start = 0
end = this.length
} else if (typeof end === 'string') {
encoding = end
end = this.length
}
if (val.length === 1) {
var code = val.charCodeAt(0)
if (code < 256) {
val = code
}
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
} else if (typeof val === 'number') {
val = val & 255
}
// Invalid ranges are not set to a default, so can range check early.
if (start < 0 || this.length < start || this.length < end) {
throw new RangeError('Out of range index')
}
if (end <= start) {
return this
}
start = start >>> 0
end = end === undefined ? this.length : end >>> 0
if (!val) val = 0
var i
if (typeof val === 'number') {
for (i = start; i < end; ++i) {
this[i] = val
}
} else {
var bytes = Buffer.isBuffer(val)
? val
: utf8ToBytes(new Buffer(val, encoding).toString())
var len = bytes.length
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len]
}
}
return this
}
// HELPER FUNCTIONS
// ================
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
var length = string.length
var leadSurrogate = null
var bytes = []
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
leadSurrogate = codePoint
continue
}
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
}
leadSurrogate = null
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
return base64.toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
return i
}
function isnan (val) {
return val !== val // eslint-disable-line no-self-compare
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ }),
/* 30 */
/***/ (function(module, exports) {
/**
* slice() reference.
*/
var slice = Array.prototype.slice;
/**
* Expose `co`.
*/
module.exports = co['default'] = co.co = co;
/**
* Wrap the given generator `fn` into a
* function that returns a promise.
* This is a separate function so that
* every `co()` call doesn't create a new,
* unnecessary closure.
*
* @param {GeneratorFunction} fn
* @return {Function}
* @api public
*/
co.wrap = function (fn) {
createPromise.__generatorFunction__ = fn;
return createPromise;
function createPromise() {
return co.call(this, fn.apply(this, arguments));
}
};
/**
* Execute the generator function or a generator
* and return a promise.
*
* @param {Function} fn
* @return {Promise}
* @api public
*/
function co(gen) {
var ctx = this;
var args = slice.call(arguments, 1)
// we wrap everything in a promise to avoid promise chaining,
// which leads to memory leak errors.
// see https://github.com/tj/co/issues/180
return new Promise(function(resolve, reject) {
if (typeof gen === 'function') gen = gen.apply(ctx, args);
if (!gen || typeof gen.next !== 'function') return resolve(gen);
onFulfilled();
/**
* @param {Mixed} res
* @return {Promise}
* @api private
*/
function onFulfilled(res) {
var ret;
try {
ret = gen.next(res);
} catch (e) {
return reject(e);
}
next(ret);
}
/**
* @param {Error} err
* @return {Promise}
* @api private
*/
function onRejected(err) {
var ret;
try {
ret = gen.throw(err);
} catch (e) {
return reject(e);
}
next(ret);
}
/**
* Get the next value in the generator,
* return a promise.
*
* @param {Object} ret
* @return {Promise}
* @api private
*/
function next(ret) {
if (ret.done) return resolve(ret.value);
var value = toPromise.call(ctx, ret.value);
if (value && isPromise(value)) return value.then(onFulfilled, onRejected);
return onRejected(new TypeError('You may only yield a function, promise, generator, array, or object, '
+ 'but the following object was passed: "' + String(ret.value) + '"'));
}
});
}
/**
* Convert a `yield`ed value into a promise.
*
* @param {Mixed} obj
* @return {Promise}
* @api private
*/
function toPromise(obj) {
if (!obj) return obj;
if (isPromise(obj)) return obj;
if (isGeneratorFunction(obj) || isGenerator(obj)) return co.call(this, obj);
if ('function' == typeof obj) return thunkToPromise.call(this, obj);
if (Array.isArray(obj)) return arrayToPromise.call(this, obj);
if (isObject(obj)) return objectToPromise.call(this, obj);
return obj;
}
/**
* Convert a thunk to a promise.
*
* @param {Function}
* @return {Promise}
* @api private
*/
function thunkToPromise(fn) {
var ctx = this;
return new Promise(function (resolve, reject) {
fn.call(ctx, function (err, res) {
if (err) return reject(err);
if (arguments.length > 2) res = slice.call(arguments, 1);
resolve(res);
});
});
}
/**
* Convert an array of "yieldables" to a promise.
* Uses `Promise.all()` internally.
*
* @param {Array} obj
* @return {Promise}
* @api private
*/
function arrayToPromise(obj) {
return Promise.all(obj.map(toPromise, this));
}
/**
* Convert an object of "yieldables" to a promise.
* Uses `Promise.all()` internally.
*
* @param {Object} obj
* @return {Promise}
* @api private
*/
function objectToPromise(obj){
var results = new obj.constructor();
var keys = Object.keys(obj);
var promises = [];
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var promise = toPromise.call(this, obj[key]);
if (promise && isPromise(promise)) defer(promise, key);
else results[key] = obj[key];
}
return Promise.all(promises).then(function () {
return results;
});
function defer(promise, key) {
// predefine the key in the result
results[key] = undefined;
promises.push(promise.then(function (res) {
results[key] = res;
}));
}
}
/**
* Check if `obj` is a promise.
*
* @param {Object} obj
* @return {Boolean}
* @api private
*/
function isPromise(obj) {
return 'function' == typeof obj.then;
}
/**
* Check if `obj` is a generator.
*
* @param {Mixed} obj
* @return {Boolean}
* @api private
*/
function isGenerator(obj) {
return 'function' == typeof obj.next && 'function' == typeof obj.throw;
}
/**
* Check if `obj` is a generator function.
*
* @param {Mixed} obj
* @return {Boolean}
* @api private
*/
function isGeneratorFunction(obj) {
var constructor = obj.constructor;
if (!constructor) return false;
if ('GeneratorFunction' === constructor.name || 'GeneratorFunction' === constructor.displayName) return true;
return isGenerator(constructor.prototype);
}
/**
* Check for plain object.
*
* @param {Mixed} val
* @return {Boolean}
* @api private
*/
function isObject(val) {
return Object == val.constructor;
}
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* global define */
(function (root, factory) {
/* istanbul ignore next */
if (true) {
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else if (typeof exports === 'object') {
module.exports = factory();
} else {
root.compareVersions = factory();
}
}(this, function () {
var semver = /^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;
var patch = /-([0-9A-Za-z-.]+)/;
function split(v) {
var temp = v.replace(/^v/, '').split('.');
var arr = temp.splice(0, 2);
arr.push(temp.join('.'));
return arr;
}
function tryParse(v) {
return isNaN(Number(v)) ? v : Number(v);
}
function validate(version) {
if (typeof version !== 'string') {
throw new TypeError('Invalid argument expected string');
}
if (!semver.test(version)) {
throw new Error('Invalid argument not valid semver');
}
}
return function compareVersions(v1, v2) {
[v1, v2].forEach(validate);
var s1 = split(v1);
var s2 = split(v2);
for (var i = 0; i < 3; i++) {
var n1 = parseInt(s1[i] || 0, 10);
var n2 = parseInt(s2[i] || 0, 10);
if (n1 > n2) return 1;
if (n2 > n1) return -1;
}
if ([s1[2], s2[2]].every(patch.test.bind(patch))) {
var p1 = patch.exec(s1[2])[1].split('.').map(tryParse);
var p2 = patch.exec(s2[2])[1].split('.').map(tryParse);
for (i = 0; i < Math.max(p1.length, p2.length); i++) {
if (p1[i] === undefined || typeof p2[i] === 'string' && typeof p1[i] === 'number') return -1;
if (p2[i] === undefined || typeof p1[i] === 'string' && typeof p2[i] === 'number') return 1;
if (p1[i] > p2[i]) return 1;
if (p2[i] > p1[i]) return -1;
}
} else if ([s1[2], s2[2]].some(patch.test.bind(patch))) {
return patch.test(s1[2]) ? -1 : 1;
}
return 0;
};
}));
/***/ }),
/* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Buffer) {/*!
* @description Recursive object extending
* @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
* @license MIT
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2015 Viacheslav Lotsmanov
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
function isSpecificValue(val) {
return (
val instanceof Buffer
|| val instanceof Date
|| val instanceof RegExp
) ? true : false;
}
function cloneSpecificValue(val) {
if (val instanceof Buffer) {
var x = new Buffer(val.length);
val.copy(x);
return x;
} else if (val instanceof Date) {
return new Date(val.getTime());
} else if (val instanceof RegExp) {
return new RegExp(val);
} else {
throw new Error('Unexpected situation');
}
}
/**
* Recursive cloning array.
*/
function deepCloneArray(arr) {
var clone = [];
arr.forEach(function (item, index) {
if (typeof item === 'object' && item !== null) {
if (Array.isArray(item)) {
clone[index] = deepCloneArray(item);
} else if (isSpecificValue(item)) {
clone[index] = cloneSpecificValue(item);
} else {
clone[index] = deepExtend({}, item);
}
} else {
clone[index] = item;
}
});
return clone;
}
/**
* Extening object that entered in first argument.
*
* Returns extended object or false if have no target object or incorrect type.
*
* If you wish to clone source object (without modify it), just use empty new
* object as first argument, like this:
* deepExtend({}, yourObj_1, [yourObj_N]);
*/
var deepExtend = module.exports = function (/*obj_1, [obj_2], [obj_N]*/) {
if (arguments.length < 1 || typeof arguments[0] !== 'object') {
return false;
}
if (arguments.length < 2) {
return arguments[0];
}
var target = arguments[0];
// convert arguments to array and cut off target object
var args = Array.prototype.slice.call(arguments, 1);
var val, src, clone;
args.forEach(function (obj) {
// skip argument if isn't an object, is null, or is an array
if (typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
return;
}
Object.keys(obj).forEach(function (key) {
src = target[key]; // source value
val = obj[key]; // new value
// recursion prevention
if (val === target) {
return;
/**
* if new value isn't object then just overwrite by new value
* instead of extending.
*/
} else if (typeof val !== 'object' || val === null) {
target[key] = val;
return;
// just clone arrays (and recursive clone objects inside)
} else if (Array.isArray(val)) {
target[key] = deepCloneArray(val);
return;
// custom cloning and overwrite for specific objects
} else if (isSpecificValue(val)) {
target[key] = cloneSpecificValue(val);
return;
// overwrite by new value if source isn't object or array
} else if (typeof src !== 'object' || src === null || Array.isArray(src)) {
target[key] = deepExtend({}, val);
return;
// source value and new value is objects both, extending...
} else {
target[key] = deepExtend(src, val);
return;
}
});
});
return target;
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(29).Buffer))
/***/ }),
/* 33 */
/***/ (function(module, exports) {
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
var i = isLE ? (nBytes - 1) : 0
var d = isLE ? -1 : 1
var s = buffer[offset + i]
i += d
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1)
e >>= (-nBits)
nBits += mLen
for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity)
} else {
m = m + Math.pow(2, mLen)
e = e - eBias
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
var eLen = nBytes * 8 - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
var i = isLE ? 0 : (nBytes - 1)
var d = isLE ? 1 : -1
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
value = Math.abs(value)
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0
e = eMax
} else {
e = Math.floor(Math.log(value) / Math.LN2)
if (value * (c = Math.pow(2, -e)) < 1) {
e--
c *= 2
}
if (e + eBias >= 1) {
value += rt / c
} else {
value += rt * Math.pow(2, 1 - eBias)
}
if (value * c >= 2) {
e++
c /= 2
}
if (e + eBias >= eMax) {
m = 0
e = eMax
} else if (e + eBias >= 1) {
m = (value * c - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
e = 0
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = (e << mLen) | m
eLen += mLen
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128
}
/***/ }),
/* 34 */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/* 35 */
/***/ (function(module, exports) {
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.
var cachedSetTimeout;
var cachedClearTimeout;
function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}
}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;
function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
} else {
queueIndex = -1;
}
if (queue.length) {
drainQueue();
}
}
function drainQueue() {
if (draining) {
return;
}
var timeout = runTimeout(cleanUpNextTick);
draining = true;
var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
runClearTimeout(timeout);
}
process.nextTick = function (fun) {
var args = new Array(arguments.length - 1);
if (arguments.length > 1) {
for (var i = 1; i < arguments.length; i++) {
args[i - 1] = arguments[i];
}
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
runTimeout(drainQueue);
}
};
// v8 likes predictible objects
function Item(fun, array) {
this.fun = fun;
this.array = array;
}
Item.prototype.run = function () {
this.fun.apply(null, this.array);
};
process.title = 'browser';
process.browser = true;
process.env = {};
process.argv = [];
process.version = ''; // empty string to avoid regexp issues
process.versions = {};
function noop() {}
process.on = noop;
process.addListener = noop;
process.once = noop;
process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;
process.listeners = function (name) { return [] }
process.binding = function (name) {
throw new Error('process.binding is not supported');
};
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };
/***/ }),
/* 36 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var stringify = __webpack_require__(38);
var parse = __webpack_require__(37);
var formats = __webpack_require__(7);
module.exports = {
formats: formats,
parse: parse,
stringify: stringify
};
/***/ }),
/* 37 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(8);
var has = Object.prototype.hasOwnProperty;
var defaults = {
allowDots: false,
allowPrototypes: false,
arrayLimit: 20,
decoder: utils.decode,
delimiter: '&',
depth: 5,
parameterLimit: 1000,
plainObjects: false,
strictNullHandling: false
};
var parseValues = function parseQueryStringValues(str, options) {
var obj = {};
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
var parts = cleanStr.split(options.delimiter, limit);
for (var i = 0; i < parts.length; ++i) {
var part = parts[i];
var bracketEqualsPos = part.indexOf(']=');
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
var key, val;
if (pos === -1) {
key = options.decoder(part, defaults.decoder);
val = options.strictNullHandling ? null : '';
} else {
key = options.decoder(part.slice(0, pos), defaults.decoder);
val = options.decoder(part.slice(pos + 1), defaults.decoder);
}
if (has.call(obj, key)) {
obj[key] = [].concat(obj[key]).concat(val);
} else {
obj[key] = val;
}
}
return obj;
};
var parseObject = function (chain, val, options) {
var leaf = val;
for (var i = chain.length - 1; i >= 0; --i) {
var obj;
var root = chain[i];
if (root === '[]') {
obj = [];
obj = obj.concat(leaf);
} else {
obj = options.plainObjects ? Object.create(null) : {};
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
var index = parseInt(cleanRoot, 10);
if (
!isNaN(index)
&& root !== cleanRoot
&& String(index) === cleanRoot
&& index >= 0
&& (options.parseArrays && index <= options.arrayLimit)
) {
obj = [];
obj[index] = leaf;
} else {
obj[cleanRoot] = leaf;
}
}
leaf = obj;
}
return leaf;
};
var parseKeys = function parseQueryStringKeys(givenKey, val, options) {
if (!givenKey) {
return;
}
// Transform dot notation to bracket notation
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
// The regex chunks
var brackets = /(\[[^[\]]*])/;
var child = /(\[[^[\]]*])/g;
// Get the parent
var segment = brackets.exec(key);
var parent = segment ? key.slice(0, segment.index) : key;
// Stash the parent if it exists
var keys = [];
if (parent) {
// If we aren't using plain objects, optionally prefix keys
// that would overwrite object prototype properties
if (!options.plainObjects && has.call(Object.prototype, parent)) {
if (!options.allowPrototypes) {
return;
}
}
keys.push(parent);
}
// Loop through children appending to the array until we hit depth
var i = 0;
while ((segment = child.exec(key)) !== null && i < options.depth) {
i += 1;
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
if (!options.allowPrototypes) {
return;
}
}
keys.push(segment[1]);
}
// If there's a remainder, just add whatever is left
if (segment) {
keys.push('[' + key.slice(segment.index) + ']');
}
return parseObject(keys, val, options);
};
module.exports = function (str, opts) {
var options = opts ? utils.assign({}, opts) : {};
if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') {
throw new TypeError('Decoder has to be a function.');
}
options.ignoreQueryPrefix = options.ignoreQueryPrefix === true;
options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter;
options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth;
options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit;
options.parseArrays = options.parseArrays !== false;
options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder;
options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots;
options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects;
options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes;
options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit;
options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
if (str === '' || str === null || typeof str === 'undefined') {
return options.plainObjects ? Object.create(null) : {};
}
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
var obj = options.plainObjects ? Object.create(null) : {};
// Iterate over the keys and setup the new object
var keys = Object.keys(tempObj);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
var newObj = parseKeys(key, tempObj[key], options);
obj = utils.merge(obj, newObj, options);
}
return utils.compact(obj);
};
/***/ }),
/* 38 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(8);
var formats = __webpack_require__(7);
var arrayPrefixGenerators = {
brackets: function brackets(prefix) { // eslint-disable-line func-name-matching
return prefix + '[]';
},
indices: function indices(prefix, key) { // eslint-disable-line func-name-matching
return prefix + '[' + key + ']';
},
repeat: function repeat(prefix) { // eslint-disable-line func-name-matching
return prefix;
}
};
var toISO = Date.prototype.toISOString;
var defaults = {
delimiter: '&',
encode: true,
encoder: utils.encode,
encodeValuesOnly: false,
serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching
return toISO.call(date);
},
skipNulls: false,
strictNullHandling: false
};
var stringify = function stringify( // eslint-disable-line func-name-matching
object,
prefix,
generateArrayPrefix,
strictNullHandling,
skipNulls,
encoder,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
) {
var obj = object;
if (typeof filter === 'function') {
obj = filter(prefix, obj);
} else if (obj instanceof Date) {
obj = serializeDate(obj);
} else if (obj === null) {
if (strictNullHandling) {
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix;
}
obj = '';
}
if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) {
if (encoder) {
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder);
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))];
}
return [formatter(prefix) + '=' + formatter(String(obj))];
}
var values = [];
if (typeof obj === 'undefined') {
return values;
}
var objKeys;
if (Array.isArray(filter)) {
objKeys = filter;
} else {
var keys = Object.keys(obj);
objKeys = sort ? keys.sort(sort) : keys;
}
for (var i = 0; i < objKeys.length; ++i) {
var key = objKeys[i];
if (skipNulls && obj[key] === null) {
continue;
}
if (Array.isArray(obj)) {
values = values.concat(stringify(
obj[key],
generateArrayPrefix(prefix, key),
generateArrayPrefix,
strictNullHandling,
skipNulls,
encoder,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
));
} else {
values = values.concat(stringify(
obj[key],
prefix + (allowDots ? '.' + key : '[' + key + ']'),
generateArrayPrefix,
strictNullHandling,
skipNulls,
encoder,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
));
}
}
return values;
};
module.exports = function (object, opts) {
var obj = object;
var options = opts ? utils.assign({}, opts) : {};
if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') {
throw new TypeError('Encoder has to be a function.');
}
var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter;
var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling;
var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls;
var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode;
var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder;
var sort = typeof options.sort === 'function' ? options.sort : null;
var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots;
var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate;
var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly;
if (typeof options.format === 'undefined') {
options.format = formats['default'];
} else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) {
throw new TypeError('Unknown format option provided.');
}
var formatter = formats.formatters[options.format];
var objKeys;
var filter;
if (typeof options.filter === 'function') {
filter = options.filter;
obj = filter('', obj);
} else if (Array.isArray(options.filter)) {
filter = options.filter;
objKeys = filter;
}
var keys = [];
if (typeof obj !== 'object' || obj === null) {
return '';
}
var arrayFormat;
if (options.arrayFormat in arrayPrefixGenerators) {
arrayFormat = options.arrayFormat;
} else if ('indices' in options) {
arrayFormat = options.indices ? 'indices' : 'repeat';
} else {
arrayFormat = 'indices';
}
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
if (!objKeys) {
objKeys = Object.keys(obj);
}
if (sort) {
objKeys.sort(sort);
}
for (var i = 0; i < objKeys.length; ++i) {
var key = objKeys[i];
if (skipNulls && obj[key] === null) {
continue;
}
keys = keys.concat(stringify(
obj[key],
key,
generateArrayPrefix,
strictNullHandling,
skipNulls,
encode ? encoder : null,
filter,
sort,
allowDots,
serializeDate,
formatter,
encodeValuesOnly
));
}
var joined = keys.join(delimiter);
var prefix = options.addQueryPrefix === true ? '?' : '';
return joined.length > 0 ? prefix + joined : '';
};
/***/ }),
/* 39 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {// This method of obtaining a reference to the global object needs to be
// kept identical to the way it is obtained in runtime.js
var g =
typeof global === "object" ? global :
typeof window === "object" ? window :
typeof self === "object" ? self : this;
// Use `getOwnPropertyNames` because not all browsers support calling
// `hasOwnProperty` on the global `self` object in a worker. See #183.
var hadRuntime = g.regeneratorRuntime &&
Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
// Save the old regeneratorRuntime in case it needs to be restored later.
var oldRuntime = hadRuntime && g.regeneratorRuntime;
// Force reevalutation of runtime.js.
g.regeneratorRuntime = undefined;
module.exports = __webpack_require__(40);
if (hadRuntime) {
// Restore the original runtime.
g.regeneratorRuntime = oldRuntime;
} else {
// Remove the global property added by runtime.js.
try {
delete g.regeneratorRuntime;
} catch(e) {
g.regeneratorRuntime = undefined;
}
}
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ }),
/* 40 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/**
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
* additional grant of patent rights can be found in the PATENTS file in
* the same directory.
*/
!(function(global) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
var inModule = typeof module === "object";
var runtime = global.regeneratorRuntime;
if (runtime) {
if (inModule) {
// If regeneratorRuntime is defined globally and we're in a module,
// make the exports object identical to regeneratorRuntime.
module.exports = runtime;
}
// Don't bother evaluating the rest of this file if the runtime was
// already defined globally.
return;
}
// Define the runtime globally (as expected by generated code) as either
// module.exports (if we're in a module) or a new, empty object.
runtime = global.regeneratorRuntime = inModule ? module.exports : {};
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
runtime.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype &&
NativeIteratorPrototype !== Op &&
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
// This environment has a native %IteratorPrototype%; use it instead
// of the polyfill.
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype =
Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunctionPrototype[toStringTagSymbol] =
GeneratorFunction.displayName = "GeneratorFunction";
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function(method) {
prototype[method] = function(arg) {
return this._invoke(method, arg);
};
});
}
runtime.isGeneratorFunction = function(genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor
? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction"
: false;
};
runtime.mark = function(genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
if (!(toStringTagSymbol in genFun)) {
genFun[toStringTagSymbol] = "GeneratorFunction";
}
}
genFun.prototype = Object.create(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
runtime.awrap = function(arg) {
return { __await: arg };
};
function AsyncIterator(generator) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value &&
typeof value === "object" &&
hasOwn.call(value, "__await")) {
return Promise.resolve(value.__await).then(function(value) {
invoke("next", value, resolve, reject);
}, function(err) {
invoke("throw", err, resolve, reject);
});
}
return Promise.resolve(value).then(function(unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration. If the Promise is rejected, however, the
// result for this iteration will be rejected with the same
// reason. Note that rejections of yielded Promises are not
// thrown back into the generator function, as is the case
// when an awaited Promise is rejected. This difference in
// behavior between yield and await is important, because it
// allows the consumer to decide what to do with the yielded
// rejection (swallow it and continue, manually .throw it back
// into the generator, abandon iteration, whatever). With
// await, by contrast, there is no opportunity to examine the
// rejection reason outside the generator function, so the
// only option is to throw it from the await expression, and
// let the generator function handle the exception.
result.value = unwrapped;
resolve(result);
}, reject);
}
}
if (typeof global.process === "object" && global.process.domain) {
invoke = global.process.domain.bind(invoke);
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new Promise(function(resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(
callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg
) : callInvokeWithMethodAndArg();
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
runtime.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
var iter = new AsyncIterator(
wrap(innerFn, outerFn, self, tryLocsList)
);
return runtime.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function(result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done
? GenStateCompleted
: GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(context.arg) call above.
context.method = "throw";
context.arg = record.arg;
}
}
};
}
// Call delegate.iterator[context.method](context.arg) and handle the
// result, either by returning a { value, done } result from the
// delegate iterator, or by modifying context.method and context.arg,
// setting context.delegate to null, and returning the ContinueSentinel.
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method always terminates the yield* loop.
context.delegate = null;
if (context.method === "throw") {
if (delegate.iterator.return) {
// If the delegate iterator has a return method, give it a
// chance to clean up.
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
// If maybeInvokeDelegate(context) changed context.method from
// "return" to "throw", let that override the TypeError below.
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError(
"The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (! info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
// Assign the result of the finished delegate to the temporary
// variable specified by delegate.resultName (see delegateYield).
context[delegate.resultName] = info.value;
// Resume execution at the desired location (see delegateYield).
context.next = delegate.nextLoc;
// If context.method was "throw" but the delegate handled the
// exception, let the outer generator proceed normally. If
// context.method was "next", forget context.arg since it has been
// "consumed" by the delegate iterator. If context.method was
// "return", allow the original .return call to continue in the
// outer generator.
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
// Re-yield the result returned by the delegate method.
return info;
}
// The delegate iterator is finished, so forget it and continue with
// the outer generator.
context.delegate = null;
return ContinueSentinel;
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
Gp[toStringTagSymbol] = "Generator";
// A Generator should always return itself as the iterator object when the
// @@iterator function is called on it. Some browsers' implementations of the
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
Gp[iteratorSymbol] = function() {
return this;
};
Gp.toString = function() {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
runtime.keys = function(object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1, next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
// Return an iterator with no values.
return { next: doneResult };
}
runtime.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function(skipTempReset) {
this.prev = 0;
this.next = 0;
// Resetting context._sent for legacy support of Babel's
// function.sent implementation.
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" &&
hasOwn.call(this, name) &&
!isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
context.method = "next";
context.arg = undefined;
}
return !! caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev &&
hasOwn.call(entry, "finallyLoc") &&
this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry &&
(type === "break" ||
type === "continue") &&
finallyEntry.tryLoc <= arg &&
arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" ||
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
this.arg = undefined;
}
return ContinueSentinel;
}
};
})(
// Among the various tricks for obtaining a reference to the global
// object, this seems to be the most reliable technique that does not
// use indirect eval (which violates Content Security Policy).
typeof global === "object" ? global :
typeof window === "object" ? window :
typeof self === "object" ? self : this
);
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2)))
/***/ }),
/* 41 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_41__;
/***/ }),
/* 42 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_42__;
/***/ }),
/* 43 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_43__;
/***/ }),
/* 44 */
/***/ (function(module, exports) {
module.exports = __WEBPACK_EXTERNAL_MODULE_44__;
/***/ }),
/* 45 */
/***/ (function(module, exports) {
/* (ignored) */
/***/ })
/******/ ]);
});
|
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @emails react-core
* @jest-environment node
*/
'use strict';
let React;
let ReactNativeRT;
let RTManager;
describe('ReactNativeRT', () => {
beforeEach(() => {
jest.resetModules();
React = require('react');
ReactNativeRT = require('react-rt-renderer');
RTManager = require('RTManager');
});
it('should be able to create and render a native component', () => {
ReactNativeRT.render(<rt-box foo="test" />, 1);
expect(RTManager.createNode).toBeCalled();
expect(RTManager.appendChildToContext).toBeCalled();
expect(RTManager.appendChild).not.toBeCalled();
expect(RTManager.updateNode).not.toBeCalled();
});
it('should be able to create and update a native component', () => {
ReactNativeRT.render(<rt-box foo="foo" />, 11);
expect(RTManager.createNode.mock.calls.length).toBe(1);
expect(RTManager.createNode).toBeCalledWith(1, 'rt-box', {foo: 'foo'});
expect(RTManager.appendChildToContext.mock.calls.length).toBe(1);
expect(RTManager.appendChild).not.toBeCalled();
expect(RTManager.updateNode).not.toBeCalled();
ReactNativeRT.render(<rt-box foo="bar" />, 11);
expect(RTManager.createNode.mock.calls.length).toBe(1);
expect(RTManager.appendChildToContext.mock.calls.length).toBe(1);
expect(RTManager.appendChild).not.toBeCalled();
expect(RTManager.updateNode).toBeCalledWith(1, {foo: 'bar'});
ReactNativeRT.render(
<rt-box foo="bar">
<rt-box />
</rt-box>,
11,
);
expect(RTManager.createNode.mock.calls.length).toBe(2);
expect(RTManager.appendChildToContext.mock.calls.length).toBe(1);
expect(RTManager.appendChildToContext.mock.calls.length).toBe(1);
expect(RTManager.updateNode.mock.calls.length).toBe(1);
});
});
|
#!/bin/env node
/*!
*
* Gumer Playstation Network API
* v0.1.2
* ---
* @desc A simple example of usage using Express, it returns the Raw object from Sony' servers
* @author José A. Sächs (admin@jsachs.net / admin@smartpixel.com.ar / jose@animus.com.ar)
*
*/
//Get the environment variables we need.
var ipaddr = process.env.OPENSHIFT_NODEJS_IP || "127.0.0.1";
var port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
var
gumerPSN = require('./psn') // Gumer Playstation module
,express = require('express') // Express
,app = express() // Express application instance
,idregex = /[A-Za-z0-9].{2,15}/ // A simple regex for PSN id's // TODO: Make it more accurate and fancy
;
console.log('Starting gPSN');
gumerPSN.init({ // Our PSN Module, we have to start it once. - irkinsander
debug: true // Let's set it true, it's still in early development. So, report everything that goes wrong please.
,email: "willsoftware@outlook.com" // A valid PSN/SCE account (can be new one) // TODO: Using the user's credentials to do this.
,password: "#PSNTrophies" // Account's password, du'h
,npLanguage: "en" // The language the trophy's name and description will shown as
,region: "us" // The server region that will push data
});
// Taken from Express site, this takes /{{id}}/ parameter
app.param(function(name, fn){
if (fn instanceof RegExp) {
return function(req, res, next, val){
var captures;
if (captures = fn.exec(String(val))) {
req.params[name] = captures;
next();
}
else {
next('route');
}
}
}
});
// Gets the ID owner's profile information and returns the JSON object.
app.get('/PSN/:id', function(req, res){
gumerPSN.getProfile(req.params.id, function(error, profileData) {
if (!error) {
res.send(profileData)
}
else {
if (profileData.error.code == 2105356) { // User not found code
res.send({
error: true, message: "PSN ID not found"
})
}
else {
res.send({
error: true, message: "Something went terribly wrong, submit an issue on GitHub please!", response: profileData
})
}
}
})
})
// Gets the ID owner's trophy (first 100) information and returns the JSON object.
app.get('/PSN/:id/trophies', function(req, res){
gumerPSN.getTrophies(req.params.id, "m", 0, 100, function(error, trophyData) {
if (!error) {
res.send(trophyData)
}
else {
if (trophyData.error.code == 2105356) { // User not found code
res.send({
error: true, message: "PSN ID not found"
})
}
else {
res.send({
error: true, message: "Something went terribly wrong, submit an issue on GitHub please!", response: trophyData
})
}
}
})
})
// Gets the ID owner's trophies for the given game title including all DLC's
app.get('/PSN/:id/trophies/:npCommID', function(req, res){
gumerPSN.getGameTrophies(req.params.id, req.params.npCommID, '', function(error, trophyData) {
if (!error) {
res.send(trophyData)
}
else {
if (trophyData.error.code == 2105356) { // User not found code
res.send({
error: true, message: "PSN ID not found"
})
}
else {
res.send({
error: true, message: "Something went terribly wrong, submit an issue on GitHub please!", response: trophyData
})
}
}
})
})
// Gets the ID owner's trophies for the given game title including all DLC's
app.get('/PSN/:id/trophies/:npCommID/groups', function(req, res){
gumerPSN.getGameTrophyGroups(req.params.id, req.params.npCommID, function(error, trophyData) {
if (!error) {
res.send(trophyData)
}
else {
if (trophyData.error.code == 2105356) { // User not found code
res.send({
error: true, message: "PSN ID not found"
})
}
else {
res.send({
error: true, message: "Something went terribly wrong, submit an issue on GitHub please!", response: trophyData
})
}
}
})
})
// Gets the ID owner's trophies for the given game title for the given group (DLC)
app.get('/PSN/:id/trophies/:npCommID/groups/:groupID', function(req, res){
gumerPSN.getGameTrophies(req.params.id, req.params.npCommID, req.params.groupID, function(error, trophyData) {
if (!error) {
res.send(trophyData)
}
else {
if (trophyData.error.code == 2105356) { // User not found code
res.send({
error: true, message: "PSN ID not found"
})
}
else {
res.send({
error: true, message: "Something went terribly wrong, submit an issue on GitHub please!", response: trophyData
})
}
}
})
})
// Gets the info for the given DLC or game's default trophy
app.get('/PSN/:id/trophies/:npCommID/:trophyID', function(req, res){
gumerPSN.getTrophy(req.params.id, req.params.npCommID, '', req.params.trophyID, function(error, trophyData) {
if (!error) {
res.send(trophyData)
}
else {
if (trophyData.error.code == 2105356) { // User not found code
res.send({
error: true, message: "PSN ID not found"
})
}
else {
res.send({
error: true, message: "Something went terribly wrong, submit an issue on GitHub please!", response: trophyData
})
}
}
})
})
// We listen in the port 3000
app.listen(port, ipaddr);
console.log('gumerPSN Example running at ' + process.env.OPENSHIFT_NODEJS_IP + ':' + process.env.OPENSHIFT_NODEJS_PORT);
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const autoprefixer = require('autoprefixer');
const WriteFilePlugin = require('write-file-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const path = require('path');
module.exports = {
entry: {
jcgj: './src/index.js',
'jcgj-admin': './src/admin/admin.js',
'jcgj-admin': './src//admin/admin.scss',
'jcgj-upload': './src/admin/uploads.js',
'jcgj-login': './src/admin/login.scss',
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
{
test: /\.(scss|css)$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
},
{
loader: 'postcss-loader',
options: {
autoprefixer: {
browsers: ['last 2 versions'],
},
plugins: () => [autoprefixer],
},
},
{
loader: 'sass-loader',
},
],
},
{
test: /\.(ico|gif|png|jpe?g|svg)$/,
loaders: [
{
loader: 'file-loader',
},
],
},
],
},
plugins: [
new CleanWebpackPlugin(),
new WriteFilePlugin(),
new MiniCssExtractPlugin({
filename: '[name].css',
chunkFilename: '[id].css',
}),
],
watchOptions: {
ignored: ['/node_modules/'],
},
};
|
import os from 'os';
import childProcess from 'child_process';
import treeKill from 'tree-kill';
import { getJreBinaryPath } from '../updaters/jre-updater';
import { getJoalJarPath, getJoalConfigPath } from '../updaters/joal-updater';
const uuidv4 = () =>
'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
const r = (Math.random() * 16) | 0; // eslint-disable-line no-bitwise
const v = c === 'x' ? r : (r & 0x3) | 0x8; // eslint-disable-line no-mixed-operators, no-bitwise
return v.toString(16);
});
const createJoalRancomWebUiConfig = () => ({
host: '127.0.0.1',
port: 5081,
pathPrefix: uuidv4(),
secretToken: uuidv4()
});
export default class Joal {
currentConfig;
constructor() {
this.currentConfig = createJoalRancomWebUiConfig();
}
start() {
if (this.joalProcess) {
this.joalProcess.kill('SIGINT');
}
console.log('Running joal with config: ', this.currentConfig);
const shouldRunDetached = !os.platform().startsWith('win');
this.joalProcess = childProcess.spawn(
getJreBinaryPath(),
[
'-jar',
`${getJoalJarPath()}`,
`--joal-conf=${getJoalConfigPath()}`,
'--spring.main.web-environment=true',
`--server.port=${this.currentConfig.port}`,
`--joal.ui.path.prefix=${this.currentConfig.pathPrefix}`,
`--joal.ui.secret-token=${this.currentConfig.secretToken}`,
'--server.address=127.0.0.1'
],
{ encoding: 'utf8', detached: shouldRunDetached }
);
this.joalProcess.stdout.on('data', data => {
console.log(`stdout: ${data}`);
});
this.joalProcess.stderr.on('data', data => {
console.log(`stderr: ${data}`);
});
return this.currentConfig;
}
kill(callback) {
let callbackFn = () => {};
if (callback) {
callbackFn = callback;
}
if (this.joalProcess) {
console.log('Killing joal');
treeKill(this.joalProcess.pid, 'SIGINT', err => {
if (!err) {
return callbackFn();
}
treeKill(this.joalProcess.pid, 'SIGKILL', error => {
if (error) {
console.error('failed to kill joal before quit: ', error);
}
return callbackFn();
});
});
}
return callbackFn();
}
}
|
'use strict';
const { and } = require('../lib/utils');
const assert = require('assert');
describe('The utility module', () => {
it('provides a logical AND method', () => {
assert(and(true));
assert(and(true, true));
assert(and(true, false) === false);
assert(and(true, null) === false);
assert(and(true, undefined) === false);
});
});
|
/**
* Cesium - https://github.com/AnalyticalGraphicsInc/cesium
*
* Copyright 2011-2017 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
(function () {
/*global define*/
define('Core/defined',[],function() {
'use strict';
/**
* @exports defined
*
* @param {Object} value The object.
* @returns {Boolean} Returns true if the object is defined, returns false otherwise.
*
* @example
* if (Cesium.defined(positions)) {
* doSomething();
* } else {
* doSomethingElse();
* }
*/
function defined(value) {
return value !== undefined && value !== null;
}
return defined;
});
/*global define*/
define('Core/DeveloperError',[
'./defined'
], function(
defined) {
'use strict';
/**
* Constructs an exception object that is thrown due to a developer error, e.g., invalid argument,
* argument out of range, etc. This exception should only be thrown during development;
* it usually indicates a bug in the calling code. This exception should never be
* caught; instead the calling code should strive not to generate it.
* <br /><br />
* On the other hand, a {@link RuntimeError} indicates an exception that may
* be thrown at runtime, e.g., out of memory, that the calling code should be prepared
* to catch.
*
* @alias DeveloperError
* @constructor
* @extends Error
*
* @param {String} [message] The error message for this exception.
*
* @see RuntimeError
*/
function DeveloperError(message) {
/**
* 'DeveloperError' indicating that this exception was thrown due to a developer error.
* @type {String}
* @readonly
*/
this.name = 'DeveloperError';
/**
* The explanation for why this exception was thrown.
* @type {String}
* @readonly
*/
this.message = message;
//Browsers such as IE don't have a stack property until you actually throw the error.
var stack;
try {
throw new Error();
} catch (e) {
stack = e.stack;
}
/**
* The stack trace of this exception, if available.
* @type {String}
* @readonly
*/
this.stack = stack;
}
if (defined(Object.create)) {
DeveloperError.prototype = Object.create(Error.prototype);
DeveloperError.prototype.constructor = DeveloperError;
}
DeveloperError.prototype.toString = function() {
var str = this.name + ': ' + this.message;
if (defined(this.stack)) {
str += '\n' + this.stack.toString();
}
return str;
};
/**
* @private
*/
DeveloperError.throwInstantiationError = function() {
throw new DeveloperError('This function defines an interface and should not be called directly.');
};
return DeveloperError;
});
/*global define*/
define('Core/Check',[
'./defined',
'./DeveloperError'
], function(
defined,
DeveloperError) {
'use strict';
/**
* Contains functions for checking that supplied arguments are of a specified type
* or meet specified conditions
* @private
*/
var Check = {};
/**
* Contains type checking functions, all using the typeof operator
*/
Check.typeOf = {};
function getUndefinedErrorMessage(name) {
return name + ' is required, actual value was undefined';
}
function getFailedTypeErrorMessage(actual, expected, name) {
return 'Expected ' + name + ' to be typeof ' + expected + ', actual typeof was ' + actual;
}
/**
* Throws if test is not defined
*
* @param {String} name The name of the variable being tested
* @param {*} test The value that is to be checked
* @exception {DeveloperError} test must be defined
*/
Check.defined = function (name, test) {
if (!defined(test)) {
throw new DeveloperError(getUndefinedErrorMessage(name));
}
};
/**
* Throws if test is not typeof 'function'
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @exception {DeveloperError} test must be typeof 'function'
*/
Check.typeOf.func = function (name, test) {
if (typeof test !== 'function') {
throw new DeveloperError(getFailedTypeErrorMessage(typeof test, 'function', name));
}
};
/**
* Throws if test is not typeof 'string'
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @exception {DeveloperError} test must be typeof 'string'
*/
Check.typeOf.string = function (name, test) {
if (typeof test !== 'string') {
throw new DeveloperError(getFailedTypeErrorMessage(typeof test, 'string', name));
}
};
/**
* Throws if test is not typeof 'number'
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @exception {DeveloperError} test must be typeof 'number'
*/
Check.typeOf.number = function (name, test) {
if (typeof test !== 'number') {
throw new DeveloperError(getFailedTypeErrorMessage(typeof test, 'number', name));
}
};
/**
* Throws if test is not typeof 'number' and less than limit
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @param {Number} limit The limit value to compare against
* @exception {DeveloperError} test must be typeof 'number' and less than limit
*/
Check.typeOf.number.lessThan = function (name, test, limit) {
Check.typeOf.number(name, test);
if (test >= limit) {
throw new DeveloperError('Expected ' + name + ' to be less than ' + limit + ', actual value was ' + test);
}
};
/**
* Throws if test is not typeof 'number' and less than or equal to limit
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @param {Number} limit The limit value to compare against
* @exception {DeveloperError} test must be typeof 'number' and less than or equal to limit
*/
Check.typeOf.number.lessThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
if (test > limit) {
throw new DeveloperError('Expected ' + name + ' to be less than or equal to ' + limit + ', actual value was ' + test);
}
};
/**
* Throws if test is not typeof 'number' and greater than limit
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @param {Number} limit The limit value to compare against
* @exception {DeveloperError} test must be typeof 'number' and greater than limit
*/
Check.typeOf.number.greaterThan = function (name, test, limit) {
Check.typeOf.number(name, test);
if (test <= limit) {
throw new DeveloperError('Expected ' + name + ' to be greater than ' + limit + ', actual value was ' + test);
}
};
/**
* Throws if test is not typeof 'number' and greater than or equal to limit
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @param {Number} limit The limit value to compare against
* @exception {DeveloperError} test must be typeof 'number' and greater than or equal to limit
*/
Check.typeOf.number.greaterThanOrEquals = function (name, test, limit) {
Check.typeOf.number(name, test);
if (test < limit) {
throw new DeveloperError('Expected ' + name + ' to be greater than or equal to' + limit + ', actual value was ' + test);
}
};
/**
* Throws if test is not typeof 'object'
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @exception {DeveloperError} test must be typeof 'object'
*/
Check.typeOf.object = function (name, test) {
if (typeof test !== 'object') {
throw new DeveloperError(getFailedTypeErrorMessage(typeof test, 'object', name));
}
};
/**
* Throws if test is not typeof 'boolean'
*
* @param {String} name The name of the variable being tested
* @param {*} test The value to test
* @exception {DeveloperError} test must be typeof 'boolean'
*/
Check.typeOf.bool = function (name, test) {
if (typeof test !== 'boolean') {
throw new DeveloperError(getFailedTypeErrorMessage(typeof test, 'boolean', name));
}
};
return Check;
});
/*global define*/
define('Core/freezeObject',[
'./defined'
], function(
defined) {
'use strict';
/**
* Freezes an object, using Object.freeze if available, otherwise returns
* the object unchanged. This function should be used in setup code to prevent
* errors from completely halting JavaScript execution in legacy browsers.
*
* @private
*
* @exports freezeObject
*/
var freezeObject = Object.freeze;
if (!defined(freezeObject)) {
freezeObject = function(o) {
return o;
};
}
return freezeObject;
});
/*global define*/
define('Core/defaultValue',[
'./freezeObject'
], function(
freezeObject) {
'use strict';
/**
* Returns the first parameter if not undefined, otherwise the second parameter.
* Useful for setting a default value for a parameter.
*
* @exports defaultValue
*
* @param {*} a
* @param {*} b
* @returns {*} Returns the first parameter if not undefined, otherwise the second parameter.
*
* @example
* param = Cesium.defaultValue(param, 'default');
*/
function defaultValue(a, b) {
if (a !== undefined) {
return a;
}
return b;
}
/**
* A frozen empty object that can be used as the default value for options passed as
* an object literal.
*/
defaultValue.EMPTY_OBJECT = freezeObject({});
return defaultValue;
});
/*
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace
so it's better encapsulated. Now you can have multiple random number generators
and they won't stomp all over eachother's state.
If you want to use this as a substitute for Math.random(), use the random()
method like so:
var m = new MersenneTwister();
var randomNumber = m.random();
You can also call the other genrand_{foo}() methods on the instance.
If you want to use a specific seed in order to get a repeatable random
sequence, pass an integer into the constructor:
var m = new MersenneTwister(123);
and that will always produce the same random sequence.
Sean McCullough (banksean@gmail.com)
*/
/*
A C-program for MT19937, with initialization improved 2002/1/26.
Coded by Takuji Nishimura and Makoto Matsumoto.
Before using, initialize the state by using init_genrand(seed)
or init_by_array(init_key, key_length).
*/
/**
@license
mersenne-twister.js - https://gist.github.com/banksean/300494
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of its contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
Any feedback is very welcome.
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html
email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
*/
define('ThirdParty/mersenne-twister',[],function() {
var MersenneTwister = function(seed) {
if (seed == undefined) {
seed = new Date().getTime();
}
/* Period parameters */
this.N = 624;
this.M = 397;
this.MATRIX_A = 0x9908b0df; /* constant vector a */
this.UPPER_MASK = 0x80000000; /* most significant w-r bits */
this.LOWER_MASK = 0x7fffffff; /* least significant r bits */
this.mt = new Array(this.N); /* the array for the state vector */
this.mti=this.N+1; /* mti==N+1 means mt[N] is not initialized */
this.init_genrand(seed);
}
/* initializes mt[N] with a seed */
MersenneTwister.prototype.init_genrand = function(s) {
this.mt[0] = s >>> 0;
for (this.mti=1; this.mti<this.N; this.mti++) {
var s = this.mt[this.mti-1] ^ (this.mt[this.mti-1] >>> 30);
this.mt[this.mti] = (((((s & 0xffff0000) >>> 16) * 1812433253) << 16) + (s & 0x0000ffff) * 1812433253)
+ this.mti;
/* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */
/* In the previous versions, MSBs of the seed affect */
/* only MSBs of the array mt[]. */
/* 2002/01/09 modified by Makoto Matsumoto */
this.mt[this.mti] >>>= 0;
/* for >32 bit machines */
}
}
/* initialize by an array with array-length */
/* init_key is the array for initializing keys */
/* key_length is its length */
/* slight change for C++, 2004/2/26 */
//MersenneTwister.prototype.init_by_array = function(init_key, key_length) {
// var i, j, k;
// this.init_genrand(19650218);
// i=1; j=0;
// k = (this.N>key_length ? this.N : key_length);
// for (; k; k--) {
// var s = this.mt[i-1] ^ (this.mt[i-1] >>> 30)
// this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1664525) << 16) + ((s & 0x0000ffff) * 1664525)))
// + init_key[j] + j; /* non linear */
// this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */
// i++; j++;
// if (i>=this.N) { this.mt[0] = this.mt[this.N-1]; i=1; }
// if (j>=key_length) j=0;
// }
// for (k=this.N-1; k; k--) {
// var s = this.mt[i-1] ^ (this.mt[i-1] >>> 30);
// this.mt[i] = (this.mt[i] ^ (((((s & 0xffff0000) >>> 16) * 1566083941) << 16) + (s & 0x0000ffff) * 1566083941))
// - i; /* non linear */
// this.mt[i] >>>= 0; /* for WORDSIZE > 32 machines */
// i++;
// if (i>=this.N) { this.mt[0] = this.mt[this.N-1]; i=1; }
// }
//
// this.mt[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */
//}
/* generates a random number on [0,0xffffffff]-interval */
MersenneTwister.prototype.genrand_int32 = function() {
var y;
var mag01 = new Array(0x0, this.MATRIX_A);
/* mag01[x] = x * MATRIX_A for x=0,1 */
if (this.mti >= this.N) { /* generate N words at one time */
var kk;
if (this.mti == this.N+1) /* if init_genrand() has not been called, */
this.init_genrand(5489); /* a default initial seed is used */
for (kk=0;kk<this.N-this.M;kk++) {
y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk+1]&this.LOWER_MASK);
this.mt[kk] = this.mt[kk+this.M] ^ (y >>> 1) ^ mag01[y & 0x1];
}
for (;kk<this.N-1;kk++) {
y = (this.mt[kk]&this.UPPER_MASK)|(this.mt[kk+1]&this.LOWER_MASK);
this.mt[kk] = this.mt[kk+(this.M-this.N)] ^ (y >>> 1) ^ mag01[y & 0x1];
}
y = (this.mt[this.N-1]&this.UPPER_MASK)|(this.mt[0]&this.LOWER_MASK);
this.mt[this.N-1] = this.mt[this.M-1] ^ (y >>> 1) ^ mag01[y & 0x1];
this.mti = 0;
}
y = this.mt[this.mti++];
/* Tempering */
y ^= (y >>> 11);
y ^= (y << 7) & 0x9d2c5680;
y ^= (y << 15) & 0xefc60000;
y ^= (y >>> 18);
return y >>> 0;
}
/* generates a random number on [0,0x7fffffff]-interval */
//MersenneTwister.prototype.genrand_int31 = function() {
// return (this.genrand_int32()>>>1);
//}
/* generates a random number on [0,1]-real-interval */
//MersenneTwister.prototype.genrand_real1 = function() {
// return this.genrand_int32()*(1.0/4294967295.0);
// /* divided by 2^32-1 */
//}
/* generates a random number on [0,1)-real-interval */
MersenneTwister.prototype.random = function() {
return this.genrand_int32()*(1.0/4294967296.0);
/* divided by 2^32 */
}
/* generates a random number on (0,1)-real-interval */
//MersenneTwister.prototype.genrand_real3 = function() {
// return (this.genrand_int32() + 0.5)*(1.0/4294967296.0);
// /* divided by 2^32 */
//}
/* generates a random number on [0,1) with 53-bit resolution*/
//MersenneTwister.prototype.genrand_res53 = function() {
// var a=this.genrand_int32()>>>5, b=this.genrand_int32()>>>6;
// return(a*67108864.0+b)*(1.0/9007199254740992.0);
//}
/* These real versions are due to Isaku Wada, 2002/01/09 added */
return MersenneTwister;
});
/*global define*/
define('Core/Math',[
'../ThirdParty/mersenne-twister',
'./defaultValue',
'./defined',
'./DeveloperError'
], function(
MersenneTwister,
defaultValue,
defined,
DeveloperError) {
'use strict';
/**
* Math functions.
*
* @exports CesiumMath
*/
var CesiumMath = {};
/**
* 0.1
* @type {Number}
* @constant
*/
CesiumMath.EPSILON1 = 0.1;
/**
* 0.01
* @type {Number}
* @constant
*/
CesiumMath.EPSILON2 = 0.01;
/**
* 0.001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON3 = 0.001;
/**
* 0.0001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON4 = 0.0001;
/**
* 0.00001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON5 = 0.00001;
/**
* 0.000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON6 = 0.000001;
/**
* 0.0000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON7 = 0.0000001;
/**
* 0.00000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON8 = 0.00000001;
/**
* 0.000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON9 = 0.000000001;
/**
* 0.0000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON10 = 0.0000000001;
/**
* 0.00000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON11 = 0.00000000001;
/**
* 0.000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON12 = 0.000000000001;
/**
* 0.0000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON13 = 0.0000000000001;
/**
* 0.00000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON14 = 0.00000000000001;
/**
* 0.000000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON15 = 0.000000000000001;
/**
* 0.0000000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON16 = 0.0000000000000001;
/**
* 0.00000000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON17 = 0.00000000000000001;
/**
* 0.000000000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON18 = 0.000000000000000001;
/**
* 0.0000000000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON19 = 0.0000000000000000001;
/**
* 0.00000000000000000001
* @type {Number}
* @constant
*/
CesiumMath.EPSILON20 = 0.00000000000000000001;
/**
* 3.986004418e14
* @type {Number}
* @constant
*/
CesiumMath.GRAVITATIONALPARAMETER = 3.986004418e14;
/**
* Radius of the sun in meters: 6.955e8
* @type {Number}
* @constant
*/
CesiumMath.SOLAR_RADIUS = 6.955e8;
/**
* The mean radius of the moon, according to the "Report of the IAU/IAG Working Group on
* Cartographic Coordinates and Rotational Elements of the Planets and satellites: 2000",
* Celestial Mechanics 82: 83-110, 2002.
* @type {Number}
* @constant
*/
CesiumMath.LUNAR_RADIUS = 1737400.0;
/**
* 64 * 1024
* @type {Number}
* @constant
*/
CesiumMath.SIXTY_FOUR_KILOBYTES = 64 * 1024;
/**
* Returns the sign of the value; 1 if the value is positive, -1 if the value is
* negative, or 0 if the value is 0.
*
* @param {Number} value The value to return the sign of.
* @returns {Number} The sign of value.
*/
CesiumMath.sign = function(value) {
if (value > 0) {
return 1;
}
if (value < 0) {
return -1;
}
return 0;
};
/**
* Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative.
* This is similar to {@link CesiumMath#sign} except that returns 1.0 instead of
* 0.0 when the input value is 0.0.
* @param {Number} value The value to return the sign of.
* @returns {Number} The sign of value.
*/
CesiumMath.signNotZero = function(value) {
return value < 0.0 ? -1.0 : 1.0;
};
/**
* Converts a scalar value in the range [-1.0, 1.0] to a SNORM in the range [0, rangeMax]
* @param {Number} value The scalar value in the range [-1.0, 1.0]
* @param {Number} [rangeMax=255] The maximum value in the mapped range, 255 by default.
* @returns {Number} A SNORM value, where 0 maps to -1.0 and rangeMax maps to 1.0.
*
* @see CesiumMath.fromSNorm
*/
CesiumMath.toSNorm = function(value, rangeMax) {
rangeMax = defaultValue(rangeMax, 255);
return Math.round((CesiumMath.clamp(value, -1.0, 1.0) * 0.5 + 0.5) * rangeMax);
};
/**
* Converts a SNORM value in the range [0, rangeMax] to a scalar in the range [-1.0, 1.0].
* @param {Number} value SNORM value in the range [0, 255]
* @param {Number} [rangeMax=255] The maximum value in the SNORM range, 255 by default.
* @returns {Number} Scalar in the range [-1.0, 1.0].
*
* @see CesiumMath.toSNorm
*/
CesiumMath.fromSNorm = function(value, rangeMax) {
rangeMax = defaultValue(rangeMax, 255);
return CesiumMath.clamp(value, 0.0, rangeMax) / rangeMax * 2.0 - 1.0;
};
/**
* Returns the hyperbolic sine of a number.
* The hyperbolic sine of <em>value</em> is defined to be
* (<em>e<sup>x</sup> - e<sup>-x</sup></em>)/2.0
* where <i>e</i> is Euler's number, approximately 2.71828183.
*
* <p>Special cases:
* <ul>
* <li>If the argument is NaN, then the result is NaN.</li>
*
* <li>If the argument is infinite, then the result is an infinity
* with the same sign as the argument.</li>
*
* <li>If the argument is zero, then the result is a zero with the
* same sign as the argument.</li>
* </ul>
*</p>
*
* @param {Number} value The number whose hyperbolic sine is to be returned.
* @returns {Number} The hyperbolic sine of <code>value</code>.
*/
CesiumMath.sinh = function(value) {
var part1 = Math.pow(Math.E, value);
var part2 = Math.pow(Math.E, -1.0 * value);
return (part1 - part2) * 0.5;
};
/**
* Returns the hyperbolic cosine of a number.
* The hyperbolic cosine of <strong>value</strong> is defined to be
* (<em>e<sup>x</sup> + e<sup>-x</sup></em>)/2.0
* where <i>e</i> is Euler's number, approximately 2.71828183.
*
* <p>Special cases:
* <ul>
* <li>If the argument is NaN, then the result is NaN.</li>
*
* <li>If the argument is infinite, then the result is positive infinity.</li>
*
* <li>If the argument is zero, then the result is 1.0.</li>
* </ul>
*</p>
*
* @param {Number} value The number whose hyperbolic cosine is to be returned.
* @returns {Number} The hyperbolic cosine of <code>value</code>.
*/
CesiumMath.cosh = function(value) {
var part1 = Math.pow(Math.E, value);
var part2 = Math.pow(Math.E, -1.0 * value);
return (part1 + part2) * 0.5;
};
/**
* Computes the linear interpolation of two values.
*
* @param {Number} p The start value to interpolate.
* @param {Number} q The end value to interpolate.
* @param {Number} time The time of interpolation generally in the range <code>[0.0, 1.0]</code>.
* @returns {Number} The linearly interpolated value.
*
* @example
* var n = Cesium.Math.lerp(0.0, 2.0, 0.5); // returns 1.0
*/
CesiumMath.lerp = function(p, q, time) {
return ((1.0 - time) * p) + (time * q);
};
/**
* pi
*
* @type {Number}
* @constant
*/
CesiumMath.PI = Math.PI;
/**
* 1/pi
*
* @type {Number}
* @constant
*/
CesiumMath.ONE_OVER_PI = 1.0 / Math.PI;
/**
* pi/2
*
* @type {Number}
* @constant
*/
CesiumMath.PI_OVER_TWO = Math.PI * 0.5;
/**
* pi/3
*
* @type {Number}
* @constant
*/
CesiumMath.PI_OVER_THREE = Math.PI / 3.0;
/**
* pi/4
*
* @type {Number}
* @constant
*/
CesiumMath.PI_OVER_FOUR = Math.PI / 4.0;
/**
* pi/6
*
* @type {Number}
* @constant
*/
CesiumMath.PI_OVER_SIX = Math.PI / 6.0;
/**
* 3pi/2
*
* @type {Number}
* @constant
*/
CesiumMath.THREE_PI_OVER_TWO = (3.0 * Math.PI) * 0.5;
/**
* 2pi
*
* @type {Number}
* @constant
*/
CesiumMath.TWO_PI = 2.0 * Math.PI;
/**
* 1/2pi
*
* @type {Number}
* @constant
*/
CesiumMath.ONE_OVER_TWO_PI = 1.0 / (2.0 * Math.PI);
/**
* The number of radians in a degree.
*
* @type {Number}
* @constant
* @default Math.PI / 180.0
*/
CesiumMath.RADIANS_PER_DEGREE = Math.PI / 180.0;
/**
* The number of degrees in a radian.
*
* @type {Number}
* @constant
* @default 180.0 / Math.PI
*/
CesiumMath.DEGREES_PER_RADIAN = 180.0 / Math.PI;
/**
* The number of radians in an arc second.
*
* @type {Number}
* @constant
* @default {@link CesiumMath.RADIANS_PER_DEGREE} / 3600.0
*/
CesiumMath.RADIANS_PER_ARCSECOND = CesiumMath.RADIANS_PER_DEGREE / 3600.0;
/**
* Converts degrees to radians.
* @param {Number} degrees The angle to convert in degrees.
* @returns {Number} The corresponding angle in radians.
*/
CesiumMath.toRadians = function(degrees) {
if (!defined(degrees)) {
throw new DeveloperError('degrees is required.');
}
return degrees * CesiumMath.RADIANS_PER_DEGREE;
};
/**
* Converts radians to degrees.
* @param {Number} radians The angle to convert in radians.
* @returns {Number} The corresponding angle in degrees.
*/
CesiumMath.toDegrees = function(radians) {
if (!defined(radians)) {
throw new DeveloperError('radians is required.');
}
return radians * CesiumMath.DEGREES_PER_RADIAN;
};
/**
* Converts a longitude value, in radians, to the range [<code>-Math.PI</code>, <code>Math.PI</code>).
*
* @param {Number} angle The longitude value, in radians, to convert to the range [<code>-Math.PI</code>, <code>Math.PI</code>).
* @returns {Number} The equivalent longitude value in the range [<code>-Math.PI</code>, <code>Math.PI</code>).
*
* @example
* // Convert 270 degrees to -90 degrees longitude
* var longitude = Cesium.Math.convertLongitudeRange(Cesium.Math.toRadians(270.0));
*/
CesiumMath.convertLongitudeRange = function(angle) {
if (!defined(angle)) {
throw new DeveloperError('angle is required.');
}
var twoPi = CesiumMath.TWO_PI;
var simplified = angle - Math.floor(angle / twoPi) * twoPi;
if (simplified < -Math.PI) {
return simplified + twoPi;
}
if (simplified >= Math.PI) {
return simplified - twoPi;
}
return simplified;
};
/**
* Convenience function that clamps a latitude value, in radians, to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>).
* Useful for sanitizing data before use in objects requiring correct range.
*
* @param {Number} angle The latitude value, in radians, to clamp to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>).
* @returns {Number} The latitude value clamped to the range [<code>-Math.PI/2</code>, <code>Math.PI/2</code>).
*
* @example
* // Clamp 108 degrees latitude to 90 degrees latitude
* var latitude = Cesium.Math.clampToLatitudeRange(Cesium.Math.toRadians(108.0));
*/
CesiumMath.clampToLatitudeRange = function(angle) {
if (!defined(angle)) {
throw new DeveloperError('angle is required.');
}
return CesiumMath.clamp(angle, -1*CesiumMath.PI_OVER_TWO, CesiumMath.PI_OVER_TWO);
};
/**
* Produces an angle in the range -Pi <= angle <= Pi which is equivalent to the provided angle.
*
* @param {Number} angle in radians
* @returns {Number} The angle in the range [<code>-CesiumMath.PI</code>, <code>CesiumMath.PI</code>].
*/
CesiumMath.negativePiToPi = function(angle) {
if (!defined(angle)) {
throw new DeveloperError('angle is required.');
}
return CesiumMath.zeroToTwoPi(angle + CesiumMath.PI) - CesiumMath.PI;
};
/**
* Produces an angle in the range 0 <= angle <= 2Pi which is equivalent to the provided angle.
*
* @param {Number} angle in radians
* @returns {Number} The angle in the range [0, <code>CesiumMath.TWO_PI</code>].
*/
CesiumMath.zeroToTwoPi = function(angle) {
if (!defined(angle)) {
throw new DeveloperError('angle is required.');
}
var mod = CesiumMath.mod(angle, CesiumMath.TWO_PI);
if (Math.abs(mod) < CesiumMath.EPSILON14 && Math.abs(angle) > CesiumMath.EPSILON14) {
return CesiumMath.TWO_PI;
}
return mod;
};
/**
* The modulo operation that also works for negative dividends.
*
* @param {Number} m The dividend.
* @param {Number} n The divisor.
* @returns {Number} The remainder.
*/
CesiumMath.mod = function(m, n) {
if (!defined(m)) {
throw new DeveloperError('m is required.');
}
if (!defined(n)) {
throw new DeveloperError('n is required.');
}
return ((m % n) + n) % n;
};
/**
* Determines if two values are equal using an absolute or relative tolerance test. This is useful
* to avoid problems due to roundoff error when comparing floating-point values directly. The values are
* first compared using an absolute tolerance test. If that fails, a relative tolerance test is performed.
* Use this test if you are unsure of the magnitudes of left and right.
*
* @param {Number} left The first value to compare.
* @param {Number} right The other value to compare.
* @param {Number} relativeEpsilon The maximum inclusive delta between <code>left</code> and <code>right</code> for the relative tolerance test.
* @param {Number} [absoluteEpsilon=relativeEpsilon] The maximum inclusive delta between <code>left</code> and <code>right</code> for the absolute tolerance test.
* @returns {Boolean} <code>true</code> if the values are equal within the epsilon; otherwise, <code>false</code>.
*
* @example
* var a = Cesium.Math.equalsEpsilon(0.0, 0.01, Cesium.Math.EPSILON2); // true
* var b = Cesium.Math.equalsEpsilon(0.0, 0.1, Cesium.Math.EPSILON2); // false
* var c = Cesium.Math.equalsEpsilon(3699175.1634344, 3699175.2, Cesium.Math.EPSILON7); // true
* var d = Cesium.Math.equalsEpsilon(3699175.1634344, 3699175.2, Cesium.Math.EPSILON9); // false
*/
CesiumMath.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
if (!defined(left)) {
throw new DeveloperError('left is required.');
}
if (!defined(right)) {
throw new DeveloperError('right is required.');
}
if (!defined(relativeEpsilon)) {
throw new DeveloperError('relativeEpsilon is required.');
}
absoluteEpsilon = defaultValue(absoluteEpsilon, relativeEpsilon);
var absDiff = Math.abs(left - right);
return absDiff <= absoluteEpsilon || absDiff <= relativeEpsilon * Math.max(Math.abs(left), Math.abs(right));
};
var factorials = [1];
/**
* Computes the factorial of the provided number.
*
* @param {Number} n The number whose factorial is to be computed.
* @returns {Number} The factorial of the provided number or undefined if the number is less than 0.
*
* @exception {DeveloperError} A number greater than or equal to 0 is required.
*
*
* @example
* //Compute 7!, which is equal to 5040
* var computedFactorial = Cesium.Math.factorial(7);
*
* @see {@link http://en.wikipedia.org/wiki/Factorial|Factorial on Wikipedia}
*/
CesiumMath.factorial = function(n) {
if (typeof n !== 'number' || n < 0) {
throw new DeveloperError('A number greater than or equal to 0 is required.');
}
var length = factorials.length;
if (n >= length) {
var sum = factorials[length - 1];
for (var i = length; i <= n; i++) {
factorials.push(sum * i);
}
}
return factorials[n];
};
/**
* Increments a number with a wrapping to a minimum value if the number exceeds the maximum value.
*
* @param {Number} [n] The number to be incremented.
* @param {Number} [maximumValue] The maximum incremented value before rolling over to the minimum value.
* @param {Number} [minimumValue=0.0] The number reset to after the maximum value has been exceeded.
* @returns {Number} The incremented number.
*
* @exception {DeveloperError} Maximum value must be greater than minimum value.
*
* @example
* var n = Cesium.Math.incrementWrap(5, 10, 0); // returns 6
* var n = Cesium.Math.incrementWrap(10, 10, 0); // returns 0
*/
CesiumMath.incrementWrap = function(n, maximumValue, minimumValue) {
minimumValue = defaultValue(minimumValue, 0.0);
if (!defined(n)) {
throw new DeveloperError('n is required.');
}
if (maximumValue <= minimumValue) {
throw new DeveloperError('maximumValue must be greater than minimumValue.');
}
++n;
if (n > maximumValue) {
n = minimumValue;
}
return n;
};
/**
* Determines if a positive integer is a power of two.
*
* @param {Number} n The positive integer to test.
* @returns {Boolean} <code>true</code> if the number if a power of two; otherwise, <code>false</code>.
*
* @exception {DeveloperError} A number greater than or equal to 0 is required.
*
* @example
* var t = Cesium.Math.isPowerOfTwo(16); // true
* var f = Cesium.Math.isPowerOfTwo(20); // false
*/
CesiumMath.isPowerOfTwo = function(n) {
if (typeof n !== 'number' || n < 0) {
throw new DeveloperError('A number greater than or equal to 0 is required.');
}
return (n !== 0) && ((n & (n - 1)) === 0);
};
/**
* Computes the next power-of-two integer greater than or equal to the provided positive integer.
*
* @param {Number} n The positive integer to test.
* @returns {Number} The next power-of-two integer.
*
* @exception {DeveloperError} A number greater than or equal to 0 is required.
*
* @example
* var n = Cesium.Math.nextPowerOfTwo(29); // 32
* var m = Cesium.Math.nextPowerOfTwo(32); // 32
*/
CesiumMath.nextPowerOfTwo = function(n) {
if (typeof n !== 'number' || n < 0) {
throw new DeveloperError('A number greater than or equal to 0 is required.');
}
// From http://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2
--n;
n |= n >> 1;
n |= n >> 2;
n |= n >> 4;
n |= n >> 8;
n |= n >> 16;
++n;
return n;
};
/**
* Constraint a value to lie between two values.
*
* @param {Number} value The value to constrain.
* @param {Number} min The minimum value.
* @param {Number} max The maximum value.
* @returns {Number} The value clamped so that min <= value <= max.
*/
CesiumMath.clamp = function(value, min, max) {
if (!defined(value)) {
throw new DeveloperError('value is required');
}
if (!defined(min)) {
throw new DeveloperError('min is required.');
}
if (!defined(max)) {
throw new DeveloperError('max is required.');
}
return value < min ? min : value > max ? max : value;
};
var randomNumberGenerator = new MersenneTwister();
/**
* Sets the seed used by the random number generator
* in {@link CesiumMath#nextRandomNumber}.
*
* @param {Number} seed An integer used as the seed.
*/
CesiumMath.setRandomNumberSeed = function(seed) {
if (!defined(seed)) {
throw new DeveloperError('seed is required.');
}
randomNumberGenerator = new MersenneTwister(seed);
};
/**
* Generates a random number in the range of [0.0, 1.0)
* using a Mersenne twister.
*
* @returns {Number} A random number in the range of [0.0, 1.0).
*
* @see CesiumMath.setRandomNumberSeed
* @see {@link http://en.wikipedia.org/wiki/Mersenne_twister|Mersenne twister on Wikipedia}
*/
CesiumMath.nextRandomNumber = function() {
return randomNumberGenerator.random();
};
/**
* Computes <code>Math.acos(value)</acode>, but first clamps <code>value</code> to the range [-1.0, 1.0]
* so that the function will never return NaN.
*
* @param {Number} value The value for which to compute acos.
* @returns {Number} The acos of the value if the value is in the range [-1.0, 1.0], or the acos of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
*/
CesiumMath.acosClamped = function(value) {
if (!defined(value)) {
throw new DeveloperError('value is required.');
}
return Math.acos(CesiumMath.clamp(value, -1.0, 1.0));
};
/**
* Computes <code>Math.asin(value)</acode>, but first clamps <code>value</code> to the range [-1.0, 1.0]
* so that the function will never return NaN.
*
* @param {Number} value The value for which to compute asin.
* @returns {Number} The asin of the value if the value is in the range [-1.0, 1.0], or the asin of -1.0 or 1.0,
* whichever is closer, if the value is outside the range.
*/
CesiumMath.asinClamped = function(value) {
if (!defined(value)) {
throw new DeveloperError('value is required.');
}
return Math.asin(CesiumMath.clamp(value, -1.0, 1.0));
};
/**
* Finds the chord length between two points given the circle's radius and the angle between the points.
*
* @param {Number} angle The angle between the two points.
* @param {Number} radius The radius of the circle.
* @returns {Number} The chord length.
*/
CesiumMath.chordLength = function(angle, radius) {
if (!defined(angle)) {
throw new DeveloperError('angle is required.');
}
if (!defined(radius)) {
throw new DeveloperError('radius is required.');
}
return 2.0 * radius * Math.sin(angle * 0.5);
};
/**
* Finds the logarithm of a number to a base.
*
* @param {Number} number The number.
* @param {Number} base The base.
* @returns {Number} The result.
*/
CesiumMath.logBase = function(number, base) {
if (!defined(number)) {
throw new DeveloperError('number is required.');
}
if (!defined(base)) {
throw new DeveloperError('base is required.');
}
return Math.log(number) / Math.log(base);
};
/**
* @private
*/
CesiumMath.fog = function(distanceToCamera, density) {
var scalar = distanceToCamera * density;
return 1.0 - Math.exp(-(scalar * scalar));
};
return CesiumMath;
});
/*global define*/
define('Core/Cartesian3',[
'./Check',
'./defaultValue',
'./defined',
'./DeveloperError',
'./freezeObject',
'./Math'
], function(
Check,
defaultValue,
defined,
DeveloperError,
freezeObject,
CesiumMath) {
'use strict';
/**
* A 3D Cartesian point.
* @alias Cartesian3
* @constructor
*
* @param {Number} [x=0.0] The X component.
* @param {Number} [y=0.0] The Y component.
* @param {Number} [z=0.0] The Z component.
*
* @see Cartesian2
* @see Cartesian4
* @see Packable
*/
function Cartesian3(x, y, z) {
/**
* The X component.
* @type {Number}
* @default 0.0
*/
this.x = defaultValue(x, 0.0);
/**
* The Y component.
* @type {Number}
* @default 0.0
*/
this.y = defaultValue(y, 0.0);
/**
* The Z component.
* @type {Number}
* @default 0.0
*/
this.z = defaultValue(z, 0.0);
}
/**
* Converts the provided Spherical into Cartesian3 coordinates.
*
* @param {Spherical} spherical The Spherical to be converted to Cartesian3.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
Cartesian3.fromSpherical = function(spherical, result) {
Check.typeOf.object('spherical', spherical);
if (!defined(result)) {
result = new Cartesian3();
}
var clock = spherical.clock;
var cone = spherical.cone;
var magnitude = defaultValue(spherical.magnitude, 1.0);
var radial = magnitude * Math.sin(cone);
result.x = radial * Math.cos(clock);
result.y = radial * Math.sin(clock);
result.z = magnitude * Math.cos(cone);
return result;
};
/**
* Creates a Cartesian3 instance from x, y and z coordinates.
*
* @param {Number} x The x coordinate.
* @param {Number} y The y coordinate.
* @param {Number} z The z coordinate.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
Cartesian3.fromElements = function(x, y, z, result) {
if (!defined(result)) {
return new Cartesian3(x, y, z);
}
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Duplicates a Cartesian3 instance.
*
* @param {Cartesian3} cartesian The Cartesian to duplicate.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided. (Returns undefined if cartesian is undefined)
*/
Cartesian3.clone = function(cartesian, result) {
if (!defined(cartesian)) {
return undefined;
}
if (!defined(result)) {
return new Cartesian3(cartesian.x, cartesian.y, cartesian.z);
}
result.x = cartesian.x;
result.y = cartesian.y;
result.z = cartesian.z;
return result;
};
/**
* Creates a Cartesian3 instance from an existing Cartesian4. This simply takes the
* x, y, and z properties of the Cartesian4 and drops w.
* @function
*
* @param {Cartesian4} cartesian The Cartesian4 instance to create a Cartesian3 instance from.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
Cartesian3.fromCartesian4 = Cartesian3.clone;
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
Cartesian3.packedLength = 3;
/**
* Stores the provided instance into the provided array.
*
* @param {Cartesian3} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
Cartesian3.pack = function(value, array, startingIndex) {
Check.typeOf.object('value', value);
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
array[startingIndex++] = value.x;
array[startingIndex++] = value.y;
array[startingIndex] = value.z;
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian3} [result] The object into which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
Cartesian3.unpack = function(array, startingIndex, result) {
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new Cartesian3();
}
result.x = array[startingIndex++];
result.y = array[startingIndex++];
result.z = array[startingIndex];
return result;
};
/**
* Flattens an array of Cartesian3s into an array of components.
*
* @param {Cartesian3[]} array The array of cartesians to pack.
* @param {Number[]} result The array onto which to store the result.
* @returns {Number[]} The packed array.
*/
Cartesian3.packArray = function(array, result) {
Check.defined('array', array);
var length = array.length;
if (!defined(result)) {
result = new Array(length * 3);
} else {
result.length = length * 3;
}
for (var i = 0; i < length; ++i) {
Cartesian3.pack(array[i], result, i * 3);
}
return result;
};
/**
* Unpacks an array of cartesian components into an array of Cartesian3s.
*
* @param {Number[]} array The array of components to unpack.
* @param {Cartesian3[]} result The array onto which to store the result.
* @returns {Cartesian3[]} The unpacked array.
*/
Cartesian3.unpackArray = function(array, result) {
Check.defined('array', array);
Check.typeOf.number.greaterThanOrEquals('array.length', array.length, 3);
if (array.length % 3 !== 0) {
throw new DeveloperError('array length must be a multiple of 3.');
}
var length = array.length;
if (!defined(result)) {
result = new Array(length / 3);
} else {
result.length = length / 3;
}
for (var i = 0; i < length; i += 3) {
var index = i / 3;
result[index] = Cartesian3.unpack(array, i, result[index]);
}
return result;
};
/**
* Creates a Cartesian3 from three consecutive elements in an array.
* @function
*
* @param {Number[]} array The array whose three consecutive elements correspond to the x, y, and z components, respectively.
* @param {Number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*
* @example
* // Create a Cartesian3 with (1.0, 2.0, 3.0)
* var v = [1.0, 2.0, 3.0];
* var p = Cesium.Cartesian3.fromArray(v);
*
* // Create a Cartesian3 with (1.0, 2.0, 3.0) using an offset into an array
* var v2 = [0.0, 0.0, 1.0, 2.0, 3.0];
* var p2 = Cesium.Cartesian3.fromArray(v2, 2);
*/
Cartesian3.fromArray = Cartesian3.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
*
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {Number} The value of the maximum component.
*/
Cartesian3.maximumComponent = function(cartesian) {
Check.typeOf.object('cartesian', cartesian);
return Math.max(cartesian.x, cartesian.y, cartesian.z);
};
/**
* Computes the value of the minimum component for the supplied Cartesian.
*
* @param {Cartesian3} cartesian The cartesian to use.
* @returns {Number} The value of the minimum component.
*/
Cartesian3.minimumComponent = function(cartesian) {
Check.typeOf.object('cartesian', cartesian);
return Math.min(cartesian.x, cartesian.y, cartesian.z);
};
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
*
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
* @returns {Cartesian3} A cartesian with the minimum components.
*/
Cartesian3.minimumByComponent = function(first, second, result) {
Check.typeOf.object('first', first);
Check.typeOf.object('second', second);
Check.typeOf.object('result', result);
result.x = Math.min(first.x, second.x);
result.y = Math.min(first.y, second.y);
result.z = Math.min(first.z, second.z);
return result;
};
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
*
* @param {Cartesian3} first A cartesian to compare.
* @param {Cartesian3} second A cartesian to compare.
* @param {Cartesian3} result The object into which to store the result.
* @returns {Cartesian3} A cartesian with the maximum components.
*/
Cartesian3.maximumByComponent = function(first, second, result) {
Check.typeOf.object('first', first);
Check.typeOf.object('second', second);
Check.typeOf.object('result', result);
result.x = Math.max(first.x, second.x);
result.y = Math.max(first.y, second.y);
result.z = Math.max(first.z, second.z);
return result;
};
/**
* Computes the provided Cartesian's squared magnitude.
*
* @param {Cartesian3} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {Number} The squared magnitude.
*/
Cartesian3.magnitudeSquared = function(cartesian) {
Check.typeOf.object('cartesian', cartesian);
return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z;
};
/**
* Computes the Cartesian's magnitude (length).
*
* @param {Cartesian3} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {Number} The magnitude.
*/
Cartesian3.magnitude = function(cartesian) {
return Math.sqrt(Cartesian3.magnitudeSquared(cartesian));
};
var distanceScratch = new Cartesian3();
/**
* Computes the distance between two points.
*
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {Number} The distance between two points.
*
* @example
* // Returns 1.0
* var d = Cesium.Cartesian3.distance(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(2.0, 0.0, 0.0));
*/
Cartesian3.distance = function(left, right) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Cartesian3.subtract(left, right, distanceScratch);
return Cartesian3.magnitude(distanceScratch);
};
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian3#distance}.
*
* @param {Cartesian3} left The first point to compute the distance from.
* @param {Cartesian3} right The second point to compute the distance to.
* @returns {Number} The distance between two points.
*
* @example
* // Returns 4.0, not 2.0
* var d = Cesium.Cartesian3.distanceSquared(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(3.0, 0.0, 0.0));
*/
Cartesian3.distanceSquared = function(left, right) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Cartesian3.subtract(left, right, distanceScratch);
return Cartesian3.magnitudeSquared(distanceScratch);
};
/**
* Computes the normalized form of the supplied Cartesian.
*
* @param {Cartesian3} cartesian The Cartesian to be normalized.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.normalize = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var magnitude = Cartesian3.magnitude(cartesian);
result.x = cartesian.x / magnitude;
result.y = cartesian.y / magnitude;
result.z = cartesian.z / magnitude;
if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z)) {
throw new DeveloperError('normalized result is not a number');
}
return result;
};
/**
* Computes the dot (scalar) product of two Cartesians.
*
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {Number} The dot product.
*/
Cartesian3.dot = function(left, right) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
return left.x * right.x + left.y * right.y + left.z * right.z;
};
/**
* Computes the componentwise product of two Cartesians.
*
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.multiplyComponents = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result.x = left.x * right.x;
result.y = left.y * right.y;
result.z = left.z * right.z;
return result;
};
/**
* Computes the componentwise quotient of two Cartesians.
*
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.divideComponents = function(left, right, result) {
if (!defined(left)) {
throw new DeveloperError('left is required');
}
if (!defined(right)) {
throw new DeveloperError('right is required');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.x = left.x / right.x;
result.y = left.y / right.y;
result.z = left.z / right.z;
return result;
};
/**
* Computes the componentwise sum of two Cartesians.
*
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.add = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result.x = left.x + right.x;
result.y = left.y + right.y;
result.z = left.z + right.z;
return result;
};
/**
* Computes the componentwise difference of two Cartesians.
*
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.subtract = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result.x = left.x - right.x;
result.y = left.y - right.y;
result.z = left.z - right.z;
return result;
};
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
*
* @param {Cartesian3} cartesian The Cartesian to be scaled.
* @param {Number} scalar The scalar to multiply with.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.multiplyByScalar = function(cartesian, scalar, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.number('scalar', scalar);
Check.typeOf.object('result', result);
result.x = cartesian.x * scalar;
result.y = cartesian.y * scalar;
result.z = cartesian.z * scalar;
return result;
};
/**
* Divides the provided Cartesian componentwise by the provided scalar.
*
* @param {Cartesian3} cartesian The Cartesian to be divided.
* @param {Number} scalar The scalar to divide by.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.divideByScalar = function(cartesian, scalar, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.number('scalar', scalar);
Check.typeOf.object('result', result);
result.x = cartesian.x / scalar;
result.y = cartesian.y / scalar;
result.z = cartesian.z / scalar;
return result;
};
/**
* Negates the provided Cartesian.
*
* @param {Cartesian3} cartesian The Cartesian to be negated.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.negate = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result.x = -cartesian.x;
result.y = -cartesian.y;
result.z = -cartesian.z;
return result;
};
/**
* Computes the absolute value of the provided Cartesian.
*
* @param {Cartesian3} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.abs = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result.x = Math.abs(cartesian.x);
result.y = Math.abs(cartesian.y);
result.z = Math.abs(cartesian.z);
return result;
};
var lerpScratch = new Cartesian3();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
*
* @param {Cartesian3} start The value corresponding to t at 0.0.
* @param {Cartesian3} end The value corresponding to t at 1.0.
* @param {Number} t The point along t at which to interpolate.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Cartesian3.lerp = function(start, end, t, result) {
Check.typeOf.object('start', start);
Check.typeOf.object('end', end);
Check.typeOf.number('t', t);
Check.typeOf.object('result', result);
Cartesian3.multiplyByScalar(end, t, lerpScratch);
result = Cartesian3.multiplyByScalar(start, 1.0 - t, result);
return Cartesian3.add(lerpScratch, result, result);
};
var angleBetweenScratch = new Cartesian3();
var angleBetweenScratch2 = new Cartesian3();
/**
* Returns the angle, in radians, between the provided Cartesians.
*
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @returns {Number} The angle between the Cartesians.
*/
Cartesian3.angleBetween = function(left, right) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Cartesian3.normalize(left, angleBetweenScratch);
Cartesian3.normalize(right, angleBetweenScratch2);
var cosine = Cartesian3.dot(angleBetweenScratch, angleBetweenScratch2);
var sine = Cartesian3.magnitude(Cartesian3.cross(angleBetweenScratch, angleBetweenScratch2, angleBetweenScratch));
return Math.atan2(sine, cosine);
};
var mostOrthogonalAxisScratch = new Cartesian3();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
*
* @param {Cartesian3} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The most orthogonal axis.
*/
Cartesian3.mostOrthogonalAxis = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var f = Cartesian3.normalize(cartesian, mostOrthogonalAxisScratch);
Cartesian3.abs(f, f);
if (f.x <= f.y) {
if (f.x <= f.z) {
result = Cartesian3.clone(Cartesian3.UNIT_X, result);
} else {
result = Cartesian3.clone(Cartesian3.UNIT_Z, result);
}
} else {
if (f.y <= f.z) {
result = Cartesian3.clone(Cartesian3.UNIT_Y, result);
} else {
result = Cartesian3.clone(Cartesian3.UNIT_Z, result);
}
}
return result;
};
/**
* Compares the provided Cartesians componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
Cartesian3.equals = function(left, right) {
return (left === right) ||
((defined(left)) &&
(defined(right)) &&
(left.x === right.x) &&
(left.y === right.y) &&
(left.z === right.z));
};
/**
* @private
*/
Cartesian3.equalsArray = function(cartesian, array, offset) {
return cartesian.x === array[offset] &&
cartesian.y === array[offset + 1] &&
cartesian.z === array[offset + 2];
};
/**
* Compares the provided Cartesians componentwise and returns
* <code>true</code> if they pass an absolute or relative tolerance test,
* <code>false</code> otherwise.
*
* @param {Cartesian3} [left] The first Cartesian.
* @param {Cartesian3} [right] The second Cartesian.
* @param {Number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {Number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {Boolean} <code>true</code> if left and right are within the provided epsilon, <code>false</code> otherwise.
*/
Cartesian3.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
return (left === right) ||
(defined(left) &&
defined(right) &&
CesiumMath.equalsEpsilon(left.x, right.x, relativeEpsilon, absoluteEpsilon) &&
CesiumMath.equalsEpsilon(left.y, right.y, relativeEpsilon, absoluteEpsilon) &&
CesiumMath.equalsEpsilon(left.z, right.z, relativeEpsilon, absoluteEpsilon));
};
/**
* Computes the cross (outer) product of two Cartesians.
*
* @param {Cartesian3} left The first Cartesian.
* @param {Cartesian3} right The second Cartesian.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The cross product.
*/
Cartesian3.cross = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
var leftX = left.x;
var leftY = left.y;
var leftZ = left.z;
var rightX = right.x;
var rightY = right.y;
var rightZ = right.z;
var x = leftY * rightZ - leftZ * rightY;
var y = leftZ * rightX - leftX * rightZ;
var z = leftX * rightY - leftY * rightX;
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Returns a Cartesian3 position from longitude and latitude values given in degrees.
*
* @param {Number} longitude The longitude, in degrees
* @param {Number} latitude The latitude, in degrees
* @param {Number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
*
* @example
* var position = Cesium.Cartesian3.fromDegrees(-115.0, 37.0);
*/
Cartesian3.fromDegrees = function(longitude, latitude, height, ellipsoid, result) {
Check.typeOf.number('longitude', longitude);
Check.typeOf.number('latitude', latitude);
longitude = CesiumMath.toRadians(longitude);
latitude = CesiumMath.toRadians(latitude);
return Cartesian3.fromRadians(longitude, latitude, height, ellipsoid, result);
};
var scratchN = new Cartesian3();
var scratchK = new Cartesian3();
var wgs84RadiiSquared = new Cartesian3(6378137.0 * 6378137.0, 6378137.0 * 6378137.0, 6356752.3142451793 * 6356752.3142451793);
/**
* Returns a Cartesian3 position from longitude and latitude values given in radians.
*
* @param {Number} longitude The longitude, in radians
* @param {Number} latitude The latitude, in radians
* @param {Number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The position
*
* @example
* var position = Cesium.Cartesian3.fromRadians(-2.007, 0.645);
*/
Cartesian3.fromRadians = function(longitude, latitude, height, ellipsoid, result) {
Check.typeOf.number('longitude', longitude);
Check.typeOf.number('latitude', latitude);
height = defaultValue(height, 0.0);
var radiiSquared = defined(ellipsoid) ? ellipsoid.radiiSquared : wgs84RadiiSquared;
var cosLatitude = Math.cos(latitude);
scratchN.x = cosLatitude * Math.cos(longitude);
scratchN.y = cosLatitude * Math.sin(longitude);
scratchN.z = Math.sin(latitude);
scratchN = Cartesian3.normalize(scratchN, scratchN);
Cartesian3.multiplyComponents(radiiSquared, scratchN, scratchK);
var gamma = Math.sqrt(Cartesian3.dot(scratchN, scratchK));
scratchK = Cartesian3.divideByScalar(scratchK, gamma, scratchK);
scratchN = Cartesian3.multiplyByScalar(scratchN, height, scratchN);
if (!defined(result)) {
result = new Cartesian3();
}
return Cartesian3.add(scratchK, scratchN, result);
};
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in degrees.
*
* @param {Number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
*
* @example
* var positions = Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0, -107.0, 33.0]);
*/
Cartesian3.fromDegreesArray = function(coordinates, ellipsoid, result) {
Check.defined('coordinates', coordinates);
if (coordinates.length < 2 || coordinates.length % 2 !== 0) {
throw new DeveloperError('the number of coordinates must be a multiple of 2 and at least 2');
}
var length = coordinates.length;
if (!defined(result)) {
result = new Array(length / 2);
} else {
result.length = length / 2;
}
for (var i = 0; i < length; i += 2) {
var longitude = coordinates[i];
var latitude = coordinates[i + 1];
var index = i / 2;
result[index] = Cartesian3.fromDegrees(longitude, latitude, 0, ellipsoid, result[index]);
}
return result;
};
/**
* Returns an array of Cartesian3 positions given an array of longitude and latitude values given in radians.
*
* @param {Number[]} coordinates A list of longitude and latitude values. Values alternate [longitude, latitude, longitude, latitude...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the coordinates lie.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
*
* @example
* var positions = Cesium.Cartesian3.fromRadiansArray([-2.007, 0.645, -1.867, .575]);
*/
Cartesian3.fromRadiansArray = function(coordinates, ellipsoid, result) {
Check.defined('coordinates', coordinates);
if (coordinates.length < 2 || coordinates.length % 2 !== 0) {
throw new DeveloperError('the number of coordinates must be a multiple of 2 and at least 2');
}
var length = coordinates.length;
if (!defined(result)) {
result = new Array(length / 2);
} else {
result.length = length / 2;
}
for (var i = 0; i < length; i += 2) {
var longitude = coordinates[i];
var latitude = coordinates[i + 1];
var index = i / 2;
result[index] = Cartesian3.fromRadians(longitude, latitude, 0, ellipsoid, result[index]);
}
return result;
};
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in degrees.
*
* @param {Number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
*
* @example
* var positions = Cesium.Cartesian3.fromDegreesArrayHeights([-115.0, 37.0, 100000.0, -107.0, 33.0, 150000.0]);
*/
Cartesian3.fromDegreesArrayHeights = function(coordinates, ellipsoid, result) {
Check.defined('coordinates', coordinates);
if (coordinates.length < 3 || coordinates.length % 3 !== 0) {
throw new DeveloperError('the number of coordinates must be a multiple of 3 and at least 3');
}
var length = coordinates.length;
if (!defined(result)) {
result = new Array(length / 3);
} else {
result.length = length / 3;
}
for (var i = 0; i < length; i += 3) {
var longitude = coordinates[i];
var latitude = coordinates[i + 1];
var height = coordinates[i + 2];
var index = i / 3;
result[index] = Cartesian3.fromDegrees(longitude, latitude, height, ellipsoid, result[index]);
}
return result;
};
/**
* Returns an array of Cartesian3 positions given an array of longitude, latitude and height values where longitude and latitude are given in radians.
*
* @param {Number[]} coordinates A list of longitude, latitude and height values. Values alternate [longitude, latitude, height, longitude, latitude, height...].
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartesian3[]} [result] An array of Cartesian3 objects to store the result.
* @returns {Cartesian3[]} The array of positions.
*
* @example
* var positions = Cesium.Cartesian3.fromRadiansArrayHeights([-2.007, 0.645, 100000.0, -1.867, .575, 150000.0]);
*/
Cartesian3.fromRadiansArrayHeights = function(coordinates, ellipsoid, result) {
Check.defined('coordinates', coordinates);
if (coordinates.length < 3 || coordinates.length % 3 !== 0) {
throw new DeveloperError('the number of coordinates must be a multiple of 3 and at least 3');
}
var length = coordinates.length;
if (!defined(result)) {
result = new Array(length / 3);
} else {
result.length = length / 3;
}
for (var i = 0; i < length; i += 3) {
var longitude = coordinates[i];
var latitude = coordinates[i + 1];
var height = coordinates[i + 2];
var index = i / 3;
result[index] = Cartesian3.fromRadians(longitude, latitude, height, ellipsoid, result[index]);
}
return result;
};
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 0.0).
*
* @type {Cartesian3}
* @constant
*/
Cartesian3.ZERO = freezeObject(new Cartesian3(0.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (1.0, 0.0, 0.0).
*
* @type {Cartesian3}
* @constant
*/
Cartesian3.UNIT_X = freezeObject(new Cartesian3(1.0, 0.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 1.0, 0.0).
*
* @type {Cartesian3}
* @constant
*/
Cartesian3.UNIT_Y = freezeObject(new Cartesian3(0.0, 1.0, 0.0));
/**
* An immutable Cartesian3 instance initialized to (0.0, 0.0, 1.0).
*
* @type {Cartesian3}
* @constant
*/
Cartesian3.UNIT_Z = freezeObject(new Cartesian3(0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian3 instance.
*
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if one was not provided.
*/
Cartesian3.prototype.clone = function(result) {
return Cartesian3.clone(this, result);
};
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Cartesian3} [right] The right hand side Cartesian.
* @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.
*/
Cartesian3.prototype.equals = function(right) {
return Cartesian3.equals(this, right);
};
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* <code>true</code> if they pass an absolute or relative tolerance test,
* <code>false</code> otherwise.
*
* @param {Cartesian3} [right] The right hand side Cartesian.
* @param {Number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {Number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {Boolean} <code>true</code> if they are within the provided epsilon, <code>false</code> otherwise.
*/
Cartesian3.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
return Cartesian3.equalsEpsilon(this, right, relativeEpsilon, absoluteEpsilon);
};
/**
* Creates a string representing this Cartesian in the format '(x, y, z)'.
*
* @returns {String} A string representing this Cartesian in the format '(x, y, z)'.
*/
Cartesian3.prototype.toString = function() {
return '(' + this.x + ', ' + this.y + ', ' + this.z + ')';
};
return Cartesian3;
});
/*global define*/
define('Core/scaleToGeodeticSurface',[
'./Cartesian3',
'./defined',
'./DeveloperError',
'./Math'
], function(
Cartesian3,
defined,
DeveloperError,
CesiumMath) {
'use strict';
var scaleToGeodeticSurfaceIntersection = new Cartesian3();
var scaleToGeodeticSurfaceGradient = new Cartesian3();
/**
* Scales the provided Cartesian position along the geodetic surface normal
* so that it is on the surface of this ellipsoid. If the position is
* at the center of the ellipsoid, this function returns undefined.
*
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} oneOverRadii One over radii of the ellipsoid.
* @param {Cartesian3} oneOverRadiiSquared One over radii squared of the ellipsoid.
* @param {Number} centerToleranceSquared Tolerance for closeness to the center.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.
*
* @exports scaleToGeodeticSurface
*
* @private
*/
function scaleToGeodeticSurface(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, result) {
if (!defined(cartesian)) {
throw new DeveloperError('cartesian is required.');
}
if (!defined(oneOverRadii)) {
throw new DeveloperError('oneOverRadii is required.');
}
if (!defined(oneOverRadiiSquared)) {
throw new DeveloperError('oneOverRadiiSquared is required.');
}
if (!defined(centerToleranceSquared)) {
throw new DeveloperError('centerToleranceSquared is required.');
}
var positionX = cartesian.x;
var positionY = cartesian.y;
var positionZ = cartesian.z;
var oneOverRadiiX = oneOverRadii.x;
var oneOverRadiiY = oneOverRadii.y;
var oneOverRadiiZ = oneOverRadii.z;
var x2 = positionX * positionX * oneOverRadiiX * oneOverRadiiX;
var y2 = positionY * positionY * oneOverRadiiY * oneOverRadiiY;
var z2 = positionZ * positionZ * oneOverRadiiZ * oneOverRadiiZ;
// Compute the squared ellipsoid norm.
var squaredNorm = x2 + y2 + z2;
var ratio = Math.sqrt(1.0 / squaredNorm);
// As an initial approximation, assume that the radial intersection is the projection point.
var intersection = Cartesian3.multiplyByScalar(cartesian, ratio, scaleToGeodeticSurfaceIntersection);
// If the position is near the center, the iteration will not converge.
if (squaredNorm < centerToleranceSquared) {
return !isFinite(ratio) ? undefined : Cartesian3.clone(intersection, result);
}
var oneOverRadiiSquaredX = oneOverRadiiSquared.x;
var oneOverRadiiSquaredY = oneOverRadiiSquared.y;
var oneOverRadiiSquaredZ = oneOverRadiiSquared.z;
// Use the gradient at the intersection point in place of the true unit normal.
// The difference in magnitude will be absorbed in the multiplier.
var gradient = scaleToGeodeticSurfaceGradient;
gradient.x = intersection.x * oneOverRadiiSquaredX * 2.0;
gradient.y = intersection.y * oneOverRadiiSquaredY * 2.0;
gradient.z = intersection.z * oneOverRadiiSquaredZ * 2.0;
// Compute the initial guess at the normal vector multiplier, lambda.
var lambda = (1.0 - ratio) * Cartesian3.magnitude(cartesian) / (0.5 * Cartesian3.magnitude(gradient));
var correction = 0.0;
var func;
var denominator;
var xMultiplier;
var yMultiplier;
var zMultiplier;
var xMultiplier2;
var yMultiplier2;
var zMultiplier2;
var xMultiplier3;
var yMultiplier3;
var zMultiplier3;
do {
lambda -= correction;
xMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredX);
yMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredY);
zMultiplier = 1.0 / (1.0 + lambda * oneOverRadiiSquaredZ);
xMultiplier2 = xMultiplier * xMultiplier;
yMultiplier2 = yMultiplier * yMultiplier;
zMultiplier2 = zMultiplier * zMultiplier;
xMultiplier3 = xMultiplier2 * xMultiplier;
yMultiplier3 = yMultiplier2 * yMultiplier;
zMultiplier3 = zMultiplier2 * zMultiplier;
func = x2 * xMultiplier2 + y2 * yMultiplier2 + z2 * zMultiplier2 - 1.0;
// "denominator" here refers to the use of this expression in the velocity and acceleration
// computations in the sections to follow.
denominator = x2 * xMultiplier3 * oneOverRadiiSquaredX + y2 * yMultiplier3 * oneOverRadiiSquaredY + z2 * zMultiplier3 * oneOverRadiiSquaredZ;
var derivative = -2.0 * denominator;
correction = func / derivative;
} while (Math.abs(func) > CesiumMath.EPSILON12);
if (!defined(result)) {
return new Cartesian3(positionX * xMultiplier, positionY * yMultiplier, positionZ * zMultiplier);
}
result.x = positionX * xMultiplier;
result.y = positionY * yMultiplier;
result.z = positionZ * zMultiplier;
return result;
}
return scaleToGeodeticSurface;
});
/*global define*/
define('Core/Cartographic',[
'./Cartesian3',
'./defaultValue',
'./defined',
'./DeveloperError',
'./freezeObject',
'./Math',
'./scaleToGeodeticSurface'
], function(
Cartesian3,
defaultValue,
defined,
DeveloperError,
freezeObject,
CesiumMath,
scaleToGeodeticSurface) {
'use strict';
/**
* A position defined by longitude, latitude, and height.
* @alias Cartographic
* @constructor
*
* @param {Number} [longitude=0.0] The longitude, in radians.
* @param {Number} [latitude=0.0] The latitude, in radians.
* @param {Number} [height=0.0] The height, in meters, above the ellipsoid.
*
* @see Ellipsoid
*/
function Cartographic(longitude, latitude, height) {
/**
* The longitude, in radians.
* @type {Number}
* @default 0.0
*/
this.longitude = defaultValue(longitude, 0.0);
/**
* The latitude, in radians.
* @type {Number}
* @default 0.0
*/
this.latitude = defaultValue(latitude, 0.0);
/**
* The height, in meters, above the ellipsoid.
* @type {Number}
* @default 0.0
*/
this.height = defaultValue(height, 0.0);
}
/**
* Creates a new Cartographic instance from longitude and latitude
* specified in radians.
*
* @param {Number} longitude The longitude, in radians.
* @param {Number} latitude The latitude, in radians.
* @param {Number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
Cartographic.fromRadians = function(longitude, latitude, height, result) {
if (!defined(longitude)) {
throw new DeveloperError('longitude is required.');
}
if (!defined(latitude)) {
throw new DeveloperError('latitude is required.');
}
height = defaultValue(height, 0.0);
if (!defined(result)) {
return new Cartographic(longitude, latitude, height);
}
result.longitude = longitude;
result.latitude = latitude;
result.height = height;
return result;
};
/**
* Creates a new Cartographic instance from longitude and latitude
* specified in degrees. The values in the resulting object will
* be in radians.
*
* @param {Number} longitude The longitude, in degrees.
* @param {Number} latitude The latitude, in degrees.
* @param {Number} [height=0.0] The height, in meters, above the ellipsoid.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
Cartographic.fromDegrees = function(longitude, latitude, height, result) {
if (!defined(longitude)) {
throw new DeveloperError('longitude is required.');
}
if (!defined(latitude)) {
throw new DeveloperError('latitude is required.');
}
longitude = CesiumMath.toRadians(longitude);
latitude = CesiumMath.toRadians(latitude);
return Cartographic.fromRadians(longitude, latitude, height, result);
};
var cartesianToCartographicN = new Cartesian3();
var cartesianToCartographicP = new Cartesian3();
var cartesianToCartographicH = new Cartesian3();
var wgs84OneOverRadii = new Cartesian3(1.0 / 6378137.0, 1.0 / 6378137.0, 1.0 / 6356752.3142451793);
var wgs84OneOverRadiiSquared = new Cartesian3(1.0 / (6378137.0 * 6378137.0), 1.0 / (6378137.0 * 6378137.0), 1.0 / (6356752.3142451793 * 6356752.3142451793));
var wgs84CenterToleranceSquared = CesiumMath.EPSILON1;
/**
* Creates a new Cartographic instance from a Cartesian position. The values in the
* resulting object will be in radians.
*
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the position lies.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
*/
Cartographic.fromCartesian = function(cartesian, ellipsoid, result) {
var oneOverRadii = defined(ellipsoid) ? ellipsoid.oneOverRadii : wgs84OneOverRadii;
var oneOverRadiiSquared = defined(ellipsoid) ? ellipsoid.oneOverRadiiSquared : wgs84OneOverRadiiSquared;
var centerToleranceSquared = defined(ellipsoid) ? ellipsoid._centerToleranceSquared : wgs84CenterToleranceSquared;
//`cartesian is required.` is thrown from scaleToGeodeticSurface
var p = scaleToGeodeticSurface(cartesian, oneOverRadii, oneOverRadiiSquared, centerToleranceSquared, cartesianToCartographicP);
if (!defined(p)) {
return undefined;
}
var n = Cartesian3.multiplyComponents(p, oneOverRadiiSquared, cartesianToCartographicN);
n = Cartesian3.normalize(n, n);
var h = Cartesian3.subtract(cartesian, p, cartesianToCartographicH);
var longitude = Math.atan2(n.y, n.x);
var latitude = Math.asin(n.z);
var height = CesiumMath.sign(Cartesian3.dot(h, cartesian)) * Cartesian3.magnitude(h);
if (!defined(result)) {
return new Cartographic(longitude, latitude, height);
}
result.longitude = longitude;
result.latitude = latitude;
result.height = height;
return result;
};
/**
* Duplicates a Cartographic instance.
*
* @param {Cartographic} cartographic The cartographic to duplicate.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)
*/
Cartographic.clone = function(cartographic, result) {
if (!defined(cartographic)) {
return undefined;
}
if (!defined(result)) {
return new Cartographic(cartographic.longitude, cartographic.latitude, cartographic.height);
}
result.longitude = cartographic.longitude;
result.latitude = cartographic.latitude;
result.height = cartographic.height;
return result;
};
/**
* Compares the provided cartographics componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
Cartographic.equals = function(left, right) {
return (left === right) ||
((defined(left)) &&
(defined(right)) &&
(left.longitude === right.longitude) &&
(left.latitude === right.latitude) &&
(left.height === right.height));
};
/**
* Compares the provided cartographics componentwise and returns
* <code>true</code> if they are within the provided epsilon,
* <code>false</code> otherwise.
*
* @param {Cartographic} [left] The first cartographic.
* @param {Cartographic} [right] The second cartographic.
* @param {Number} epsilon The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if left and right are within the provided epsilon, <code>false</code> otherwise.
*/
Cartographic.equalsEpsilon = function(left, right, epsilon) {
if (typeof epsilon !== 'number') {
throw new DeveloperError('epsilon is required and must be a number.');
}
return (left === right) ||
((defined(left)) &&
(defined(right)) &&
(Math.abs(left.longitude - right.longitude) <= epsilon) &&
(Math.abs(left.latitude - right.latitude) <= epsilon) &&
(Math.abs(left.height - right.height) <= epsilon));
};
/**
* An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).
*
* @type {Cartographic}
* @constant
*/
Cartographic.ZERO = freezeObject(new Cartographic(0.0, 0.0, 0.0));
/**
* Duplicates this instance.
*
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if one was not provided.
*/
Cartographic.prototype.clone = function(result) {
return Cartographic.clone(this, result);
};
/**
* Compares the provided against this cartographic componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Cartographic} [right] The second cartographic.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
Cartographic.prototype.equals = function(right) {
return Cartographic.equals(this, right);
};
/**
* Compares the provided against this cartographic componentwise and returns
* <code>true</code> if they are within the provided epsilon,
* <code>false</code> otherwise.
*
* @param {Cartographic} [right] The second cartographic.
* @param {Number} epsilon The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if left and right are within the provided epsilon, <code>false</code> otherwise.
*/
Cartographic.prototype.equalsEpsilon = function(right, epsilon) {
return Cartographic.equalsEpsilon(this, right, epsilon);
};
/**
* Creates a string representing this cartographic in the format '(longitude, latitude, height)'.
*
* @returns {String} A string representing the provided cartographic in the format '(longitude, latitude, height)'.
*/
Cartographic.prototype.toString = function() {
return '(' + this.longitude + ', ' + this.latitude + ', ' + this.height + ')';
};
return Cartographic;
});
/*global define*/
define('Core/defineProperties',[
'./defined'
], function(
defined) {
'use strict';
var definePropertyWorks = (function() {
try {
return 'x' in Object.defineProperty({}, 'x', {});
} catch (e) {
return false;
}
})();
/**
* Defines properties on an object, using Object.defineProperties if available,
* otherwise returns the object unchanged. This function should be used in
* setup code to prevent errors from completely halting JavaScript execution
* in legacy browsers.
*
* @private
*
* @exports defineProperties
*/
var defineProperties = Object.defineProperties;
if (!definePropertyWorks || !defined(defineProperties)) {
defineProperties = function(o) {
return o;
};
}
return defineProperties;
});
/*global define*/
define('Core/Ellipsoid',[
'./Cartesian3',
'./Cartographic',
'./defaultValue',
'./defined',
'./defineProperties',
'./DeveloperError',
'./freezeObject',
'./Math',
'./scaleToGeodeticSurface'
], function(
Cartesian3,
Cartographic,
defaultValue,
defined,
defineProperties,
DeveloperError,
freezeObject,
CesiumMath,
scaleToGeodeticSurface) {
'use strict';
function initialize(ellipsoid, x, y, z) {
x = defaultValue(x, 0.0);
y = defaultValue(y, 0.0);
z = defaultValue(z, 0.0);
if (x < 0.0 || y < 0.0 || z < 0.0) {
throw new DeveloperError('All radii components must be greater than or equal to zero.');
}
ellipsoid._radii = new Cartesian3(x, y, z);
ellipsoid._radiiSquared = new Cartesian3(x * x,
y * y,
z * z);
ellipsoid._radiiToTheFourth = new Cartesian3(x * x * x * x,
y * y * y * y,
z * z * z * z);
ellipsoid._oneOverRadii = new Cartesian3(x === 0.0 ? 0.0 : 1.0 / x,
y === 0.0 ? 0.0 : 1.0 / y,
z === 0.0 ? 0.0 : 1.0 / z);
ellipsoid._oneOverRadiiSquared = new Cartesian3(x === 0.0 ? 0.0 : 1.0 / (x * x),
y === 0.0 ? 0.0 : 1.0 / (y * y),
z === 0.0 ? 0.0 : 1.0 / (z * z));
ellipsoid._minimumRadius = Math.min(x, y, z);
ellipsoid._maximumRadius = Math.max(x, y, z);
ellipsoid._centerToleranceSquared = CesiumMath.EPSILON1;
if (ellipsoid._radiiSquared.z !== 0) {
ellipsoid._sqauredXOverSquaredZ = ellipsoid._radiiSquared.x / ellipsoid._radiiSquared.z;
}
}
/**
* A quadratic surface defined in Cartesian coordinates by the equation
* <code>(x / a)^2 + (y / b)^2 + (z / c)^2 = 1</code>. Primarily used
* by Cesium to represent the shape of planetary bodies.
*
* Rather than constructing this object directly, one of the provided
* constants is normally used.
* @alias Ellipsoid
* @constructor
*
* @param {Number} [x=0] The radius in the x direction.
* @param {Number} [y=0] The radius in the y direction.
* @param {Number} [z=0] The radius in the z direction.
*
* @exception {DeveloperError} All radii components must be greater than or equal to zero.
*
* @see Ellipsoid.fromCartesian3
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
*/
function Ellipsoid(x, y, z) {
this._radii = undefined;
this._radiiSquared = undefined;
this._radiiToTheFourth = undefined;
this._oneOverRadii = undefined;
this._oneOverRadiiSquared = undefined;
this._minimumRadius = undefined;
this._maximumRadius = undefined;
this._centerToleranceSquared = undefined;
this._sqauredXOverSquaredZ = undefined;
initialize(this, x, y, z);
}
defineProperties(Ellipsoid.prototype, {
/**
* Gets the radii of the ellipsoid.
* @memberof Ellipsoid.prototype
* @type {Cartesian3}
* @readonly
*/
radii : {
get: function() {
return this._radii;
}
},
/**
* Gets the squared radii of the ellipsoid.
* @memberof Ellipsoid.prototype
* @type {Cartesian3}
* @readonly
*/
radiiSquared : {
get : function() {
return this._radiiSquared;
}
},
/**
* Gets the radii of the ellipsoid raise to the fourth power.
* @memberof Ellipsoid.prototype
* @type {Cartesian3}
* @readonly
*/
radiiToTheFourth : {
get : function() {
return this._radiiToTheFourth;
}
},
/**
* Gets one over the radii of the ellipsoid.
* @memberof Ellipsoid.prototype
* @type {Cartesian3}
* @readonly
*/
oneOverRadii : {
get : function() {
return this._oneOverRadii;
}
},
/**
* Gets one over the squared radii of the ellipsoid.
* @memberof Ellipsoid.prototype
* @type {Cartesian3}
* @readonly
*/
oneOverRadiiSquared : {
get : function() {
return this._oneOverRadiiSquared;
}
},
/**
* Gets the minimum radius of the ellipsoid.
* @memberof Ellipsoid.prototype
* @type {Number}
* @readonly
*/
minimumRadius : {
get : function() {
return this._minimumRadius;
}
},
/**
* Gets the maximum radius of the ellipsoid.
* @memberof Ellipsoid.prototype
* @type {Number}
* @readonly
*/
maximumRadius : {
get : function() {
return this._maximumRadius;
}
}
});
/**
* Duplicates an Ellipsoid instance.
*
* @param {Ellipsoid} ellipsoid The ellipsoid to duplicate.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} The cloned Ellipsoid. (Returns undefined if ellipsoid is undefined)
*/
Ellipsoid.clone = function(ellipsoid, result) {
if (!defined(ellipsoid)) {
return undefined;
}
var radii = ellipsoid._radii;
if (!defined(result)) {
return new Ellipsoid(radii.x, radii.y, radii.z);
}
Cartesian3.clone(radii, result._radii);
Cartesian3.clone(ellipsoid._radiiSquared, result._radiiSquared);
Cartesian3.clone(ellipsoid._radiiToTheFourth, result._radiiToTheFourth);
Cartesian3.clone(ellipsoid._oneOverRadii, result._oneOverRadii);
Cartesian3.clone(ellipsoid._oneOverRadiiSquared, result._oneOverRadiiSquared);
result._minimumRadius = ellipsoid._minimumRadius;
result._maximumRadius = ellipsoid._maximumRadius;
result._centerToleranceSquared = ellipsoid._centerToleranceSquared;
return result;
};
/**
* Computes an Ellipsoid from a Cartesian specifying the radii in x, y, and z directions.
*
* @param {Cartesian3} [cartesian=Cartesian3.ZERO] The ellipsoid's radius in the x, y, and z directions.
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} A new Ellipsoid instance.
*
* @exception {DeveloperError} All radii components must be greater than or equal to zero.
*
* @see Ellipsoid.WGS84
* @see Ellipsoid.UNIT_SPHERE
*/
Ellipsoid.fromCartesian3 = function(cartesian, result) {
if (!defined(result)) {
result = new Ellipsoid();
}
if (!defined(cartesian)) {
return result;
}
initialize(result, cartesian.x, cartesian.y, cartesian.z);
return result;
};
/**
* An Ellipsoid instance initialized to the WGS84 standard.
*
* @type {Ellipsoid}
* @constant
*/
Ellipsoid.WGS84 = freezeObject(new Ellipsoid(6378137.0, 6378137.0, 6356752.3142451793));
/**
* An Ellipsoid instance initialized to radii of (1.0, 1.0, 1.0).
*
* @type {Ellipsoid}
* @constant
*/
Ellipsoid.UNIT_SPHERE = freezeObject(new Ellipsoid(1.0, 1.0, 1.0));
/**
* An Ellipsoid instance initialized to a sphere with the lunar radius.
*
* @type {Ellipsoid}
* @constant
*/
Ellipsoid.MOON = freezeObject(new Ellipsoid(CesiumMath.LUNAR_RADIUS, CesiumMath.LUNAR_RADIUS, CesiumMath.LUNAR_RADIUS));
/**
* Duplicates an Ellipsoid instance.
*
* @param {Ellipsoid} [result] The object onto which to store the result, or undefined if a new
* instance should be created.
* @returns {Ellipsoid} The cloned Ellipsoid.
*/
Ellipsoid.prototype.clone = function(result) {
return Ellipsoid.clone(this, result);
};
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
Ellipsoid.packedLength = Cartesian3.packedLength;
/**
* Stores the provided instance into the provided array.
*
* @param {Ellipsoid} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
Ellipsoid.pack = function(value, array, startingIndex) {
if (!defined(value)) {
throw new DeveloperError('value is required');
}
if (!defined(array)) {
throw new DeveloperError('array is required');
}
startingIndex = defaultValue(startingIndex, 0);
Cartesian3.pack(value._radii, array, startingIndex);
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Ellipsoid} [result] The object into which to store the result.
* @returns {Ellipsoid} The modified result parameter or a new Ellipsoid instance if one was not provided.
*/
Ellipsoid.unpack = function(array, startingIndex, result) {
if (!defined(array)) {
throw new DeveloperError('array is required');
}
startingIndex = defaultValue(startingIndex, 0);
var radii = Cartesian3.unpack(array, startingIndex);
return Ellipsoid.fromCartesian3(radii, result);
};
/**
* Computes the unit vector directed from the center of this ellipsoid toward the provided Cartesian position.
* @function
*
* @param {Cartesian3} cartesian The Cartesian for which to to determine the geocentric normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
*/
Ellipsoid.prototype.geocentricSurfaceNormal = Cartesian3.normalize;
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
*
* @param {Cartographic} cartographic The cartographic position for which to to determine the geodetic normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
*/
Ellipsoid.prototype.geodeticSurfaceNormalCartographic = function(cartographic, result) {
if (!defined(cartographic)) {
throw new DeveloperError('cartographic is required.');
}
var longitude = cartographic.longitude;
var latitude = cartographic.latitude;
var cosLatitude = Math.cos(latitude);
var x = cosLatitude * Math.cos(longitude);
var y = cosLatitude * Math.sin(longitude);
var z = Math.sin(latitude);
if (!defined(result)) {
result = new Cartesian3();
}
result.x = x;
result.y = y;
result.z = z;
return Cartesian3.normalize(result, result);
};
/**
* Computes the normal of the plane tangent to the surface of the ellipsoid at the provided position.
*
* @param {Cartesian3} cartesian The Cartesian position for which to to determine the surface normal.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
*/
Ellipsoid.prototype.geodeticSurfaceNormal = function(cartesian, result) {
if (!defined(result)) {
result = new Cartesian3();
}
result = Cartesian3.multiplyComponents(cartesian, this._oneOverRadiiSquared, result);
return Cartesian3.normalize(result, result);
};
var cartographicToCartesianNormal = new Cartesian3();
var cartographicToCartesianK = new Cartesian3();
/**
* Converts the provided cartographic to Cartesian representation.
*
* @param {Cartographic} cartographic The cartographic position.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
*
* @example
* //Create a Cartographic and determine it's Cartesian representation on a WGS84 ellipsoid.
* var position = new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 5000);
* var cartesianPosition = Cesium.Ellipsoid.WGS84.cartographicToCartesian(position);
*/
Ellipsoid.prototype.cartographicToCartesian = function(cartographic, result) {
//`cartographic is required` is thrown from geodeticSurfaceNormalCartographic.
var n = cartographicToCartesianNormal;
var k = cartographicToCartesianK;
this.geodeticSurfaceNormalCartographic(cartographic, n);
Cartesian3.multiplyComponents(this._radiiSquared, n, k);
var gamma = Math.sqrt(Cartesian3.dot(n, k));
Cartesian3.divideByScalar(k, gamma, k);
Cartesian3.multiplyByScalar(n, cartographic.height, n);
if (!defined(result)) {
result = new Cartesian3();
}
return Cartesian3.add(k, n, result);
};
/**
* Converts the provided array of cartographics to an array of Cartesians.
*
* @param {Cartographic[]} cartographics An array of cartographic positions.
* @param {Cartesian3[]} [result] The object onto which to store the result.
* @returns {Cartesian3[]} The modified result parameter or a new Array instance if none was provided.
*
* @example
* //Convert an array of Cartographics and determine their Cartesian representation on a WGS84 ellipsoid.
* var positions = [new Cesium.Cartographic(Cesium.Math.toRadians(21), Cesium.Math.toRadians(78), 0),
* new Cesium.Cartographic(Cesium.Math.toRadians(21.321), Cesium.Math.toRadians(78.123), 100),
* new Cesium.Cartographic(Cesium.Math.toRadians(21.645), Cesium.Math.toRadians(78.456), 250)];
* var cartesianPositions = Cesium.Ellipsoid.WGS84.cartographicArrayToCartesianArray(positions);
*/
Ellipsoid.prototype.cartographicArrayToCartesianArray = function(cartographics, result) {
if (!defined(cartographics)) {
throw new DeveloperError('cartographics is required.');
}
var length = cartographics.length;
if (!defined(result)) {
result = new Array(length);
} else {
result.length = length;
}
for ( var i = 0; i < length; i++) {
result[i] = this.cartographicToCartesian(cartographics[i], result[i]);
}
return result;
};
var cartesianToCartographicN = new Cartesian3();
var cartesianToCartographicP = new Cartesian3();
var cartesianToCartographicH = new Cartesian3();
/**
* Converts the provided cartesian to cartographic representation.
* The cartesian is undefined at the center of the ellipsoid.
*
* @param {Cartesian3} cartesian The Cartesian position to convert to cartographic representation.
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
*
* @example
* //Create a Cartesian and determine it's Cartographic representation on a WGS84 ellipsoid.
* var position = new Cesium.Cartesian3(17832.12, 83234.52, 952313.73);
* var cartographicPosition = Cesium.Ellipsoid.WGS84.cartesianToCartographic(position);
*/
Ellipsoid.prototype.cartesianToCartographic = function(cartesian, result) {
//`cartesian is required.` is thrown from scaleToGeodeticSurface
var p = this.scaleToGeodeticSurface(cartesian, cartesianToCartographicP);
if (!defined(p)) {
return undefined;
}
var n = this.geodeticSurfaceNormal(p, cartesianToCartographicN);
var h = Cartesian3.subtract(cartesian, p, cartesianToCartographicH);
var longitude = Math.atan2(n.y, n.x);
var latitude = Math.asin(n.z);
var height = CesiumMath.sign(Cartesian3.dot(h, cartesian)) * Cartesian3.magnitude(h);
if (!defined(result)) {
return new Cartographic(longitude, latitude, height);
}
result.longitude = longitude;
result.latitude = latitude;
result.height = height;
return result;
};
/**
* Converts the provided array of cartesians to an array of cartographics.
*
* @param {Cartesian3[]} cartesians An array of Cartesian positions.
* @param {Cartographic[]} [result] The object onto which to store the result.
* @returns {Cartographic[]} The modified result parameter or a new Array instance if none was provided.
*
* @example
* //Create an array of Cartesians and determine their Cartographic representation on a WGS84 ellipsoid.
* var positions = [new Cesium.Cartesian3(17832.12, 83234.52, 952313.73),
* new Cesium.Cartesian3(17832.13, 83234.53, 952313.73),
* new Cesium.Cartesian3(17832.14, 83234.54, 952313.73)]
* var cartographicPositions = Cesium.Ellipsoid.WGS84.cartesianArrayToCartographicArray(positions);
*/
Ellipsoid.prototype.cartesianArrayToCartographicArray = function(cartesians, result) {
if (!defined(cartesians)) {
throw new DeveloperError('cartesians is required.');
}
var length = cartesians.length;
if (!defined(result)) {
result = new Array(length);
} else {
result.length = length;
}
for ( var i = 0; i < length; ++i) {
result[i] = this.cartesianToCartographic(cartesians[i], result[i]);
}
return result;
};
/**
* Scales the provided Cartesian position along the geodetic surface normal
* so that it is on the surface of this ellipsoid. If the position is
* at the center of the ellipsoid, this function returns undefined.
*
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter, a new Cartesian3 instance if none was provided, or undefined if the position is at the center.
*/
Ellipsoid.prototype.scaleToGeodeticSurface = function(cartesian, result) {
return scaleToGeodeticSurface(cartesian, this._oneOverRadii, this._oneOverRadiiSquared, this._centerToleranceSquared, result);
};
/**
* Scales the provided Cartesian position along the geocentric surface normal
* so that it is on the surface of this ellipsoid.
*
* @param {Cartesian3} cartesian The Cartesian position to scale.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter or a new Cartesian3 instance if none was provided.
*/
Ellipsoid.prototype.scaleToGeocentricSurface = function(cartesian, result) {
if (!defined(cartesian)) {
throw new DeveloperError('cartesian is required.');
}
if (!defined(result)) {
result = new Cartesian3();
}
var positionX = cartesian.x;
var positionY = cartesian.y;
var positionZ = cartesian.z;
var oneOverRadiiSquared = this._oneOverRadiiSquared;
var beta = 1.0 / Math.sqrt((positionX * positionX) * oneOverRadiiSquared.x +
(positionY * positionY) * oneOverRadiiSquared.y +
(positionZ * positionZ) * oneOverRadiiSquared.z);
return Cartesian3.multiplyByScalar(cartesian, beta, result);
};
/**
* Transforms a Cartesian X, Y, Z position to the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#oneOverRadii}.
*
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
* @returns {Cartesian3} The position expressed in the scaled space. The returned instance is the
* one passed as the result parameter if it is not undefined, or a new instance of it is.
*/
Ellipsoid.prototype.transformPositionToScaledSpace = function(position, result) {
if (!defined(result)) {
result = new Cartesian3();
}
return Cartesian3.multiplyComponents(position, this._oneOverRadii, result);
};
/**
* Transforms a Cartesian X, Y, Z position from the ellipsoid-scaled space by multiplying
* its components by the result of {@link Ellipsoid#radii}.
*
* @param {Cartesian3} position The position to transform.
* @param {Cartesian3} [result] The position to which to copy the result, or undefined to create and
* return a new instance.
* @returns {Cartesian3} The position expressed in the unscaled space. The returned instance is the
* one passed as the result parameter if it is not undefined, or a new instance of it is.
*/
Ellipsoid.prototype.transformPositionFromScaledSpace = function(position, result) {
if (!defined(result)) {
result = new Cartesian3();
}
return Cartesian3.multiplyComponents(position, this._radii, result);
};
/**
* Compares this Ellipsoid against the provided Ellipsoid componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Ellipsoid} [right] The other Ellipsoid.
* @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.
*/
Ellipsoid.prototype.equals = function(right) {
return (this === right) ||
(defined(right) &&
Cartesian3.equals(this._radii, right._radii));
};
/**
* Creates a string representing this Ellipsoid in the format '(radii.x, radii.y, radii.z)'.
*
* @returns {String} A string representing this ellipsoid in the format '(radii.x, radii.y, radii.z)'.
*/
Ellipsoid.prototype.toString = function() {
return this._radii.toString();
};
/**
* Computes a point which is the intersection of the surface normal with the z-axis.
*
* @param {Cartesian3} position the position. must be on the surface of the ellipsoid.
* @param {Number} [buffer = 0.0] A buffer to subtract from the ellipsoid size when checking if the point is inside the ellipsoid.
* In earth case, with common earth datums, there is no need for this buffer since the intersection point is always (relatively) very close to the center.
* In WGS84 datum, intersection point is at max z = +-42841.31151331382 (0.673% of z-axis).
* Intersection point could be outside the ellipsoid if the ratio of MajorAxis / AxisOfRotation is bigger than the square root of 2
* @param {Cartesian} [result] The cartesian to which to copy the result, or undefined to create and
* return a new instance.
* @returns {Cartesian | undefined} the intersection point if it's inside the ellipsoid, undefined otherwise
*
* @exception {DeveloperError} position is required.
* @exception {DeveloperError} Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y).
* @exception {DeveloperError} Ellipsoid.radii.z must be greater than 0.
*/
Ellipsoid.prototype.getSurfaceNormalIntersectionWithZAxis = function(position, buffer, result) {
if (!defined(position)) {
throw new DeveloperError('position is required.');
}
if (!CesiumMath.equalsEpsilon(this._radii.x, this._radii.y, CesiumMath.EPSILON15)) {
throw new DeveloperError('Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)');
}
if (this._radii.z === 0) {
throw new DeveloperError('Ellipsoid.radii.z must be greater than 0');
}
buffer = defaultValue(buffer, 0.0);
var sqauredXOverSquaredZ = this._sqauredXOverSquaredZ;
if (!defined(result)) {
result = new Cartesian3();
}
result.x = 0.0;
result.y = 0.0;
result.z = position.z * (1 - sqauredXOverSquaredZ);
if (Math.abs(result.z) >= this._radii.z - buffer) {
return undefined;
}
return result;
};
return Ellipsoid;
});
/*global define*/
define('Core/GeographicProjection',[
'./Cartesian3',
'./Cartographic',
'./defaultValue',
'./defined',
'./defineProperties',
'./DeveloperError',
'./Ellipsoid'
], function(
Cartesian3,
Cartographic,
defaultValue,
defined,
defineProperties,
DeveloperError,
Ellipsoid) {
'use strict';
/**
* A simple map projection where longitude and latitude are linearly mapped to X and Y by multiplying
* them by the {@link Ellipsoid#maximumRadius}. This projection
* is commonly known as geographic, equirectangular, equidistant cylindrical, or plate carrée. It
* is also known as EPSG:4326.
*
* @alias GeographicProjection
* @constructor
*
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid.
*
* @see WebMercatorProjection
*/
function GeographicProjection(ellipsoid) {
this._ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
this._semimajorAxis = this._ellipsoid.maximumRadius;
this._oneOverSemimajorAxis = 1.0 / this._semimajorAxis;
}
defineProperties(GeographicProjection.prototype, {
/**
* Gets the {@link Ellipsoid}.
*
* @memberof GeographicProjection.prototype
*
* @type {Ellipsoid}
* @readonly
*/
ellipsoid : {
get : function() {
return this._ellipsoid;
}
}
});
/**
* Projects a set of {@link Cartographic} coordinates, in radians, to map coordinates, in meters.
* X and Y are the longitude and latitude, respectively, multiplied by the maximum radius of the
* ellipsoid. Z is the unmodified height.
*
* @param {Cartographic} cartographic The coordinates to project.
* @param {Cartesian3} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
* @returns {Cartesian3} The projected coordinates. If the result parameter is not undefined, the
* coordinates are copied there and that instance is returned. Otherwise, a new instance is
* created and returned.
*/
GeographicProjection.prototype.project = function(cartographic, result) {
// Actually this is the special case of equidistant cylindrical called the plate carree
var semimajorAxis = this._semimajorAxis;
var x = cartographic.longitude * semimajorAxis;
var y = cartographic.latitude * semimajorAxis;
var z = cartographic.height;
if (!defined(result)) {
return new Cartesian3(x, y, z);
}
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Unprojects a set of projected {@link Cartesian3} coordinates, in meters, to {@link Cartographic}
* coordinates, in radians. Longitude and Latitude are the X and Y coordinates, respectively,
* divided by the maximum radius of the ellipsoid. Height is the unmodified Z coordinate.
*
* @param {Cartesian3} cartesian The Cartesian position to unproject with height (z) in meters.
* @param {Cartographic} [result] An instance into which to copy the result. If this parameter is
* undefined, a new instance is created and returned.
* @returns {Cartographic} The unprojected coordinates. If the result parameter is not undefined, the
* coordinates are copied there and that instance is returned. Otherwise, a new instance is
* created and returned.
*/
GeographicProjection.prototype.unproject = function(cartesian, result) {
if (!defined(cartesian)) {
throw new DeveloperError('cartesian is required');
}
var oneOverEarthSemimajorAxis = this._oneOverSemimajorAxis;
var longitude = cartesian.x * oneOverEarthSemimajorAxis;
var latitude = cartesian.y * oneOverEarthSemimajorAxis;
var height = cartesian.z;
if (!defined(result)) {
return new Cartographic(longitude, latitude, height);
}
result.longitude = longitude;
result.latitude = latitude;
result.height = height;
return result;
};
return GeographicProjection;
});
/*global define*/
define('Core/Intersect',[
'./freezeObject'
], function(
freezeObject) {
'use strict';
/**
* This enumerated type is used in determining where, relative to the frustum, an
* object is located. The object can either be fully contained within the frustum (INSIDE),
* partially inside the frustum and partially outside (INTERSECTING), or somwhere entirely
* outside of the frustum's 6 planes (OUTSIDE).
*
* @exports Intersect
*/
var Intersect = {
/**
* Represents that an object is not contained within the frustum.
*
* @type {Number}
* @constant
*/
OUTSIDE : -1,
/**
* Represents that an object intersects one of the frustum's planes.
*
* @type {Number}
* @constant
*/
INTERSECTING : 0,
/**
* Represents that an object is fully within the frustum.
*
* @type {Number}
* @constant
*/
INSIDE : 1
};
return freezeObject(Intersect);
});
/*global define*/
define('Core/Interval',[
'./defaultValue'
], function(
defaultValue) {
'use strict';
/**
* Represents the closed interval [start, stop].
* @alias Interval
* @constructor
*
* @param {Number} [start=0.0] The beginning of the interval.
* @param {Number} [stop=0.0] The end of the interval.
*/
function Interval(start, stop) {
/**
* The beginning of the interval.
* @type {Number}
* @default 0.0
*/
this.start = defaultValue(start, 0.0);
/**
* The end of the interval.
* @type {Number}
* @default 0.0
*/
this.stop = defaultValue(stop, 0.0);
}
return Interval;
});
/*global define*/
define('Core/Matrix3',[
'./Cartesian3',
'./Check',
'./defaultValue',
'./defined',
'./defineProperties',
'./DeveloperError',
'./freezeObject',
'./Math'
], function(
Cartesian3,
Check,
defaultValue,
defined,
defineProperties,
DeveloperError,
freezeObject,
CesiumMath) {
'use strict';
/**
* A 3x3 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix3
* @constructor
*
* @param {Number} [column0Row0=0.0] The value for column 0, row 0.
* @param {Number} [column1Row0=0.0] The value for column 1, row 0.
* @param {Number} [column2Row0=0.0] The value for column 2, row 0.
* @param {Number} [column0Row1=0.0] The value for column 0, row 1.
* @param {Number} [column1Row1=0.0] The value for column 1, row 1.
* @param {Number} [column2Row1=0.0] The value for column 2, row 1.
* @param {Number} [column0Row2=0.0] The value for column 0, row 2.
* @param {Number} [column1Row2=0.0] The value for column 1, row 2.
* @param {Number} [column2Row2=0.0] The value for column 2, row 2.
*
* @see Matrix3.fromColumnMajorArray
* @see Matrix3.fromRowMajorArray
* @see Matrix3.fromQuaternion
* @see Matrix3.fromScale
* @see Matrix3.fromUniformScale
* @see Matrix2
* @see Matrix4
*/
function Matrix3(column0Row0, column1Row0, column2Row0,
column0Row1, column1Row1, column2Row1,
column0Row2, column1Row2, column2Row2) {
this[0] = defaultValue(column0Row0, 0.0);
this[1] = defaultValue(column0Row1, 0.0);
this[2] = defaultValue(column0Row2, 0.0);
this[3] = defaultValue(column1Row0, 0.0);
this[4] = defaultValue(column1Row1, 0.0);
this[5] = defaultValue(column1Row2, 0.0);
this[6] = defaultValue(column2Row0, 0.0);
this[7] = defaultValue(column2Row1, 0.0);
this[8] = defaultValue(column2Row2, 0.0);
}
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
Matrix3.packedLength = 9;
/**
* Stores the provided instance into the provided array.
*
* @param {Matrix3} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
Matrix3.pack = function(value, array, startingIndex) {
Check.typeOf.object('value', value);
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
array[startingIndex++] = value[0];
array[startingIndex++] = value[1];
array[startingIndex++] = value[2];
array[startingIndex++] = value[3];
array[startingIndex++] = value[4];
array[startingIndex++] = value[5];
array[startingIndex++] = value[6];
array[startingIndex++] = value[7];
array[startingIndex++] = value[8];
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix3} [result] The object into which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*/
Matrix3.unpack = function(array, startingIndex, result) {
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new Matrix3();
}
result[0] = array[startingIndex++];
result[1] = array[startingIndex++];
result[2] = array[startingIndex++];
result[3] = array[startingIndex++];
result[4] = array[startingIndex++];
result[5] = array[startingIndex++];
result[6] = array[startingIndex++];
result[7] = array[startingIndex++];
result[8] = array[startingIndex++];
return result;
};
/**
* Duplicates a Matrix3 instance.
*
* @param {Matrix3} matrix The matrix to duplicate.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided. (Returns undefined if matrix is undefined)
*/
Matrix3.clone = function(matrix, result) {
if (!defined(matrix)) {
return undefined;
}
if (!defined(result)) {
return new Matrix3(matrix[0], matrix[3], matrix[6],
matrix[1], matrix[4], matrix[7],
matrix[2], matrix[5], matrix[8]);
}
result[0] = matrix[0];
result[1] = matrix[1];
result[2] = matrix[2];
result[3] = matrix[3];
result[4] = matrix[4];
result[5] = matrix[5];
result[6] = matrix[6];
result[7] = matrix[7];
result[8] = matrix[8];
return result;
};
/**
* Creates a Matrix3 from 9 consecutive elements in an array.
*
* @param {Number[]} array The array whose 9 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {Number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*
* @example
* // Create the Matrix3:
* // [1.0, 2.0, 3.0]
* // [1.0, 2.0, 3.0]
* // [1.0, 2.0, 3.0]
*
* var v = [1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];
* var m = Cesium.Matrix3.fromArray(v);
*
* // Create same Matrix3 with using an offset into an array
* var v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0];
* var m2 = Cesium.Matrix3.fromArray(v2, 2);
*/
Matrix3.fromArray = function(array, startingIndex, result) {
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new Matrix3();
}
result[0] = array[startingIndex];
result[1] = array[startingIndex + 1];
result[2] = array[startingIndex + 2];
result[3] = array[startingIndex + 3];
result[4] = array[startingIndex + 4];
result[5] = array[startingIndex + 5];
result[6] = array[startingIndex + 6];
result[7] = array[startingIndex + 7];
result[8] = array[startingIndex + 8];
return result;
};
/**
* Creates a Matrix3 instance from a column-major order array.
*
* @param {Number[]} values The column-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*/
Matrix3.fromColumnMajorArray = function(values, result) {
Check.defined('values', values);
return Matrix3.clone(values, result);
};
/**
* Creates a Matrix3 instance from a row-major order array.
* The resulting matrix will be in column-major order.
*
* @param {Number[]} values The row-major order array.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*/
Matrix3.fromRowMajorArray = function(values, result) {
Check.defined('values', values);
if (!defined(result)) {
return new Matrix3(values[0], values[1], values[2],
values[3], values[4], values[5],
values[6], values[7], values[8]);
}
result[0] = values[0];
result[1] = values[3];
result[2] = values[6];
result[3] = values[1];
result[4] = values[4];
result[5] = values[7];
result[6] = values[2];
result[7] = values[5];
result[8] = values[8];
return result;
};
/**
* Computes a 3x3 rotation matrix from the provided quaternion.
*
* @param {Quaternion} quaternion the quaternion to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this quaternion.
*/
Matrix3.fromQuaternion = function(quaternion, result) {
Check.typeOf.object('quaternion', quaternion);
var x2 = quaternion.x * quaternion.x;
var xy = quaternion.x * quaternion.y;
var xz = quaternion.x * quaternion.z;
var xw = quaternion.x * quaternion.w;
var y2 = quaternion.y * quaternion.y;
var yz = quaternion.y * quaternion.z;
var yw = quaternion.y * quaternion.w;
var z2 = quaternion.z * quaternion.z;
var zw = quaternion.z * quaternion.w;
var w2 = quaternion.w * quaternion.w;
var m00 = x2 - y2 - z2 + w2;
var m01 = 2.0 * (xy - zw);
var m02 = 2.0 * (xz + yw);
var m10 = 2.0 * (xy + zw);
var m11 = -x2 + y2 - z2 + w2;
var m12 = 2.0 * (yz - xw);
var m20 = 2.0 * (xz - yw);
var m21 = 2.0 * (yz + xw);
var m22 = -x2 - y2 + z2 + w2;
if (!defined(result)) {
return new Matrix3(m00, m01, m02,
m10, m11, m12,
m20, m21, m22);
}
result[0] = m00;
result[1] = m10;
result[2] = m20;
result[3] = m01;
result[4] = m11;
result[5] = m21;
result[6] = m02;
result[7] = m12;
result[8] = m22;
return result;
};
/**
* Computes a 3x3 rotation matrix from the provided headingPitchRoll. (see http://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles )
*
* @param {HeadingPitchRoll} headingPitchRoll the headingPitchRoll to use.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The 3x3 rotation matrix from this headingPitchRoll.
*/
Matrix3.fromHeadingPitchRoll = function(headingPitchRoll, result) {
Check.typeOf.object('headingPitchRoll', headingPitchRoll);
var cosTheta = Math.cos(-headingPitchRoll.pitch);
var cosPsi = Math.cos(-headingPitchRoll.heading);
var cosPhi = Math.cos(headingPitchRoll.roll);
var sinTheta = Math.sin(-headingPitchRoll.pitch);
var sinPsi = Math.sin(-headingPitchRoll.heading);
var sinPhi = Math.sin(headingPitchRoll.roll);
var m00 = cosTheta * cosPsi;
var m01 = -cosPhi * sinPsi + sinPhi * sinTheta * cosPsi;
var m02 = sinPhi * sinPsi + cosPhi * sinTheta * cosPsi;
var m10 = cosTheta * sinPsi;
var m11 = cosPhi * cosPsi + sinPhi * sinTheta * sinPsi;
var m12 = -sinPhi * cosPsi + cosPhi * sinTheta * sinPsi;
var m20 = -sinTheta;
var m21 = sinPhi * cosTheta;
var m22 = cosPhi * cosTheta;
if (!defined(result)) {
return new Matrix3(m00, m01, m02,
m10, m11, m12,
m20, m21, m22);
}
result[0] = m00;
result[1] = m10;
result[2] = m20;
result[3] = m01;
result[4] = m11;
result[5] = m21;
result[6] = m02;
result[7] = m12;
result[8] = m22;
return result;
};
/**
* Computes a Matrix3 instance representing a non-uniform scale.
*
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*
* @example
* // Creates
* // [7.0, 0.0, 0.0]
* // [0.0, 8.0, 0.0]
* // [0.0, 0.0, 9.0]
* var m = Cesium.Matrix3.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));
*/
Matrix3.fromScale = function(scale, result) {
Check.typeOf.object('scale', scale);
if (!defined(result)) {
return new Matrix3(
scale.x, 0.0, 0.0,
0.0, scale.y, 0.0,
0.0, 0.0, scale.z);
}
result[0] = scale.x;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = scale.y;
result[5] = 0.0;
result[6] = 0.0;
result[7] = 0.0;
result[8] = scale.z;
return result;
};
/**
* Computes a Matrix3 instance representing a uniform scale.
*
* @param {Number} scale The uniform scale factor.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*
* @example
* // Creates
* // [2.0, 0.0, 0.0]
* // [0.0, 2.0, 0.0]
* // [0.0, 0.0, 2.0]
* var m = Cesium.Matrix3.fromUniformScale(2.0);
*/
Matrix3.fromUniformScale = function(scale, result) {
Check.typeOf.number('scale', scale);
if (!defined(result)) {
return new Matrix3(
scale, 0.0, 0.0,
0.0, scale, 0.0,
0.0, 0.0, scale);
}
result[0] = scale;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = scale;
result[5] = 0.0;
result[6] = 0.0;
result[7] = 0.0;
result[8] = scale;
return result;
};
/**
* Computes a Matrix3 instance representing the cross product equivalent matrix of a Cartesian3 vector.
*
* @param {Cartesian3} vector the vector on the left hand side of the cross product operation.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*
* @example
* // Creates
* // [0.0, -9.0, 8.0]
* // [9.0, 0.0, -7.0]
* // [-8.0, 7.0, 0.0]
* var m = Cesium.Matrix3.fromCrossProduct(new Cesium.Cartesian3(7.0, 8.0, 9.0));
*/
Matrix3.fromCrossProduct = function(vector, result) {
Check.typeOf.object('vector', vector);
if (!defined(result)) {
return new Matrix3(
0.0, -vector.z, vector.y,
vector.z, 0.0, -vector.x,
-vector.y, vector.x, 0.0);
}
result[0] = 0.0;
result[1] = vector.z;
result[2] = -vector.y;
result[3] = -vector.z;
result[4] = 0.0;
result[5] = vector.x;
result[6] = vector.y;
result[7] = -vector.x;
result[8] = 0.0;
return result;
};
/**
* Creates a rotation matrix around the x-axis.
*
* @param {Number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*
* @example
* // Rotate a point 45 degrees counterclockwise around the x-axis.
* var p = new Cesium.Cartesian3(5, 6, 7);
* var m = Cesium.Matrix3.fromRotationX(Cesium.Math.toRadians(45.0));
* var rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());
*/
Matrix3.fromRotationX = function(angle, result) {
Check.typeOf.number('angle', angle);
var cosAngle = Math.cos(angle);
var sinAngle = Math.sin(angle);
if (!defined(result)) {
return new Matrix3(
1.0, 0.0, 0.0,
0.0, cosAngle, -sinAngle,
0.0, sinAngle, cosAngle);
}
result[0] = 1.0;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = cosAngle;
result[5] = sinAngle;
result[6] = 0.0;
result[7] = -sinAngle;
result[8] = cosAngle;
return result;
};
/**
* Creates a rotation matrix around the y-axis.
*
* @param {Number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*
* @example
* // Rotate a point 45 degrees counterclockwise around the y-axis.
* var p = new Cesium.Cartesian3(5, 6, 7);
* var m = Cesium.Matrix3.fromRotationY(Cesium.Math.toRadians(45.0));
* var rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());
*/
Matrix3.fromRotationY = function(angle, result) {
Check.typeOf.number('angle', angle);
var cosAngle = Math.cos(angle);
var sinAngle = Math.sin(angle);
if (!defined(result)) {
return new Matrix3(
cosAngle, 0.0, sinAngle,
0.0, 1.0, 0.0,
-sinAngle, 0.0, cosAngle);
}
result[0] = cosAngle;
result[1] = 0.0;
result[2] = -sinAngle;
result[3] = 0.0;
result[4] = 1.0;
result[5] = 0.0;
result[6] = sinAngle;
result[7] = 0.0;
result[8] = cosAngle;
return result;
};
/**
* Creates a rotation matrix around the z-axis.
*
* @param {Number} angle The angle, in radians, of the rotation. Positive angles are counterclockwise.
* @param {Matrix3} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix3} The modified result parameter, or a new Matrix3 instance if one was not provided.
*
* @example
* // Rotate a point 45 degrees counterclockwise around the z-axis.
* var p = new Cesium.Cartesian3(5, 6, 7);
* var m = Cesium.Matrix3.fromRotationZ(Cesium.Math.toRadians(45.0));
* var rotated = Cesium.Matrix3.multiplyByVector(m, p, new Cesium.Cartesian3());
*/
Matrix3.fromRotationZ = function(angle, result) {
Check.typeOf.number('angle', angle);
var cosAngle = Math.cos(angle);
var sinAngle = Math.sin(angle);
if (!defined(result)) {
return new Matrix3(
cosAngle, -sinAngle, 0.0,
sinAngle, cosAngle, 0.0,
0.0, 0.0, 1.0);
}
result[0] = cosAngle;
result[1] = sinAngle;
result[2] = 0.0;
result[3] = -sinAngle;
result[4] = cosAngle;
result[5] = 0.0;
result[6] = 0.0;
result[7] = 0.0;
result[8] = 1.0;
return result;
};
/**
* Creates an Array from the provided Matrix3 instance.
* The array will be in column-major order.
*
* @param {Matrix3} matrix The matrix to use..
* @param {Number[]} [result] The Array onto which to store the result.
* @returns {Number[]} The modified Array parameter or a new Array instance if one was not provided.
*/
Matrix3.toArray = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
if (!defined(result)) {
return [matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5], matrix[6], matrix[7], matrix[8]];
}
result[0] = matrix[0];
result[1] = matrix[1];
result[2] = matrix[2];
result[3] = matrix[3];
result[4] = matrix[4];
result[5] = matrix[5];
result[6] = matrix[6];
result[7] = matrix[7];
result[8] = matrix[8];
return result;
};
/**
* Computes the array index of the element at the provided row and column.
*
* @param {Number} row The zero-based index of the row.
* @param {Number} column The zero-based index of the column.
* @returns {Number} The index of the element at the provided row and column.
*
* @exception {DeveloperError} row must be 0, 1, or 2.
* @exception {DeveloperError} column must be 0, 1, or 2.
*
* @example
* var myMatrix = new Cesium.Matrix3();
* var column1Row0Index = Cesium.Matrix3.getElementIndex(1, 0);
* var column1Row0 = myMatrix[column1Row0Index]
* myMatrix[column1Row0Index] = 10.0;
*/
Matrix3.getElementIndex = function(column, row) {
Check.typeOf.number.greaterThanOrEquals('row', row, 0);
Check.typeOf.number.lessThanOrEquals('row', row, 2);
Check.typeOf.number.greaterThanOrEquals('column', column, 0);
Check.typeOf.number.lessThanOrEquals('column', column, 2);
return column * 3 + row;
};
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian3 instance.
*
* @param {Matrix3} matrix The matrix to use.
* @param {Number} index The zero-based index of the column to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getColumn = function(matrix, index, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 2);
Check.typeOf.object('result', result);
var startIndex = index * 3;
var x = matrix[startIndex];
var y = matrix[startIndex + 1];
var z = matrix[startIndex + 2];
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian3 instance.
*
* @param {Matrix3} matrix The matrix to use.
* @param {Number} index The zero-based index of the column to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setColumn = function(matrix, index, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 2);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result = Matrix3.clone(matrix, result);
var startIndex = index * 3;
result[startIndex] = cartesian.x;
result[startIndex + 1] = cartesian.y;
result[startIndex + 2] = cartesian.z;
return result;
};
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian3 instance.
*
* @param {Matrix3} matrix The matrix to use.
* @param {Number} index The zero-based index of the row to retrieve.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.getRow = function(matrix, index, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 2);
Check.typeOf.object('result', result);
var x = matrix[index];
var y = matrix[index + 3];
var z = matrix[index + 6];
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian3 instance.
*
* @param {Matrix3} matrix The matrix to use.
* @param {Number} index The zero-based index of the row to set.
* @param {Cartesian3} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, or 2.
*/
Matrix3.setRow = function(matrix, index, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 2);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result = Matrix3.clone(matrix, result);
result[index] = cartesian.x;
result[index + 3] = cartesian.y;
result[index + 6] = cartesian.z;
return result;
};
var scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
*
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Matrix3.getScale = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result.x = Cartesian3.magnitude(Cartesian3.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn));
result.y = Cartesian3.magnitude(Cartesian3.fromElements(matrix[3], matrix[4], matrix[5], scratchColumn));
result.z = Cartesian3.magnitude(Cartesian3.fromElements(matrix[6], matrix[7], matrix[8], scratchColumn));
return result;
};
var scratchScale = new Cartesian3();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors.
*
* @param {Matrix3} matrix The matrix.
* @returns {Number} The maximum scale.
*/
Matrix3.getMaximumScale = function(matrix) {
Matrix3.getScale(matrix, scratchScale);
return Cartesian3.maximumComponent(scratchScale);
};
/**
* Computes the product of two matrices.
*
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*/
Matrix3.multiply = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
var column0Row0 = left[0] * right[0] + left[3] * right[1] + left[6] * right[2];
var column0Row1 = left[1] * right[0] + left[4] * right[1] + left[7] * right[2];
var column0Row2 = left[2] * right[0] + left[5] * right[1] + left[8] * right[2];
var column1Row0 = left[0] * right[3] + left[3] * right[4] + left[6] * right[5];
var column1Row1 = left[1] * right[3] + left[4] * right[4] + left[7] * right[5];
var column1Row2 = left[2] * right[3] + left[5] * right[4] + left[8] * right[5];
var column2Row0 = left[0] * right[6] + left[3] * right[7] + left[6] * right[8];
var column2Row1 = left[1] * right[6] + left[4] * right[7] + left[7] * right[8];
var column2Row2 = left[2] * right[6] + left[5] * right[7] + left[8] * right[8];
result[0] = column0Row0;
result[1] = column0Row1;
result[2] = column0Row2;
result[3] = column1Row0;
result[4] = column1Row1;
result[5] = column1Row2;
result[6] = column2Row0;
result[7] = column2Row1;
result[8] = column2Row2;
return result;
};
/**
* Computes the sum of two matrices.
*
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*/
Matrix3.add = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result[0] = left[0] + right[0];
result[1] = left[1] + right[1];
result[2] = left[2] + right[2];
result[3] = left[3] + right[3];
result[4] = left[4] + right[4];
result[5] = left[5] + right[5];
result[6] = left[6] + right[6];
result[7] = left[7] + right[7];
result[8] = left[8] + right[8];
return result;
};
/**
* Computes the difference of two matrices.
*
* @param {Matrix3} left The first matrix.
* @param {Matrix3} right The second matrix.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*/
Matrix3.subtract = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result[0] = left[0] - right[0];
result[1] = left[1] - right[1];
result[2] = left[2] - right[2];
result[3] = left[3] - right[3];
result[4] = left[4] - right[4];
result[5] = left[5] - right[5];
result[6] = left[6] - right[6];
result[7] = left[7] - right[7];
result[8] = left[8] - right[8];
return result;
};
/**
* Computes the product of a matrix and a column vector.
*
* @param {Matrix3} matrix The matrix.
* @param {Cartesian3} cartesian The column.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Matrix3.multiplyByVector = function(matrix, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var vX = cartesian.x;
var vY = cartesian.y;
var vZ = cartesian.z;
var x = matrix[0] * vX + matrix[3] * vY + matrix[6] * vZ;
var y = matrix[1] * vX + matrix[4] * vY + matrix[7] * vZ;
var z = matrix[2] * vX + matrix[5] * vY + matrix[8] * vZ;
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Computes the product of a matrix and a scalar.
*
* @param {Matrix3} matrix The matrix.
* @param {Number} scalar The number to multiply by.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*/
Matrix3.multiplyByScalar = function(matrix, scalar, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number('scalar', scalar);
Check.typeOf.object('result', result);
result[0] = matrix[0] * scalar;
result[1] = matrix[1] * scalar;
result[2] = matrix[2] * scalar;
result[3] = matrix[3] * scalar;
result[4] = matrix[4] * scalar;
result[5] = matrix[5] * scalar;
result[6] = matrix[6] * scalar;
result[7] = matrix[7] * scalar;
result[8] = matrix[8] * scalar;
return result;
};
/**
* Computes the product of a matrix times a (non-uniform) scale, as if the scale were a scale matrix.
*
* @param {Matrix3} matrix The matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*
*
* @example
* // Instead of Cesium.Matrix3.multiply(m, Cesium.Matrix3.fromScale(scale), m);
* Cesium.Matrix3.multiplyByScale(m, scale, m);
*
* @see Matrix3.fromScale
* @see Matrix3.multiplyByUniformScale
*/
Matrix3.multiplyByScale = function(matrix, scale, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('scale', scale);
Check.typeOf.object('result', result);
result[0] = matrix[0] * scale.x;
result[1] = matrix[1] * scale.x;
result[2] = matrix[2] * scale.x;
result[3] = matrix[3] * scale.y;
result[4] = matrix[4] * scale.y;
result[5] = matrix[5] * scale.y;
result[6] = matrix[6] * scale.z;
result[7] = matrix[7] * scale.z;
result[8] = matrix[8] * scale.z;
return result;
};
/**
* Creates a negated copy of the provided matrix.
*
* @param {Matrix3} matrix The matrix to negate.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*/
Matrix3.negate = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result[0] = -matrix[0];
result[1] = -matrix[1];
result[2] = -matrix[2];
result[3] = -matrix[3];
result[4] = -matrix[4];
result[5] = -matrix[5];
result[6] = -matrix[6];
result[7] = -matrix[7];
result[8] = -matrix[8];
return result;
};
/**
* Computes the transpose of the provided matrix.
*
* @param {Matrix3} matrix The matrix to transpose.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*/
Matrix3.transpose = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
var column0Row0 = matrix[0];
var column0Row1 = matrix[3];
var column0Row2 = matrix[6];
var column1Row0 = matrix[1];
var column1Row1 = matrix[4];
var column1Row2 = matrix[7];
var column2Row0 = matrix[2];
var column2Row1 = matrix[5];
var column2Row2 = matrix[8];
result[0] = column0Row0;
result[1] = column0Row1;
result[2] = column0Row2;
result[3] = column1Row0;
result[4] = column1Row1;
result[5] = column1Row2;
result[6] = column2Row0;
result[7] = column2Row1;
result[8] = column2Row2;
return result;
};
function computeFrobeniusNorm(matrix) {
var norm = 0.0;
for (var i = 0; i < 9; ++i) {
var temp = matrix[i];
norm += temp * temp;
}
return Math.sqrt(norm);
}
var rowVal = [1, 0, 0];
var colVal = [2, 2, 1];
function offDiagonalFrobeniusNorm(matrix) {
// Computes the "off-diagonal" Frobenius norm.
// Assumes matrix is symmetric.
var norm = 0.0;
for (var i = 0; i < 3; ++i) {
var temp = matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])];
norm += 2.0 * temp * temp;
}
return Math.sqrt(norm);
}
function shurDecomposition(matrix, result) {
// This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,
// section 8.4.2 The 2by2 Symmetric Schur Decomposition.
//
// The routine takes a matrix, which is assumed to be symmetric, and
// finds the largest off-diagonal term, and then creates
// a matrix (result) which can be used to help reduce it
var tolerance = CesiumMath.EPSILON15;
var maxDiagonal = 0.0;
var rotAxis = 1;
// find pivot (rotAxis) based on max diagonal of matrix
for (var i = 0; i < 3; ++i) {
var temp = Math.abs(matrix[Matrix3.getElementIndex(colVal[i], rowVal[i])]);
if (temp > maxDiagonal) {
rotAxis = i;
maxDiagonal = temp;
}
}
var c = 1.0;
var s = 0.0;
var p = rowVal[rotAxis];
var q = colVal[rotAxis];
if (Math.abs(matrix[Matrix3.getElementIndex(q, p)]) > tolerance) {
var qq = matrix[Matrix3.getElementIndex(q, q)];
var pp = matrix[Matrix3.getElementIndex(p, p)];
var qp = matrix[Matrix3.getElementIndex(q, p)];
var tau = (qq - pp) / 2.0 / qp;
var t;
if (tau < 0.0) {
t = -1.0 / (-tau + Math.sqrt(1.0 + tau * tau));
} else {
t = 1.0 / (tau + Math.sqrt(1.0 + tau * tau));
}
c = 1.0 / Math.sqrt(1.0 + t * t);
s = t * c;
}
result = Matrix3.clone(Matrix3.IDENTITY, result);
result[Matrix3.getElementIndex(p, p)] = result[Matrix3.getElementIndex(q, q)] = c;
result[Matrix3.getElementIndex(q, p)] = s;
result[Matrix3.getElementIndex(p, q)] = -s;
return result;
}
var jMatrix = new Matrix3();
var jMatrixTranspose = new Matrix3();
/**
* Computes the eigenvectors and eigenvalues of a symmetric matrix.
* <p>
* Returns a diagonal matrix and unitary matrix such that:
* <code>matrix = unitary matrix * diagonal matrix * transpose(unitary matrix)</code>
* </p>
* <p>
* The values along the diagonal of the diagonal matrix are the eigenvalues. The columns
* of the unitary matrix are the corresponding eigenvectors.
* </p>
*
* @param {Matrix3} matrix The matrix to decompose into diagonal and unitary matrix. Expected to be symmetric.
* @param {Object} [result] An object with unitary and diagonal properties which are matrices onto which to store the result.
* @returns {Object} An object with unitary and diagonal properties which are the unitary and diagonal matrices, respectively.
*
* @example
* var a = //... symetric matrix
* var result = {
* unitary : new Cesium.Matrix3(),
* diagonal : new Cesium.Matrix3()
* };
* Cesium.Matrix3.computeEigenDecomposition(a, result);
*
* var unitaryTranspose = Cesium.Matrix3.transpose(result.unitary, new Cesium.Matrix3());
* var b = Cesium.Matrix3.multiply(result.unitary, result.diagonal, new Cesium.Matrix3());
* Cesium.Matrix3.multiply(b, unitaryTranspose, b); // b is now equal to a
*
* var lambda = Cesium.Matrix3.getColumn(result.diagonal, 0, new Cesium.Cartesian3()).x; // first eigenvalue
* var v = Cesium.Matrix3.getColumn(result.unitary, 0, new Cesium.Cartesian3()); // first eigenvector
* var c = Cesium.Cartesian3.multiplyByScalar(v, lambda, new Cesium.Cartesian3()); // equal to Cesium.Matrix3.multiplyByVector(a, v)
*/
Matrix3.computeEigenDecomposition = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
// This routine was created based upon Matrix Computations, 3rd ed., by Golub and Van Loan,
// section 8.4.3 The Classical Jacobi Algorithm
var tolerance = CesiumMath.EPSILON20;
var maxSweeps = 10;
var count = 0;
var sweep = 0;
if (!defined(result)) {
result = {};
}
var unitaryMatrix = result.unitary = Matrix3.clone(Matrix3.IDENTITY, result.unitary);
var diagMatrix = result.diagonal = Matrix3.clone(matrix, result.diagonal);
var epsilon = tolerance * computeFrobeniusNorm(diagMatrix);
while (sweep < maxSweeps && offDiagonalFrobeniusNorm(diagMatrix) > epsilon) {
shurDecomposition(diagMatrix, jMatrix);
Matrix3.transpose(jMatrix, jMatrixTranspose);
Matrix3.multiply(diagMatrix, jMatrix, diagMatrix);
Matrix3.multiply(jMatrixTranspose, diagMatrix, diagMatrix);
Matrix3.multiply(unitaryMatrix, jMatrix, unitaryMatrix);
if (++count > 2) {
++sweep;
count = 0;
}
}
return result;
};
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
*
* @param {Matrix3} matrix The matrix with signed elements.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*/
Matrix3.abs = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result[0] = Math.abs(matrix[0]);
result[1] = Math.abs(matrix[1]);
result[2] = Math.abs(matrix[2]);
result[3] = Math.abs(matrix[3]);
result[4] = Math.abs(matrix[4]);
result[5] = Math.abs(matrix[5]);
result[6] = Math.abs(matrix[6]);
result[7] = Math.abs(matrix[7]);
result[8] = Math.abs(matrix[8]);
return result;
};
/**
* Computes the determinant of the provided matrix.
*
* @param {Matrix3} matrix The matrix to use.
* @returns {Number} The value of the determinant of the matrix.
*/
Matrix3.determinant = function(matrix) {
Check.typeOf.object('matrix', matrix);
var m11 = matrix[0];
var m21 = matrix[3];
var m31 = matrix[6];
var m12 = matrix[1];
var m22 = matrix[4];
var m32 = matrix[7];
var m13 = matrix[2];
var m23 = matrix[5];
var m33 = matrix[8];
return m11 * (m22 * m33 - m23 * m32) + m12 * (m23 * m31 - m21 * m33) + m13 * (m21 * m32 - m22 * m31);
};
/**
* Computes the inverse of the provided matrix.
*
* @param {Matrix3} matrix The matrix to invert.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*
* @exception {DeveloperError} matrix is not invertible.
*/
Matrix3.inverse = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
var m11 = matrix[0];
var m21 = matrix[1];
var m31 = matrix[2];
var m12 = matrix[3];
var m22 = matrix[4];
var m32 = matrix[5];
var m13 = matrix[6];
var m23 = matrix[7];
var m33 = matrix[8];
var determinant = Matrix3.determinant(matrix);
if (Math.abs(determinant) <= CesiumMath.EPSILON15) {
throw new DeveloperError('matrix is not invertible');
}
result[0] = m22 * m33 - m23 * m32;
result[1] = m23 * m31 - m21 * m33;
result[2] = m21 * m32 - m22 * m31;
result[3] = m13 * m32 - m12 * m33;
result[4] = m11 * m33 - m13 * m31;
result[5] = m12 * m31 - m11 * m32;
result[6] = m12 * m23 - m13 * m22;
result[7] = m13 * m21 - m11 * m23;
result[8] = m11 * m22 - m12 * m21;
var scale = 1.0 / determinant;
return Matrix3.multiplyByScalar(result, scale, result);
};
/**
* Compares the provided matrices componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
Matrix3.equals = function(left, right) {
return (left === right) ||
(defined(left) &&
defined(right) &&
left[0] === right[0] &&
left[1] === right[1] &&
left[2] === right[2] &&
left[3] === right[3] &&
left[4] === right[4] &&
left[5] === right[5] &&
left[6] === right[6] &&
left[7] === right[7] &&
left[8] === right[8]);
};
/**
* Compares the provided matrices componentwise and returns
* <code>true</code> if they are within the provided epsilon,
* <code>false</code> otherwise.
*
* @param {Matrix3} [left] The first matrix.
* @param {Matrix3} [right] The second matrix.
* @param {Number} epsilon The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if left and right are within the provided epsilon, <code>false</code> otherwise.
*/
Matrix3.equalsEpsilon = function(left, right, epsilon) {
Check.typeOf.number('epsilon', epsilon);
return (left === right) ||
(defined(left) &&
defined(right) &&
Math.abs(left[0] - right[0]) <= epsilon &&
Math.abs(left[1] - right[1]) <= epsilon &&
Math.abs(left[2] - right[2]) <= epsilon &&
Math.abs(left[3] - right[3]) <= epsilon &&
Math.abs(left[4] - right[4]) <= epsilon &&
Math.abs(left[5] - right[5]) <= epsilon &&
Math.abs(left[6] - right[6]) <= epsilon &&
Math.abs(left[7] - right[7]) <= epsilon &&
Math.abs(left[8] - right[8]) <= epsilon);
};
/**
* An immutable Matrix3 instance initialized to the identity matrix.
*
* @type {Matrix3}
* @constant
*/
Matrix3.IDENTITY = freezeObject(new Matrix3(1.0, 0.0, 0.0,
0.0, 1.0, 0.0,
0.0, 0.0, 1.0));
/**
* An immutable Matrix3 instance initialized to the zero matrix.
*
* @type {Matrix3}
* @constant
*/
Matrix3.ZERO = freezeObject(new Matrix3(0.0, 0.0, 0.0,
0.0, 0.0, 0.0,
0.0, 0.0, 0.0));
/**
* The index into Matrix3 for column 0, row 0.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN0ROW0 = 0;
/**
* The index into Matrix3 for column 0, row 1.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN0ROW1 = 1;
/**
* The index into Matrix3 for column 0, row 2.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN0ROW2 = 2;
/**
* The index into Matrix3 for column 1, row 0.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN1ROW0 = 3;
/**
* The index into Matrix3 for column 1, row 1.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN1ROW1 = 4;
/**
* The index into Matrix3 for column 1, row 2.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN1ROW2 = 5;
/**
* The index into Matrix3 for column 2, row 0.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN2ROW0 = 6;
/**
* The index into Matrix3 for column 2, row 1.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN2ROW1 = 7;
/**
* The index into Matrix3 for column 2, row 2.
*
* @type {Number}
* @constant
*/
Matrix3.COLUMN2ROW2 = 8;
defineProperties(Matrix3.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix3.prototype
*
* @type {Number}
*/
length : {
get : function() {
return Matrix3.packedLength;
}
}
});
/**
* Duplicates the provided Matrix3 instance.
*
* @param {Matrix3} [result] The object onto which to store the result.
* @returns {Matrix3} The modified result parameter or a new Matrix3 instance if one was not provided.
*/
Matrix3.prototype.clone = function(result) {
return Matrix3.clone(this, result);
};
/**
* Compares this matrix to the provided matrix componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Matrix3} [right] The right hand side matrix.
* @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.
*/
Matrix3.prototype.equals = function(right) {
return Matrix3.equals(this, right);
};
/**
* @private
*/
Matrix3.equalsArray = function(matrix, array, offset) {
return matrix[0] === array[offset] &&
matrix[1] === array[offset + 1] &&
matrix[2] === array[offset + 2] &&
matrix[3] === array[offset + 3] &&
matrix[4] === array[offset + 4] &&
matrix[5] === array[offset + 5] &&
matrix[6] === array[offset + 6] &&
matrix[7] === array[offset + 7] &&
matrix[8] === array[offset + 8];
};
/**
* Compares this matrix to the provided matrix componentwise and returns
* <code>true</code> if they are within the provided epsilon,
* <code>false</code> otherwise.
*
* @param {Matrix3} [right] The right hand side matrix.
* @param {Number} epsilon The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if they are within the provided epsilon, <code>false</code> otherwise.
*/
Matrix3.prototype.equalsEpsilon = function(right, epsilon) {
return Matrix3.equalsEpsilon(this, right, epsilon);
};
/**
* Creates a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2)'.
*
* @returns {String} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2)'.
*/
Matrix3.prototype.toString = function() {
return '(' + this[0] + ', ' + this[3] + ', ' + this[6] + ')\n' +
'(' + this[1] + ', ' + this[4] + ', ' + this[7] + ')\n' +
'(' + this[2] + ', ' + this[5] + ', ' + this[8] + ')';
};
return Matrix3;
});
/*global define*/
define('Core/Cartesian4',[
'./Check',
'./defaultValue',
'./defined',
'./DeveloperError',
'./freezeObject',
'./Math'
], function(
Check,
defaultValue,
defined,
DeveloperError,
freezeObject,
CesiumMath) {
'use strict';
/**
* A 4D Cartesian point.
* @alias Cartesian4
* @constructor
*
* @param {Number} [x=0.0] The X component.
* @param {Number} [y=0.0] The Y component.
* @param {Number} [z=0.0] The Z component.
* @param {Number} [w=0.0] The W component.
*
* @see Cartesian2
* @see Cartesian3
* @see Packable
*/
function Cartesian4(x, y, z, w) {
/**
* The X component.
* @type {Number}
* @default 0.0
*/
this.x = defaultValue(x, 0.0);
/**
* The Y component.
* @type {Number}
* @default 0.0
*/
this.y = defaultValue(y, 0.0);
/**
* The Z component.
* @type {Number}
* @default 0.0
*/
this.z = defaultValue(z, 0.0);
/**
* The W component.
* @type {Number}
* @default 0.0
*/
this.w = defaultValue(w, 0.0);
}
/**
* Creates a Cartesian4 instance from x, y, z and w coordinates.
*
* @param {Number} x The x coordinate.
* @param {Number} y The y coordinate.
* @param {Number} z The z coordinate.
* @param {Number} w The w coordinate.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
Cartesian4.fromElements = function(x, y, z, w, result) {
if (!defined(result)) {
return new Cartesian4(x, y, z, w);
}
result.x = x;
result.y = y;
result.z = z;
result.w = w;
return result;
};
/**
* Creates a Cartesian4 instance from a {@link Color}. <code>red</code>, <code>green</code>, <code>blue</code>,
* and <code>alpha</code> map to <code>x</code>, <code>y</code>, <code>z</code>, and <code>w</code>, respectively.
*
* @param {Color} color The source color.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
Cartesian4.fromColor = function(color, result) {
Check.typeOf.object('color', color);
if (!defined(result)) {
return new Cartesian4(color.red, color.green, color.blue, color.alpha);
}
result.x = color.red;
result.y = color.green;
result.z = color.blue;
result.w = color.alpha;
return result;
};
/**
* Duplicates a Cartesian4 instance.
*
* @param {Cartesian4} cartesian The Cartesian to duplicate.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided. (Returns undefined if cartesian is undefined)
*/
Cartesian4.clone = function(cartesian, result) {
if (!defined(cartesian)) {
return undefined;
}
if (!defined(result)) {
return new Cartesian4(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
}
result.x = cartesian.x;
result.y = cartesian.y;
result.z = cartesian.z;
result.w = cartesian.w;
return result;
};
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
Cartesian4.packedLength = 4;
/**
* Stores the provided instance into the provided array.
*
* @param {Cartesian4} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
Cartesian4.pack = function(value, array, startingIndex) {
Check.typeOf.object('value', value);
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
array[startingIndex++] = value.x;
array[startingIndex++] = value.y;
array[startingIndex++] = value.z;
array[startingIndex] = value.w;
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Cartesian4} [result] The object into which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
Cartesian4.unpack = function(array, startingIndex, result) {
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new Cartesian4();
}
result.x = array[startingIndex++];
result.y = array[startingIndex++];
result.z = array[startingIndex++];
result.w = array[startingIndex];
return result;
};
/**
* Flattens an array of Cartesian4s into and array of components.
*
* @param {Cartesian4[]} array The array of cartesians to pack.
* @param {Number[]} result The array onto which to store the result.
* @returns {Number[]} The packed array.
*/
Cartesian4.packArray = function(array, result) {
Check.defined('array', array);
var length = array.length;
if (!defined(result)) {
result = new Array(length * 4);
} else {
result.length = length * 4;
}
for (var i = 0; i < length; ++i) {
Cartesian4.pack(array[i], result, i * 4);
}
return result;
};
/**
* Unpacks an array of cartesian components into and array of Cartesian4s.
*
* @param {Number[]} array The array of components to unpack.
* @param {Cartesian4[]} result The array onto which to store the result.
* @returns {Cartesian4[]} The unpacked array.
*/
Cartesian4.unpackArray = function(array, result) {
Check.defined('array', array);
var length = array.length;
if (!defined(result)) {
result = new Array(length / 4);
} else {
result.length = length / 4;
}
for (var i = 0; i < length; i += 4) {
var index = i / 4;
result[index] = Cartesian4.unpack(array, i, result[index]);
}
return result;
};
/**
* Creates a Cartesian4 from four consecutive elements in an array.
* @function
*
* @param {Number[]} array The array whose four consecutive elements correspond to the x, y, z, and w components, respectively.
* @param {Number} [startingIndex=0] The offset into the array of the first element, which corresponds to the x component.
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*
* @example
* // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)
* var v = [1.0, 2.0, 3.0, 4.0];
* var p = Cesium.Cartesian4.fromArray(v);
*
* // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) using an offset into an array
* var v2 = [0.0, 0.0, 1.0, 2.0, 3.0, 4.0];
* var p2 = Cesium.Cartesian4.fromArray(v2, 2);
*/
Cartesian4.fromArray = Cartesian4.unpack;
/**
* Computes the value of the maximum component for the supplied Cartesian.
*
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {Number} The value of the maximum component.
*/
Cartesian4.maximumComponent = function(cartesian) {
Check.typeOf.object('cartesian', cartesian);
return Math.max(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
};
/**
* Computes the value of the minimum component for the supplied Cartesian.
*
* @param {Cartesian4} cartesian The cartesian to use.
* @returns {Number} The value of the minimum component.
*/
Cartesian4.minimumComponent = function(cartesian) {
Check.typeOf.object('cartesian', cartesian);
return Math.min(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
};
/**
* Compares two Cartesians and computes a Cartesian which contains the minimum components of the supplied Cartesians.
*
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
* @returns {Cartesian4} A cartesian with the minimum components.
*/
Cartesian4.minimumByComponent = function(first, second, result) {
Check.typeOf.object('first', first);
Check.typeOf.object('second', second);
Check.typeOf.object('result', result);
result.x = Math.min(first.x, second.x);
result.y = Math.min(first.y, second.y);
result.z = Math.min(first.z, second.z);
result.w = Math.min(first.w, second.w);
return result;
};
/**
* Compares two Cartesians and computes a Cartesian which contains the maximum components of the supplied Cartesians.
*
* @param {Cartesian4} first A cartesian to compare.
* @param {Cartesian4} second A cartesian to compare.
* @param {Cartesian4} result The object into which to store the result.
* @returns {Cartesian4} A cartesian with the maximum components.
*/
Cartesian4.maximumByComponent = function(first, second, result) {
Check.typeOf.object('first', first);
Check.typeOf.object('second', second);
Check.typeOf.object('result', result);
result.x = Math.max(first.x, second.x);
result.y = Math.max(first.y, second.y);
result.z = Math.max(first.z, second.z);
result.w = Math.max(first.w, second.w);
return result;
};
/**
* Computes the provided Cartesian's squared magnitude.
*
* @param {Cartesian4} cartesian The Cartesian instance whose squared magnitude is to be computed.
* @returns {Number} The squared magnitude.
*/
Cartesian4.magnitudeSquared = function(cartesian) {
Check.typeOf.object('cartesian', cartesian);
return cartesian.x * cartesian.x + cartesian.y * cartesian.y + cartesian.z * cartesian.z + cartesian.w * cartesian.w;
};
/**
* Computes the Cartesian's magnitude (length).
*
* @param {Cartesian4} cartesian The Cartesian instance whose magnitude is to be computed.
* @returns {Number} The magnitude.
*/
Cartesian4.magnitude = function(cartesian) {
return Math.sqrt(Cartesian4.magnitudeSquared(cartesian));
};
var distanceScratch = new Cartesian4();
/**
* Computes the 4-space distance between two points.
*
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {Number} The distance between two points.
*
* @example
* // Returns 1.0
* var d = Cesium.Cartesian4.distance(
* new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),
* new Cesium.Cartesian4(2.0, 0.0, 0.0, 0.0));
*/
Cartesian4.distance = function(left, right) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Cartesian4.subtract(left, right, distanceScratch);
return Cartesian4.magnitude(distanceScratch);
};
/**
* Computes the squared distance between two points. Comparing squared distances
* using this function is more efficient than comparing distances using {@link Cartesian4#distance}.
*
* @param {Cartesian4} left The first point to compute the distance from.
* @param {Cartesian4} right The second point to compute the distance to.
* @returns {Number} The distance between two points.
*
* @example
* // Returns 4.0, not 2.0
* var d = Cesium.Cartesian4.distance(
* new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0),
* new Cesium.Cartesian4(3.0, 0.0, 0.0, 0.0));
*/
Cartesian4.distanceSquared = function(left, right) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Cartesian4.subtract(left, right, distanceScratch);
return Cartesian4.magnitudeSquared(distanceScratch);
};
/**
* Computes the normalized form of the supplied Cartesian.
*
* @param {Cartesian4} cartesian The Cartesian to be normalized.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.normalize = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var magnitude = Cartesian4.magnitude(cartesian);
result.x = cartesian.x / magnitude;
result.y = cartesian.y / magnitude;
result.z = cartesian.z / magnitude;
result.w = cartesian.w / magnitude;
if (isNaN(result.x) || isNaN(result.y) || isNaN(result.z) || isNaN(result.w)) {
throw new DeveloperError('normalized result is not a number');
}
return result;
};
/**
* Computes the dot (scalar) product of two Cartesians.
*
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @returns {Number} The dot product.
*/
Cartesian4.dot = function(left, right) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w;
};
/**
* Computes the componentwise product of two Cartesians.
*
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.multiplyComponents = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result.x = left.x * right.x;
result.y = left.y * right.y;
result.z = left.z * right.z;
result.w = left.w * right.w;
return result;
};
/**
* Computes the componentwise quotient of two Cartesians.
*
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.divideComponents = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result.x = left.x / right.x;
result.y = left.y / right.y;
result.z = left.z / right.z;
result.w = left.w / right.w;
return result;
};
/**
* Computes the componentwise sum of two Cartesians.
*
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.add = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result.x = left.x + right.x;
result.y = left.y + right.y;
result.z = left.z + right.z;
result.w = left.w + right.w;
return result;
};
/**
* Computes the componentwise difference of two Cartesians.
*
* @param {Cartesian4} left The first Cartesian.
* @param {Cartesian4} right The second Cartesian.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.subtract = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result.x = left.x - right.x;
result.y = left.y - right.y;
result.z = left.z - right.z;
result.w = left.w - right.w;
return result;
};
/**
* Multiplies the provided Cartesian componentwise by the provided scalar.
*
* @param {Cartesian4} cartesian The Cartesian to be scaled.
* @param {Number} scalar The scalar to multiply with.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.multiplyByScalar = function(cartesian, scalar, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.number('scalar', scalar);
Check.typeOf.object('result', result);
result.x = cartesian.x * scalar;
result.y = cartesian.y * scalar;
result.z = cartesian.z * scalar;
result.w = cartesian.w * scalar;
return result;
};
/**
* Divides the provided Cartesian componentwise by the provided scalar.
*
* @param {Cartesian4} cartesian The Cartesian to be divided.
* @param {Number} scalar The scalar to divide by.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.divideByScalar = function(cartesian, scalar, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.number('scalar', scalar);
Check.typeOf.object('result', result);
result.x = cartesian.x / scalar;
result.y = cartesian.y / scalar;
result.z = cartesian.z / scalar;
result.w = cartesian.w / scalar;
return result;
};
/**
* Negates the provided Cartesian.
*
* @param {Cartesian4} cartesian The Cartesian to be negated.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.negate = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result.x = -cartesian.x;
result.y = -cartesian.y;
result.z = -cartesian.z;
result.w = -cartesian.w;
return result;
};
/**
* Computes the absolute value of the provided Cartesian.
*
* @param {Cartesian4} cartesian The Cartesian whose absolute value is to be computed.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.abs = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result.x = Math.abs(cartesian.x);
result.y = Math.abs(cartesian.y);
result.z = Math.abs(cartesian.z);
result.w = Math.abs(cartesian.w);
return result;
};
var lerpScratch = new Cartesian4();
/**
* Computes the linear interpolation or extrapolation at t using the provided cartesians.
*
* @param {Cartesian4} start The value corresponding to t at 0.0.
* @param {Cartesian4}end The value corresponding to t at 1.0.
* @param {Number} t The point along t at which to interpolate.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Cartesian4.lerp = function(start, end, t, result) {
Check.typeOf.object('start', start);
Check.typeOf.object('end', end);
Check.typeOf.number('t', t);
Check.typeOf.object('result', result);
Cartesian4.multiplyByScalar(end, t, lerpScratch);
result = Cartesian4.multiplyByScalar(start, 1.0 - t, result);
return Cartesian4.add(lerpScratch, result, result);
};
var mostOrthogonalAxisScratch = new Cartesian4();
/**
* Returns the axis that is most orthogonal to the provided Cartesian.
*
* @param {Cartesian4} cartesian The Cartesian on which to find the most orthogonal axis.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The most orthogonal axis.
*/
Cartesian4.mostOrthogonalAxis = function(cartesian, result) {
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var f = Cartesian4.normalize(cartesian, mostOrthogonalAxisScratch);
Cartesian4.abs(f, f);
if (f.x <= f.y) {
if (f.x <= f.z) {
if (f.x <= f.w) {
result = Cartesian4.clone(Cartesian4.UNIT_X, result);
} else {
result = Cartesian4.clone(Cartesian4.UNIT_W, result);
}
} else if (f.z <= f.w) {
result = Cartesian4.clone(Cartesian4.UNIT_Z, result);
} else {
result = Cartesian4.clone(Cartesian4.UNIT_W, result);
}
} else if (f.y <= f.z) {
if (f.y <= f.w) {
result = Cartesian4.clone(Cartesian4.UNIT_Y, result);
} else {
result = Cartesian4.clone(Cartesian4.UNIT_W, result);
}
} else if (f.z <= f.w) {
result = Cartesian4.clone(Cartesian4.UNIT_Z, result);
} else {
result = Cartesian4.clone(Cartesian4.UNIT_W, result);
}
return result;
};
/**
* Compares the provided Cartesians componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
Cartesian4.equals = function(left, right) {
return (left === right) ||
((defined(left)) &&
(defined(right)) &&
(left.x === right.x) &&
(left.y === right.y) &&
(left.z === right.z) &&
(left.w === right.w));
};
/**
* @private
*/
Cartesian4.equalsArray = function(cartesian, array, offset) {
return cartesian.x === array[offset] &&
cartesian.y === array[offset + 1] &&
cartesian.z === array[offset + 2] &&
cartesian.w === array[offset + 3];
};
/**
* Compares the provided Cartesians componentwise and returns
* <code>true</code> if they pass an absolute or relative tolerance test,
* <code>false</code> otherwise.
*
* @param {Cartesian4} [left] The first Cartesian.
* @param {Cartesian4} [right] The second Cartesian.
* @param {Number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {Number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {Boolean} <code>true</code> if left and right are within the provided epsilon, <code>false</code> otherwise.
*/
Cartesian4.equalsEpsilon = function(left, right, relativeEpsilon, absoluteEpsilon) {
return (left === right) ||
(defined(left) &&
defined(right) &&
CesiumMath.equalsEpsilon(left.x, right.x, relativeEpsilon, absoluteEpsilon) &&
CesiumMath.equalsEpsilon(left.y, right.y, relativeEpsilon, absoluteEpsilon) &&
CesiumMath.equalsEpsilon(left.z, right.z, relativeEpsilon, absoluteEpsilon) &&
CesiumMath.equalsEpsilon(left.w, right.w, relativeEpsilon, absoluteEpsilon));
};
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 0.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.ZERO = freezeObject(new Cartesian4(0.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (1.0, 0.0, 0.0, 0.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_X = freezeObject(new Cartesian4(1.0, 0.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 1.0, 0.0, 0.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_Y = freezeObject(new Cartesian4(0.0, 1.0, 0.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 1.0, 0.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_Z = freezeObject(new Cartesian4(0.0, 0.0, 1.0, 0.0));
/**
* An immutable Cartesian4 instance initialized to (0.0, 0.0, 0.0, 1.0).
*
* @type {Cartesian4}
* @constant
*/
Cartesian4.UNIT_W = freezeObject(new Cartesian4(0.0, 0.0, 0.0, 1.0));
/**
* Duplicates this Cartesian4 instance.
*
* @param {Cartesian4} [result] The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter or a new Cartesian4 instance if one was not provided.
*/
Cartesian4.prototype.clone = function(result) {
return Cartesian4.clone(this, result);
};
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Cartesian4} [right] The right hand side Cartesian.
* @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.
*/
Cartesian4.prototype.equals = function(right) {
return Cartesian4.equals(this, right);
};
/**
* Compares this Cartesian against the provided Cartesian componentwise and returns
* <code>true</code> if they pass an absolute or relative tolerance test,
* <code>false</code> otherwise.
*
* @param {Cartesian4} [right] The right hand side Cartesian.
* @param {Number} relativeEpsilon The relative epsilon tolerance to use for equality testing.
* @param {Number} [absoluteEpsilon=relativeEpsilon] The absolute epsilon tolerance to use for equality testing.
* @returns {Boolean} <code>true</code> if they are within the provided epsilon, <code>false</code> otherwise.
*/
Cartesian4.prototype.equalsEpsilon = function(right, relativeEpsilon, absoluteEpsilon) {
return Cartesian4.equalsEpsilon(this, right, relativeEpsilon, absoluteEpsilon);
};
/**
* Creates a string representing this Cartesian in the format '(x, y)'.
*
* @returns {String} A string representing the provided Cartesian in the format '(x, y)'.
*/
Cartesian4.prototype.toString = function() {
return '(' + this.x + ', ' + this.y + ', ' + this.z + ', ' + this.w + ')';
};
return Cartesian4;
});
/*global define*/
define('Core/RuntimeError',[
'./defined'
], function(
defined) {
'use strict';
/**
* Constructs an exception object that is thrown due to an error that can occur at runtime, e.g.,
* out of memory, could not compile shader, etc. If a function may throw this
* exception, the calling code should be prepared to catch it.
* <br /><br />
* On the other hand, a {@link DeveloperError} indicates an exception due
* to a developer error, e.g., invalid argument, that usually indicates a bug in the
* calling code.
*
* @alias RuntimeError
* @constructor
* @extends Error
*
* @param {String} [message] The error message for this exception.
*
* @see DeveloperError
*/
function RuntimeError(message) {
/**
* 'RuntimeError' indicating that this exception was thrown due to a runtime error.
* @type {String}
* @readonly
*/
this.name = 'RuntimeError';
/**
* The explanation for why this exception was thrown.
* @type {String}
* @readonly
*/
this.message = message;
//Browsers such as IE don't have a stack property until you actually throw the error.
var stack;
try {
throw new Error();
} catch (e) {
stack = e.stack;
}
/**
* The stack trace of this exception, if available.
* @type {String}
* @readonly
*/
this.stack = stack;
}
if (defined(Object.create)) {
RuntimeError.prototype = Object.create(Error.prototype);
RuntimeError.prototype.constructor = RuntimeError;
}
RuntimeError.prototype.toString = function() {
var str = this.name + ': ' + this.message;
if (defined(this.stack)) {
str += '\n' + this.stack.toString();
}
return str;
};
return RuntimeError;
});
/*global define*/
define('Core/Matrix4',[
'./Cartesian3',
'./Cartesian4',
'./Check',
'./defaultValue',
'./defined',
'./defineProperties',
'./freezeObject',
'./Math',
'./Matrix3',
'./RuntimeError'
], function(
Cartesian3,
Cartesian4,
Check,
defaultValue,
defined,
defineProperties,
freezeObject,
CesiumMath,
Matrix3,
RuntimeError) {
'use strict';
/**
* A 4x4 matrix, indexable as a column-major order array.
* Constructor parameters are in row-major order for code readability.
* @alias Matrix4
* @constructor
*
* @param {Number} [column0Row0=0.0] The value for column 0, row 0.
* @param {Number} [column1Row0=0.0] The value for column 1, row 0.
* @param {Number} [column2Row0=0.0] The value for column 2, row 0.
* @param {Number} [column3Row0=0.0] The value for column 3, row 0.
* @param {Number} [column0Row1=0.0] The value for column 0, row 1.
* @param {Number} [column1Row1=0.0] The value for column 1, row 1.
* @param {Number} [column2Row1=0.0] The value for column 2, row 1.
* @param {Number} [column3Row1=0.0] The value for column 3, row 1.
* @param {Number} [column0Row2=0.0] The value for column 0, row 2.
* @param {Number} [column1Row2=0.0] The value for column 1, row 2.
* @param {Number} [column2Row2=0.0] The value for column 2, row 2.
* @param {Number} [column3Row2=0.0] The value for column 3, row 2.
* @param {Number} [column0Row3=0.0] The value for column 0, row 3.
* @param {Number} [column1Row3=0.0] The value for column 1, row 3.
* @param {Number} [column2Row3=0.0] The value for column 2, row 3.
* @param {Number} [column3Row3=0.0] The value for column 3, row 3.
*
* @see Matrix4.fromColumnMajorArray
* @see Matrix4.fromRowMajorArray
* @see Matrix4.fromRotationTranslation
* @see Matrix4.fromTranslationRotationScale
* @see Matrix4.fromTranslationQuaternionRotationScale
* @see Matrix4.fromTranslation
* @see Matrix4.fromScale
* @see Matrix4.fromUniformScale
* @see Matrix4.fromCamera
* @see Matrix4.computePerspectiveFieldOfView
* @see Matrix4.computeOrthographicOffCenter
* @see Matrix4.computePerspectiveOffCenter
* @see Matrix4.computeInfinitePerspectiveOffCenter
* @see Matrix4.computeViewportTransformation
* @see Matrix4.computeView
* @see Matrix2
* @see Matrix3
* @see Packable
*/
function Matrix4(column0Row0, column1Row0, column2Row0, column3Row0,
column0Row1, column1Row1, column2Row1, column3Row1,
column0Row2, column1Row2, column2Row2, column3Row2,
column0Row3, column1Row3, column2Row3, column3Row3) {
this[0] = defaultValue(column0Row0, 0.0);
this[1] = defaultValue(column0Row1, 0.0);
this[2] = defaultValue(column0Row2, 0.0);
this[3] = defaultValue(column0Row3, 0.0);
this[4] = defaultValue(column1Row0, 0.0);
this[5] = defaultValue(column1Row1, 0.0);
this[6] = defaultValue(column1Row2, 0.0);
this[7] = defaultValue(column1Row3, 0.0);
this[8] = defaultValue(column2Row0, 0.0);
this[9] = defaultValue(column2Row1, 0.0);
this[10] = defaultValue(column2Row2, 0.0);
this[11] = defaultValue(column2Row3, 0.0);
this[12] = defaultValue(column3Row0, 0.0);
this[13] = defaultValue(column3Row1, 0.0);
this[14] = defaultValue(column3Row2, 0.0);
this[15] = defaultValue(column3Row3, 0.0);
}
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
Matrix4.packedLength = 16;
/**
* Stores the provided instance into the provided array.
*
* @param {Matrix4} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
Matrix4.pack = function(value, array, startingIndex) {
Check.typeOf.object('value', value);
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
array[startingIndex++] = value[0];
array[startingIndex++] = value[1];
array[startingIndex++] = value[2];
array[startingIndex++] = value[3];
array[startingIndex++] = value[4];
array[startingIndex++] = value[5];
array[startingIndex++] = value[6];
array[startingIndex++] = value[7];
array[startingIndex++] = value[8];
array[startingIndex++] = value[9];
array[startingIndex++] = value[10];
array[startingIndex++] = value[11];
array[startingIndex++] = value[12];
array[startingIndex++] = value[13];
array[startingIndex++] = value[14];
array[startingIndex] = value[15];
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Matrix4} [result] The object into which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*/
Matrix4.unpack = function(array, startingIndex, result) {
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new Matrix4();
}
result[0] = array[startingIndex++];
result[1] = array[startingIndex++];
result[2] = array[startingIndex++];
result[3] = array[startingIndex++];
result[4] = array[startingIndex++];
result[5] = array[startingIndex++];
result[6] = array[startingIndex++];
result[7] = array[startingIndex++];
result[8] = array[startingIndex++];
result[9] = array[startingIndex++];
result[10] = array[startingIndex++];
result[11] = array[startingIndex++];
result[12] = array[startingIndex++];
result[13] = array[startingIndex++];
result[14] = array[startingIndex++];
result[15] = array[startingIndex];
return result;
};
/**
* Duplicates a Matrix4 instance.
*
* @param {Matrix4} matrix The matrix to duplicate.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided. (Returns undefined if matrix is undefined)
*/
Matrix4.clone = function(matrix, result) {
if (!defined(matrix)) {
return undefined;
}
if (!defined(result)) {
return new Matrix4(matrix[0], matrix[4], matrix[8], matrix[12],
matrix[1], matrix[5], matrix[9], matrix[13],
matrix[2], matrix[6], matrix[10], matrix[14],
matrix[3], matrix[7], matrix[11], matrix[15]);
}
result[0] = matrix[0];
result[1] = matrix[1];
result[2] = matrix[2];
result[3] = matrix[3];
result[4] = matrix[4];
result[5] = matrix[5];
result[6] = matrix[6];
result[7] = matrix[7];
result[8] = matrix[8];
result[9] = matrix[9];
result[10] = matrix[10];
result[11] = matrix[11];
result[12] = matrix[12];
result[13] = matrix[13];
result[14] = matrix[14];
result[15] = matrix[15];
return result;
};
/**
* Creates a Matrix4 from 16 consecutive elements in an array.
* @function
*
* @param {Number[]} array The array whose 16 consecutive elements correspond to the positions of the matrix. Assumes column-major order.
* @param {Number} [startingIndex=0] The offset into the array of the first element, which corresponds to first column first row position in the matrix.
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*
* @example
* // Create the Matrix4:
* // [1.0, 2.0, 3.0, 4.0]
* // [1.0, 2.0, 3.0, 4.0]
* // [1.0, 2.0, 3.0, 4.0]
* // [1.0, 2.0, 3.0, 4.0]
*
* var v = [1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];
* var m = Cesium.Matrix4.fromArray(v);
*
* // Create same Matrix4 with using an offset into an array
* var v2 = [0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 3.0, 3.0, 3.0, 3.0, 4.0, 4.0, 4.0, 4.0];
* var m2 = Cesium.Matrix4.fromArray(v2, 2);
*/
Matrix4.fromArray = Matrix4.unpack;
/**
* Computes a Matrix4 instance from a column-major order array.
*
* @param {Number[]} values The column-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
Matrix4.fromColumnMajorArray = function(values, result) {
Check.defined('values', values);
return Matrix4.clone(values, result);
};
/**
* Computes a Matrix4 instance from a row-major order array.
* The resulting matrix will be in column-major order.
*
* @param {Number[]} values The row-major order array.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
Matrix4.fromRowMajorArray = function(values, result) {
Check.defined('values', values);
if (!defined(result)) {
return new Matrix4(values[0], values[1], values[2], values[3],
values[4], values[5], values[6], values[7],
values[8], values[9], values[10], values[11],
values[12], values[13], values[14], values[15]);
}
result[0] = values[0];
result[1] = values[4];
result[2] = values[8];
result[3] = values[12];
result[4] = values[1];
result[5] = values[5];
result[6] = values[9];
result[7] = values[13];
result[8] = values[2];
result[9] = values[6];
result[10] = values[10];
result[11] = values[14];
result[12] = values[3];
result[13] = values[7];
result[14] = values[11];
result[15] = values[15];
return result;
};
/**
* Computes a Matrix4 instance from a Matrix3 representing the rotation
* and a Cartesian3 representing the translation.
*
* @param {Matrix3} rotation The upper left portion of the matrix representing the rotation.
* @param {Cartesian3} [translation=Cartesian3.ZERO] The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
Matrix4.fromRotationTranslation = function(rotation, translation, result) {
Check.typeOf.object('rotation', rotation);
translation = defaultValue(translation, Cartesian3.ZERO);
if (!defined(result)) {
return new Matrix4(rotation[0], rotation[3], rotation[6], translation.x,
rotation[1], rotation[4], rotation[7], translation.y,
rotation[2], rotation[5], rotation[8], translation.z,
0.0, 0.0, 0.0, 1.0);
}
result[0] = rotation[0];
result[1] = rotation[1];
result[2] = rotation[2];
result[3] = 0.0;
result[4] = rotation[3];
result[5] = rotation[4];
result[6] = rotation[5];
result[7] = 0.0;
result[8] = rotation[6];
result[9] = rotation[7];
result[10] = rotation[8];
result[11] = 0.0;
result[12] = translation.x;
result[13] = translation.y;
result[14] = translation.z;
result[15] = 1.0;
return result;
};
/**
* Computes a Matrix4 instance from a translation, rotation, and scale (TRS)
* representation with the rotation represented as a quaternion.
*
* @param {Cartesian3} translation The translation transformation.
* @param {Quaternion} rotation The rotation transformation.
* @param {Cartesian3} scale The non-uniform scale transformation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*
* @example
* var result = Cesium.Matrix4.fromTranslationQuaternionRotationScale(
* new Cesium.Cartesian3(1.0, 2.0, 3.0), // translation
* Cesium.Quaternion.IDENTITY, // rotation
* new Cesium.Cartesian3(7.0, 8.0, 9.0), // scale
* result);
*/
Matrix4.fromTranslationQuaternionRotationScale = function(translation, rotation, scale, result) {
Check.typeOf.object('translation', translation);
Check.typeOf.object('rotation', rotation);
Check.typeOf.object('scale', scale);
if (!defined(result)) {
result = new Matrix4();
}
var scaleX = scale.x;
var scaleY = scale.y;
var scaleZ = scale.z;
var x2 = rotation.x * rotation.x;
var xy = rotation.x * rotation.y;
var xz = rotation.x * rotation.z;
var xw = rotation.x * rotation.w;
var y2 = rotation.y * rotation.y;
var yz = rotation.y * rotation.z;
var yw = rotation.y * rotation.w;
var z2 = rotation.z * rotation.z;
var zw = rotation.z * rotation.w;
var w2 = rotation.w * rotation.w;
var m00 = x2 - y2 - z2 + w2;
var m01 = 2.0 * (xy - zw);
var m02 = 2.0 * (xz + yw);
var m10 = 2.0 * (xy + zw);
var m11 = -x2 + y2 - z2 + w2;
var m12 = 2.0 * (yz - xw);
var m20 = 2.0 * (xz - yw);
var m21 = 2.0 * (yz + xw);
var m22 = -x2 - y2 + z2 + w2;
result[0] = m00 * scaleX;
result[1] = m10 * scaleX;
result[2] = m20 * scaleX;
result[3] = 0.0;
result[4] = m01 * scaleY;
result[5] = m11 * scaleY;
result[6] = m21 * scaleY;
result[7] = 0.0;
result[8] = m02 * scaleZ;
result[9] = m12 * scaleZ;
result[10] = m22 * scaleZ;
result[11] = 0.0;
result[12] = translation.x;
result[13] = translation.y;
result[14] = translation.z;
result[15] = 1.0;
return result;
};
/**
* Creates a Matrix4 instance from a {@link TranslationRotationScale} instance.
*
* @param {TranslationRotationScale} translationRotationScale The instance.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
Matrix4.fromTranslationRotationScale = function(translationRotationScale, result) {
Check.typeOf.object('translationRotationScale', translationRotationScale);
return Matrix4.fromTranslationQuaternionRotationScale(translationRotationScale.translation, translationRotationScale.rotation, translationRotationScale.scale, result);
};
/**
* Creates a Matrix4 instance from a Cartesian3 representing the translation.
*
* @param {Cartesian3} translation The upper right portion of the matrix representing the translation.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*
* @see Matrix4.multiplyByTranslation
*/
Matrix4.fromTranslation = function(translation, result) {
Check.typeOf.object('translation', translation);
return Matrix4.fromRotationTranslation(Matrix3.IDENTITY, translation, result);
};
/**
* Computes a Matrix4 instance representing a non-uniform scale.
*
* @param {Cartesian3} scale The x, y, and z scale factors.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*
* @example
* // Creates
* // [7.0, 0.0, 0.0, 0.0]
* // [0.0, 8.0, 0.0, 0.0]
* // [0.0, 0.0, 9.0, 0.0]
* // [0.0, 0.0, 0.0, 1.0]
* var m = Cesium.Matrix4.fromScale(new Cesium.Cartesian3(7.0, 8.0, 9.0));
*/
Matrix4.fromScale = function(scale, result) {
Check.typeOf.object('scale', scale);
if (!defined(result)) {
return new Matrix4(
scale.x, 0.0, 0.0, 0.0,
0.0, scale.y, 0.0, 0.0,
0.0, 0.0, scale.z, 0.0,
0.0, 0.0, 0.0, 1.0);
}
result[0] = scale.x;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = scale.y;
result[6] = 0.0;
result[7] = 0.0;
result[8] = 0.0;
result[9] = 0.0;
result[10] = scale.z;
result[11] = 0.0;
result[12] = 0.0;
result[13] = 0.0;
result[14] = 0.0;
result[15] = 1.0;
return result;
};
/**
* Computes a Matrix4 instance representing a uniform scale.
*
* @param {Number} scale The uniform scale factor.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*
* @example
* // Creates
* // [2.0, 0.0, 0.0, 0.0]
* // [0.0, 2.0, 0.0, 0.0]
* // [0.0, 0.0, 2.0, 0.0]
* // [0.0, 0.0, 0.0, 1.0]
* var m = Cesium.Matrix4.fromUniformScale(2.0);
*/
Matrix4.fromUniformScale = function(scale, result) {
Check.typeOf.number('scale', scale);
if (!defined(result)) {
return new Matrix4(scale, 0.0, 0.0, 0.0,
0.0, scale, 0.0, 0.0,
0.0, 0.0, scale, 0.0,
0.0, 0.0, 0.0, 1.0);
}
result[0] = scale;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = scale;
result[6] = 0.0;
result[7] = 0.0;
result[8] = 0.0;
result[9] = 0.0;
result[10] = scale;
result[11] = 0.0;
result[12] = 0.0;
result[13] = 0.0;
result[14] = 0.0;
result[15] = 1.0;
return result;
};
var fromCameraF = new Cartesian3();
var fromCameraR = new Cartesian3();
var fromCameraU = new Cartesian3();
/**
* Computes a Matrix4 instance from a Camera.
*
* @param {Camera} camera The camera to use.
* @param {Matrix4} [result] The object in which the result will be stored, if undefined a new instance will be created.
* @returns {Matrix4} The modified result parameter, or a new Matrix4 instance if one was not provided.
*/
Matrix4.fromCamera = function(camera, result) {
Check.typeOf.object('camera', camera);
var position = camera.position;
var direction = camera.direction;
var up = camera.up;
Check.typeOf.object('camera.position', position);
Check.typeOf.object('camera.direction', direction);
Check.typeOf.object('camera.up', up);
Cartesian3.normalize(direction, fromCameraF);
Cartesian3.normalize(Cartesian3.cross(fromCameraF, up, fromCameraR), fromCameraR);
Cartesian3.normalize(Cartesian3.cross(fromCameraR, fromCameraF, fromCameraU), fromCameraU);
var sX = fromCameraR.x;
var sY = fromCameraR.y;
var sZ = fromCameraR.z;
var fX = fromCameraF.x;
var fY = fromCameraF.y;
var fZ = fromCameraF.z;
var uX = fromCameraU.x;
var uY = fromCameraU.y;
var uZ = fromCameraU.z;
var positionX = position.x;
var positionY = position.y;
var positionZ = position.z;
var t0 = sX * -positionX + sY * -positionY+ sZ * -positionZ;
var t1 = uX * -positionX + uY * -positionY+ uZ * -positionZ;
var t2 = fX * positionX + fY * positionY + fZ * positionZ;
// The code below this comment is an optimized
// version of the commented lines.
// Rather that create two matrices and then multiply,
// we just bake in the multiplcation as part of creation.
// var rotation = new Matrix4(
// sX, sY, sZ, 0.0,
// uX, uY, uZ, 0.0,
// -fX, -fY, -fZ, 0.0,
// 0.0, 0.0, 0.0, 1.0);
// var translation = new Matrix4(
// 1.0, 0.0, 0.0, -position.x,
// 0.0, 1.0, 0.0, -position.y,
// 0.0, 0.0, 1.0, -position.z,
// 0.0, 0.0, 0.0, 1.0);
// return rotation.multiply(translation);
if (!defined(result)) {
return new Matrix4(
sX, sY, sZ, t0,
uX, uY, uZ, t1,
-fX, -fY, -fZ, t2,
0.0, 0.0, 0.0, 1.0);
}
result[0] = sX;
result[1] = uX;
result[2] = -fX;
result[3] = 0.0;
result[4] = sY;
result[5] = uY;
result[6] = -fY;
result[7] = 0.0;
result[8] = sZ;
result[9] = uZ;
result[10] = -fZ;
result[11] = 0.0;
result[12] = t0;
result[13] = t1;
result[14] = t2;
result[15] = 1.0;
return result;
};
/**
* Computes a Matrix4 instance representing a perspective transformation matrix.
*
* @param {Number} fovY The field of view along the Y axis in radians.
* @param {Number} aspectRatio The aspect ratio.
* @param {Number} near The distance to the near plane in meters.
* @param {Number} far The distance to the far plane in meters.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
*
* @exception {DeveloperError} fovY must be in (0, PI].
* @exception {DeveloperError} aspectRatio must be greater than zero.
* @exception {DeveloperError} near must be greater than zero.
* @exception {DeveloperError} far must be greater than zero.
*/
Matrix4.computePerspectiveFieldOfView = function(fovY, aspectRatio, near, far, result) {
Check.typeOf.number.greaterThan('fovY', fovY, 0.0);
Check.typeOf.number.lessThan('fovY', fovY, Math.PI);
Check.typeOf.number.greaterThan('near', near, 0.0);
Check.typeOf.number.greaterThan('far', far, 0.0);
Check.typeOf.object('result', result);
var bottom = Math.tan(fovY * 0.5);
var column1Row1 = 1.0 / bottom;
var column0Row0 = column1Row1 / aspectRatio;
var column2Row2 = (far + near) / (near - far);
var column3Row2 = (2.0 * far * near) / (near - far);
result[0] = column0Row0;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = column1Row1;
result[6] = 0.0;
result[7] = 0.0;
result[8] = 0.0;
result[9] = 0.0;
result[10] = column2Row2;
result[11] = -1.0;
result[12] = 0.0;
result[13] = 0.0;
result[14] = column3Row2;
result[15] = 0.0;
return result;
};
/**
* Computes a Matrix4 instance representing an orthographic transformation matrix.
*
* @param {Number} left The number of meters to the left of the camera that will be in view.
* @param {Number} right The number of meters to the right of the camera that will be in view.
* @param {Number} bottom The number of meters below of the camera that will be in view.
* @param {Number} top The number of meters above of the camera that will be in view.
* @param {Number} near The distance to the near plane in meters.
* @param {Number} far The distance to the far plane in meters.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.computeOrthographicOffCenter = function(left, right, bottom, top, near, far, result) {
Check.typeOf.number('left', left);
Check.typeOf.number('right', right);
Check.typeOf.number('bottom', bottom);
Check.typeOf.number('top', top);
Check.typeOf.number('near', near);
Check.typeOf.number('far', far);
Check.typeOf.object('result', result);
var a = 1.0 / (right - left);
var b = 1.0 / (top - bottom);
var c = 1.0 / (far - near);
var tx = -(right + left) * a;
var ty = -(top + bottom) * b;
var tz = -(far + near) * c;
a *= 2.0;
b *= 2.0;
c *= -2.0;
result[0] = a;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = b;
result[6] = 0.0;
result[7] = 0.0;
result[8] = 0.0;
result[9] = 0.0;
result[10] = c;
result[11] = 0.0;
result[12] = tx;
result[13] = ty;
result[14] = tz;
result[15] = 1.0;
return result;
};
/**
* Computes a Matrix4 instance representing an off center perspective transformation.
*
* @param {Number} left The number of meters to the left of the camera that will be in view.
* @param {Number} right The number of meters to the right of the camera that will be in view.
* @param {Number} bottom The number of meters below of the camera that will be in view.
* @param {Number} top The number of meters above of the camera that will be in view.
* @param {Number} near The distance to the near plane in meters.
* @param {Number} far The distance to the far plane in meters.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.computePerspectiveOffCenter = function(left, right, bottom, top, near, far, result) {
Check.typeOf.number('left', left);
Check.typeOf.number('right', right);
Check.typeOf.number('bottom', bottom);
Check.typeOf.number('top', top);
Check.typeOf.number('near', near);
Check.typeOf.number('far', far);
Check.typeOf.object('result', result);
var column0Row0 = 2.0 * near / (right - left);
var column1Row1 = 2.0 * near / (top - bottom);
var column2Row0 = (right + left) / (right - left);
var column2Row1 = (top + bottom) / (top - bottom);
var column2Row2 = -(far + near) / (far - near);
var column2Row3 = -1.0;
var column3Row2 = -2.0 * far * near / (far - near);
result[0] = column0Row0;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = column1Row1;
result[6] = 0.0;
result[7] = 0.0;
result[8] = column2Row0;
result[9] = column2Row1;
result[10] = column2Row2;
result[11] = column2Row3;
result[12] = 0.0;
result[13] = 0.0;
result[14] = column3Row2;
result[15] = 0.0;
return result;
};
/**
* Computes a Matrix4 instance representing an infinite off center perspective transformation.
*
* @param {Number} left The number of meters to the left of the camera that will be in view.
* @param {Number} right The number of meters to the right of the camera that will be in view.
* @param {Number} bottom The number of meters below of the camera that will be in view.
* @param {Number} top The number of meters above of the camera that will be in view.
* @param {Number} near The distance to the near plane in meters.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.computeInfinitePerspectiveOffCenter = function(left, right, bottom, top, near, result) {
Check.typeOf.number('left', left);
Check.typeOf.number('right', right);
Check.typeOf.number('bottom', bottom);
Check.typeOf.number('top', top);
Check.typeOf.number('near', near);
Check.typeOf.object('result', result);
var column0Row0 = 2.0 * near / (right - left);
var column1Row1 = 2.0 * near / (top - bottom);
var column2Row0 = (right + left) / (right - left);
var column2Row1 = (top + bottom) / (top - bottom);
var column2Row2 = -1.0;
var column2Row3 = -1.0;
var column3Row2 = -2.0 * near;
result[0] = column0Row0;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = column1Row1;
result[6] = 0.0;
result[7] = 0.0;
result[8] = column2Row0;
result[9] = column2Row1;
result[10] = column2Row2;
result[11] = column2Row3;
result[12] = 0.0;
result[13] = 0.0;
result[14] = column3Row2;
result[15] = 0.0;
return result;
};
/**
* Computes a Matrix4 instance that transforms from normalized device coordinates to window coordinates.
*
* @param {Object}[viewport = { x : 0.0, y : 0.0, width : 0.0, height : 0.0 }] The viewport's corners as shown in Example 1.
* @param {Number}[nearDepthRange=0.0] The near plane distance in window coordinates.
* @param {Number}[farDepthRange=1.0] The far plane distance in window coordinates.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
*
* @example
* // Create viewport transformation using an explicit viewport and depth range.
* var m = Cesium.Matrix4.computeViewportTransformation({
* x : 0.0,
* y : 0.0,
* width : 1024.0,
* height : 768.0
* }, 0.0, 1.0, new Cesium.Matrix4());
*/
Matrix4.computeViewportTransformation = function(viewport, nearDepthRange, farDepthRange, result) {
Check.typeOf.object('result', result);
viewport = defaultValue(viewport, defaultValue.EMPTY_OBJECT);
var x = defaultValue(viewport.x, 0.0);
var y = defaultValue(viewport.y, 0.0);
var width = defaultValue(viewport.width, 0.0);
var height = defaultValue(viewport.height, 0.0);
nearDepthRange = defaultValue(nearDepthRange, 0.0);
farDepthRange = defaultValue(farDepthRange, 1.0);
var halfWidth = width * 0.5;
var halfHeight = height * 0.5;
var halfDepth = (farDepthRange - nearDepthRange) * 0.5;
var column0Row0 = halfWidth;
var column1Row1 = halfHeight;
var column2Row2 = halfDepth;
var column3Row0 = x + halfWidth;
var column3Row1 = y + halfHeight;
var column3Row2 = nearDepthRange + halfDepth;
var column3Row3 = 1.0;
result[0] = column0Row0;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = column1Row1;
result[6] = 0.0;
result[7] = 0.0;
result[8] = 0.0;
result[9] = 0.0;
result[10] = column2Row2;
result[11] = 0.0;
result[12] = column3Row0;
result[13] = column3Row1;
result[14] = column3Row2;
result[15] = column3Row3;
return result;
};
/**
* Computes a Matrix4 instance that transforms from world space to view space.
*
* @param {Cartesian3} position The position of the camera.
* @param {Cartesian3} direction The forward direction.
* @param {Cartesian3} up The up direction.
* @param {Cartesian3} right The right direction.
* @param {Matrix4} result The object in which the result will be stored.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.computeView = function(position, direction, up, right, result) {
Check.typeOf.object('position', position);
Check.typeOf.object('direction', direction);
Check.typeOf.object('up', up);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result[0] = right.x;
result[1] = up.x;
result[2] = -direction.x;
result[3] = 0.0;
result[4] = right.y;
result[5] = up.y;
result[6] = -direction.y;
result[7] = 0.0;
result[8] = right.z;
result[9] = up.z;
result[10] = -direction.z;
result[11] = 0.0;
result[12] = -Cartesian3.dot(right, position);
result[13] = -Cartesian3.dot(up, position);
result[14] = Cartesian3.dot(direction, position);
result[15] = 1.0;
return result;
};
/**
* Computes an Array from the provided Matrix4 instance.
* The array will be in column-major order.
*
* @param {Matrix4} matrix The matrix to use..
* @param {Number[]} [result] The Array onto which to store the result.
* @returns {Number[]} The modified Array parameter or a new Array instance if one was not provided.
*
* @example
* //create an array from an instance of Matrix4
* // m = [10.0, 14.0, 18.0, 22.0]
* // [11.0, 15.0, 19.0, 23.0]
* // [12.0, 16.0, 20.0, 24.0]
* // [13.0, 17.0, 21.0, 25.0]
* var a = Cesium.Matrix4.toArray(m);
*
* // m remains the same
* //creates a = [10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0]
*/
Matrix4.toArray = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
if (!defined(result)) {
return [matrix[0], matrix[1], matrix[2], matrix[3],
matrix[4], matrix[5], matrix[6], matrix[7],
matrix[8], matrix[9], matrix[10], matrix[11],
matrix[12], matrix[13], matrix[14], matrix[15]];
}
result[0] = matrix[0];
result[1] = matrix[1];
result[2] = matrix[2];
result[3] = matrix[3];
result[4] = matrix[4];
result[5] = matrix[5];
result[6] = matrix[6];
result[7] = matrix[7];
result[8] = matrix[8];
result[9] = matrix[9];
result[10] = matrix[10];
result[11] = matrix[11];
result[12] = matrix[12];
result[13] = matrix[13];
result[14] = matrix[14];
result[15] = matrix[15];
return result;
};
/**
* Computes the array index of the element at the provided row and column.
*
* @param {Number} row The zero-based index of the row.
* @param {Number} column The zero-based index of the column.
* @returns {Number} The index of the element at the provided row and column.
*
* @exception {DeveloperError} row must be 0, 1, 2, or 3.
* @exception {DeveloperError} column must be 0, 1, 2, or 3.
*
* @example
* var myMatrix = new Cesium.Matrix4();
* var column1Row0Index = Cesium.Matrix4.getElementIndex(1, 0);
* var column1Row0 = myMatrix[column1Row0Index];
* myMatrix[column1Row0Index] = 10.0;
*/
Matrix4.getElementIndex = function(column, row) {
Check.typeOf.number.greaterThanOrEquals('row', row, 0);
Check.typeOf.number.lessThanOrEquals('row', row, 3);
Check.typeOf.number.greaterThanOrEquals('column', column, 0);
Check.typeOf.number.lessThanOrEquals('column', column, 3);
return column * 4 + row;
};
/**
* Retrieves a copy of the matrix column at the provided index as a Cartesian4 instance.
*
* @param {Matrix4} matrix The matrix to use.
* @param {Number} index The zero-based index of the column to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, 2, or 3.
*
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [18.0, 19.0, 20.0, 21.0]
* // [22.0, 23.0, 24.0, 25.0]
*
* //Example 1: Creates an instance of Cartesian
* var a = Cesium.Matrix4.getColumn(m, 2, new Cesium.Cartesian4());
*
* @example
* //Example 2: Sets values for Cartesian instance
* var a = new Cesium.Cartesian4();
* Cesium.Matrix4.getColumn(m, 2, a);
*
* // a.x = 12.0; a.y = 16.0; a.z = 20.0; a.w = 24.0;
*/
Matrix4.getColumn = function(matrix, index, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 3);
Check.typeOf.object('result', result);
var startIndex = index * 4;
var x = matrix[startIndex];
var y = matrix[startIndex + 1];
var z = matrix[startIndex + 2];
var w = matrix[startIndex + 3];
result.x = x;
result.y = y;
result.z = z;
result.w = w;
return result;
};
/**
* Computes a new matrix that replaces the specified column in the provided matrix with the provided Cartesian4 instance.
*
* @param {Matrix4} matrix The matrix to use.
* @param {Number} index The zero-based index of the column to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified column.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, 2, or 3.
*
* @example
* //creates a new Matrix4 instance with new column values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [18.0, 19.0, 20.0, 21.0]
* // [22.0, 23.0, 24.0, 25.0]
*
* var a = Cesium.Matrix4.setColumn(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());
*
* // m remains the same
* // a = [10.0, 11.0, 99.0, 13.0]
* // [14.0, 15.0, 98.0, 17.0]
* // [18.0, 19.0, 97.0, 21.0]
* // [22.0, 23.0, 96.0, 25.0]
*/
Matrix4.setColumn = function(matrix, index, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 3);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result = Matrix4.clone(matrix, result);
var startIndex = index * 4;
result[startIndex] = cartesian.x;
result[startIndex + 1] = cartesian.y;
result[startIndex + 2] = cartesian.z;
result[startIndex + 3] = cartesian.w;
return result;
};
/**
* Computes a new matrix that replaces the translation in the rightmost column of the provided
* matrix with the provided translation. This assumes the matrix is an affine transformation
*
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} translation The translation that replaces the translation of the provided matrix.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.setTranslation = function(matrix, translation, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('translation', translation);
Check.typeOf.object('result', result);
result[0] = matrix[0];
result[1] = matrix[1];
result[2] = matrix[2];
result[3] = matrix[3];
result[4] = matrix[4];
result[5] = matrix[5];
result[6] = matrix[6];
result[7] = matrix[7];
result[8] = matrix[8];
result[9] = matrix[9];
result[10] = matrix[10];
result[11] = matrix[11];
result[12] = translation.x;
result[13] = translation.y;
result[14] = translation.z;
result[15] = matrix[15];
return result;
};
/**
* Retrieves a copy of the matrix row at the provided index as a Cartesian4 instance.
*
* @param {Matrix4} matrix The matrix to use.
* @param {Number} index The zero-based index of the row to retrieve.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, 2, or 3.
*
* @example
* //returns a Cartesian4 instance with values from the specified column
* // m = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [18.0, 19.0, 20.0, 21.0]
* // [22.0, 23.0, 24.0, 25.0]
*
* //Example 1: Returns an instance of Cartesian
* var a = Cesium.Matrix4.getRow(m, 2, new Cesium.Cartesian4());
*
* @example
* //Example 2: Sets values for a Cartesian instance
* var a = new Cesium.Cartesian4();
* Cesium.Matrix4.getRow(m, 2, a);
*
* // a.x = 18.0; a.y = 19.0; a.z = 20.0; a.w = 21.0;
*/
Matrix4.getRow = function(matrix, index, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 3);
Check.typeOf.object('result', result);
var x = matrix[index];
var y = matrix[index + 4];
var z = matrix[index + 8];
var w = matrix[index + 12];
result.x = x;
result.y = y;
result.z = z;
result.w = w;
return result;
};
/**
* Computes a new matrix that replaces the specified row in the provided matrix with the provided Cartesian4 instance.
*
* @param {Matrix4} matrix The matrix to use.
* @param {Number} index The zero-based index of the row to set.
* @param {Cartesian4} cartesian The Cartesian whose values will be assigned to the specified row.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @exception {DeveloperError} index must be 0, 1, 2, or 3.
*
* @example
* //create a new Matrix4 instance with new row values from the Cartesian4 instance
* // m = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [18.0, 19.0, 20.0, 21.0]
* // [22.0, 23.0, 24.0, 25.0]
*
* var a = Cesium.Matrix4.setRow(m, 2, new Cesium.Cartesian4(99.0, 98.0, 97.0, 96.0), new Cesium.Matrix4());
*
* // m remains the same
* // a = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [99.0, 98.0, 97.0, 96.0]
* // [22.0, 23.0, 24.0, 25.0]
*/
Matrix4.setRow = function(matrix, index, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number.greaterThanOrEquals('index', index, 0);
Check.typeOf.number.lessThanOrEquals('index', index, 3);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
result = Matrix4.clone(matrix, result);
result[index] = cartesian.x;
result[index + 4] = cartesian.y;
result[index + 8] = cartesian.z;
result[index + 12] = cartesian.w;
return result;
};
var scratchColumn = new Cartesian3();
/**
* Extracts the non-uniform scale assuming the matrix is an affine transformation.
*
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter
*/
Matrix4.getScale = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result.x = Cartesian3.magnitude(Cartesian3.fromElements(matrix[0], matrix[1], matrix[2], scratchColumn));
result.y = Cartesian3.magnitude(Cartesian3.fromElements(matrix[4], matrix[5], matrix[6], scratchColumn));
result.z = Cartesian3.magnitude(Cartesian3.fromElements(matrix[8], matrix[9], matrix[10], scratchColumn));
return result;
};
var scratchScale = new Cartesian3();
/**
* Computes the maximum scale assuming the matrix is an affine transformation.
* The maximum scale is the maximum length of the column vectors in the upper-left
* 3x3 matrix.
*
* @param {Matrix4} matrix The matrix.
* @returns {Number} The maximum scale.
*/
Matrix4.getMaximumScale = function(matrix) {
Matrix4.getScale(matrix, scratchScale);
return Cartesian3.maximumComponent(scratchScale);
};
/**
* Computes the product of two matrices.
*
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.multiply = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
var left0 = left[0];
var left1 = left[1];
var left2 = left[2];
var left3 = left[3];
var left4 = left[4];
var left5 = left[5];
var left6 = left[6];
var left7 = left[7];
var left8 = left[8];
var left9 = left[9];
var left10 = left[10];
var left11 = left[11];
var left12 = left[12];
var left13 = left[13];
var left14 = left[14];
var left15 = left[15];
var right0 = right[0];
var right1 = right[1];
var right2 = right[2];
var right3 = right[3];
var right4 = right[4];
var right5 = right[5];
var right6 = right[6];
var right7 = right[7];
var right8 = right[8];
var right9 = right[9];
var right10 = right[10];
var right11 = right[11];
var right12 = right[12];
var right13 = right[13];
var right14 = right[14];
var right15 = right[15];
var column0Row0 = left0 * right0 + left4 * right1 + left8 * right2 + left12 * right3;
var column0Row1 = left1 * right0 + left5 * right1 + left9 * right2 + left13 * right3;
var column0Row2 = left2 * right0 + left6 * right1 + left10 * right2 + left14 * right3;
var column0Row3 = left3 * right0 + left7 * right1 + left11 * right2 + left15 * right3;
var column1Row0 = left0 * right4 + left4 * right5 + left8 * right6 + left12 * right7;
var column1Row1 = left1 * right4 + left5 * right5 + left9 * right6 + left13 * right7;
var column1Row2 = left2 * right4 + left6 * right5 + left10 * right6 + left14 * right7;
var column1Row3 = left3 * right4 + left7 * right5 + left11 * right6 + left15 * right7;
var column2Row0 = left0 * right8 + left4 * right9 + left8 * right10 + left12 * right11;
var column2Row1 = left1 * right8 + left5 * right9 + left9 * right10 + left13 * right11;
var column2Row2 = left2 * right8 + left6 * right9 + left10 * right10 + left14 * right11;
var column2Row3 = left3 * right8 + left7 * right9 + left11 * right10 + left15 * right11;
var column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12 * right15;
var column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13 * right15;
var column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14 * right15;
var column3Row3 = left3 * right12 + left7 * right13 + left11 * right14 + left15 * right15;
result[0] = column0Row0;
result[1] = column0Row1;
result[2] = column0Row2;
result[3] = column0Row3;
result[4] = column1Row0;
result[5] = column1Row1;
result[6] = column1Row2;
result[7] = column1Row3;
result[8] = column2Row0;
result[9] = column2Row1;
result[10] = column2Row2;
result[11] = column2Row3;
result[12] = column3Row0;
result[13] = column3Row1;
result[14] = column3Row2;
result[15] = column3Row3;
return result;
};
/**
* Computes the sum of two matrices.
*
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.add = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result[0] = left[0] + right[0];
result[1] = left[1] + right[1];
result[2] = left[2] + right[2];
result[3] = left[3] + right[3];
result[4] = left[4] + right[4];
result[5] = left[5] + right[5];
result[6] = left[6] + right[6];
result[7] = left[7] + right[7];
result[8] = left[8] + right[8];
result[9] = left[9] + right[9];
result[10] = left[10] + right[10];
result[11] = left[11] + right[11];
result[12] = left[12] + right[12];
result[13] = left[13] + right[13];
result[14] = left[14] + right[14];
result[15] = left[15] + right[15];
return result;
};
/**
* Computes the difference of two matrices.
*
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.subtract = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
result[0] = left[0] - right[0];
result[1] = left[1] - right[1];
result[2] = left[2] - right[2];
result[3] = left[3] - right[3];
result[4] = left[4] - right[4];
result[5] = left[5] - right[5];
result[6] = left[6] - right[6];
result[7] = left[7] - right[7];
result[8] = left[8] - right[8];
result[9] = left[9] - right[9];
result[10] = left[10] - right[10];
result[11] = left[11] - right[11];
result[12] = left[12] - right[12];
result[13] = left[13] - right[13];
result[14] = left[14] - right[14];
result[15] = left[15] - right[15];
return result;
};
/**
* Computes the product of two matrices assuming the matrices are
* affine transformation matrices, where the upper left 3x3 elements
* are a rotation matrix, and the upper three elements in the fourth
* column are the translation. The bottom row is assumed to be [0, 0, 0, 1].
* The matrix is not verified to be in the proper form.
* This method is faster than computing the product for general 4x4
* matrices using {@link Matrix4.multiply}.
*
* @param {Matrix4} left The first matrix.
* @param {Matrix4} right The second matrix.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @example
* var m1 = new Cesium.Matrix4(1.0, 6.0, 7.0, 0.0, 2.0, 5.0, 8.0, 0.0, 3.0, 4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 1.0);
* var m2 = Cesium.Transforms.eastNorthUpToFixedFrame(new Cesium.Cartesian3(1.0, 1.0, 1.0));
* var m3 = Cesium.Matrix4.multiplyTransformation(m1, m2, new Cesium.Matrix4());
*/
Matrix4.multiplyTransformation = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
Check.typeOf.object('result', result);
var left0 = left[0];
var left1 = left[1];
var left2 = left[2];
var left4 = left[4];
var left5 = left[5];
var left6 = left[6];
var left8 = left[8];
var left9 = left[9];
var left10 = left[10];
var left12 = left[12];
var left13 = left[13];
var left14 = left[14];
var right0 = right[0];
var right1 = right[1];
var right2 = right[2];
var right4 = right[4];
var right5 = right[5];
var right6 = right[6];
var right8 = right[8];
var right9 = right[9];
var right10 = right[10];
var right12 = right[12];
var right13 = right[13];
var right14 = right[14];
var column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;
var column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;
var column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;
var column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;
var column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;
var column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;
var column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;
var column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;
var column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;
var column3Row0 = left0 * right12 + left4 * right13 + left8 * right14 + left12;
var column3Row1 = left1 * right12 + left5 * right13 + left9 * right14 + left13;
var column3Row2 = left2 * right12 + left6 * right13 + left10 * right14 + left14;
result[0] = column0Row0;
result[1] = column0Row1;
result[2] = column0Row2;
result[3] = 0.0;
result[4] = column1Row0;
result[5] = column1Row1;
result[6] = column1Row2;
result[7] = 0.0;
result[8] = column2Row0;
result[9] = column2Row1;
result[10] = column2Row2;
result[11] = 0.0;
result[12] = column3Row0;
result[13] = column3Row1;
result[14] = column3Row2;
result[15] = 1.0;
return result;
};
/**
* Multiplies a transformation matrix (with a bottom row of <code>[0.0, 0.0, 0.0, 1.0]</code>)
* by a 3x3 rotation matrix. This is an optimization
* for <code>Matrix4.multiply(m, Matrix4.fromRotationTranslation(rotation), m);</code> with less allocations and arithmetic operations.
*
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Matrix3} rotation The 3x3 rotation matrix on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromRotationTranslation(rotation), m);
* Cesium.Matrix4.multiplyByMatrix3(m, rotation, m);
*/
Matrix4.multiplyByMatrix3 = function(matrix, rotation, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('rotation', rotation);
Check.typeOf.object('result', result);
var left0 = matrix[0];
var left1 = matrix[1];
var left2 = matrix[2];
var left4 = matrix[4];
var left5 = matrix[5];
var left6 = matrix[6];
var left8 = matrix[8];
var left9 = matrix[9];
var left10 = matrix[10];
var right0 = rotation[0];
var right1 = rotation[1];
var right2 = rotation[2];
var right4 = rotation[3];
var right5 = rotation[4];
var right6 = rotation[5];
var right8 = rotation[6];
var right9 = rotation[7];
var right10 = rotation[8];
var column0Row0 = left0 * right0 + left4 * right1 + left8 * right2;
var column0Row1 = left1 * right0 + left5 * right1 + left9 * right2;
var column0Row2 = left2 * right0 + left6 * right1 + left10 * right2;
var column1Row0 = left0 * right4 + left4 * right5 + left8 * right6;
var column1Row1 = left1 * right4 + left5 * right5 + left9 * right6;
var column1Row2 = left2 * right4 + left6 * right5 + left10 * right6;
var column2Row0 = left0 * right8 + left4 * right9 + left8 * right10;
var column2Row1 = left1 * right8 + left5 * right9 + left9 * right10;
var column2Row2 = left2 * right8 + left6 * right9 + left10 * right10;
result[0] = column0Row0;
result[1] = column0Row1;
result[2] = column0Row2;
result[3] = 0.0;
result[4] = column1Row0;
result[5] = column1Row1;
result[6] = column1Row2;
result[7] = 0.0;
result[8] = column2Row0;
result[9] = column2Row1;
result[10] = column2Row2;
result[11] = 0.0;
result[12] = matrix[12];
result[13] = matrix[13];
result[14] = matrix[14];
result[15] = matrix[15];
return result;
};
/**
* Multiplies a transformation matrix (with a bottom row of <code>[0.0, 0.0, 0.0, 1.0]</code>)
* by an implicit translation matrix defined by a {@link Cartesian3}. This is an optimization
* for <code>Matrix4.multiply(m, Matrix4.fromTranslation(position), m);</code> with less allocations and arithmetic operations.
*
* @param {Matrix4} matrix The matrix on the left-hand side.
* @param {Cartesian3} translation The translation on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromTranslation(position), m);
* Cesium.Matrix4.multiplyByTranslation(m, position, m);
*/
Matrix4.multiplyByTranslation = function(matrix, translation, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('translation', translation);
Check.typeOf.object('result', result);
var x = translation.x;
var y = translation.y;
var z = translation.z;
var tx = (x * matrix[0]) + (y * matrix[4]) + (z * matrix[8]) + matrix[12];
var ty = (x * matrix[1]) + (y * matrix[5]) + (z * matrix[9]) + matrix[13];
var tz = (x * matrix[2]) + (y * matrix[6]) + (z * matrix[10]) + matrix[14];
result[0] = matrix[0];
result[1] = matrix[1];
result[2] = matrix[2];
result[3] = matrix[3];
result[4] = matrix[4];
result[5] = matrix[5];
result[6] = matrix[6];
result[7] = matrix[7];
result[8] = matrix[8];
result[9] = matrix[9];
result[10] = matrix[10];
result[11] = matrix[11];
result[12] = tx;
result[13] = ty;
result[14] = tz;
result[15] = matrix[15];
return result;
};
var uniformScaleScratch = new Cartesian3();
/**
* Multiplies an affine transformation matrix (with a bottom row of <code>[0.0, 0.0, 0.0, 1.0]</code>)
* by an implicit uniform scale matrix. This is an optimization
* for <code>Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);</code>, where
* <code>m</code> must be an affine matrix.
* This function performs fewer allocations and arithmetic operations.
*
* @param {Matrix4} matrix The affine matrix on the left-hand side.
* @param {Number} scale The uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
*
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromUniformScale(scale), m);
* Cesium.Matrix4.multiplyByUniformScale(m, scale, m);
*
* @see Matrix4.fromUniformScale
* @see Matrix4.multiplyByScale
*/
Matrix4.multiplyByUniformScale = function(matrix, scale, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number('scale', scale);
Check.typeOf.object('result', result);
uniformScaleScratch.x = scale;
uniformScaleScratch.y = scale;
uniformScaleScratch.z = scale;
return Matrix4.multiplyByScale(matrix, uniformScaleScratch, result);
};
/**
* Multiplies an affine transformation matrix (with a bottom row of <code>[0.0, 0.0, 0.0, 1.0]</code>)
* by an implicit non-uniform scale matrix. This is an optimization
* for <code>Matrix4.multiply(m, Matrix4.fromUniformScale(scale), m);</code>, where
* <code>m</code> must be an affine matrix.
* This function performs fewer allocations and arithmetic operations.
*
* @param {Matrix4} matrix The affine matrix on the left-hand side.
* @param {Cartesian3} scale The non-uniform scale on the right-hand side.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
*
* @example
* // Instead of Cesium.Matrix4.multiply(m, Cesium.Matrix4.fromScale(scale), m);
* Cesium.Matrix4.multiplyByScale(m, scale, m);
*
* @see Matrix4.fromScale
* @see Matrix4.multiplyByUniformScale
*/
Matrix4.multiplyByScale = function(matrix, scale, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('scale', scale);
Check.typeOf.object('result', result);
var scaleX = scale.x;
var scaleY = scale.y;
var scaleZ = scale.z;
// Faster than Cartesian3.equals
if ((scaleX === 1.0) && (scaleY === 1.0) && (scaleZ === 1.0)) {
return Matrix4.clone(matrix, result);
}
result[0] = scaleX * matrix[0];
result[1] = scaleX * matrix[1];
result[2] = scaleX * matrix[2];
result[3] = 0.0;
result[4] = scaleY * matrix[4];
result[5] = scaleY * matrix[5];
result[6] = scaleY * matrix[6];
result[7] = 0.0;
result[8] = scaleZ * matrix[8];
result[9] = scaleZ * matrix[9];
result[10] = scaleZ * matrix[10];
result[11] = 0.0;
result[12] = matrix[12];
result[13] = matrix[13];
result[14] = matrix[14];
result[15] = 1.0;
return result;
};
/**
* Computes the product of a matrix and a column vector.
*
* @param {Matrix4} matrix The matrix.
* @param {Cartesian4} cartesian The vector.
* @param {Cartesian4} result The object onto which to store the result.
* @returns {Cartesian4} The modified result parameter.
*/
Matrix4.multiplyByVector = function(matrix, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var vX = cartesian.x;
var vY = cartesian.y;
var vZ = cartesian.z;
var vW = cartesian.w;
var x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12] * vW;
var y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13] * vW;
var z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14] * vW;
var w = matrix[3] * vX + matrix[7] * vY + matrix[11] * vZ + matrix[15] * vW;
result.x = x;
result.y = y;
result.z = z;
result.w = w;
return result;
};
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a <code>w</code> component of zero.
*
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*
* @example
* var p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* var result = Cesium.Matrix4.multiplyByPointAsVector(matrix, p, new Cesium.Cartesian3());
* // A shortcut for
* // Cartesian3 p = ...
* // Cesium.Matrix4.multiplyByVector(matrix, new Cesium.Cartesian4(p.x, p.y, p.z, 0.0), result);
*/
Matrix4.multiplyByPointAsVector = function(matrix, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var vX = cartesian.x;
var vY = cartesian.y;
var vZ = cartesian.z;
var x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ;
var y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ;
var z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ;
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Computes the product of a matrix and a {@link Cartesian3}. This is equivalent to calling {@link Matrix4.multiplyByVector}
* with a {@link Cartesian4} with a <code>w</code> component of 1, but returns a {@link Cartesian3} instead of a {@link Cartesian4}.
*
* @param {Matrix4} matrix The matrix.
* @param {Cartesian3} cartesian The point.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*
* @example
* var p = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* var result = Cesium.Matrix4.multiplyByPoint(matrix, p, new Cesium.Cartesian3());
*/
Matrix4.multiplyByPoint = function(matrix, cartesian, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('cartesian', cartesian);
Check.typeOf.object('result', result);
var vX = cartesian.x;
var vY = cartesian.y;
var vZ = cartesian.z;
var x = matrix[0] * vX + matrix[4] * vY + matrix[8] * vZ + matrix[12];
var y = matrix[1] * vX + matrix[5] * vY + matrix[9] * vZ + matrix[13];
var z = matrix[2] * vX + matrix[6] * vY + matrix[10] * vZ + matrix[14];
result.x = x;
result.y = y;
result.z = z;
return result;
};
/**
* Computes the product of a matrix and a scalar.
*
* @param {Matrix4} matrix The matrix.
* @param {Number} scalar The number to multiply by.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @example
* //create a Matrix4 instance which is a scaled version of the supplied Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [18.0, 19.0, 20.0, 21.0]
* // [22.0, 23.0, 24.0, 25.0]
*
* var a = Cesium.Matrix4.multiplyByScalar(m, -2, new Cesium.Matrix4());
*
* // m remains the same
* // a = [-20.0, -22.0, -24.0, -26.0]
* // [-28.0, -30.0, -32.0, -34.0]
* // [-36.0, -38.0, -40.0, -42.0]
* // [-44.0, -46.0, -48.0, -50.0]
*/
Matrix4.multiplyByScalar = function(matrix, scalar, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.number('scalar', scalar);
Check.typeOf.object('result', result);
result[0] = matrix[0] * scalar;
result[1] = matrix[1] * scalar;
result[2] = matrix[2] * scalar;
result[3] = matrix[3] * scalar;
result[4] = matrix[4] * scalar;
result[5] = matrix[5] * scalar;
result[6] = matrix[6] * scalar;
result[7] = matrix[7] * scalar;
result[8] = matrix[8] * scalar;
result[9] = matrix[9] * scalar;
result[10] = matrix[10] * scalar;
result[11] = matrix[11] * scalar;
result[12] = matrix[12] * scalar;
result[13] = matrix[13] * scalar;
result[14] = matrix[14] * scalar;
result[15] = matrix[15] * scalar;
return result;
};
/**
* Computes a negated copy of the provided matrix.
*
* @param {Matrix4} matrix The matrix to negate.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @example
* //create a new Matrix4 instance which is a negation of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [18.0, 19.0, 20.0, 21.0]
* // [22.0, 23.0, 24.0, 25.0]
*
* var a = Cesium.Matrix4.negate(m, new Cesium.Matrix4());
*
* // m remains the same
* // a = [-10.0, -11.0, -12.0, -13.0]
* // [-14.0, -15.0, -16.0, -17.0]
* // [-18.0, -19.0, -20.0, -21.0]
* // [-22.0, -23.0, -24.0, -25.0]
*/
Matrix4.negate = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result[0] = -matrix[0];
result[1] = -matrix[1];
result[2] = -matrix[2];
result[3] = -matrix[3];
result[4] = -matrix[4];
result[5] = -matrix[5];
result[6] = -matrix[6];
result[7] = -matrix[7];
result[8] = -matrix[8];
result[9] = -matrix[9];
result[10] = -matrix[10];
result[11] = -matrix[11];
result[12] = -matrix[12];
result[13] = -matrix[13];
result[14] = -matrix[14];
result[15] = -matrix[15];
return result;
};
/**
* Computes the transpose of the provided matrix.
*
* @param {Matrix4} matrix The matrix to transpose.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @example
* //returns transpose of a Matrix4
* // m = [10.0, 11.0, 12.0, 13.0]
* // [14.0, 15.0, 16.0, 17.0]
* // [18.0, 19.0, 20.0, 21.0]
* // [22.0, 23.0, 24.0, 25.0]
*
* var a = Cesium.Matrix4.transpose(m, new Cesium.Matrix4());
*
* // m remains the same
* // a = [10.0, 14.0, 18.0, 22.0]
* // [11.0, 15.0, 19.0, 23.0]
* // [12.0, 16.0, 20.0, 24.0]
* // [13.0, 17.0, 21.0, 25.0]
*/
Matrix4.transpose = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
var matrix1 = matrix[1];
var matrix2 = matrix[2];
var matrix3 = matrix[3];
var matrix6 = matrix[6];
var matrix7 = matrix[7];
var matrix11 = matrix[11];
result[0] = matrix[0];
result[1] = matrix[4];
result[2] = matrix[8];
result[3] = matrix[12];
result[4] = matrix1;
result[5] = matrix[5];
result[6] = matrix[9];
result[7] = matrix[13];
result[8] = matrix2;
result[9] = matrix6;
result[10] = matrix[10];
result[11] = matrix[14];
result[12] = matrix3;
result[13] = matrix7;
result[14] = matrix11;
result[15] = matrix[15];
return result;
};
/**
* Computes a matrix, which contains the absolute (unsigned) values of the provided matrix's elements.
*
* @param {Matrix4} matrix The matrix with signed elements.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.abs = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result[0] = Math.abs(matrix[0]);
result[1] = Math.abs(matrix[1]);
result[2] = Math.abs(matrix[2]);
result[3] = Math.abs(matrix[3]);
result[4] = Math.abs(matrix[4]);
result[5] = Math.abs(matrix[5]);
result[6] = Math.abs(matrix[6]);
result[7] = Math.abs(matrix[7]);
result[8] = Math.abs(matrix[8]);
result[9] = Math.abs(matrix[9]);
result[10] = Math.abs(matrix[10]);
result[11] = Math.abs(matrix[11]);
result[12] = Math.abs(matrix[12]);
result[13] = Math.abs(matrix[13]);
result[14] = Math.abs(matrix[14]);
result[15] = Math.abs(matrix[15]);
return result;
};
/**
* Compares the provided matrices componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*
* @example
* //compares two Matrix4 instances
*
* // a = [10.0, 14.0, 18.0, 22.0]
* // [11.0, 15.0, 19.0, 23.0]
* // [12.0, 16.0, 20.0, 24.0]
* // [13.0, 17.0, 21.0, 25.0]
*
* // b = [10.0, 14.0, 18.0, 22.0]
* // [11.0, 15.0, 19.0, 23.0]
* // [12.0, 16.0, 20.0, 24.0]
* // [13.0, 17.0, 21.0, 25.0]
*
* if(Cesium.Matrix4.equals(a,b)) {
* console.log("Both matrices are equal");
* } else {
* console.log("They are not equal");
* }
*
* //Prints "Both matrices are equal" on the console
*/
Matrix4.equals = function(left, right) {
// Given that most matrices will be transformation matrices, the elements
// are tested in order such that the test is likely to fail as early
// as possible. I _think_ this is just as friendly to the L1 cache
// as testing in index order. It is certainty faster in practice.
return (left === right) ||
(defined(left) &&
defined(right) &&
// Translation
left[12] === right[12] &&
left[13] === right[13] &&
left[14] === right[14] &&
// Rotation/scale
left[0] === right[0] &&
left[1] === right[1] &&
left[2] === right[2] &&
left[4] === right[4] &&
left[5] === right[5] &&
left[6] === right[6] &&
left[8] === right[8] &&
left[9] === right[9] &&
left[10] === right[10] &&
// Bottom row
left[3] === right[3] &&
left[7] === right[7] &&
left[11] === right[11] &&
left[15] === right[15]);
};
/**
* Compares the provided matrices componentwise and returns
* <code>true</code> if they are within the provided epsilon,
* <code>false</code> otherwise.
*
* @param {Matrix4} [left] The first matrix.
* @param {Matrix4} [right] The second matrix.
* @param {Number} epsilon The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if left and right are within the provided epsilon, <code>false</code> otherwise.
*
* @example
* //compares two Matrix4 instances
*
* // a = [10.5, 14.5, 18.5, 22.5]
* // [11.5, 15.5, 19.5, 23.5]
* // [12.5, 16.5, 20.5, 24.5]
* // [13.5, 17.5, 21.5, 25.5]
*
* // b = [10.0, 14.0, 18.0, 22.0]
* // [11.0, 15.0, 19.0, 23.0]
* // [12.0, 16.0, 20.0, 24.0]
* // [13.0, 17.0, 21.0, 25.0]
*
* if(Cesium.Matrix4.equalsEpsilon(a,b,0.1)){
* console.log("Difference between both the matrices is less than 0.1");
* } else {
* console.log("Difference between both the matrices is not less than 0.1");
* }
*
* //Prints "Difference between both the matrices is not less than 0.1" on the console
*/
Matrix4.equalsEpsilon = function(left, right, epsilon) {
Check.typeOf.number('epsilon', epsilon);
return (left === right) ||
(defined(left) &&
defined(right) &&
Math.abs(left[0] - right[0]) <= epsilon &&
Math.abs(left[1] - right[1]) <= epsilon &&
Math.abs(left[2] - right[2]) <= epsilon &&
Math.abs(left[3] - right[3]) <= epsilon &&
Math.abs(left[4] - right[4]) <= epsilon &&
Math.abs(left[5] - right[5]) <= epsilon &&
Math.abs(left[6] - right[6]) <= epsilon &&
Math.abs(left[7] - right[7]) <= epsilon &&
Math.abs(left[8] - right[8]) <= epsilon &&
Math.abs(left[9] - right[9]) <= epsilon &&
Math.abs(left[10] - right[10]) <= epsilon &&
Math.abs(left[11] - right[11]) <= epsilon &&
Math.abs(left[12] - right[12]) <= epsilon &&
Math.abs(left[13] - right[13]) <= epsilon &&
Math.abs(left[14] - right[14]) <= epsilon &&
Math.abs(left[15] - right[15]) <= epsilon);
};
/**
* Gets the translation portion of the provided matrix, assuming the matrix is a affine transformation matrix.
*
* @param {Matrix4} matrix The matrix to use.
* @param {Cartesian3} result The object onto which to store the result.
* @returns {Cartesian3} The modified result parameter.
*/
Matrix4.getTranslation = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result.x = matrix[12];
result.y = matrix[13];
result.z = matrix[14];
return result;
};
/**
* Gets the upper left 3x3 rotation matrix of the provided matrix, assuming the matrix is a affine transformation matrix.
*
* @param {Matrix4} matrix The matrix to use.
* @param {Matrix3} result The object onto which to store the result.
* @returns {Matrix3} The modified result parameter.
*
* @example
* // returns a Matrix3 instance from a Matrix4 instance
*
* // m = [10.0, 14.0, 18.0, 22.0]
* // [11.0, 15.0, 19.0, 23.0]
* // [12.0, 16.0, 20.0, 24.0]
* // [13.0, 17.0, 21.0, 25.0]
*
* var b = new Cesium.Matrix3();
* Cesium.Matrix4.getRotation(m,b);
*
* // b = [10.0, 14.0, 18.0]
* // [11.0, 15.0, 19.0]
* // [12.0, 16.0, 20.0]
*/
Matrix4.getRotation = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
result[0] = matrix[0];
result[1] = matrix[1];
result[2] = matrix[2];
result[3] = matrix[4];
result[4] = matrix[5];
result[5] = matrix[6];
result[6] = matrix[8];
result[7] = matrix[9];
result[8] = matrix[10];
return result;
};
var scratchInverseRotation = new Matrix3();
var scratchMatrix3Zero = new Matrix3();
var scratchBottomRow = new Cartesian4();
var scratchExpectedBottomRow = new Cartesian4(0.0, 0.0, 0.0, 1.0);
/**
* Computes the inverse of the provided matrix using Cramers Rule.
* If the determinant is zero, the matrix can not be inverted, and an exception is thrown.
* If the matrix is an affine transformation matrix, it is more efficient
* to invert it with {@link Matrix4.inverseTransformation}.
*
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*
* @exception {RuntimeError} matrix is not invertible because its determinate is zero.
*/
Matrix4.inverse = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
// Special case for a zero scale matrix that can occur, for example,
// when a model's node has a [0, 0, 0] scale.
if (Matrix3.equalsEpsilon(Matrix4.getRotation(matrix, scratchInverseRotation), scratchMatrix3Zero, CesiumMath.EPSILON7) &&
Cartesian4.equals(Matrix4.getRow(matrix, 3, scratchBottomRow), scratchExpectedBottomRow)) {
result[0] = 0.0;
result[1] = 0.0;
result[2] = 0.0;
result[3] = 0.0;
result[4] = 0.0;
result[5] = 0.0;
result[6] = 0.0;
result[7] = 0.0;
result[8] = 0.0;
result[9] = 0.0;
result[10] = 0.0;
result[11] = 0.0;
result[12] = -matrix[12];
result[13] = -matrix[13];
result[14] = -matrix[14];
result[15] = 1.0;
return result;
}
//
// Ported from:
// ftp://download.intel.com/design/PentiumIII/sml/24504301.pdf
//
var src0 = matrix[0];
var src1 = matrix[4];
var src2 = matrix[8];
var src3 = matrix[12];
var src4 = matrix[1];
var src5 = matrix[5];
var src6 = matrix[9];
var src7 = matrix[13];
var src8 = matrix[2];
var src9 = matrix[6];
var src10 = matrix[10];
var src11 = matrix[14];
var src12 = matrix[3];
var src13 = matrix[7];
var src14 = matrix[11];
var src15 = matrix[15];
// calculate pairs for first 8 elements (cofactors)
var tmp0 = src10 * src15;
var tmp1 = src11 * src14;
var tmp2 = src9 * src15;
var tmp3 = src11 * src13;
var tmp4 = src9 * src14;
var tmp5 = src10 * src13;
var tmp6 = src8 * src15;
var tmp7 = src11 * src12;
var tmp8 = src8 * src14;
var tmp9 = src10 * src12;
var tmp10 = src8 * src13;
var tmp11 = src9 * src12;
// calculate first 8 elements (cofactors)
var dst0 = (tmp0 * src5 + tmp3 * src6 + tmp4 * src7) - (tmp1 * src5 + tmp2 * src6 + tmp5 * src7);
var dst1 = (tmp1 * src4 + tmp6 * src6 + tmp9 * src7) - (tmp0 * src4 + tmp7 * src6 + tmp8 * src7);
var dst2 = (tmp2 * src4 + tmp7 * src5 + tmp10 * src7) - (tmp3 * src4 + tmp6 * src5 + tmp11 * src7);
var dst3 = (tmp5 * src4 + tmp8 * src5 + tmp11 * src6) - (tmp4 * src4 + tmp9 * src5 + tmp10 * src6);
var dst4 = (tmp1 * src1 + tmp2 * src2 + tmp5 * src3) - (tmp0 * src1 + tmp3 * src2 + tmp4 * src3);
var dst5 = (tmp0 * src0 + tmp7 * src2 + tmp8 * src3) - (tmp1 * src0 + tmp6 * src2 + tmp9 * src3);
var dst6 = (tmp3 * src0 + tmp6 * src1 + tmp11 * src3) - (tmp2 * src0 + tmp7 * src1 + tmp10 * src3);
var dst7 = (tmp4 * src0 + tmp9 * src1 + tmp10 * src2) - (tmp5 * src0 + tmp8 * src1 + tmp11 * src2);
// calculate pairs for second 8 elements (cofactors)
tmp0 = src2 * src7;
tmp1 = src3 * src6;
tmp2 = src1 * src7;
tmp3 = src3 * src5;
tmp4 = src1 * src6;
tmp5 = src2 * src5;
tmp6 = src0 * src7;
tmp7 = src3 * src4;
tmp8 = src0 * src6;
tmp9 = src2 * src4;
tmp10 = src0 * src5;
tmp11 = src1 * src4;
// calculate second 8 elements (cofactors)
var dst8 = (tmp0 * src13 + tmp3 * src14 + tmp4 * src15) - (tmp1 * src13 + tmp2 * src14 + tmp5 * src15);
var dst9 = (tmp1 * src12 + tmp6 * src14 + tmp9 * src15) - (tmp0 * src12 + tmp7 * src14 + tmp8 * src15);
var dst10 = (tmp2 * src12 + tmp7 * src13 + tmp10 * src15) - (tmp3 * src12 + tmp6 * src13 + tmp11 * src15);
var dst11 = (tmp5 * src12 + tmp8 * src13 + tmp11 * src14) - (tmp4 * src12 + tmp9 * src13 + tmp10 * src14);
var dst12 = (tmp2 * src10 + tmp5 * src11 + tmp1 * src9) - (tmp4 * src11 + tmp0 * src9 + tmp3 * src10);
var dst13 = (tmp8 * src11 + tmp0 * src8 + tmp7 * src10) - (tmp6 * src10 + tmp9 * src11 + tmp1 * src8);
var dst14 = (tmp6 * src9 + tmp11 * src11 + tmp3 * src8) - (tmp10 * src11 + tmp2 * src8 + tmp7 * src9);
var dst15 = (tmp10 * src10 + tmp4 * src8 + tmp9 * src9) - (tmp8 * src9 + tmp11 * src10 + tmp5 * src8);
// calculate determinant
var det = src0 * dst0 + src1 * dst1 + src2 * dst2 + src3 * dst3;
if (Math.abs(det) < CesiumMath.EPSILON20) {
throw new RuntimeError('matrix is not invertible because its determinate is zero.');
}
// calculate matrix inverse
det = 1.0 / det;
result[0] = dst0 * det;
result[1] = dst1 * det;
result[2] = dst2 * det;
result[3] = dst3 * det;
result[4] = dst4 * det;
result[5] = dst5 * det;
result[6] = dst6 * det;
result[7] = dst7 * det;
result[8] = dst8 * det;
result[9] = dst9 * det;
result[10] = dst10 * det;
result[11] = dst11 * det;
result[12] = dst12 * det;
result[13] = dst13 * det;
result[14] = dst14 * det;
result[15] = dst15 * det;
return result;
};
/**
* Computes the inverse of the provided matrix assuming it is
* an affine transformation matrix, where the upper left 3x3 elements
* are a rotation matrix, and the upper three elements in the fourth
* column are the translation. The bottom row is assumed to be [0, 0, 0, 1].
* The matrix is not verified to be in the proper form.
* This method is faster than computing the inverse for a general 4x4
* matrix using {@link Matrix4.inverse}.
*
* @param {Matrix4} matrix The matrix to invert.
* @param {Matrix4} result The object onto which to store the result.
* @returns {Matrix4} The modified result parameter.
*/
Matrix4.inverseTransformation = function(matrix, result) {
Check.typeOf.object('matrix', matrix);
Check.typeOf.object('result', result);
//This function is an optimized version of the below 4 lines.
//var rT = Matrix3.transpose(Matrix4.getRotation(matrix));
//var rTN = Matrix3.negate(rT);
//var rTT = Matrix3.multiplyByVector(rTN, Matrix4.getTranslation(matrix));
//return Matrix4.fromRotationTranslation(rT, rTT, result);
var matrix0 = matrix[0];
var matrix1 = matrix[1];
var matrix2 = matrix[2];
var matrix4 = matrix[4];
var matrix5 = matrix[5];
var matrix6 = matrix[6];
var matrix8 = matrix[8];
var matrix9 = matrix[9];
var matrix10 = matrix[10];
var vX = matrix[12];
var vY = matrix[13];
var vZ = matrix[14];
var x = -matrix0 * vX - matrix1 * vY - matrix2 * vZ;
var y = -matrix4 * vX - matrix5 * vY - matrix6 * vZ;
var z = -matrix8 * vX - matrix9 * vY - matrix10 * vZ;
result[0] = matrix0;
result[1] = matrix4;
result[2] = matrix8;
result[3] = 0.0;
result[4] = matrix1;
result[5] = matrix5;
result[6] = matrix9;
result[7] = 0.0;
result[8] = matrix2;
result[9] = matrix6;
result[10] = matrix10;
result[11] = 0.0;
result[12] = x;
result[13] = y;
result[14] = z;
result[15] = 1.0;
return result;
};
/**
* An immutable Matrix4 instance initialized to the identity matrix.
*
* @type {Matrix4}
* @constant
*/
Matrix4.IDENTITY = freezeObject(new Matrix4(1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0));
/**
* An immutable Matrix4 instance initialized to the zero matrix.
*
* @type {Matrix4}
* @constant
*/
Matrix4.ZERO = freezeObject(new Matrix4(0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0));
/**
* The index into Matrix4 for column 0, row 0.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN0ROW0 = 0;
/**
* The index into Matrix4 for column 0, row 1.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN0ROW1 = 1;
/**
* The index into Matrix4 for column 0, row 2.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN0ROW2 = 2;
/**
* The index into Matrix4 for column 0, row 3.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN0ROW3 = 3;
/**
* The index into Matrix4 for column 1, row 0.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN1ROW0 = 4;
/**
* The index into Matrix4 for column 1, row 1.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN1ROW1 = 5;
/**
* The index into Matrix4 for column 1, row 2.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN1ROW2 = 6;
/**
* The index into Matrix4 for column 1, row 3.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN1ROW3 = 7;
/**
* The index into Matrix4 for column 2, row 0.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN2ROW0 = 8;
/**
* The index into Matrix4 for column 2, row 1.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN2ROW1 = 9;
/**
* The index into Matrix4 for column 2, row 2.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN2ROW2 = 10;
/**
* The index into Matrix4 for column 2, row 3.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN2ROW3 = 11;
/**
* The index into Matrix4 for column 3, row 0.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN3ROW0 = 12;
/**
* The index into Matrix4 for column 3, row 1.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN3ROW1 = 13;
/**
* The index into Matrix4 for column 3, row 2.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN3ROW2 = 14;
/**
* The index into Matrix4 for column 3, row 3.
*
* @type {Number}
* @constant
*/
Matrix4.COLUMN3ROW3 = 15;
defineProperties(Matrix4.prototype, {
/**
* Gets the number of items in the collection.
* @memberof Matrix4.prototype
*
* @type {Number}
*/
length : {
get : function() {
return Matrix4.packedLength;
}
}
});
/**
* Duplicates the provided Matrix4 instance.
*
* @param {Matrix4} [result] The object onto which to store the result.
* @returns {Matrix4} The modified result parameter or a new Matrix4 instance if one was not provided.
*/
Matrix4.prototype.clone = function(result) {
return Matrix4.clone(this, result);
};
/**
* Compares this matrix to the provided matrix componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Matrix4} [right] The right hand side matrix.
* @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.
*/
Matrix4.prototype.equals = function(right) {
return Matrix4.equals(this, right);
};
/**
* @private
*/
Matrix4.equalsArray = function(matrix, array, offset) {
return matrix[0] === array[offset] &&
matrix[1] === array[offset + 1] &&
matrix[2] === array[offset + 2] &&
matrix[3] === array[offset + 3] &&
matrix[4] === array[offset + 4] &&
matrix[5] === array[offset + 5] &&
matrix[6] === array[offset + 6] &&
matrix[7] === array[offset + 7] &&
matrix[8] === array[offset + 8] &&
matrix[9] === array[offset + 9] &&
matrix[10] === array[offset + 10] &&
matrix[11] === array[offset + 11] &&
matrix[12] === array[offset + 12] &&
matrix[13] === array[offset + 13] &&
matrix[14] === array[offset + 14] &&
matrix[15] === array[offset + 15];
};
/**
* Compares this matrix to the provided matrix componentwise and returns
* <code>true</code> if they are within the provided epsilon,
* <code>false</code> otherwise.
*
* @param {Matrix4} [right] The right hand side matrix.
* @param {Number} epsilon The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if they are within the provided epsilon, <code>false</code> otherwise.
*/
Matrix4.prototype.equalsEpsilon = function(right, epsilon) {
return Matrix4.equalsEpsilon(this, right, epsilon);
};
/**
* Computes a string representing this Matrix with each row being
* on a separate line and in the format '(column0, column1, column2, column3)'.
*
* @returns {String} A string representing the provided Matrix with each row being on a separate line and in the format '(column0, column1, column2, column3)'.
*/
Matrix4.prototype.toString = function() {
return '(' + this[0] + ', ' + this[4] + ', ' + this[8] + ', ' + this[12] +')\n' +
'(' + this[1] + ', ' + this[5] + ', ' + this[9] + ', ' + this[13] +')\n' +
'(' + this[2] + ', ' + this[6] + ', ' + this[10] + ', ' + this[14] +')\n' +
'(' + this[3] + ', ' + this[7] + ', ' + this[11] + ', ' + this[15] +')';
};
return Matrix4;
});
/*global define*/
define('Core/Rectangle',[
'./Cartographic',
'./Check',
'./defaultValue',
'./defined',
'./defineProperties',
'./Ellipsoid',
'./freezeObject',
'./Math'
], function(
Cartographic,
Check,
defaultValue,
defined,
defineProperties,
Ellipsoid,
freezeObject,
CesiumMath) {
'use strict';
/**
* A two dimensional region specified as longitude and latitude coordinates.
*
* @alias Rectangle
* @constructor
*
* @param {Number} [west=0.0] The westernmost longitude, in radians, in the range [-Pi, Pi].
* @param {Number} [south=0.0] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
* @param {Number} [east=0.0] The easternmost longitude, in radians, in the range [-Pi, Pi].
* @param {Number} [north=0.0] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
*
* @see Packable
*/
function Rectangle(west, south, east, north) {
/**
* The westernmost longitude in radians in the range [-Pi, Pi].
*
* @type {Number}
* @default 0.0
*/
this.west = defaultValue(west, 0.0);
/**
* The southernmost latitude in radians in the range [-Pi/2, Pi/2].
*
* @type {Number}
* @default 0.0
*/
this.south = defaultValue(south, 0.0);
/**
* The easternmost longitude in radians in the range [-Pi, Pi].
*
* @type {Number}
* @default 0.0
*/
this.east = defaultValue(east, 0.0);
/**
* The northernmost latitude in radians in the range [-Pi/2, Pi/2].
*
* @type {Number}
* @default 0.0
*/
this.north = defaultValue(north, 0.0);
}
defineProperties(Rectangle.prototype, {
/**
* Gets the width of the rectangle in radians.
* @memberof Rectangle.prototype
* @type {Number}
*/
width : {
get : function() {
return Rectangle.computeWidth(this);
}
},
/**
* Gets the height of the rectangle in radians.
* @memberof Rectangle.prototype
* @type {Number}
*/
height : {
get : function() {
return Rectangle.computeHeight(this);
}
}
});
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
Rectangle.packedLength = 4;
/**
* Stores the provided instance into the provided array.
*
* @param {Rectangle} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
Rectangle.pack = function(value, array, startingIndex) {
Check.typeOf.object('value', value);
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
array[startingIndex++] = value.west;
array[startingIndex++] = value.south;
array[startingIndex++] = value.east;
array[startingIndex] = value.north;
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Rectangle} [result] The object into which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if one was not provided.
*/
Rectangle.unpack = function(array, startingIndex, result) {
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new Rectangle();
}
result.west = array[startingIndex++];
result.south = array[startingIndex++];
result.east = array[startingIndex++];
result.north = array[startingIndex];
return result;
};
/**
* Computes the width of a rectangle in radians.
* @param {Rectangle} rectangle The rectangle to compute the width of.
* @returns {Number} The width.
*/
Rectangle.computeWidth = function(rectangle) {
Check.typeOf.object('rectangle', rectangle);
var east = rectangle.east;
var west = rectangle.west;
if (east < west) {
east += CesiumMath.TWO_PI;
}
return east - west;
};
/**
* Computes the height of a rectangle in radians.
* @param {Rectangle} rectangle The rectangle to compute the height of.
* @returns {Number} The height.
*/
Rectangle.computeHeight = function(rectangle) {
Check.typeOf.object('rectangle', rectangle);
return rectangle.north - rectangle.south;
};
/**
* Creates a rectangle given the boundary longitude and latitude in degrees.
*
* @param {Number} [west=0.0] The westernmost longitude in degrees in the range [-180.0, 180.0].
* @param {Number} [south=0.0] The southernmost latitude in degrees in the range [-90.0, 90.0].
* @param {Number} [east=0.0] The easternmost longitude in degrees in the range [-180.0, 180.0].
* @param {Number} [north=0.0] The northernmost latitude in degrees in the range [-90.0, 90.0].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*
* @example
* var rectangle = Cesium.Rectangle.fromDegrees(0.0, 20.0, 10.0, 30.0);
*/
Rectangle.fromDegrees = function(west, south, east, north, result) {
west = CesiumMath.toRadians(defaultValue(west, 0.0));
south = CesiumMath.toRadians(defaultValue(south, 0.0));
east = CesiumMath.toRadians(defaultValue(east, 0.0));
north = CesiumMath.toRadians(defaultValue(north, 0.0));
if (!defined(result)) {
return new Rectangle(west, south, east, north);
}
result.west = west;
result.south = south;
result.east = east;
result.north = north;
return result;
};
/**
* Creates an rectangle given the boundary longitude and latitude in radians.
*
* @param {Number} [west=0.0] The westernmost longitude in radians in the range [-Math.PI, Math.PI].
* @param {Number} [south=0.0] The southernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
* @param {Number} [east=0.0] The easternmost longitude in radians in the range [-Math.PI, Math.PI].
* @param {Number} [north=0.0] The northernmost latitude in radians in the range [-Math.PI/2, Math.PI/2].
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*
* @example
* var rectangle = Cesium.Rectangle.fromRadians(0.0, Math.PI/4, Math.PI/8, 3*Math.PI/4);
*/
Rectangle.fromRadians = function(west, south, east, north, result) {
if (!defined(result)) {
return new Rectangle(west, south, east, north);
}
result.west = defaultValue(west, 0.0);
result.south = defaultValue(south, 0.0);
result.east = defaultValue(east, 0.0);
result.north = defaultValue(north, 0.0);
return result;
};
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
*
* @param {Cartographic[]} cartographics The list of Cartographic instances.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
Rectangle.fromCartographicArray = function(cartographics, result) {
Check.defined('cartographics', cartographics);
var west = Number.MAX_VALUE;
var east = -Number.MAX_VALUE;
var westOverIDL = Number.MAX_VALUE;
var eastOverIDL = -Number.MAX_VALUE;
var south = Number.MAX_VALUE;
var north = -Number.MAX_VALUE;
for ( var i = 0, len = cartographics.length; i < len; i++) {
var position = cartographics[i];
west = Math.min(west, position.longitude);
east = Math.max(east, position.longitude);
south = Math.min(south, position.latitude);
north = Math.max(north, position.latitude);
var lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + CesiumMath.TWO_PI;
westOverIDL = Math.min(westOverIDL, lonAdjusted);
eastOverIDL = Math.max(eastOverIDL, lonAdjusted);
}
if(east - west > eastOverIDL - westOverIDL) {
west = westOverIDL;
east = eastOverIDL;
if (east > CesiumMath.PI) {
east = east - CesiumMath.TWO_PI;
}
if (west > CesiumMath.PI) {
west = west - CesiumMath.TWO_PI;
}
}
if (!defined(result)) {
return new Rectangle(west, south, east, north);
}
result.west = west;
result.south = south;
result.east = east;
result.north = north;
return result;
};
/**
* Creates the smallest possible Rectangle that encloses all positions in the provided array.
*
* @param {Cartesian[]} cartesians The list of Cartesian instances.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid the cartesians are on.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
Rectangle.fromCartesianArray = function(cartesians, ellipsoid, result) {
Check.defined('cartesians', cartesians);
var west = Number.MAX_VALUE;
var east = -Number.MAX_VALUE;
var westOverIDL = Number.MAX_VALUE;
var eastOverIDL = -Number.MAX_VALUE;
var south = Number.MAX_VALUE;
var north = -Number.MAX_VALUE;
for ( var i = 0, len = cartesians.length; i < len; i++) {
var position = ellipsoid.cartesianToCartographic(cartesians[i]);
west = Math.min(west, position.longitude);
east = Math.max(east, position.longitude);
south = Math.min(south, position.latitude);
north = Math.max(north, position.latitude);
var lonAdjusted = position.longitude >= 0 ? position.longitude : position.longitude + CesiumMath.TWO_PI;
westOverIDL = Math.min(westOverIDL, lonAdjusted);
eastOverIDL = Math.max(eastOverIDL, lonAdjusted);
}
if(east - west > eastOverIDL - westOverIDL) {
west = westOverIDL;
east = eastOverIDL;
if (east > CesiumMath.PI) {
east = east - CesiumMath.TWO_PI;
}
if (west > CesiumMath.PI) {
west = west - CesiumMath.TWO_PI;
}
}
if (!defined(result)) {
return new Rectangle(west, south, east, north);
}
result.west = west;
result.south = south;
result.east = east;
result.north = north;
return result;
};
/**
* Duplicates a Rectangle.
*
* @param {Rectangle} rectangle The rectangle to clone.
* @param {Rectangle} [result] The object onto which to store the result, or undefined if a new instance should be created.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided. (Returns undefined if rectangle is undefined)
*/
Rectangle.clone = function(rectangle, result) {
if (!defined(rectangle)) {
return undefined;
}
if (!defined(result)) {
return new Rectangle(rectangle.west, rectangle.south, rectangle.east, rectangle.north);
}
result.west = rectangle.west;
result.south = rectangle.south;
result.east = rectangle.east;
result.north = rectangle.north;
return result;
};
/**
* Duplicates this Rectangle.
*
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
Rectangle.prototype.clone = function(result) {
return Rectangle.clone(this, result);
};
/**
* Compares the provided Rectangle with this Rectangle componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {Rectangle} [other] The Rectangle to compare.
* @returns {Boolean} <code>true</code> if the Rectangles are equal, <code>false</code> otherwise.
*/
Rectangle.prototype.equals = function(other) {
return Rectangle.equals(this, other);
};
/**
* Compares the provided rectangles and returns <code>true</code> if they are equal,
* <code>false</code> otherwise.
*
* @param {Rectangle} [left] The first Rectangle.
* @param {Rectangle} [right] The second Rectangle.
* @returns {Boolean} <code>true</code> if left and right are equal; otherwise <code>false</code>.
*/
Rectangle.equals = function(left, right) {
return (left === right) ||
((defined(left)) &&
(defined(right)) &&
(left.west === right.west) &&
(left.south === right.south) &&
(left.east === right.east) &&
(left.north === right.north));
};
/**
* Compares the provided Rectangle with this Rectangle componentwise and returns
* <code>true</code> if they are within the provided epsilon,
* <code>false</code> otherwise.
*
* @param {Rectangle} [other] The Rectangle to compare.
* @param {Number} epsilon The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if the Rectangles are within the provided epsilon, <code>false</code> otherwise.
*/
Rectangle.prototype.equalsEpsilon = function(other, epsilon) {
Check.typeOf.number('epsilon', epsilon);
return defined(other) &&
(Math.abs(this.west - other.west) <= epsilon) &&
(Math.abs(this.south - other.south) <= epsilon) &&
(Math.abs(this.east - other.east) <= epsilon) &&
(Math.abs(this.north - other.north) <= epsilon);
};
/**
* Checks a Rectangle's properties and throws if they are not in valid ranges.
*
* @param {Rectangle} rectangle The rectangle to validate
*
* @exception {DeveloperError} <code>north</code> must be in the interval [<code>-Pi/2</code>, <code>Pi/2</code>].
* @exception {DeveloperError} <code>south</code> must be in the interval [<code>-Pi/2</code>, <code>Pi/2</code>].
* @exception {DeveloperError} <code>east</code> must be in the interval [<code>-Pi</code>, <code>Pi</code>].
* @exception {DeveloperError} <code>west</code> must be in the interval [<code>-Pi</code>, <code>Pi</code>].
*/
Rectangle.validate = function(rectangle) {
Check.typeOf.object('rectangle', rectangle);
var north = rectangle.north;
Check.typeOf.number.greaterThanOrEquals('north', north, -CesiumMath.PI_OVER_TWO);
Check.typeOf.number.lessThanOrEquals('north', north, CesiumMath.PI_OVER_TWO);
var south = rectangle.south;
Check.typeOf.number.greaterThanOrEquals('south', south, -CesiumMath.PI_OVER_TWO);
Check.typeOf.number.lessThanOrEquals('south', south, CesiumMath.PI_OVER_TWO);
var west = rectangle.west;
Check.typeOf.number.greaterThanOrEquals('west', west, -Math.PI);
Check.typeOf.number.lessThanOrEquals('west', west, Math.PI);
var east = rectangle.east;
Check.typeOf.number.greaterThanOrEquals('east', east, -Math.PI);
Check.typeOf.number.lessThanOrEquals('east', east, Math.PI);
};
/**
* Computes the southwest corner of a rectangle.
*
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
*/
Rectangle.southwest = function(rectangle, result) {
Check.typeOf.object('rectangle', rectangle);
if (!defined(result)) {
return new Cartographic(rectangle.west, rectangle.south);
}
result.longitude = rectangle.west;
result.latitude = rectangle.south;
result.height = 0.0;
return result;
};
/**
* Computes the northwest corner of a rectangle.
*
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
*/
Rectangle.northwest = function(rectangle, result) {
Check.typeOf.object('rectangle', rectangle);
if (!defined(result)) {
return new Cartographic(rectangle.west, rectangle.north);
}
result.longitude = rectangle.west;
result.latitude = rectangle.north;
result.height = 0.0;
return result;
};
/**
* Computes the northeast corner of a rectangle.
*
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
*/
Rectangle.northeast = function(rectangle, result) {
Check.typeOf.object('rectangle', rectangle);
if (!defined(result)) {
return new Cartographic(rectangle.east, rectangle.north);
}
result.longitude = rectangle.east;
result.latitude = rectangle.north;
result.height = 0.0;
return result;
};
/**
* Computes the southeast corner of a rectangle.
*
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
*/
Rectangle.southeast = function(rectangle, result) {
Check.typeOf.object('rectangle', rectangle);
if (!defined(result)) {
return new Cartographic(rectangle.east, rectangle.south);
}
result.longitude = rectangle.east;
result.latitude = rectangle.south;
result.height = 0.0;
return result;
};
/**
* Computes the center of a rectangle.
*
* @param {Rectangle} rectangle The rectangle for which to find the center
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
*/
Rectangle.center = function(rectangle, result) {
Check.typeOf.object('rectangle', rectangle);
var east = rectangle.east;
var west = rectangle.west;
if (east < west) {
east += CesiumMath.TWO_PI;
}
var longitude = CesiumMath.negativePiToPi((west + east) * 0.5);
var latitude = (rectangle.south + rectangle.north) * 0.5;
if (!defined(result)) {
return new Cartographic(longitude, latitude);
}
result.longitude = longitude;
result.latitude = latitude;
result.height = 0.0;
return result;
};
/**
* Computes the intersection of two rectangles. This function assumes that the rectangle's coordinates are
* latitude and longitude in radians and produces a correct intersection, taking into account the fact that
* the same angle can be represented with multiple values as well as the wrapping of longitude at the
* anti-meridian. For a simple intersection that ignores these factors and can be used with projected
* coordinates, see {@link Rectangle.simpleIntersection}.
*
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle|undefined} The modified result parameter, a new Rectangle instance if none was provided or undefined if there is no intersection.
*/
Rectangle.intersection = function(rectangle, otherRectangle, result) {
Check.typeOf.object('rectangle', rectangle);
Check.typeOf.object('otherRectangle', otherRectangle);
var rectangleEast = rectangle.east;
var rectangleWest = rectangle.west;
var otherRectangleEast = otherRectangle.east;
var otherRectangleWest = otherRectangle.west;
if (rectangleEast < rectangleWest && otherRectangleEast > 0.0) {
rectangleEast += CesiumMath.TWO_PI;
} else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0.0) {
otherRectangleEast += CesiumMath.TWO_PI;
}
if (rectangleEast < rectangleWest && otherRectangleWest < 0.0) {
otherRectangleWest += CesiumMath.TWO_PI;
} else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0.0) {
rectangleWest += CesiumMath.TWO_PI;
}
var west = CesiumMath.negativePiToPi(Math.max(rectangleWest, otherRectangleWest));
var east = CesiumMath.negativePiToPi(Math.min(rectangleEast, otherRectangleEast));
if ((rectangle.west < rectangle.east || otherRectangle.west < otherRectangle.east) && east <= west) {
return undefined;
}
var south = Math.max(rectangle.south, otherRectangle.south);
var north = Math.min(rectangle.north, otherRectangle.north);
if (south >= north) {
return undefined;
}
if (!defined(result)) {
return new Rectangle(west, south, east, north);
}
result.west = west;
result.south = south;
result.east = east;
result.north = north;
return result;
};
/**
* Computes a simple intersection of two rectangles. Unlike {@link Rectangle.intersection}, this function
* does not attempt to put the angular coordinates into a consistent range or to account for crossing the
* anti-meridian. As such, it can be used for rectangles where the coordinates are not simply latitude
* and longitude (i.e. projected coordinates).
*
* @param {Rectangle} rectangle On rectangle to find an intersection
* @param {Rectangle} otherRectangle Another rectangle to find an intersection
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle|undefined} The modified result parameter, a new Rectangle instance if none was provided or undefined if there is no intersection.
*/
Rectangle.simpleIntersection = function(rectangle, otherRectangle, result) {
Check.typeOf.object('rectangle', rectangle);
Check.typeOf.object('otherRectangle', otherRectangle);
var west = Math.max(rectangle.west, otherRectangle.west);
var south = Math.max(rectangle.south, otherRectangle.south);
var east = Math.min(rectangle.east, otherRectangle.east);
var north = Math.min(rectangle.north, otherRectangle.north);
if (south >= north || west >= east) {
return undefined;
}
if (!defined(result)) {
return new Rectangle(west, south, east, north);
}
result.west = west;
result.south = south;
result.east = east;
result.north = north;
return result;
};
/**
* Computes a rectangle that is the union of two rectangles.
*
* @param {Rectangle} rectangle A rectangle to enclose in rectangle.
* @param {Rectangle} otherRectangle A rectangle to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if none was provided.
*/
Rectangle.union = function(rectangle, otherRectangle, result) {
Check.typeOf.object('rectangle', rectangle);
Check.typeOf.object('otherRectangle', otherRectangle);
if (!defined(result)) {
result = new Rectangle();
}
var rectangleEast = rectangle.east;
var rectangleWest = rectangle.west;
var otherRectangleEast = otherRectangle.east;
var otherRectangleWest = otherRectangle.west;
if (rectangleEast < rectangleWest && otherRectangleEast > 0.0) {
rectangleEast += CesiumMath.TWO_PI;
} else if (otherRectangleEast < otherRectangleWest && rectangleEast > 0.0) {
otherRectangleEast += CesiumMath.TWO_PI;
}
if (rectangleEast < rectangleWest && otherRectangleWest < 0.0) {
otherRectangleWest += CesiumMath.TWO_PI;
} else if (otherRectangleEast < otherRectangleWest && rectangleWest < 0.0) {
rectangleWest += CesiumMath.TWO_PI;
}
var west = CesiumMath.convertLongitudeRange(Math.min(rectangleWest, otherRectangleWest));
var east = CesiumMath.convertLongitudeRange(Math.max(rectangleEast, otherRectangleEast));
result.west = west;
result.south = Math.min(rectangle.south, otherRectangle.south);
result.east = east;
result.north = Math.max(rectangle.north, otherRectangle.north);
return result;
};
/**
* Computes a rectangle by enlarging the provided rectangle until it contains the provided cartographic.
*
* @param {Rectangle} rectangle A rectangle to expand.
* @param {Cartographic} cartographic A cartographic to enclose in a rectangle.
* @param {Rectangle} [result] The object onto which to store the result.
* @returns {Rectangle} The modified result parameter or a new Rectangle instance if one was not provided.
*/
Rectangle.expand = function(rectangle, cartographic, result) {
Check.typeOf.object('rectangle', rectangle);
Check.typeOf.object('cartographic', cartographic);
if (!defined(result)) {
result = new Rectangle();
}
result.west = Math.min(rectangle.west, cartographic.longitude);
result.south = Math.min(rectangle.south, cartographic.latitude);
result.east = Math.max(rectangle.east, cartographic.longitude);
result.north = Math.max(rectangle.north, cartographic.latitude);
return result;
};
/**
* Returns true if the cartographic is on or inside the rectangle, false otherwise.
*
* @param {Rectangle} rectangle The rectangle
* @param {Cartographic} cartographic The cartographic to test.
* @returns {Boolean} true if the provided cartographic is inside the rectangle, false otherwise.
*/
Rectangle.contains = function(rectangle, cartographic) {
Check.typeOf.object('rectangle', rectangle);
Check.typeOf.object('cartographic', cartographic);
var longitude = cartographic.longitude;
var latitude = cartographic.latitude;
var west = rectangle.west;
var east = rectangle.east;
if (east < west) {
east += CesiumMath.TWO_PI;
if (longitude < 0.0) {
longitude += CesiumMath.TWO_PI;
}
}
return (longitude > west || CesiumMath.equalsEpsilon(longitude, west, CesiumMath.EPSILON14)) &&
(longitude < east || CesiumMath.equalsEpsilon(longitude, east, CesiumMath.EPSILON14)) &&
latitude >= rectangle.south &&
latitude <= rectangle.north;
};
var subsampleLlaScratch = new Cartographic();
/**
* Samples a rectangle so that it includes a list of Cartesian points suitable for passing to
* {@link BoundingSphere#fromPoints}. Sampling is necessary to account
* for rectangles that cover the poles or cross the equator.
*
* @param {Rectangle} rectangle The rectangle to subsample.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid to use.
* @param {Number} [surfaceHeight=0.0] The height of the rectangle above the ellipsoid.
* @param {Cartesian3[]} [result] The array of Cartesians onto which to store the result.
* @returns {Cartesian3[]} The modified result parameter or a new Array of Cartesians instances if none was provided.
*/
Rectangle.subsample = function(rectangle, ellipsoid, surfaceHeight, result) {
Check.typeOf.object('rectangle', rectangle);
ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
surfaceHeight = defaultValue(surfaceHeight, 0.0);
if (!defined(result)) {
result = [];
}
var length = 0;
var north = rectangle.north;
var south = rectangle.south;
var east = rectangle.east;
var west = rectangle.west;
var lla = subsampleLlaScratch;
lla.height = surfaceHeight;
lla.longitude = west;
lla.latitude = north;
result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
length++;
lla.longitude = east;
result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
length++;
lla.latitude = south;
result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
length++;
lla.longitude = west;
result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
length++;
if (north < 0.0) {
lla.latitude = north;
} else if (south > 0.0) {
lla.latitude = south;
} else {
lla.latitude = 0.0;
}
for ( var i = 1; i < 8; ++i) {
lla.longitude = -Math.PI + i * CesiumMath.PI_OVER_TWO;
if (Rectangle.contains(rectangle, lla)) {
result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
length++;
}
}
if (lla.latitude === 0.0) {
lla.longitude = west;
result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
length++;
lla.longitude = east;
result[length] = ellipsoid.cartographicToCartesian(lla, result[length]);
length++;
}
result.length = length;
return result;
};
/**
* The largest possible rectangle.
*
* @type {Rectangle}
* @constant
*/
Rectangle.MAX_VALUE = freezeObject(new Rectangle(-Math.PI, -CesiumMath.PI_OVER_TWO, Math.PI, CesiumMath.PI_OVER_TWO));
return Rectangle;
});
/*global define*/
define('Core/BoundingSphere',[
'./Cartesian3',
'./Cartographic',
'./Check',
'./defaultValue',
'./defined',
'./Ellipsoid',
'./GeographicProjection',
'./Intersect',
'./Interval',
'./Matrix3',
'./Matrix4',
'./Rectangle'
], function(
Cartesian3,
Cartographic,
Check,
defaultValue,
defined,
Ellipsoid,
GeographicProjection,
Intersect,
Interval,
Matrix3,
Matrix4,
Rectangle) {
'use strict';
/**
* A bounding sphere with a center and a radius.
* @alias BoundingSphere
* @constructor
*
* @param {Cartesian3} [center=Cartesian3.ZERO] The center of the bounding sphere.
* @param {Number} [radius=0.0] The radius of the bounding sphere.
*
* @see AxisAlignedBoundingBox
* @see BoundingRectangle
* @see Packable
*/
function BoundingSphere(center, radius) {
/**
* The center point of the sphere.
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
this.center = Cartesian3.clone(defaultValue(center, Cartesian3.ZERO));
/**
* The radius of the sphere.
* @type {Number}
* @default 0.0
*/
this.radius = defaultValue(radius, 0.0);
}
var fromPointsXMin = new Cartesian3();
var fromPointsYMin = new Cartesian3();
var fromPointsZMin = new Cartesian3();
var fromPointsXMax = new Cartesian3();
var fromPointsYMax = new Cartesian3();
var fromPointsZMax = new Cartesian3();
var fromPointsCurrentPos = new Cartesian3();
var fromPointsScratch = new Cartesian3();
var fromPointsRitterCenter = new Cartesian3();
var fromPointsMinBoxPt = new Cartesian3();
var fromPointsMaxBoxPt = new Cartesian3();
var fromPointsNaiveCenterScratch = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing a list of 3D Cartesian points.
* The bounding sphere is computed by running two algorithms, a naive algorithm and
* Ritter's algorithm. The smaller of the two spheres is used to ensure a tight fit.
*
* @param {Cartesian3[]} positions An array of points that the bounding sphere will enclose. Each point must have <code>x</code>, <code>y</code>, and <code>z</code> properties.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
*
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromPoints = function(positions, result) {
if (!defined(result)) {
result = new BoundingSphere();
}
if (!defined(positions) || positions.length === 0) {
result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
result.radius = 0.0;
return result;
}
var currentPos = Cartesian3.clone(positions[0], fromPointsCurrentPos);
var xMin = Cartesian3.clone(currentPos, fromPointsXMin);
var yMin = Cartesian3.clone(currentPos, fromPointsYMin);
var zMin = Cartesian3.clone(currentPos, fromPointsZMin);
var xMax = Cartesian3.clone(currentPos, fromPointsXMax);
var yMax = Cartesian3.clone(currentPos, fromPointsYMax);
var zMax = Cartesian3.clone(currentPos, fromPointsZMax);
var numPositions = positions.length;
for (var i = 1; i < numPositions; i++) {
Cartesian3.clone(positions[i], currentPos);
var x = currentPos.x;
var y = currentPos.y;
var z = currentPos.z;
// Store points containing the the smallest and largest components
if (x < xMin.x) {
Cartesian3.clone(currentPos, xMin);
}
if (x > xMax.x) {
Cartesian3.clone(currentPos, xMax);
}
if (y < yMin.y) {
Cartesian3.clone(currentPos, yMin);
}
if (y > yMax.y) {
Cartesian3.clone(currentPos, yMax);
}
if (z < zMin.z) {
Cartesian3.clone(currentPos, zMin);
}
if (z > zMax.z) {
Cartesian3.clone(currentPos, zMax);
}
}
// Compute x-, y-, and z-spans (Squared distances b/n each component's min. and max.).
var xSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(xMax, xMin, fromPointsScratch));
var ySpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(yMax, yMin, fromPointsScratch));
var zSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(zMax, zMin, fromPointsScratch));
// Set the diameter endpoints to the largest span.
var diameter1 = xMin;
var diameter2 = xMax;
var maxSpan = xSpan;
if (ySpan > maxSpan) {
maxSpan = ySpan;
diameter1 = yMin;
diameter2 = yMax;
}
if (zSpan > maxSpan) {
maxSpan = zSpan;
diameter1 = zMin;
diameter2 = zMax;
}
// Calculate the center of the initial sphere found by Ritter's algorithm
var ritterCenter = fromPointsRitterCenter;
ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
// Calculate the radius of the initial sphere found by Ritter's algorithm
var radiusSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(diameter2, ritterCenter, fromPointsScratch));
var ritterRadius = Math.sqrt(radiusSquared);
// Find the center of the sphere found using the Naive method.
var minBoxPt = fromPointsMinBoxPt;
minBoxPt.x = xMin.x;
minBoxPt.y = yMin.y;
minBoxPt.z = zMin.z;
var maxBoxPt = fromPointsMaxBoxPt;
maxBoxPt.x = xMax.x;
maxBoxPt.y = yMax.y;
maxBoxPt.z = zMax.z;
var naiveCenter = Cartesian3.multiplyByScalar(Cartesian3.add(minBoxPt, maxBoxPt, fromPointsScratch), 0.5, fromPointsNaiveCenterScratch);
// Begin 2nd pass to find naive radius and modify the ritter sphere.
var naiveRadius = 0;
for (i = 0; i < numPositions; i++) {
Cartesian3.clone(positions[i], currentPos);
// Find the furthest point from the naive center to calculate the naive radius.
var r = Cartesian3.magnitude(Cartesian3.subtract(currentPos, naiveCenter, fromPointsScratch));
if (r > naiveRadius) {
naiveRadius = r;
}
// Make adjustments to the Ritter Sphere to include all points.
var oldCenterToPointSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(currentPos, ritterCenter, fromPointsScratch));
if (oldCenterToPointSquared > radiusSquared) {
var oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
// Calculate new radius to include the point that lies outside
ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
radiusSquared = ritterRadius * ritterRadius;
// Calculate center of new Ritter sphere
var oldToNew = oldCenterToPoint - ritterRadius;
ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
}
}
if (ritterRadius < naiveRadius) {
Cartesian3.clone(ritterCenter, result.center);
result.radius = ritterRadius;
} else {
Cartesian3.clone(naiveCenter, result.center);
result.radius = naiveRadius;
}
return result;
};
var defaultProjection = new GeographicProjection();
var fromRectangle2DLowerLeft = new Cartesian3();
var fromRectangle2DUpperRight = new Cartesian3();
var fromRectangle2DSouthwest = new Cartographic();
var fromRectangle2DNortheast = new Cartographic();
/**
* Computes a bounding sphere from an rectangle projected in 2D.
*
* @param {Rectangle} rectangle The rectangle around which to create a bounding sphere.
* @param {Object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.fromRectangle2D = function(rectangle, projection, result) {
return BoundingSphere.fromRectangleWithHeights2D(rectangle, projection, 0.0, 0.0, result);
};
/**
* Computes a bounding sphere from a rectangle projected in 2D. The bounding sphere accounts for the
* object's minimum and maximum heights over the rectangle.
*
* @param {Rectangle} rectangle The rectangle around which to create a bounding sphere.
* @param {Object} [projection=GeographicProjection] The projection used to project the rectangle into 2D.
* @param {Number} [minimumHeight=0.0] The minimum height over the rectangle.
* @param {Number} [maximumHeight=0.0] The maximum height over the rectangle.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.fromRectangleWithHeights2D = function(rectangle, projection, minimumHeight, maximumHeight, result) {
if (!defined(result)) {
result = new BoundingSphere();
}
if (!defined(rectangle)) {
result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
result.radius = 0.0;
return result;
}
projection = defaultValue(projection, defaultProjection);
Rectangle.southwest(rectangle, fromRectangle2DSouthwest);
fromRectangle2DSouthwest.height = minimumHeight;
Rectangle.northeast(rectangle, fromRectangle2DNortheast);
fromRectangle2DNortheast.height = maximumHeight;
var lowerLeft = projection.project(fromRectangle2DSouthwest, fromRectangle2DLowerLeft);
var upperRight = projection.project(fromRectangle2DNortheast, fromRectangle2DUpperRight);
var width = upperRight.x - lowerLeft.x;
var height = upperRight.y - lowerLeft.y;
var elevation = upperRight.z - lowerLeft.z;
result.radius = Math.sqrt(width * width + height * height + elevation * elevation) * 0.5;
var center = result.center;
center.x = lowerLeft.x + width * 0.5;
center.y = lowerLeft.y + height * 0.5;
center.z = lowerLeft.z + elevation * 0.5;
return result;
};
var fromRectangle3DScratch = [];
/**
* Computes a bounding sphere from a rectangle in 3D. The bounding sphere is created using a subsample of points
* on the ellipsoid and contained in the rectangle. It may not be accurate for all rectangles on all types of ellipsoids.
*
* @param {Rectangle} rectangle The valid rectangle used to create a bounding sphere.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid used to determine positions of the rectangle.
* @param {Number} [surfaceHeight=0.0] The height above the surface of the ellipsoid.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.fromRectangle3D = function(rectangle, ellipsoid, surfaceHeight, result) {
ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
surfaceHeight = defaultValue(surfaceHeight, 0.0);
var positions;
if (defined(rectangle)) {
positions = Rectangle.subsample(rectangle, ellipsoid, surfaceHeight, fromRectangle3DScratch);
}
return BoundingSphere.fromPoints(positions, result);
};
/**
* Computes a tight-fitting bounding sphere enclosing a list of 3D points, where the points are
* stored in a flat array in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
*
* @param {Number[]} positions An array of points that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {Cartesian3} [center=Cartesian3.ZERO] The position to which the positions are relative, which need not be the
* origin of the coordinate system. This is useful when the positions are to be used for
* relative-to-center (RTC) rendering.
* @param {Number} [stride=3] The number of array elements per vertex. It must be at least 3, but it may
* be higher. Regardless of the value of this parameter, the X coordinate of the first position
* is at array index 0, the Y coordinate is at array index 1, and the Z coordinate is at array index
* 2. When stride is 3, the X coordinate of the next position then begins at array index 3. If
* the stride is 5, however, two array elements are skipped and the next position begins at array
* index 5.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
*
* @example
* // Compute the bounding sphere from 3 positions, each specified relative to a center.
* // In addition to the X, Y, and Z coordinates, the points array contains two additional
* // elements per point which are ignored for the purpose of computing the bounding sphere.
* var center = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* var points = [1.0, 2.0, 3.0, 0.1, 0.2,
* 4.0, 5.0, 6.0, 0.1, 0.2,
* 7.0, 8.0, 9.0, 0.1, 0.2];
* var sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);
*
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromVertices = function(positions, center, stride, result) {
if (!defined(result)) {
result = new BoundingSphere();
}
if (!defined(positions) || positions.length === 0) {
result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
result.radius = 0.0;
return result;
}
center = defaultValue(center, Cartesian3.ZERO);
stride = defaultValue(stride, 3);
Check.typeOf.number.greaterThanOrEquals('stride', stride, 3);
var currentPos = fromPointsCurrentPos;
currentPos.x = positions[0] + center.x;
currentPos.y = positions[1] + center.y;
currentPos.z = positions[2] + center.z;
var xMin = Cartesian3.clone(currentPos, fromPointsXMin);
var yMin = Cartesian3.clone(currentPos, fromPointsYMin);
var zMin = Cartesian3.clone(currentPos, fromPointsZMin);
var xMax = Cartesian3.clone(currentPos, fromPointsXMax);
var yMax = Cartesian3.clone(currentPos, fromPointsYMax);
var zMax = Cartesian3.clone(currentPos, fromPointsZMax);
var numElements = positions.length;
for (var i = 0; i < numElements; i += stride) {
var x = positions[i] + center.x;
var y = positions[i + 1] + center.y;
var z = positions[i + 2] + center.z;
currentPos.x = x;
currentPos.y = y;
currentPos.z = z;
// Store points containing the the smallest and largest components
if (x < xMin.x) {
Cartesian3.clone(currentPos, xMin);
}
if (x > xMax.x) {
Cartesian3.clone(currentPos, xMax);
}
if (y < yMin.y) {
Cartesian3.clone(currentPos, yMin);
}
if (y > yMax.y) {
Cartesian3.clone(currentPos, yMax);
}
if (z < zMin.z) {
Cartesian3.clone(currentPos, zMin);
}
if (z > zMax.z) {
Cartesian3.clone(currentPos, zMax);
}
}
// Compute x-, y-, and z-spans (Squared distances b/n each component's min. and max.).
var xSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(xMax, xMin, fromPointsScratch));
var ySpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(yMax, yMin, fromPointsScratch));
var zSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(zMax, zMin, fromPointsScratch));
// Set the diameter endpoints to the largest span.
var diameter1 = xMin;
var diameter2 = xMax;
var maxSpan = xSpan;
if (ySpan > maxSpan) {
maxSpan = ySpan;
diameter1 = yMin;
diameter2 = yMax;
}
if (zSpan > maxSpan) {
maxSpan = zSpan;
diameter1 = zMin;
diameter2 = zMax;
}
// Calculate the center of the initial sphere found by Ritter's algorithm
var ritterCenter = fromPointsRitterCenter;
ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
// Calculate the radius of the initial sphere found by Ritter's algorithm
var radiusSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(diameter2, ritterCenter, fromPointsScratch));
var ritterRadius = Math.sqrt(radiusSquared);
// Find the center of the sphere found using the Naive method.
var minBoxPt = fromPointsMinBoxPt;
minBoxPt.x = xMin.x;
minBoxPt.y = yMin.y;
minBoxPt.z = zMin.z;
var maxBoxPt = fromPointsMaxBoxPt;
maxBoxPt.x = xMax.x;
maxBoxPt.y = yMax.y;
maxBoxPt.z = zMax.z;
var naiveCenter = Cartesian3.multiplyByScalar(Cartesian3.add(minBoxPt, maxBoxPt, fromPointsScratch), 0.5, fromPointsNaiveCenterScratch);
// Begin 2nd pass to find naive radius and modify the ritter sphere.
var naiveRadius = 0;
for (i = 0; i < numElements; i += stride) {
currentPos.x = positions[i] + center.x;
currentPos.y = positions[i + 1] + center.y;
currentPos.z = positions[i + 2] + center.z;
// Find the furthest point from the naive center to calculate the naive radius.
var r = Cartesian3.magnitude(Cartesian3.subtract(currentPos, naiveCenter, fromPointsScratch));
if (r > naiveRadius) {
naiveRadius = r;
}
// Make adjustments to the Ritter Sphere to include all points.
var oldCenterToPointSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(currentPos, ritterCenter, fromPointsScratch));
if (oldCenterToPointSquared > radiusSquared) {
var oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
// Calculate new radius to include the point that lies outside
ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
radiusSquared = ritterRadius * ritterRadius;
// Calculate center of new Ritter sphere
var oldToNew = oldCenterToPoint - ritterRadius;
ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
}
}
if (ritterRadius < naiveRadius) {
Cartesian3.clone(ritterCenter, result.center);
result.radius = ritterRadius;
} else {
Cartesian3.clone(naiveCenter, result.center);
result.radius = naiveRadius;
}
return result;
};
/**
* Computes a tight-fitting bounding sphere enclosing a list of {@link EncodedCartesian3}s, where the points are
* stored in parallel flat arrays in X, Y, Z, order. The bounding sphere is computed by running two
* algorithms, a naive algorithm and Ritter's algorithm. The smaller of the two spheres is used to
* ensure a tight fit.
*
* @param {Number[]} positionsHigh An array of high bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {Number[]} positionsLow An array of low bits of the encoded cartesians that the bounding sphere will enclose. Each point
* is formed from three elements in the array in the order X, Y, Z.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
*
* @see {@link http://blogs.agi.com/insight3d/index.php/2008/02/04/a-bounding/|Bounding Sphere computation article}
*/
BoundingSphere.fromEncodedCartesianVertices = function(positionsHigh, positionsLow, result) {
if (!defined(result)) {
result = new BoundingSphere();
}
if (!defined(positionsHigh) || !defined(positionsLow) || positionsHigh.length !== positionsLow.length || positionsHigh.length === 0) {
result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
result.radius = 0.0;
return result;
}
var currentPos = fromPointsCurrentPos;
currentPos.x = positionsHigh[0] + positionsLow[0];
currentPos.y = positionsHigh[1] + positionsLow[1];
currentPos.z = positionsHigh[2] + positionsLow[2];
var xMin = Cartesian3.clone(currentPos, fromPointsXMin);
var yMin = Cartesian3.clone(currentPos, fromPointsYMin);
var zMin = Cartesian3.clone(currentPos, fromPointsZMin);
var xMax = Cartesian3.clone(currentPos, fromPointsXMax);
var yMax = Cartesian3.clone(currentPos, fromPointsYMax);
var zMax = Cartesian3.clone(currentPos, fromPointsZMax);
var numElements = positionsHigh.length;
for (var i = 0; i < numElements; i += 3) {
var x = positionsHigh[i] + positionsLow[i];
var y = positionsHigh[i + 1] + positionsLow[i + 1];
var z = positionsHigh[i + 2] + positionsLow[i + 2];
currentPos.x = x;
currentPos.y = y;
currentPos.z = z;
// Store points containing the the smallest and largest components
if (x < xMin.x) {
Cartesian3.clone(currentPos, xMin);
}
if (x > xMax.x) {
Cartesian3.clone(currentPos, xMax);
}
if (y < yMin.y) {
Cartesian3.clone(currentPos, yMin);
}
if (y > yMax.y) {
Cartesian3.clone(currentPos, yMax);
}
if (z < zMin.z) {
Cartesian3.clone(currentPos, zMin);
}
if (z > zMax.z) {
Cartesian3.clone(currentPos, zMax);
}
}
// Compute x-, y-, and z-spans (Squared distances b/n each component's min. and max.).
var xSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(xMax, xMin, fromPointsScratch));
var ySpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(yMax, yMin, fromPointsScratch));
var zSpan = Cartesian3.magnitudeSquared(Cartesian3.subtract(zMax, zMin, fromPointsScratch));
// Set the diameter endpoints to the largest span.
var diameter1 = xMin;
var diameter2 = xMax;
var maxSpan = xSpan;
if (ySpan > maxSpan) {
maxSpan = ySpan;
diameter1 = yMin;
diameter2 = yMax;
}
if (zSpan > maxSpan) {
maxSpan = zSpan;
diameter1 = zMin;
diameter2 = zMax;
}
// Calculate the center of the initial sphere found by Ritter's algorithm
var ritterCenter = fromPointsRitterCenter;
ritterCenter.x = (diameter1.x + diameter2.x) * 0.5;
ritterCenter.y = (diameter1.y + diameter2.y) * 0.5;
ritterCenter.z = (diameter1.z + diameter2.z) * 0.5;
// Calculate the radius of the initial sphere found by Ritter's algorithm
var radiusSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(diameter2, ritterCenter, fromPointsScratch));
var ritterRadius = Math.sqrt(radiusSquared);
// Find the center of the sphere found using the Naive method.
var minBoxPt = fromPointsMinBoxPt;
minBoxPt.x = xMin.x;
minBoxPt.y = yMin.y;
minBoxPt.z = zMin.z;
var maxBoxPt = fromPointsMaxBoxPt;
maxBoxPt.x = xMax.x;
maxBoxPt.y = yMax.y;
maxBoxPt.z = zMax.z;
var naiveCenter = Cartesian3.multiplyByScalar(Cartesian3.add(minBoxPt, maxBoxPt, fromPointsScratch), 0.5, fromPointsNaiveCenterScratch);
// Begin 2nd pass to find naive radius and modify the ritter sphere.
var naiveRadius = 0;
for (i = 0; i < numElements; i += 3) {
currentPos.x = positionsHigh[i] + positionsLow[i];
currentPos.y = positionsHigh[i + 1] + positionsLow[i + 1];
currentPos.z = positionsHigh[i + 2] + positionsLow[i + 2];
// Find the furthest point from the naive center to calculate the naive radius.
var r = Cartesian3.magnitude(Cartesian3.subtract(currentPos, naiveCenter, fromPointsScratch));
if (r > naiveRadius) {
naiveRadius = r;
}
// Make adjustments to the Ritter Sphere to include all points.
var oldCenterToPointSquared = Cartesian3.magnitudeSquared(Cartesian3.subtract(currentPos, ritterCenter, fromPointsScratch));
if (oldCenterToPointSquared > radiusSquared) {
var oldCenterToPoint = Math.sqrt(oldCenterToPointSquared);
// Calculate new radius to include the point that lies outside
ritterRadius = (ritterRadius + oldCenterToPoint) * 0.5;
radiusSquared = ritterRadius * ritterRadius;
// Calculate center of new Ritter sphere
var oldToNew = oldCenterToPoint - ritterRadius;
ritterCenter.x = (ritterRadius * ritterCenter.x + oldToNew * currentPos.x) / oldCenterToPoint;
ritterCenter.y = (ritterRadius * ritterCenter.y + oldToNew * currentPos.y) / oldCenterToPoint;
ritterCenter.z = (ritterRadius * ritterCenter.z + oldToNew * currentPos.z) / oldCenterToPoint;
}
}
if (ritterRadius < naiveRadius) {
Cartesian3.clone(ritterCenter, result.center);
result.radius = ritterRadius;
} else {
Cartesian3.clone(naiveCenter, result.center);
result.radius = naiveRadius;
}
return result;
};
/**
* Computes a bounding sphere from the corner points of an axis-aligned bounding box. The sphere
* tighly and fully encompases the box.
*
* @param {Cartesian3} [corner] The minimum height over the rectangle.
* @param {Cartesian3} [oppositeCorner] The maximum height over the rectangle.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*
* @example
* // Create a bounding sphere around the unit cube
* var sphere = Cesium.BoundingSphere.fromCornerPoints(new Cesium.Cartesian3(-0.5, -0.5, -0.5), new Cesium.Cartesian3(0.5, 0.5, 0.5));
*/
BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) {
Check.typeOf.object('corner', corner);
Check.typeOf.object('oppositeCorner', oppositeCorner);
if (!defined(result)) {
result = new BoundingSphere();
}
var center = result.center;
Cartesian3.add(corner, oppositeCorner, center);
Cartesian3.multiplyByScalar(center, 0.5, center);
result.radius = Cartesian3.distance(center, oppositeCorner);
return result;
};
/**
* Creates a bounding sphere encompassing an ellipsoid.
*
* @param {Ellipsoid} ellipsoid The ellipsoid around which to create a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*
* @example
* var boundingSphere = Cesium.BoundingSphere.fromEllipsoid(ellipsoid);
*/
BoundingSphere.fromEllipsoid = function(ellipsoid, result) {
Check.typeOf.object('ellipsoid', ellipsoid);
if (!defined(result)) {
result = new BoundingSphere();
}
Cartesian3.clone(Cartesian3.ZERO, result.center);
result.radius = ellipsoid.maximumRadius;
return result;
};
var fromBoundingSpheresScratch = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided array of bounding spheres.
*
* @param {BoundingSphere[]} boundingSpheres The array of bounding spheres.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.fromBoundingSpheres = function(boundingSpheres, result) {
if (!defined(result)) {
result = new BoundingSphere();
}
if (!defined(boundingSpheres) || boundingSpheres.length === 0) {
result.center = Cartesian3.clone(Cartesian3.ZERO, result.center);
result.radius = 0.0;
return result;
}
var length = boundingSpheres.length;
if (length === 1) {
return BoundingSphere.clone(boundingSpheres[0], result);
}
if (length === 2) {
return BoundingSphere.union(boundingSpheres[0], boundingSpheres[1], result);
}
var positions = [];
for (var i = 0; i < length; i++) {
positions.push(boundingSpheres[i].center);
}
result = BoundingSphere.fromPoints(positions, result);
var center = result.center;
var radius = result.radius;
for (i = 0; i < length; i++) {
var tmp = boundingSpheres[i];
radius = Math.max(radius, Cartesian3.distance(center, tmp.center, fromBoundingSpheresScratch) + tmp.radius);
}
result.radius = radius;
return result;
};
var fromOrientedBoundingBoxScratchU = new Cartesian3();
var fromOrientedBoundingBoxScratchV = new Cartesian3();
var fromOrientedBoundingBoxScratchW = new Cartesian3();
/**
* Computes a tight-fitting bounding sphere enclosing the provided oriented bounding box.
*
* @param {OrientedBoundingBox} orientedBoundingBox The oriented bounding box.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.fromOrientedBoundingBox = function(orientedBoundingBox, result) {
if (!defined(result)) {
result = new BoundingSphere();
}
var halfAxes = orientedBoundingBox.halfAxes;
var u = Matrix3.getColumn(halfAxes, 0, fromOrientedBoundingBoxScratchU);
var v = Matrix3.getColumn(halfAxes, 1, fromOrientedBoundingBoxScratchV);
var w = Matrix3.getColumn(halfAxes, 2, fromOrientedBoundingBoxScratchW);
var uHalf = Cartesian3.magnitude(u);
var vHalf = Cartesian3.magnitude(v);
var wHalf = Cartesian3.magnitude(w);
result.center = Cartesian3.clone(orientedBoundingBox.center, result.center);
result.radius = Math.max(uHalf, vHalf, wHalf);
return result;
};
/**
* Duplicates a BoundingSphere instance.
*
* @param {BoundingSphere} sphere The bounding sphere to duplicate.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided. (Returns undefined if sphere is undefined)
*/
BoundingSphere.clone = function(sphere, result) {
if (!defined(sphere)) {
return undefined;
}
if (!defined(result)) {
return new BoundingSphere(sphere.center, sphere.radius);
}
result.center = Cartesian3.clone(sphere.center, result.center);
result.radius = sphere.radius;
return result;
};
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
BoundingSphere.packedLength = 4;
/**
* Stores the provided instance into the provided array.
*
* @param {BoundingSphere} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
BoundingSphere.pack = function(value, array, startingIndex) {
Check.typeOf.object('value', value);
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
var center = value.center;
array[startingIndex++] = center.x;
array[startingIndex++] = center.y;
array[startingIndex++] = center.z;
array[startingIndex] = value.radius;
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {BoundingSphere} [result] The object into which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if one was not provided.
*/
BoundingSphere.unpack = function(array, startingIndex, result) {
Check.defined('array', array);
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new BoundingSphere();
}
var center = result.center;
center.x = array[startingIndex++];
center.y = array[startingIndex++];
center.z = array[startingIndex++];
result.radius = array[startingIndex];
return result;
};
var unionScratch = new Cartesian3();
var unionScratchCenter = new Cartesian3();
/**
* Computes a bounding sphere that contains both the left and right bounding spheres.
*
* @param {BoundingSphere} left A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} right A sphere to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.union = function(left, right, result) {
Check.typeOf.object('left', left);
Check.typeOf.object('right', right);
if (!defined(result)) {
result = new BoundingSphere();
}
var leftCenter = left.center;
var leftRadius = left.radius;
var rightCenter = right.center;
var rightRadius = right.radius;
var toRightCenter = Cartesian3.subtract(rightCenter, leftCenter, unionScratch);
var centerSeparation = Cartesian3.magnitude(toRightCenter);
if (leftRadius >= (centerSeparation + rightRadius)) {
// Left sphere wins.
left.clone(result);
return result;
}
if (rightRadius >= (centerSeparation + leftRadius)) {
// Right sphere wins.
right.clone(result);
return result;
}
// There are two tangent points, one on far side of each sphere.
var halfDistanceBetweenTangentPoints = (leftRadius + centerSeparation + rightRadius) * 0.5;
// Compute the center point halfway between the two tangent points.
var center = Cartesian3.multiplyByScalar(toRightCenter,
(-leftRadius + halfDistanceBetweenTangentPoints) / centerSeparation, unionScratchCenter);
Cartesian3.add(center, leftCenter, center);
Cartesian3.clone(center, result.center);
result.radius = halfDistanceBetweenTangentPoints;
return result;
};
var expandScratch = new Cartesian3();
/**
* Computes a bounding sphere by enlarging the provided sphere to contain the provided point.
*
* @param {BoundingSphere} sphere A sphere to expand.
* @param {Cartesian3} point A point to enclose in a bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.expand = function(sphere, point, result) {
Check.typeOf.object('sphere', sphere);
Check.typeOf.object('point', point);
result = BoundingSphere.clone(sphere, result);
var radius = Cartesian3.magnitude(Cartesian3.subtract(point, result.center, expandScratch));
if (radius > result.radius) {
result.radius = radius;
}
return result;
};
/**
* Determines which side of a plane a sphere is located.
*
* @param {BoundingSphere} sphere The bounding sphere to test.
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire sphere is
* on the opposite side, and {@link Intersect.INTERSECTING} if the sphere
* intersects the plane.
*/
BoundingSphere.intersectPlane = function(sphere, plane) {
Check.typeOf.object('sphere', sphere);
Check.typeOf.object('plane', plane);
var center = sphere.center;
var radius = sphere.radius;
var normal = plane.normal;
var distanceToPlane = Cartesian3.dot(normal, center) + plane.distance;
if (distanceToPlane < -radius) {
// The center point is negative side of the plane normal
return Intersect.OUTSIDE;
} else if (distanceToPlane < radius) {
// The center point is positive side of the plane, but radius extends beyond it; partial overlap
return Intersect.INTERSECTING;
}
return Intersect.INSIDE;
};
/**
* Applies a 4x4 affine transformation matrix to a bounding sphere.
*
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.transform = function(sphere, transform, result) {
Check.typeOf.object('sphere', sphere);
Check.typeOf.object('transform', transform);
if (!defined(result)) {
result = new BoundingSphere();
}
result.center = Matrix4.multiplyByPoint(transform, sphere.center, result.center);
result.radius = Matrix4.getMaximumScale(transform) * sphere.radius;
return result;
};
var distanceSquaredToScratch = new Cartesian3();
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
*
* @param {BoundingSphere} sphere The sphere.
* @param {Cartesian3} cartesian The point
* @returns {Number} The estimated distance squared from the bounding sphere to the point.
*
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
* return Cesium.BoundingSphere.distanceSquaredTo(b, camera.positionWC) - Cesium.BoundingSphere.distanceSquaredTo(a, camera.positionWC);
* });
*/
BoundingSphere.distanceSquaredTo = function(sphere, cartesian) {
Check.typeOf.object('sphere', sphere);
Check.typeOf.object('cartesian', cartesian);
var diff = Cartesian3.subtract(sphere.center, cartesian, distanceSquaredToScratch);
return Cartesian3.magnitudeSquared(diff) - sphere.radius * sphere.radius;
};
/**
* Applies a 4x4 affine transformation matrix to a bounding sphere where there is no scale
* The transformation matrix is not verified to have a uniform scale of 1.
* This method is faster than computing the general bounding sphere transform using {@link BoundingSphere.transform}.
*
* @param {BoundingSphere} sphere The bounding sphere to apply the transformation to.
* @param {Matrix4} transform The transformation matrix to apply to the bounding sphere.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*
* @example
* var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
* var boundingSphere = new Cesium.BoundingSphere();
* var newBoundingSphere = Cesium.BoundingSphere.transformWithoutScale(boundingSphere, modelMatrix);
*/
BoundingSphere.transformWithoutScale = function(sphere, transform, result) {
Check.typeOf.object('sphere', sphere);
Check.typeOf.object('transform', transform);
if (!defined(result)) {
result = new BoundingSphere();
}
result.center = Matrix4.multiplyByPoint(transform, sphere.center, result.center);
result.radius = sphere.radius;
return result;
};
var scratchCartesian3 = new Cartesian3();
/**
* The distances calculated by the vector from the center of the bounding sphere to position projected onto direction
* plus/minus the radius of the bounding sphere.
* <br>
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
*
* @param {BoundingSphere} sphere The bounding sphere to calculate the distance to.
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
* @returns {Interval} The nearest and farthest distances on the bounding sphere from position in direction.
*/
BoundingSphere.computePlaneDistances = function(sphere, position, direction, result) {
Check.typeOf.object('sphere', sphere);
Check.typeOf.object('position', position);
Check.typeOf.object('direction', direction);
if (!defined(result)) {
result = new Interval();
}
var toCenter = Cartesian3.subtract(sphere.center, position, scratchCartesian3);
var mag = Cartesian3.dot(direction, toCenter);
result.start = mag - sphere.radius;
result.stop = mag + sphere.radius;
return result;
};
var projectTo2DNormalScratch = new Cartesian3();
var projectTo2DEastScratch = new Cartesian3();
var projectTo2DNorthScratch = new Cartesian3();
var projectTo2DWestScratch = new Cartesian3();
var projectTo2DSouthScratch = new Cartesian3();
var projectTo2DCartographicScratch = new Cartographic();
var projectTo2DPositionsScratch = new Array(8);
for (var n = 0; n < 8; ++n) {
projectTo2DPositionsScratch[n] = new Cartesian3();
}
var projectTo2DProjection = new GeographicProjection();
/**
* Creates a bounding sphere in 2D from a bounding sphere in 3D world coordinates.
*
* @param {BoundingSphere} sphere The bounding sphere to transform to 2D.
* @param {Object} [projection=GeographicProjection] The projection to 2D.
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.projectTo2D = function(sphere, projection, result) {
Check.typeOf.object('sphere', sphere);
projection = defaultValue(projection, projectTo2DProjection);
var ellipsoid = projection.ellipsoid;
var center = sphere.center;
var radius = sphere.radius;
var normal = ellipsoid.geodeticSurfaceNormal(center, projectTo2DNormalScratch);
var east = Cartesian3.cross(Cartesian3.UNIT_Z, normal, projectTo2DEastScratch);
Cartesian3.normalize(east, east);
var north = Cartesian3.cross(normal, east, projectTo2DNorthScratch);
Cartesian3.normalize(north, north);
Cartesian3.multiplyByScalar(normal, radius, normal);
Cartesian3.multiplyByScalar(north, radius, north);
Cartesian3.multiplyByScalar(east, radius, east);
var south = Cartesian3.negate(north, projectTo2DSouthScratch);
var west = Cartesian3.negate(east, projectTo2DWestScratch);
var positions = projectTo2DPositionsScratch;
// top NE corner
var corner = positions[0];
Cartesian3.add(normal, north, corner);
Cartesian3.add(corner, east, corner);
// top NW corner
corner = positions[1];
Cartesian3.add(normal, north, corner);
Cartesian3.add(corner, west, corner);
// top SW corner
corner = positions[2];
Cartesian3.add(normal, south, corner);
Cartesian3.add(corner, west, corner);
// top SE corner
corner = positions[3];
Cartesian3.add(normal, south, corner);
Cartesian3.add(corner, east, corner);
Cartesian3.negate(normal, normal);
// bottom NE corner
corner = positions[4];
Cartesian3.add(normal, north, corner);
Cartesian3.add(corner, east, corner);
// bottom NW corner
corner = positions[5];
Cartesian3.add(normal, north, corner);
Cartesian3.add(corner, west, corner);
// bottom SW corner
corner = positions[6];
Cartesian3.add(normal, south, corner);
Cartesian3.add(corner, west, corner);
// bottom SE corner
corner = positions[7];
Cartesian3.add(normal, south, corner);
Cartesian3.add(corner, east, corner);
var length = positions.length;
for (var i = 0; i < length; ++i) {
var position = positions[i];
Cartesian3.add(center, position, position);
var cartographic = ellipsoid.cartesianToCartographic(position, projectTo2DCartographicScratch);
projection.project(cartographic, position);
}
result = BoundingSphere.fromPoints(positions, result);
// swizzle center components
center = result.center;
var x = center.x;
var y = center.y;
var z = center.z;
center.x = z;
center.y = x;
center.z = y;
return result;
};
/**
* Determines whether or not a sphere is hidden from view by the occluder.
*
* @param {BoundingSphere} sphere The bounding sphere surrounding the occludee object.
* @param {Occluder} occluder The occluder.
* @returns {Boolean} <code>true</code> if the sphere is not visible; otherwise <code>false</code>.
*/
BoundingSphere.isOccluded = function(sphere, occluder) {
Check.typeOf.object('sphere', sphere);
Check.typeOf.object('occluder', occluder);
return !occluder.isBoundingSphereVisible(sphere);
};
/**
* Compares the provided BoundingSphere componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {BoundingSphere} [left] The first BoundingSphere.
* @param {BoundingSphere} [right] The second BoundingSphere.
* @returns {Boolean} <code>true</code> if left and right are equal, <code>false</code> otherwise.
*/
BoundingSphere.equals = function(left, right) {
return (left === right) ||
((defined(left)) &&
(defined(right)) &&
Cartesian3.equals(left.center, right.center) &&
left.radius === right.radius);
};
/**
* Determines which side of a plane the sphere is located.
*
* @param {Plane} plane The plane to test against.
* @returns {Intersect} {@link Intersect.INSIDE} if the entire sphere is on the side of the plane
* the normal is pointing, {@link Intersect.OUTSIDE} if the entire sphere is
* on the opposite side, and {@link Intersect.INTERSECTING} if the sphere
* intersects the plane.
*/
BoundingSphere.prototype.intersectPlane = function(plane) {
return BoundingSphere.intersectPlane(this, plane);
};
/**
* Computes the estimated distance squared from the closest point on a bounding sphere to a point.
*
* @param {Cartesian3} cartesian The point
* @returns {Number} The estimated distance squared from the bounding sphere to the point.
*
* @example
* // Sort bounding spheres from back to front
* spheres.sort(function(a, b) {
* return b.distanceSquaredTo(camera.positionWC) - a.distanceSquaredTo(camera.positionWC);
* });
*/
BoundingSphere.prototype.distanceSquaredTo = function(cartesian) {
return BoundingSphere.distanceSquaredTo(this, cartesian);
};
/**
* The distances calculated by the vector from the center of the bounding sphere to position projected onto direction
* plus/minus the radius of the bounding sphere.
* <br>
* If you imagine the infinite number of planes with normal direction, this computes the smallest distance to the
* closest and farthest planes from position that intersect the bounding sphere.
*
* @param {Cartesian3} position The position to calculate the distance from.
* @param {Cartesian3} direction The direction from position.
* @param {Interval} [result] A Interval to store the nearest and farthest distances.
* @returns {Interval} The nearest and farthest distances on the bounding sphere from position in direction.
*/
BoundingSphere.prototype.computePlaneDistances = function(position, direction, result) {
return BoundingSphere.computePlaneDistances(this, position, direction, result);
};
/**
* Determines whether or not a sphere is hidden from view by the occluder.
*
* @param {Occluder} occluder The occluder.
* @returns {Boolean} <code>true</code> if the sphere is not visible; otherwise <code>false</code>.
*/
BoundingSphere.prototype.isOccluded = function(occluder) {
return BoundingSphere.isOccluded(this, occluder);
};
/**
* Compares this BoundingSphere against the provided BoundingSphere componentwise and returns
* <code>true</code> if they are equal, <code>false</code> otherwise.
*
* @param {BoundingSphere} [right] The right hand side BoundingSphere.
* @returns {Boolean} <code>true</code> if they are equal, <code>false</code> otherwise.
*/
BoundingSphere.prototype.equals = function(right) {
return BoundingSphere.equals(this, right);
};
/**
* Duplicates this BoundingSphere instance.
*
* @param {BoundingSphere} [result] The object onto which to store the result.
* @returns {BoundingSphere} The modified result parameter or a new BoundingSphere instance if none was provided.
*/
BoundingSphere.prototype.clone = function(result) {
return BoundingSphere.clone(this, result);
};
return BoundingSphere;
});
/*global define*/
define('Core/Fullscreen',[
'./defined',
'./defineProperties'
], function(
defined,
defineProperties) {
'use strict';
var _supportsFullscreen;
var _names = {
requestFullscreen : undefined,
exitFullscreen : undefined,
fullscreenEnabled : undefined,
fullscreenElement : undefined,
fullscreenchange : undefined,
fullscreenerror : undefined
};
/**
* Browser-independent functions for working with the standard fullscreen API.
*
* @exports Fullscreen
*
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
var Fullscreen = {};
defineProperties(Fullscreen, {
/**
* The element that is currently fullscreen, if any. To simply check if the
* browser is in fullscreen mode or not, use {@link Fullscreen#fullscreen}.
* @memberof Fullscreen
* @type {Object}
* @readonly
*/
element : {
get : function() {
if (!Fullscreen.supportsFullscreen()) {
return undefined;
}
return document[_names.fullscreenElement];
}
},
/**
* The name of the event on the document that is fired when fullscreen is
* entered or exited. This event name is intended for use with addEventListener.
* In your event handler, to determine if the browser is in fullscreen mode or not,
* use {@link Fullscreen#fullscreen}.
* @memberof Fullscreen
* @type {String}
* @readonly
*/
changeEventName : {
get : function() {
if (!Fullscreen.supportsFullscreen()) {
return undefined;
}
return _names.fullscreenchange;
}
},
/**
* The name of the event that is fired when a fullscreen error
* occurs. This event name is intended for use with addEventListener.
* @memberof Fullscreen
* @type {String}
* @readonly
*/
errorEventName : {
get : function() {
if (!Fullscreen.supportsFullscreen()) {
return undefined;
}
return _names.fullscreenerror;
}
},
/**
* Determine whether the browser will allow an element to be made fullscreen, or not.
* For example, by default, iframes cannot go fullscreen unless the containing page
* adds an "allowfullscreen" attribute (or prefixed equivalent).
* @memberof Fullscreen
* @type {Boolean}
* @readonly
*/
enabled : {
get : function() {
if (!Fullscreen.supportsFullscreen()) {
return undefined;
}
return document[_names.fullscreenEnabled];
}
},
/**
* Determines if the browser is currently in fullscreen mode.
* @memberof Fullscreen
* @type {Boolean}
* @readonly
*/
fullscreen : {
get : function() {
if (!Fullscreen.supportsFullscreen()) {
return undefined;
}
return Fullscreen.element !== null;
}
}
});
/**
* Detects whether the browser supports the standard fullscreen API.
*
* @returns {Boolean} <code>true</code> if the browser supports the standard fullscreen API,
* <code>false</code> otherwise.
*/
Fullscreen.supportsFullscreen = function() {
if (defined(_supportsFullscreen)) {
return _supportsFullscreen;
}
_supportsFullscreen = false;
var body = document.body;
if (typeof body.requestFullscreen === 'function') {
// go with the unprefixed, standard set of names
_names.requestFullscreen = 'requestFullscreen';
_names.exitFullscreen = 'exitFullscreen';
_names.fullscreenEnabled = 'fullscreenEnabled';
_names.fullscreenElement = 'fullscreenElement';
_names.fullscreenchange = 'fullscreenchange';
_names.fullscreenerror = 'fullscreenerror';
_supportsFullscreen = true;
return _supportsFullscreen;
}
//check for the correct combination of prefix plus the various names that browsers use
var prefixes = ['webkit', 'moz', 'o', 'ms', 'khtml'];
var name;
for (var i = 0, len = prefixes.length; i < len; ++i) {
var prefix = prefixes[i];
// casing of Fullscreen differs across browsers
name = prefix + 'RequestFullscreen';
if (typeof body[name] === 'function') {
_names.requestFullscreen = name;
_supportsFullscreen = true;
} else {
name = prefix + 'RequestFullScreen';
if (typeof body[name] === 'function') {
_names.requestFullscreen = name;
_supportsFullscreen = true;
}
}
// disagreement about whether it's "exit" as per spec, or "cancel"
name = prefix + 'ExitFullscreen';
if (typeof document[name] === 'function') {
_names.exitFullscreen = name;
} else {
name = prefix + 'CancelFullScreen';
if (typeof document[name] === 'function') {
_names.exitFullscreen = name;
}
}
// casing of Fullscreen differs across browsers
name = prefix + 'FullscreenEnabled';
if (document[name] !== undefined) {
_names.fullscreenEnabled = name;
} else {
name = prefix + 'FullScreenEnabled';
if (document[name] !== undefined) {
_names.fullscreenEnabled = name;
}
}
// casing of Fullscreen differs across browsers
name = prefix + 'FullscreenElement';
if (document[name] !== undefined) {
_names.fullscreenElement = name;
} else {
name = prefix + 'FullScreenElement';
if (document[name] !== undefined) {
_names.fullscreenElement = name;
}
}
// thankfully, event names are all lowercase per spec
name = prefix + 'fullscreenchange';
// event names do not have 'on' in the front, but the property on the document does
if (document['on' + name] !== undefined) {
//except on IE
if (prefix === 'ms') {
name = 'MSFullscreenChange';
}
_names.fullscreenchange = name;
}
name = prefix + 'fullscreenerror';
if (document['on' + name] !== undefined) {
//except on IE
if (prefix === 'ms') {
name = 'MSFullscreenError';
}
_names.fullscreenerror = name;
}
}
return _supportsFullscreen;
};
/**
* Asynchronously requests the browser to enter fullscreen mode on the given element.
* If fullscreen mode is not supported by the browser, does nothing.
*
* @param {Object} element The HTML element which will be placed into fullscreen mode.
* @param {HMDVRDevice} [vrDevice] The VR device.
*
* @example
* // Put the entire page into fullscreen.
* Cesium.Fullscreen.requestFullscreen(document.body)
*
* // Place only the Cesium canvas into fullscreen.
* Cesium.Fullscreen.requestFullscreen(scene.canvas)
*/
Fullscreen.requestFullscreen = function(element, vrDevice) {
if (!Fullscreen.supportsFullscreen()) {
return;
}
element[_names.requestFullscreen]({ vrDisplay: vrDevice });
};
/**
* Asynchronously exits fullscreen mode. If the browser is not currently
* in fullscreen, or if fullscreen mode is not supported by the browser, does nothing.
*/
Fullscreen.exitFullscreen = function() {
if (!Fullscreen.supportsFullscreen()) {
return;
}
document[_names.exitFullscreen]();
};
return Fullscreen;
});
/*global define*/
define('Core/FeatureDetection',[
'./defaultValue',
'./defined',
'./Fullscreen'
], function(
defaultValue,
defined,
Fullscreen) {
'use strict';
var theNavigator;
if (typeof navigator !== 'undefined') {
theNavigator = navigator;
} else {
theNavigator = {};
}
function extractVersion(versionString) {
var parts = versionString.split('.');
for (var i = 0, len = parts.length; i < len; ++i) {
parts[i] = parseInt(parts[i], 10);
}
return parts;
}
var isChromeResult;
var chromeVersionResult;
function isChrome() {
if (!defined(isChromeResult)) {
isChromeResult = false;
// Edge contains Chrome in the user agent too
if (!isEdge()) {
var fields = (/ Chrome\/([\.0-9]+)/).exec(theNavigator.userAgent);
if (fields !== null) {
isChromeResult = true;
chromeVersionResult = extractVersion(fields[1]);
}
}
}
return isChromeResult;
}
function chromeVersion() {
return isChrome() && chromeVersionResult;
}
var isSafariResult;
var safariVersionResult;
function isSafari() {
if (!defined(isSafariResult)) {
isSafariResult = false;
// Chrome and Edge contain Safari in the user agent too
if (!isChrome() && !isEdge() && (/ Safari\/[\.0-9]+/).test(theNavigator.userAgent)) {
var fields = (/ Version\/([\.0-9]+)/).exec(theNavigator.userAgent);
if (fields !== null) {
isSafariResult = true;
safariVersionResult = extractVersion(fields[1]);
}
}
}
return isSafariResult;
}
function safariVersion() {
return isSafari() && safariVersionResult;
}
var isWebkitResult;
var webkitVersionResult;
function isWebkit() {
if (!defined(isWebkitResult)) {
isWebkitResult = false;
var fields = (/ AppleWebKit\/([\.0-9]+)(\+?)/).exec(theNavigator.userAgent);
if (fields !== null) {
isWebkitResult = true;
webkitVersionResult = extractVersion(fields[1]);
webkitVersionResult.isNightly = !!fields[2];
}
}
return isWebkitResult;
}
function webkitVersion() {
return isWebkit() && webkitVersionResult;
}
var isInternetExplorerResult;
var internetExplorerVersionResult;
function isInternetExplorer() {
if (!defined(isInternetExplorerResult)) {
isInternetExplorerResult = false;
var fields;
if (theNavigator.appName === 'Microsoft Internet Explorer') {
fields = /MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent);
if (fields !== null) {
isInternetExplorerResult = true;
internetExplorerVersionResult = extractVersion(fields[1]);
}
} else if (theNavigator.appName === 'Netscape') {
fields = /Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(theNavigator.userAgent);
if (fields !== null) {
isInternetExplorerResult = true;
internetExplorerVersionResult = extractVersion(fields[1]);
}
}
}
return isInternetExplorerResult;
}
function internetExplorerVersion() {
return isInternetExplorer() && internetExplorerVersionResult;
}
var isEdgeResult;
var edgeVersionResult;
function isEdge() {
if (!defined(isEdgeResult)) {
isEdgeResult = false;
var fields = (/ Edge\/([\.0-9]+)/).exec(theNavigator.userAgent);
if (fields !== null) {
isEdgeResult = true;
edgeVersionResult = extractVersion(fields[1]);
}
}
return isEdgeResult;
}
function edgeVersion() {
return isEdge() && edgeVersionResult;
}
var isFirefoxResult;
var firefoxVersionResult;
function isFirefox() {
if (!defined(isFirefoxResult)) {
isFirefoxResult = false;
var fields = /Firefox\/([\.0-9]+)/.exec(theNavigator.userAgent);
if (fields !== null) {
isFirefoxResult = true;
firefoxVersionResult = extractVersion(fields[1]);
}
}
return isFirefoxResult;
}
var isWindowsResult;
function isWindows() {
if (!defined(isWindowsResult)) {
isWindowsResult = /Windows/i.test(theNavigator.appVersion);
}
return isWindowsResult;
}
function firefoxVersion() {
return isFirefox() && firefoxVersionResult;
}
var hasPointerEvents;
function supportsPointerEvents() {
if (!defined(hasPointerEvents)) {
//While navigator.pointerEnabled is deprecated in the W3C specification
//we still need to use it if it exists in order to support browsers
//that rely on it, such as the Windows WebBrowser control which defines
//PointerEvent but sets navigator.pointerEnabled to false.
hasPointerEvents = typeof PointerEvent !== 'undefined' && (!defined(theNavigator.pointerEnabled) || theNavigator.pointerEnabled);
}
return hasPointerEvents;
}
var imageRenderingValueResult;
var supportsImageRenderingPixelatedResult;
function supportsImageRenderingPixelated() {
if (!defined(supportsImageRenderingPixelatedResult)) {
var canvas = document.createElement('canvas');
canvas.setAttribute('style',
'image-rendering: -moz-crisp-edges;' +
'image-rendering: pixelated;');
//canvas.style.imageRendering will be undefined, null or an empty string on unsupported browsers.
var tmp = canvas.style.imageRendering;
supportsImageRenderingPixelatedResult = defined(tmp) && tmp !== '';
if (supportsImageRenderingPixelatedResult) {
imageRenderingValueResult = tmp;
}
}
return supportsImageRenderingPixelatedResult;
}
function imageRenderingValue() {
return supportsImageRenderingPixelated() ? imageRenderingValueResult : undefined;
}
/**
* A set of functions to detect whether the current browser supports
* various features.
*
* @exports FeatureDetection
*/
var FeatureDetection = {
isChrome : isChrome,
chromeVersion : chromeVersion,
isSafari : isSafari,
safariVersion : safariVersion,
isWebkit : isWebkit,
webkitVersion : webkitVersion,
isInternetExplorer : isInternetExplorer,
internetExplorerVersion : internetExplorerVersion,
isEdge : isEdge,
edgeVersion : edgeVersion,
isFirefox : isFirefox,
firefoxVersion : firefoxVersion,
isWindows : isWindows,
hardwareConcurrency : defaultValue(theNavigator.hardwareConcurrency, 3),
supportsPointerEvents : supportsPointerEvents,
supportsImageRenderingPixelated: supportsImageRenderingPixelated,
imageRenderingValue: imageRenderingValue
};
/**
* Detects whether the current browser supports the full screen standard.
*
* @returns {Boolean} true if the browser supports the full screen standard, false if not.
*
* @see Fullscreen
* @see {@link http://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html|W3C Fullscreen Living Specification}
*/
FeatureDetection.supportsFullscreen = function() {
return Fullscreen.supportsFullscreen();
};
/**
* Detects whether the current browser supports typed arrays.
*
* @returns {Boolean} true if the browser supports typed arrays, false if not.
*
* @see {@link http://www.khronos.org/registry/typedarray/specs/latest/|Typed Array Specification}
*/
FeatureDetection.supportsTypedArrays = function() {
return typeof ArrayBuffer !== 'undefined';
};
/**
* Detects whether the current browser supports Web Workers.
*
* @returns {Boolean} true if the browsers supports Web Workers, false if not.
*
* @see {@link http://www.w3.org/TR/workers/}
*/
FeatureDetection.supportsWebWorkers = function() {
return typeof Worker !== 'undefined';
};
return FeatureDetection;
});
/*global define*/
define('Core/Color',[
'./defaultValue',
'./defined',
'./DeveloperError',
'./FeatureDetection',
'./freezeObject',
'./Math'
], function(
defaultValue,
defined,
DeveloperError,
FeatureDetection,
freezeObject,
CesiumMath) {
'use strict';
function hue2rgb(m1, m2, h) {
if (h < 0) {
h += 1;
}
if (h > 1) {
h -= 1;
}
if (h * 6 < 1) {
return m1 + (m2 - m1) * 6 * h;
}
if (h * 2 < 1) {
return m2;
}
if (h * 3 < 2) {
return m1 + (m2 - m1) * (2 / 3 - h) * 6;
}
return m1;
}
/**
* A color, specified using red, green, blue, and alpha values,
* which range from <code>0</code> (no intensity) to <code>1.0</code> (full intensity).
* @param {Number} [red=1.0] The red component.
* @param {Number} [green=1.0] The green component.
* @param {Number} [blue=1.0] The blue component.
* @param {Number} [alpha=1.0] The alpha component.
*
* @constructor
* @alias Color
*
* @see Packable
*/
function Color(red, green, blue, alpha) {
/**
* The red component.
* @type {Number}
* @default 1.0
*/
this.red = defaultValue(red, 1.0);
/**
* The green component.
* @type {Number}
* @default 1.0
*/
this.green = defaultValue(green, 1.0);
/**
* The blue component.
* @type {Number}
* @default 1.0
*/
this.blue = defaultValue(blue, 1.0);
/**
* The alpha component.
* @type {Number}
* @default 1.0
*/
this.alpha = defaultValue(alpha, 1.0);
}
/**
* Creates a Color instance from a {@link Cartesian4}. <code>x</code>, <code>y</code>, <code>z</code>,
* and <code>w</code> map to <code>red</code>, <code>green</code>, <code>blue</code>, and <code>alpha</code>, respectively.
*
* @param {Cartesian4} cartesian The source cartesian.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*/
Color.fromCartesian4 = function(cartesian, result) {
if (!defined(cartesian)) {
throw new DeveloperError('cartesian is required');
}
if (!defined(result)) {
return new Color(cartesian.x, cartesian.y, cartesian.z, cartesian.w);
}
result.red = cartesian.x;
result.green = cartesian.y;
result.blue = cartesian.z;
result.alpha = cartesian.w;
return result;
};
/**
* Creates a new Color specified using red, green, blue, and alpha values
* that are in the range of 0 to 255, converting them internally to a range of 0.0 to 1.0.
*
* @param {Number} [red=255] The red component.
* @param {Number} [green=255] The green component.
* @param {Number} [blue=255] The blue component.
* @param {Number} [alpha=255] The alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*/
Color.fromBytes = function(red, green, blue, alpha, result) {
red = Color.byteToFloat(defaultValue(red, 255.0));
green = Color.byteToFloat(defaultValue(green, 255.0));
blue = Color.byteToFloat(defaultValue(blue, 255.0));
alpha = Color.byteToFloat(defaultValue(alpha, 255.0));
if (!defined(result)) {
return new Color(red, green, blue, alpha);
}
result.red = red;
result.green = green;
result.blue = blue;
result.alpha = alpha;
return result;
};
/**
* Creates a new Color that has the same red, green, and blue components
* of the specified color, but with the specified alpha value.
*
* @param {Color} color The base color
* @param {Number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*
* @example var translucentRed = Cesium.Color.fromAlpha(Cesium.Color.RED, 0.9);
*/
Color.fromAlpha = function(color, alpha, result) {
if (!defined(color)) {
throw new DeveloperError('color is required');
}
if (!defined(alpha)) {
throw new DeveloperError('alpha is required');
}
if (!defined(result)) {
return new Color(color.red, color.green, color.blue, alpha);
}
result.red = color.red;
result.green = color.green;
result.blue = color.blue;
result.alpha = alpha;
return result;
};
var scratchArrayBuffer;
var scratchUint32Array;
var scratchUint8Array;
if (FeatureDetection.supportsTypedArrays()) {
scratchArrayBuffer = new ArrayBuffer(4);
scratchUint32Array = new Uint32Array(scratchArrayBuffer);
scratchUint8Array = new Uint8Array(scratchArrayBuffer);
}
/**
* Creates a new Color from a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
*
* @param {Number} rgba A single numeric unsigned 32-bit RGBA value.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
*
* @example
* var color = Cesium.Color.fromRgba(0x67ADDFFF);
*
* @see Color#toRgba
*/
Color.fromRgba = function(rgba, result) {
// scratchUint32Array and scratchUint8Array share an underlying array buffer
scratchUint32Array[0] = rgba;
return Color.fromBytes(scratchUint8Array[0], scratchUint8Array[1], scratchUint8Array[2], scratchUint8Array[3], result);
};
/**
* Creates a Color instance from hue, saturation, and lightness.
*
* @param {Number} [hue=0] The hue angle 0...1
* @param {Number} [saturation=0] The saturation value 0...1
* @param {Number} [lightness=0] The lightness value 0...1
* @param {Number} [alpha=1.0] The alpha component 0...1
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object.
*
* @see {@link http://www.w3.org/TR/css3-color/#hsl-color|CSS color values}
*/
Color.fromHsl = function(hue, saturation, lightness, alpha, result) {
hue = defaultValue(hue, 0.0) % 1.0;
saturation = defaultValue(saturation, 0.0);
lightness = defaultValue(lightness, 0.0);
alpha = defaultValue(alpha, 1.0);
var red = lightness;
var green = lightness;
var blue = lightness;
if (saturation !== 0) {
var m2;
if (lightness < 0.5) {
m2 = lightness * (1 + saturation);
} else {
m2 = lightness + saturation - lightness * saturation;
}
var m1 = 2.0 * lightness - m2;
red = hue2rgb(m1, m2, hue + 1 / 3);
green = hue2rgb(m1, m2, hue);
blue = hue2rgb(m1, m2, hue - 1 / 3);
}
if (!defined(result)) {
return new Color(red, green, blue, alpha);
}
result.red = red;
result.green = green;
result.blue = blue;
result.alpha = alpha;
return result;
};
/**
* Creates a random color using the provided options. For reproducible random colors, you should
* call {@link CesiumMath#setRandomNumberSeed} once at the beginning of your application.
*
* @param {Object} [options] Object with the following properties:
* @param {Number} [options.red] If specified, the red component to use instead of a randomized value.
* @param {Number} [options.minimumRed=0.0] The maximum red value to generate if none was specified.
* @param {Number} [options.maximumRed=1.0] The minimum red value to generate if none was specified.
* @param {Number} [options.green] If specified, the green component to use instead of a randomized value.
* @param {Number} [options.minimumGreen=0.0] The maximum green value to generate if none was specified.
* @param {Number} [options.maximumGreen=1.0] The minimum green value to generate if none was specified.
* @param {Number} [options.blue] If specified, the blue component to use instead of a randomized value.
* @param {Number} [options.minimumBlue=0.0] The maximum blue value to generate if none was specified.
* @param {Number} [options.maximumBlue=1.0] The minimum blue value to generate if none was specified.
* @param {Number} [options.alpha] If specified, the alpha component to use instead of a randomized value.
* @param {Number} [options.minimumAlpha=0.0] The maximum alpha value to generate if none was specified.
* @param {Number} [options.maximumAlpha=1.0] The minimum alpha value to generate if none was specified.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
*
* @exception {DeveloperError} minimumRed must be less than or equal to maximumRed.
* @exception {DeveloperError} minimumGreen must be less than or equal to maximumGreen.
* @exception {DeveloperError} minimumBlue must be less than or equal to maximumBlue.
* @exception {DeveloperError} minimumAlpha must be less than or equal to maximumAlpha.
*
* @example
* //Create a completely random color
* var color = Cesium.Color.fromRandom();
*
* //Create a random shade of yellow.
* var color = Cesium.Color.fromRandom({
* red : 1.0,
* green : 1.0,
* alpha : 1.0
* });
*
* //Create a random bright color.
* var color = Cesium.Color.fromRandom({
* minimumRed : 0.75,
* minimumGreen : 0.75,
* minimumBlue : 0.75,
* alpha : 1.0
* });
*/
Color.fromRandom = function(options, result) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
var red = options.red;
if (!defined(red)) {
var minimumRed = defaultValue(options.minimumRed, 0);
var maximumRed = defaultValue(options.maximumRed, 1.0);
if (minimumRed > maximumRed) {
throw new DeveloperError("minimumRed must be less than or equal to maximumRed");
}
red = minimumRed + (CesiumMath.nextRandomNumber() * (maximumRed - minimumRed));
}
var green = options.green;
if (!defined(green)) {
var minimumGreen = defaultValue(options.minimumGreen, 0);
var maximumGreen = defaultValue(options.maximumGreen, 1.0);
if (minimumGreen > maximumGreen) {
throw new DeveloperError("minimumGreen must be less than or equal to maximumGreen");
}
green = minimumGreen + (CesiumMath.nextRandomNumber() * (maximumGreen - minimumGreen));
}
var blue = options.blue;
if (!defined(blue)) {
var minimumBlue = defaultValue(options.minimumBlue, 0);
var maximumBlue = defaultValue(options.maximumBlue, 1.0);
if (minimumBlue > maximumBlue) {
throw new DeveloperError("minimumBlue must be less than or equal to maximumBlue");
}
blue = minimumBlue + (CesiumMath.nextRandomNumber() * (maximumBlue - minimumBlue));
}
var alpha = options.alpha;
if (!defined(alpha)) {
var minimumAlpha = defaultValue(options.minimumAlpha, 0);
var maximumAlpha = defaultValue(options.maximumAlpha, 1.0);
if (minimumAlpha > maximumAlpha) {
throw new DeveloperError("minimumAlpha must be less than or equal to maximumAlpha");
}
alpha = minimumAlpha + (CesiumMath.nextRandomNumber() * (maximumAlpha - minimumAlpha));
}
if (!defined(result)) {
return new Color(red, green, blue, alpha);
}
result.red = red;
result.green = green;
result.blue = blue;
result.alpha = alpha;
return result;
};
//#rgb
var rgbMatcher = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i;
//#rrggbb
var rrggbbMatcher = /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i;
//rgb(), rgba(), or rgb%()
var rgbParenthesesMatcher = /^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i;
//hsl(), hsla(), or hsl%()
var hslParenthesesMatcher = /^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;
/**
* Creates a Color instance from a CSS color value.
*
* @param {String} color The CSS color value in #rgb, #rrggbb, rgb(), rgba(), hsl(), or hsla() format.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The color object, or undefined if the string was not a valid CSS color.
*
*
* @example
* var cesiumBlue = Cesium.Color.fromCssColorString('#67ADDF');
* var green = Cesium.Color.fromCssColorString('green');
*
* @see {@link http://www.w3.org/TR/css3-color|CSS color values}
*/
Color.fromCssColorString = function(color, result) {
if (!defined(color)) {
throw new DeveloperError('color is required');
}
if (!defined(result)) {
result = new Color();
}
var namedColor = Color[color.toUpperCase()];
if (defined(namedColor)) {
Color.clone(namedColor, result);
return result;
}
var matches = rgbMatcher.exec(color);
if (matches !== null) {
result.red = parseInt(matches[1], 16) / 15;
result.green = parseInt(matches[2], 16) / 15.0;
result.blue = parseInt(matches[3], 16) / 15.0;
result.alpha = 1.0;
return result;
}
matches = rrggbbMatcher.exec(color);
if (matches !== null) {
result.red = parseInt(matches[1], 16) / 255.0;
result.green = parseInt(matches[2], 16) / 255.0;
result.blue = parseInt(matches[3], 16) / 255.0;
result.alpha = 1.0;
return result;
}
matches = rgbParenthesesMatcher.exec(color);
if (matches !== null) {
result.red = parseFloat(matches[1]) / ('%' === matches[1].substr(-1) ? 100.0 : 255.0);
result.green = parseFloat(matches[2]) / ('%' === matches[2].substr(-1) ? 100.0 : 255.0);
result.blue = parseFloat(matches[3]) / ('%' === matches[3].substr(-1) ? 100.0 : 255.0);
result.alpha = parseFloat(defaultValue(matches[4], '1.0'));
return result;
}
matches = hslParenthesesMatcher.exec(color);
if (matches !== null) {
return Color.fromHsl(parseFloat(matches[1]) / 360.0,
parseFloat(matches[2]) / 100.0,
parseFloat(matches[3]) / 100.0,
parseFloat(defaultValue(matches[4], '1.0')), result);
}
result = undefined;
return result;
};
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
Color.packedLength = 4;
/**
* Stores the provided instance into the provided array.
*
* @param {Color} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
Color.pack = function(value, array, startingIndex) {
if (!defined(value)) {
throw new DeveloperError('value is required');
}
if (!defined(array)) {
throw new DeveloperError('array is required');
}
startingIndex = defaultValue(startingIndex, 0);
array[startingIndex++] = value.red;
array[startingIndex++] = value.green;
array[startingIndex++] = value.blue;
array[startingIndex] = value.alpha;
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {Color} [result] The object into which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*/
Color.unpack = function(array, startingIndex, result) {
if (!defined(array)) {
throw new DeveloperError('array is required');
}
startingIndex = defaultValue(startingIndex, 0);
if (!defined(result)) {
result = new Color();
}
result.red = array[startingIndex++];
result.green = array[startingIndex++];
result.blue = array[startingIndex++];
result.alpha = array[startingIndex];
return result;
};
/**
* Converts a 'byte' color component in the range of 0 to 255 into
* a 'float' color component in the range of 0 to 1.0.
*
* @param {Number} number The number to be converted.
* @returns {Number} The converted number.
*/
Color.byteToFloat = function(number) {
return number / 255.0;
};
/**
* Converts a 'float' color component in the range of 0 to 1.0 into
* a 'byte' color component in the range of 0 to 255.
*
* @param {Number} number The number to be converted.
* @returns {Number} The converted number.
*/
Color.floatToByte = function(number) {
return number === 1.0 ? 255.0 : (number * 256.0) | 0;
};
/**
* Duplicates a Color.
*
* @param {Color} color The Color to duplicate.
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined. (Returns undefined if color is undefined)
*/
Color.clone = function(color, result) {
if (!defined(color)) {
return undefined;
}
if (!defined(result)) {
return new Color(color.red, color.green, color.blue, color.alpha);
}
result.red = color.red;
result.green = color.green;
result.blue = color.blue;
result.alpha = color.alpha;
return result;
};
/**
* Returns true if the first Color equals the second color.
*
* @param {Color} left The first Color to compare for equality.
* @param {Color} right The second Color to compare for equality.
* @returns {Boolean} <code>true</code> if the Colors are equal; otherwise, <code>false</code>.
*/
Color.equals = function(left, right) {
return (left === right) || //
(defined(left) && //
defined(right) && //
left.red === right.red && //
left.green === right.green && //
left.blue === right.blue && //
left.alpha === right.alpha);
};
/**
* @private
*/
Color.equalsArray = function(color, array, offset) {
return color.red === array[offset] &&
color.green === array[offset + 1] &&
color.blue === array[offset + 2] &&
color.alpha === array[offset + 3];
};
/**
* Returns a duplicate of a Color instance.
*
* @param {Color} [result] The object to store the result in, if undefined a new instance will be created.
* @returns {Color} The modified result parameter or a new instance if result was undefined.
*/
Color.prototype.clone = function(result) {
return Color.clone(this, result);
};
/**
* Returns true if this Color equals other.
*
* @param {Color} other The Color to compare for equality.
* @returns {Boolean} <code>true</code> if the Colors are equal; otherwise, <code>false</code>.
*/
Color.prototype.equals = function(other) {
return Color.equals(this, other);
};
/**
* Returns <code>true</code> if this Color equals other componentwise within the specified epsilon.
*
* @param {Color} other The Color to compare for equality.
* @param {Number} [epsilon=0.0] The epsilon to use for equality testing.
* @returns {Boolean} <code>true</code> if the Colors are equal within the specified epsilon; otherwise, <code>false</code>.
*/
Color.prototype.equalsEpsilon = function(other, epsilon) {
return (this === other) || //
((defined(other)) && //
(Math.abs(this.red - other.red) <= epsilon) && //
(Math.abs(this.green - other.green) <= epsilon) && //
(Math.abs(this.blue - other.blue) <= epsilon) && //
(Math.abs(this.alpha - other.alpha) <= epsilon));
};
/**
* Creates a string representing this Color in the format '(red, green, blue, alpha)'.
*
* @returns {String} A string representing this Color in the format '(red, green, blue, alpha)'.
*/
Color.prototype.toString = function() {
return '(' + this.red + ', ' + this.green + ', ' + this.blue + ', ' + this.alpha + ')';
};
/**
* Creates a string containing the CSS color value for this color.
*
* @returns {String} The CSS equivalent of this color.
*
* @see {@link http://www.w3.org/TR/css3-color/#rgba-color|CSS RGB or RGBA color values}
*/
Color.prototype.toCssColorString = function() {
var red = Color.floatToByte(this.red);
var green = Color.floatToByte(this.green);
var blue = Color.floatToByte(this.blue);
if (this.alpha === 1) {
return 'rgb(' + red + ',' + green + ',' + blue + ')';
}
return 'rgba(' + red + ',' + green + ',' + blue + ',' + this.alpha + ')';
};
/**
* Converts this color to an array of red, green, blue, and alpha values
* that are in the range of 0 to 255.
*
* @param {Number[]} [result] The array to store the result in, if undefined a new instance will be created.
* @returns {Number[]} The modified result parameter or a new instance if result was undefined.
*/
Color.prototype.toBytes = function(result) {
var red = Color.floatToByte(this.red);
var green = Color.floatToByte(this.green);
var blue = Color.floatToByte(this.blue);
var alpha = Color.floatToByte(this.alpha);
if (!defined(result)) {
return [red, green, blue, alpha];
}
result[0] = red;
result[1] = green;
result[2] = blue;
result[3] = alpha;
return result;
};
/**
* Converts this color to a single numeric unsigned 32-bit RGBA value, using the endianness
* of the system.
*
* @returns {Number} A single numeric unsigned 32-bit RGBA value.
*
*
* @example
* var rgba = Cesium.Color.BLUE.toRgba();
*
* @see Color.fromRgba
*/
Color.prototype.toRgba = function() {
// scratchUint32Array and scratchUint8Array share an underlying array buffer
scratchUint8Array[0] = Color.floatToByte(this.red);
scratchUint8Array[1] = Color.floatToByte(this.green);
scratchUint8Array[2] = Color.floatToByte(this.blue);
scratchUint8Array[3] = Color.floatToByte(this.alpha);
return scratchUint32Array[0];
};
/**
* Brightens this color by the provided magnitude.
*
* @param {Number} magnitude A positive number indicating the amount to brighten.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*
* @example
* var brightBlue = Cesium.Color.BLUE.brighten(0.5, new Cesium.Color());
*/
Color.prototype.brighten = function(magnitude, result) {
if (!defined(magnitude)) {
throw new DeveloperError('magnitude is required.');
}
if (magnitude < 0.0) {
throw new DeveloperError('magnitude must be positive.');
}
if (!defined(result)) {
throw new DeveloperError('result is required.');
}
magnitude = (1.0 - magnitude);
result.red = 1.0 - ((1.0 - this.red) * magnitude);
result.green = 1.0 - ((1.0 - this.green) * magnitude);
result.blue = 1.0 - ((1.0 - this.blue) * magnitude);
result.alpha = this.alpha;
return result;
};
/**
* Darkens this color by the provided magnitude.
*
* @param {Number} magnitude A positive number indicating the amount to darken.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*
* @example
* var darkBlue = Cesium.Color.BLUE.darken(0.5, new Cesium.Color());
*/
Color.prototype.darken = function(magnitude, result) {
if (!defined(magnitude)) {
throw new DeveloperError('magnitude is required.');
}
if (magnitude < 0.0) {
throw new DeveloperError('magnitude must be positive.');
}
if (!defined(result)) {
throw new DeveloperError('result is required.');
}
magnitude = (1.0 - magnitude);
result.red = this.red * magnitude;
result.green = this.green * magnitude;
result.blue = this.blue * magnitude;
result.alpha = this.alpha;
return result;
};
/**
* Creates a new Color that has the same red, green, and blue components
* as this Color, but with the specified alpha value.
*
* @param {Number} alpha The new alpha component.
* @param {Color} [result] The object onto which to store the result.
* @returns {Color} The modified result parameter or a new Color instance if one was not provided.
*
* @example var translucentRed = Cesium.Color.RED.withAlpha(0.9);
*/
Color.prototype.withAlpha = function(alpha, result) {
return Color.fromAlpha(this, alpha, result);
};
/**
* Computes the componentwise sum of two Colors.
*
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*/
Color.add = function(left, right, result) {
if (!defined(left)) {
throw new DeveloperError('left is required');
}
if (!defined(right)) {
throw new DeveloperError('right is required');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.red = left.red + right.red;
result.green = left.green + right.green;
result.blue = left.blue + right.blue;
result.alpha = left.alpha + right.alpha;
return result;
};
/**
* Computes the componentwise difference of two Colors.
*
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*/
Color.subtract = function(left, right, result) {
if (!defined(left)) {
throw new DeveloperError('left is required');
}
if (!defined(right)) {
throw new DeveloperError('right is required');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.red = left.red - right.red;
result.green = left.green - right.green;
result.blue = left.blue - right.blue;
result.alpha = left.alpha - right.alpha;
return result;
};
/**
* Computes the componentwise product of two Colors.
*
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*/
Color.multiply = function(left, right, result) {
if (!defined(left)) {
throw new DeveloperError('left is required');
}
if (!defined(right)) {
throw new DeveloperError('right is required');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.red = left.red * right.red;
result.green = left.green * right.green;
result.blue = left.blue * right.blue;
result.alpha = left.alpha * right.alpha;
return result;
};
/**
* Computes the componentwise quotient of two Colors.
*
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*/
Color.divide = function(left, right, result) {
if (!defined(left)) {
throw new DeveloperError('left is required');
}
if (!defined(right)) {
throw new DeveloperError('right is required');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.red = left.red / right.red;
result.green = left.green / right.green;
result.blue = left.blue / right.blue;
result.alpha = left.alpha / right.alpha;
return result;
};
/**
* Computes the componentwise modulus of two Colors.
*
* @param {Color} left The first Color.
* @param {Color} right The second Color.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*/
Color.mod = function(left, right, result) {
if (!defined(left)) {
throw new DeveloperError('left is required');
}
if (!defined(right)) {
throw new DeveloperError('right is required');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.red = left.red % right.red;
result.green = left.green % right.green;
result.blue = left.blue % right.blue;
result.alpha = left.alpha % right.alpha;
return result;
};
/**
* Multiplies the provided Color componentwise by the provided scalar.
*
* @param {Color} color The Color to be scaled.
* @param {Number} scalar The scalar to multiply with.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*/
Color.multiplyByScalar = function(color, scalar, result) {
if (!defined(color)) {
throw new DeveloperError('cartesian is required');
}
if (typeof scalar !== 'number') {
throw new DeveloperError('scalar is required and must be a number.');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.red = color.red * scalar;
result.green = color.green * scalar;
result.blue = color.blue * scalar;
result.alpha = color.alpha * scalar;
return result;
};
/**
* Divides the provided Color componentwise by the provided scalar.
*
* @param {Color} color The Color to be divided.
* @param {Number} scalar The scalar to divide with.
* @param {Color} result The object onto which to store the result.
* @returns {Color} The modified result parameter.
*/
Color.divideByScalar = function(color, scalar, result) {
if (!defined(color)) {
throw new DeveloperError('cartesian is required');
}
if (typeof scalar !== 'number') {
throw new DeveloperError('scalar is required and must be a number.');
}
if (!defined(result)) {
throw new DeveloperError('result is required');
}
result.red = color.red / scalar;
result.green = color.green / scalar;
result.blue = color.blue / scalar;
result.alpha = color.alpha / scalar;
return result;
};
/**
* An immutable Color instance initialized to CSS color #F0F8FF
* <span class="colorSwath" style="background: #F0F8FF;"></span>
*
* @constant
* @type {Color}
*/
Color.ALICEBLUE = freezeObject(Color.fromCssColorString('#F0F8FF'));
/**
* An immutable Color instance initialized to CSS color #FAEBD7
* <span class="colorSwath" style="background: #FAEBD7;"></span>
*
* @constant
* @type {Color}
*/
Color.ANTIQUEWHITE = freezeObject(Color.fromCssColorString('#FAEBD7'));
/**
* An immutable Color instance initialized to CSS color #00FFFF
* <span class="colorSwath" style="background: #00FFFF;"></span>
*
* @constant
* @type {Color}
*/
Color.AQUA = freezeObject(Color.fromCssColorString('#00FFFF'));
/**
* An immutable Color instance initialized to CSS color #7FFFD4
* <span class="colorSwath" style="background: #7FFFD4;"></span>
*
* @constant
* @type {Color}
*/
Color.AQUAMARINE = freezeObject(Color.fromCssColorString('#7FFFD4'));
/**
* An immutable Color instance initialized to CSS color #F0FFFF
* <span class="colorSwath" style="background: #F0FFFF;"></span>
*
* @constant
* @type {Color}
*/
Color.AZURE = freezeObject(Color.fromCssColorString('#F0FFFF'));
/**
* An immutable Color instance initialized to CSS color #F5F5DC
* <span class="colorSwath" style="background: #F5F5DC;"></span>
*
* @constant
* @type {Color}
*/
Color.BEIGE = freezeObject(Color.fromCssColorString('#F5F5DC'));
/**
* An immutable Color instance initialized to CSS color #FFE4C4
* <span class="colorSwath" style="background: #FFE4C4;"></span>
*
* @constant
* @type {Color}
*/
Color.BISQUE = freezeObject(Color.fromCssColorString('#FFE4C4'));
/**
* An immutable Color instance initialized to CSS color #000000
* <span class="colorSwath" style="background: #000000;"></span>
*
* @constant
* @type {Color}
*/
Color.BLACK = freezeObject(Color.fromCssColorString('#000000'));
/**
* An immutable Color instance initialized to CSS color #FFEBCD
* <span class="colorSwath" style="background: #FFEBCD;"></span>
*
* @constant
* @type {Color}
*/
Color.BLANCHEDALMOND = freezeObject(Color.fromCssColorString('#FFEBCD'));
/**
* An immutable Color instance initialized to CSS color #0000FF
* <span class="colorSwath" style="background: #0000FF;"></span>
*
* @constant
* @type {Color}
*/
Color.BLUE = freezeObject(Color.fromCssColorString('#0000FF'));
/**
* An immutable Color instance initialized to CSS color #8A2BE2
* <span class="colorSwath" style="background: #8A2BE2;"></span>
*
* @constant
* @type {Color}
*/
Color.BLUEVIOLET = freezeObject(Color.fromCssColorString('#8A2BE2'));
/**
* An immutable Color instance initialized to CSS color #A52A2A
* <span class="colorSwath" style="background: #A52A2A;"></span>
*
* @constant
* @type {Color}
*/
Color.BROWN = freezeObject(Color.fromCssColorString('#A52A2A'));
/**
* An immutable Color instance initialized to CSS color #DEB887
* <span class="colorSwath" style="background: #DEB887;"></span>
*
* @constant
* @type {Color}
*/
Color.BURLYWOOD = freezeObject(Color.fromCssColorString('#DEB887'));
/**
* An immutable Color instance initialized to CSS color #5F9EA0
* <span class="colorSwath" style="background: #5F9EA0;"></span>
*
* @constant
* @type {Color}
*/
Color.CADETBLUE = freezeObject(Color.fromCssColorString('#5F9EA0'));
/**
* An immutable Color instance initialized to CSS color #7FFF00
* <span class="colorSwath" style="background: #7FFF00;"></span>
*
* @constant
* @type {Color}
*/
Color.CHARTREUSE = freezeObject(Color.fromCssColorString('#7FFF00'));
/**
* An immutable Color instance initialized to CSS color #D2691E
* <span class="colorSwath" style="background: #D2691E;"></span>
*
* @constant
* @type {Color}
*/
Color.CHOCOLATE = freezeObject(Color.fromCssColorString('#D2691E'));
/**
* An immutable Color instance initialized to CSS color #FF7F50
* <span class="colorSwath" style="background: #FF7F50;"></span>
*
* @constant
* @type {Color}
*/
Color.CORAL = freezeObject(Color.fromCssColorString('#FF7F50'));
/**
* An immutable Color instance initialized to CSS color #6495ED
* <span class="colorSwath" style="background: #6495ED;"></span>
*
* @constant
* @type {Color}
*/
Color.CORNFLOWERBLUE = freezeObject(Color.fromCssColorString('#6495ED'));
/**
* An immutable Color instance initialized to CSS color #FFF8DC
* <span class="colorSwath" style="background: #FFF8DC;"></span>
*
* @constant
* @type {Color}
*/
Color.CORNSILK = freezeObject(Color.fromCssColorString('#FFF8DC'));
/**
* An immutable Color instance initialized to CSS color #DC143C
* <span class="colorSwath" style="background: #DC143C;"></span>
*
* @constant
* @type {Color}
*/
Color.CRIMSON = freezeObject(Color.fromCssColorString('#DC143C'));
/**
* An immutable Color instance initialized to CSS color #00FFFF
* <span class="colorSwath" style="background: #00FFFF;"></span>
*
* @constant
* @type {Color}
*/
Color.CYAN = freezeObject(Color.fromCssColorString('#00FFFF'));
/**
* An immutable Color instance initialized to CSS color #00008B
* <span class="colorSwath" style="background: #00008B;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKBLUE = freezeObject(Color.fromCssColorString('#00008B'));
/**
* An immutable Color instance initialized to CSS color #008B8B
* <span class="colorSwath" style="background: #008B8B;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKCYAN = freezeObject(Color.fromCssColorString('#008B8B'));
/**
* An immutable Color instance initialized to CSS color #B8860B
* <span class="colorSwath" style="background: #B8860B;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKGOLDENROD = freezeObject(Color.fromCssColorString('#B8860B'));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
* <span class="colorSwath" style="background: #A9A9A9;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKGRAY = freezeObject(Color.fromCssColorString('#A9A9A9'));
/**
* An immutable Color instance initialized to CSS color #006400
* <span class="colorSwath" style="background: #006400;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKGREEN = freezeObject(Color.fromCssColorString('#006400'));
/**
* An immutable Color instance initialized to CSS color #A9A9A9
* <span class="colorSwath" style="background: #A9A9A9;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKGREY = Color.DARKGRAY;
/**
* An immutable Color instance initialized to CSS color #BDB76B
* <span class="colorSwath" style="background: #BDB76B;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKKHAKI = freezeObject(Color.fromCssColorString('#BDB76B'));
/**
* An immutable Color instance initialized to CSS color #8B008B
* <span class="colorSwath" style="background: #8B008B;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKMAGENTA = freezeObject(Color.fromCssColorString('#8B008B'));
/**
* An immutable Color instance initialized to CSS color #556B2F
* <span class="colorSwath" style="background: #556B2F;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKOLIVEGREEN = freezeObject(Color.fromCssColorString('#556B2F'));
/**
* An immutable Color instance initialized to CSS color #FF8C00
* <span class="colorSwath" style="background: #FF8C00;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKORANGE = freezeObject(Color.fromCssColorString('#FF8C00'));
/**
* An immutable Color instance initialized to CSS color #9932CC
* <span class="colorSwath" style="background: #9932CC;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKORCHID = freezeObject(Color.fromCssColorString('#9932CC'));
/**
* An immutable Color instance initialized to CSS color #8B0000
* <span class="colorSwath" style="background: #8B0000;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKRED = freezeObject(Color.fromCssColorString('#8B0000'));
/**
* An immutable Color instance initialized to CSS color #E9967A
* <span class="colorSwath" style="background: #E9967A;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKSALMON = freezeObject(Color.fromCssColorString('#E9967A'));
/**
* An immutable Color instance initialized to CSS color #8FBC8F
* <span class="colorSwath" style="background: #8FBC8F;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKSEAGREEN = freezeObject(Color.fromCssColorString('#8FBC8F'));
/**
* An immutable Color instance initialized to CSS color #483D8B
* <span class="colorSwath" style="background: #483D8B;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKSLATEBLUE = freezeObject(Color.fromCssColorString('#483D8B'));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
* <span class="colorSwath" style="background: #2F4F4F;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKSLATEGRAY = freezeObject(Color.fromCssColorString('#2F4F4F'));
/**
* An immutable Color instance initialized to CSS color #2F4F4F
* <span class="colorSwath" style="background: #2F4F4F;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKSLATEGREY = Color.DARKSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #00CED1
* <span class="colorSwath" style="background: #00CED1;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKTURQUOISE = freezeObject(Color.fromCssColorString('#00CED1'));
/**
* An immutable Color instance initialized to CSS color #9400D3
* <span class="colorSwath" style="background: #9400D3;"></span>
*
* @constant
* @type {Color}
*/
Color.DARKVIOLET = freezeObject(Color.fromCssColorString('#9400D3'));
/**
* An immutable Color instance initialized to CSS color #FF1493
* <span class="colorSwath" style="background: #FF1493;"></span>
*
* @constant
* @type {Color}
*/
Color.DEEPPINK = freezeObject(Color.fromCssColorString('#FF1493'));
/**
* An immutable Color instance initialized to CSS color #00BFFF
* <span class="colorSwath" style="background: #00BFFF;"></span>
*
* @constant
* @type {Color}
*/
Color.DEEPSKYBLUE = freezeObject(Color.fromCssColorString('#00BFFF'));
/**
* An immutable Color instance initialized to CSS color #696969
* <span class="colorSwath" style="background: #696969;"></span>
*
* @constant
* @type {Color}
*/
Color.DIMGRAY = freezeObject(Color.fromCssColorString('#696969'));
/**
* An immutable Color instance initialized to CSS color #696969
* <span class="colorSwath" style="background: #696969;"></span>
*
* @constant
* @type {Color}
*/
Color.DIMGREY = Color.DIMGRAY;
/**
* An immutable Color instance initialized to CSS color #1E90FF
* <span class="colorSwath" style="background: #1E90FF;"></span>
*
* @constant
* @type {Color}
*/
Color.DODGERBLUE = freezeObject(Color.fromCssColorString('#1E90FF'));
/**
* An immutable Color instance initialized to CSS color #B22222
* <span class="colorSwath" style="background: #B22222;"></span>
*
* @constant
* @type {Color}
*/
Color.FIREBRICK = freezeObject(Color.fromCssColorString('#B22222'));
/**
* An immutable Color instance initialized to CSS color #FFFAF0
* <span class="colorSwath" style="background: #FFFAF0;"></span>
*
* @constant
* @type {Color}
*/
Color.FLORALWHITE = freezeObject(Color.fromCssColorString('#FFFAF0'));
/**
* An immutable Color instance initialized to CSS color #228B22
* <span class="colorSwath" style="background: #228B22;"></span>
*
* @constant
* @type {Color}
*/
Color.FORESTGREEN = freezeObject(Color.fromCssColorString('#228B22'));
/**
* An immutable Color instance initialized to CSS color #FF00FF
* <span class="colorSwath" style="background: #FF00FF;"></span>
*
* @constant
* @type {Color}
*/
Color.FUCHSIA = freezeObject(Color.fromCssColorString('#FF00FF'));
/**
* An immutable Color instance initialized to CSS color #DCDCDC
* <span class="colorSwath" style="background: #DCDCDC;"></span>
*
* @constant
* @type {Color}
*/
Color.GAINSBORO = freezeObject(Color.fromCssColorString('#DCDCDC'));
/**
* An immutable Color instance initialized to CSS color #F8F8FF
* <span class="colorSwath" style="background: #F8F8FF;"></span>
*
* @constant
* @type {Color}
*/
Color.GHOSTWHITE = freezeObject(Color.fromCssColorString('#F8F8FF'));
/**
* An immutable Color instance initialized to CSS color #FFD700
* <span class="colorSwath" style="background: #FFD700;"></span>
*
* @constant
* @type {Color}
*/
Color.GOLD = freezeObject(Color.fromCssColorString('#FFD700'));
/**
* An immutable Color instance initialized to CSS color #DAA520
* <span class="colorSwath" style="background: #DAA520;"></span>
*
* @constant
* @type {Color}
*/
Color.GOLDENROD = freezeObject(Color.fromCssColorString('#DAA520'));
/**
* An immutable Color instance initialized to CSS color #808080
* <span class="colorSwath" style="background: #808080;"></span>
*
* @constant
* @type {Color}
*/
Color.GRAY = freezeObject(Color.fromCssColorString('#808080'));
/**
* An immutable Color instance initialized to CSS color #008000
* <span class="colorSwath" style="background: #008000;"></span>
*
* @constant
* @type {Color}
*/
Color.GREEN = freezeObject(Color.fromCssColorString('#008000'));
/**
* An immutable Color instance initialized to CSS color #ADFF2F
* <span class="colorSwath" style="background: #ADFF2F;"></span>
*
* @constant
* @type {Color}
*/
Color.GREENYELLOW = freezeObject(Color.fromCssColorString('#ADFF2F'));
/**
* An immutable Color instance initialized to CSS color #808080
* <span class="colorSwath" style="background: #808080;"></span>
*
* @constant
* @type {Color}
*/
Color.GREY = Color.GRAY;
/**
* An immutable Color instance initialized to CSS color #F0FFF0
* <span class="colorSwath" style="background: #F0FFF0;"></span>
*
* @constant
* @type {Color}
*/
Color.HONEYDEW = freezeObject(Color.fromCssColorString('#F0FFF0'));
/**
* An immutable Color instance initialized to CSS color #FF69B4
* <span class="colorSwath" style="background: #FF69B4;"></span>
*
* @constant
* @type {Color}
*/
Color.HOTPINK = freezeObject(Color.fromCssColorString('#FF69B4'));
/**
* An immutable Color instance initialized to CSS color #CD5C5C
* <span class="colorSwath" style="background: #CD5C5C;"></span>
*
* @constant
* @type {Color}
*/
Color.INDIANRED = freezeObject(Color.fromCssColorString('#CD5C5C'));
/**
* An immutable Color instance initialized to CSS color #4B0082
* <span class="colorSwath" style="background: #4B0082;"></span>
*
* @constant
* @type {Color}
*/
Color.INDIGO = freezeObject(Color.fromCssColorString('#4B0082'));
/**
* An immutable Color instance initialized to CSS color #FFFFF0
* <span class="colorSwath" style="background: #FFFFF0;"></span>
*
* @constant
* @type {Color}
*/
Color.IVORY = freezeObject(Color.fromCssColorString('#FFFFF0'));
/**
* An immutable Color instance initialized to CSS color #F0E68C
* <span class="colorSwath" style="background: #F0E68C;"></span>
*
* @constant
* @type {Color}
*/
Color.KHAKI = freezeObject(Color.fromCssColorString('#F0E68C'));
/**
* An immutable Color instance initialized to CSS color #E6E6FA
* <span class="colorSwath" style="background: #E6E6FA;"></span>
*
* @constant
* @type {Color}
*/
Color.LAVENDER = freezeObject(Color.fromCssColorString('#E6E6FA'));
/**
* An immutable Color instance initialized to CSS color #FFF0F5
* <span class="colorSwath" style="background: #FFF0F5;"></span>
*
* @constant
* @type {Color}
*/
Color.LAVENDAR_BLUSH = freezeObject(Color.fromCssColorString('#FFF0F5'));
/**
* An immutable Color instance initialized to CSS color #7CFC00
* <span class="colorSwath" style="background: #7CFC00;"></span>
*
* @constant
* @type {Color}
*/
Color.LAWNGREEN = freezeObject(Color.fromCssColorString('#7CFC00'));
/**
* An immutable Color instance initialized to CSS color #FFFACD
* <span class="colorSwath" style="background: #FFFACD;"></span>
*
* @constant
* @type {Color}
*/
Color.LEMONCHIFFON = freezeObject(Color.fromCssColorString('#FFFACD'));
/**
* An immutable Color instance initialized to CSS color #ADD8E6
* <span class="colorSwath" style="background: #ADD8E6;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTBLUE = freezeObject(Color.fromCssColorString('#ADD8E6'));
/**
* An immutable Color instance initialized to CSS color #F08080
* <span class="colorSwath" style="background: #F08080;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTCORAL = freezeObject(Color.fromCssColorString('#F08080'));
/**
* An immutable Color instance initialized to CSS color #E0FFFF
* <span class="colorSwath" style="background: #E0FFFF;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTCYAN = freezeObject(Color.fromCssColorString('#E0FFFF'));
/**
* An immutable Color instance initialized to CSS color #FAFAD2
* <span class="colorSwath" style="background: #FAFAD2;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTGOLDENRODYELLOW = freezeObject(Color.fromCssColorString('#FAFAD2'));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
* <span class="colorSwath" style="background: #D3D3D3;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTGRAY = freezeObject(Color.fromCssColorString('#D3D3D3'));
/**
* An immutable Color instance initialized to CSS color #90EE90
* <span class="colorSwath" style="background: #90EE90;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTGREEN = freezeObject(Color.fromCssColorString('#90EE90'));
/**
* An immutable Color instance initialized to CSS color #D3D3D3
* <span class="colorSwath" style="background: #D3D3D3;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTGREY = Color.LIGHTGRAY;
/**
* An immutable Color instance initialized to CSS color #FFB6C1
* <span class="colorSwath" style="background: #FFB6C1;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTPINK = freezeObject(Color.fromCssColorString('#FFB6C1'));
/**
* An immutable Color instance initialized to CSS color #20B2AA
* <span class="colorSwath" style="background: #20B2AA;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTSEAGREEN = freezeObject(Color.fromCssColorString('#20B2AA'));
/**
* An immutable Color instance initialized to CSS color #87CEFA
* <span class="colorSwath" style="background: #87CEFA;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTSKYBLUE = freezeObject(Color.fromCssColorString('#87CEFA'));
/**
* An immutable Color instance initialized to CSS color #778899
* <span class="colorSwath" style="background: #778899;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTSLATEGRAY = freezeObject(Color.fromCssColorString('#778899'));
/**
* An immutable Color instance initialized to CSS color #778899
* <span class="colorSwath" style="background: #778899;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTSLATEGREY = Color.LIGHTSLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #B0C4DE
* <span class="colorSwath" style="background: #B0C4DE;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTSTEELBLUE = freezeObject(Color.fromCssColorString('#B0C4DE'));
/**
* An immutable Color instance initialized to CSS color #FFFFE0
* <span class="colorSwath" style="background: #FFFFE0;"></span>
*
* @constant
* @type {Color}
*/
Color.LIGHTYELLOW = freezeObject(Color.fromCssColorString('#FFFFE0'));
/**
* An immutable Color instance initialized to CSS color #00FF00
* <span class="colorSwath" style="background: #00FF00;"></span>
*
* @constant
* @type {Color}
*/
Color.LIME = freezeObject(Color.fromCssColorString('#00FF00'));
/**
* An immutable Color instance initialized to CSS color #32CD32
* <span class="colorSwath" style="background: #32CD32;"></span>
*
* @constant
* @type {Color}
*/
Color.LIMEGREEN = freezeObject(Color.fromCssColorString('#32CD32'));
/**
* An immutable Color instance initialized to CSS color #FAF0E6
* <span class="colorSwath" style="background: #FAF0E6;"></span>
*
* @constant
* @type {Color}
*/
Color.LINEN = freezeObject(Color.fromCssColorString('#FAF0E6'));
/**
* An immutable Color instance initialized to CSS color #FF00FF
* <span class="colorSwath" style="background: #FF00FF;"></span>
*
* @constant
* @type {Color}
*/
Color.MAGENTA = freezeObject(Color.fromCssColorString('#FF00FF'));
/**
* An immutable Color instance initialized to CSS color #800000
* <span class="colorSwath" style="background: #800000;"></span>
*
* @constant
* @type {Color}
*/
Color.MAROON = freezeObject(Color.fromCssColorString('#800000'));
/**
* An immutable Color instance initialized to CSS color #66CDAA
* <span class="colorSwath" style="background: #66CDAA;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMAQUAMARINE = freezeObject(Color.fromCssColorString('#66CDAA'));
/**
* An immutable Color instance initialized to CSS color #0000CD
* <span class="colorSwath" style="background: #0000CD;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMBLUE = freezeObject(Color.fromCssColorString('#0000CD'));
/**
* An immutable Color instance initialized to CSS color #BA55D3
* <span class="colorSwath" style="background: #BA55D3;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMORCHID = freezeObject(Color.fromCssColorString('#BA55D3'));
/**
* An immutable Color instance initialized to CSS color #9370DB
* <span class="colorSwath" style="background: #9370DB;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMPURPLE = freezeObject(Color.fromCssColorString('#9370DB'));
/**
* An immutable Color instance initialized to CSS color #3CB371
* <span class="colorSwath" style="background: #3CB371;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMSEAGREEN = freezeObject(Color.fromCssColorString('#3CB371'));
/**
* An immutable Color instance initialized to CSS color #7B68EE
* <span class="colorSwath" style="background: #7B68EE;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMSLATEBLUE = freezeObject(Color.fromCssColorString('#7B68EE'));
/**
* An immutable Color instance initialized to CSS color #00FA9A
* <span class="colorSwath" style="background: #00FA9A;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMSPRINGGREEN = freezeObject(Color.fromCssColorString('#00FA9A'));
/**
* An immutable Color instance initialized to CSS color #48D1CC
* <span class="colorSwath" style="background: #48D1CC;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMTURQUOISE = freezeObject(Color.fromCssColorString('#48D1CC'));
/**
* An immutable Color instance initialized to CSS color #C71585
* <span class="colorSwath" style="background: #C71585;"></span>
*
* @constant
* @type {Color}
*/
Color.MEDIUMVIOLETRED = freezeObject(Color.fromCssColorString('#C71585'));
/**
* An immutable Color instance initialized to CSS color #191970
* <span class="colorSwath" style="background: #191970;"></span>
*
* @constant
* @type {Color}
*/
Color.MIDNIGHTBLUE = freezeObject(Color.fromCssColorString('#191970'));
/**
* An immutable Color instance initialized to CSS color #F5FFFA
* <span class="colorSwath" style="background: #F5FFFA;"></span>
*
* @constant
* @type {Color}
*/
Color.MINTCREAM = freezeObject(Color.fromCssColorString('#F5FFFA'));
/**
* An immutable Color instance initialized to CSS color #FFE4E1
* <span class="colorSwath" style="background: #FFE4E1;"></span>
*
* @constant
* @type {Color}
*/
Color.MISTYROSE = freezeObject(Color.fromCssColorString('#FFE4E1'));
/**
* An immutable Color instance initialized to CSS color #FFE4B5
* <span class="colorSwath" style="background: #FFE4B5;"></span>
*
* @constant
* @type {Color}
*/
Color.MOCCASIN = freezeObject(Color.fromCssColorString('#FFE4B5'));
/**
* An immutable Color instance initialized to CSS color #FFDEAD
* <span class="colorSwath" style="background: #FFDEAD;"></span>
*
* @constant
* @type {Color}
*/
Color.NAVAJOWHITE = freezeObject(Color.fromCssColorString('#FFDEAD'));
/**
* An immutable Color instance initialized to CSS color #000080
* <span class="colorSwath" style="background: #000080;"></span>
*
* @constant
* @type {Color}
*/
Color.NAVY = freezeObject(Color.fromCssColorString('#000080'));
/**
* An immutable Color instance initialized to CSS color #FDF5E6
* <span class="colorSwath" style="background: #FDF5E6;"></span>
*
* @constant
* @type {Color}
*/
Color.OLDLACE = freezeObject(Color.fromCssColorString('#FDF5E6'));
/**
* An immutable Color instance initialized to CSS color #808000
* <span class="colorSwath" style="background: #808000;"></span>
*
* @constant
* @type {Color}
*/
Color.OLIVE = freezeObject(Color.fromCssColorString('#808000'));
/**
* An immutable Color instance initialized to CSS color #6B8E23
* <span class="colorSwath" style="background: #6B8E23;"></span>
*
* @constant
* @type {Color}
*/
Color.OLIVEDRAB = freezeObject(Color.fromCssColorString('#6B8E23'));
/**
* An immutable Color instance initialized to CSS color #FFA500
* <span class="colorSwath" style="background: #FFA500;"></span>
*
* @constant
* @type {Color}
*/
Color.ORANGE = freezeObject(Color.fromCssColorString('#FFA500'));
/**
* An immutable Color instance initialized to CSS color #FF4500
* <span class="colorSwath" style="background: #FF4500;"></span>
*
* @constant
* @type {Color}
*/
Color.ORANGERED = freezeObject(Color.fromCssColorString('#FF4500'));
/**
* An immutable Color instance initialized to CSS color #DA70D6
* <span class="colorSwath" style="background: #DA70D6;"></span>
*
* @constant
* @type {Color}
*/
Color.ORCHID = freezeObject(Color.fromCssColorString('#DA70D6'));
/**
* An immutable Color instance initialized to CSS color #EEE8AA
* <span class="colorSwath" style="background: #EEE8AA;"></span>
*
* @constant
* @type {Color}
*/
Color.PALEGOLDENROD = freezeObject(Color.fromCssColorString('#EEE8AA'));
/**
* An immutable Color instance initialized to CSS color #98FB98
* <span class="colorSwath" style="background: #98FB98;"></span>
*
* @constant
* @type {Color}
*/
Color.PALEGREEN = freezeObject(Color.fromCssColorString('#98FB98'));
/**
* An immutable Color instance initialized to CSS color #AFEEEE
* <span class="colorSwath" style="background: #AFEEEE;"></span>
*
* @constant
* @type {Color}
*/
Color.PALETURQUOISE = freezeObject(Color.fromCssColorString('#AFEEEE'));
/**
* An immutable Color instance initialized to CSS color #DB7093
* <span class="colorSwath" style="background: #DB7093;"></span>
*
* @constant
* @type {Color}
*/
Color.PALEVIOLETRED = freezeObject(Color.fromCssColorString('#DB7093'));
/**
* An immutable Color instance initialized to CSS color #FFEFD5
* <span class="colorSwath" style="background: #FFEFD5;"></span>
*
* @constant
* @type {Color}
*/
Color.PAPAYAWHIP = freezeObject(Color.fromCssColorString('#FFEFD5'));
/**
* An immutable Color instance initialized to CSS color #FFDAB9
* <span class="colorSwath" style="background: #FFDAB9;"></span>
*
* @constant
* @type {Color}
*/
Color.PEACHPUFF = freezeObject(Color.fromCssColorString('#FFDAB9'));
/**
* An immutable Color instance initialized to CSS color #CD853F
* <span class="colorSwath" style="background: #CD853F;"></span>
*
* @constant
* @type {Color}
*/
Color.PERU = freezeObject(Color.fromCssColorString('#CD853F'));
/**
* An immutable Color instance initialized to CSS color #FFC0CB
* <span class="colorSwath" style="background: #FFC0CB;"></span>
*
* @constant
* @type {Color}
*/
Color.PINK = freezeObject(Color.fromCssColorString('#FFC0CB'));
/**
* An immutable Color instance initialized to CSS color #DDA0DD
* <span class="colorSwath" style="background: #DDA0DD;"></span>
*
* @constant
* @type {Color}
*/
Color.PLUM = freezeObject(Color.fromCssColorString('#DDA0DD'));
/**
* An immutable Color instance initialized to CSS color #B0E0E6
* <span class="colorSwath" style="background: #B0E0E6;"></span>
*
* @constant
* @type {Color}
*/
Color.POWDERBLUE = freezeObject(Color.fromCssColorString('#B0E0E6'));
/**
* An immutable Color instance initialized to CSS color #800080
* <span class="colorSwath" style="background: #800080;"></span>
*
* @constant
* @type {Color}
*/
Color.PURPLE = freezeObject(Color.fromCssColorString('#800080'));
/**
* An immutable Color instance initialized to CSS color #FF0000
* <span class="colorSwath" style="background: #FF0000;"></span>
*
* @constant
* @type {Color}
*/
Color.RED = freezeObject(Color.fromCssColorString('#FF0000'));
/**
* An immutable Color instance initialized to CSS color #BC8F8F
* <span class="colorSwath" style="background: #BC8F8F;"></span>
*
* @constant
* @type {Color}
*/
Color.ROSYBROWN = freezeObject(Color.fromCssColorString('#BC8F8F'));
/**
* An immutable Color instance initialized to CSS color #4169E1
* <span class="colorSwath" style="background: #4169E1;"></span>
*
* @constant
* @type {Color}
*/
Color.ROYALBLUE = freezeObject(Color.fromCssColorString('#4169E1'));
/**
* An immutable Color instance initialized to CSS color #8B4513
* <span class="colorSwath" style="background: #8B4513;"></span>
*
* @constant
* @type {Color}
*/
Color.SADDLEBROWN = freezeObject(Color.fromCssColorString('#8B4513'));
/**
* An immutable Color instance initialized to CSS color #FA8072
* <span class="colorSwath" style="background: #FA8072;"></span>
*
* @constant
* @type {Color}
*/
Color.SALMON = freezeObject(Color.fromCssColorString('#FA8072'));
/**
* An immutable Color instance initialized to CSS color #F4A460
* <span class="colorSwath" style="background: #F4A460;"></span>
*
* @constant
* @type {Color}
*/
Color.SANDYBROWN = freezeObject(Color.fromCssColorString('#F4A460'));
/**
* An immutable Color instance initialized to CSS color #2E8B57
* <span class="colorSwath" style="background: #2E8B57;"></span>
*
* @constant
* @type {Color}
*/
Color.SEAGREEN = freezeObject(Color.fromCssColorString('#2E8B57'));
/**
* An immutable Color instance initialized to CSS color #FFF5EE
* <span class="colorSwath" style="background: #FFF5EE;"></span>
*
* @constant
* @type {Color}
*/
Color.SEASHELL = freezeObject(Color.fromCssColorString('#FFF5EE'));
/**
* An immutable Color instance initialized to CSS color #A0522D
* <span class="colorSwath" style="background: #A0522D;"></span>
*
* @constant
* @type {Color}
*/
Color.SIENNA = freezeObject(Color.fromCssColorString('#A0522D'));
/**
* An immutable Color instance initialized to CSS color #C0C0C0
* <span class="colorSwath" style="background: #C0C0C0;"></span>
*
* @constant
* @type {Color}
*/
Color.SILVER = freezeObject(Color.fromCssColorString('#C0C0C0'));
/**
* An immutable Color instance initialized to CSS color #87CEEB
* <span class="colorSwath" style="background: #87CEEB;"></span>
*
* @constant
* @type {Color}
*/
Color.SKYBLUE = freezeObject(Color.fromCssColorString('#87CEEB'));
/**
* An immutable Color instance initialized to CSS color #6A5ACD
* <span class="colorSwath" style="background: #6A5ACD;"></span>
*
* @constant
* @type {Color}
*/
Color.SLATEBLUE = freezeObject(Color.fromCssColorString('#6A5ACD'));
/**
* An immutable Color instance initialized to CSS color #708090
* <span class="colorSwath" style="background: #708090;"></span>
*
* @constant
* @type {Color}
*/
Color.SLATEGRAY = freezeObject(Color.fromCssColorString('#708090'));
/**
* An immutable Color instance initialized to CSS color #708090
* <span class="colorSwath" style="background: #708090;"></span>
*
* @constant
* @type {Color}
*/
Color.SLATEGREY = Color.SLATEGRAY;
/**
* An immutable Color instance initialized to CSS color #FFFAFA
* <span class="colorSwath" style="background: #FFFAFA;"></span>
*
* @constant
* @type {Color}
*/
Color.SNOW = freezeObject(Color.fromCssColorString('#FFFAFA'));
/**
* An immutable Color instance initialized to CSS color #00FF7F
* <span class="colorSwath" style="background: #00FF7F;"></span>
*
* @constant
* @type {Color}
*/
Color.SPRINGGREEN = freezeObject(Color.fromCssColorString('#00FF7F'));
/**
* An immutable Color instance initialized to CSS color #4682B4
* <span class="colorSwath" style="background: #4682B4;"></span>
*
* @constant
* @type {Color}
*/
Color.STEELBLUE = freezeObject(Color.fromCssColorString('#4682B4'));
/**
* An immutable Color instance initialized to CSS color #D2B48C
* <span class="colorSwath" style="background: #D2B48C;"></span>
*
* @constant
* @type {Color}
*/
Color.TAN = freezeObject(Color.fromCssColorString('#D2B48C'));
/**
* An immutable Color instance initialized to CSS color #008080
* <span class="colorSwath" style="background: #008080;"></span>
*
* @constant
* @type {Color}
*/
Color.TEAL = freezeObject(Color.fromCssColorString('#008080'));
/**
* An immutable Color instance initialized to CSS color #D8BFD8
* <span class="colorSwath" style="background: #D8BFD8;"></span>
*
* @constant
* @type {Color}
*/
Color.THISTLE = freezeObject(Color.fromCssColorString('#D8BFD8'));
/**
* An immutable Color instance initialized to CSS color #FF6347
* <span class="colorSwath" style="background: #FF6347;"></span>
*
* @constant
* @type {Color}
*/
Color.TOMATO = freezeObject(Color.fromCssColorString('#FF6347'));
/**
* An immutable Color instance initialized to CSS color #40E0D0
* <span class="colorSwath" style="background: #40E0D0;"></span>
*
* @constant
* @type {Color}
*/
Color.TURQUOISE = freezeObject(Color.fromCssColorString('#40E0D0'));
/**
* An immutable Color instance initialized to CSS color #EE82EE
* <span class="colorSwath" style="background: #EE82EE;"></span>
*
* @constant
* @type {Color}
*/
Color.VIOLET = freezeObject(Color.fromCssColorString('#EE82EE'));
/**
* An immutable Color instance initialized to CSS color #F5DEB3
* <span class="colorSwath" style="background: #F5DEB3;"></span>
*
* @constant
* @type {Color}
*/
Color.WHEAT = freezeObject(Color.fromCssColorString('#F5DEB3'));
/**
* An immutable Color instance initialized to CSS color #FFFFFF
* <span class="colorSwath" style="background: #FFFFFF;"></span>
*
* @constant
* @type {Color}
*/
Color.WHITE = freezeObject(Color.fromCssColorString('#FFFFFF'));
/**
* An immutable Color instance initialized to CSS color #F5F5F5
* <span class="colorSwath" style="background: #F5F5F5;"></span>
*
* @constant
* @type {Color}
*/
Color.WHITESMOKE = freezeObject(Color.fromCssColorString('#F5F5F5'));
/**
* An immutable Color instance initialized to CSS color #FFFF00
* <span class="colorSwath" style="background: #FFFF00;"></span>
*
* @constant
* @type {Color}
*/
Color.YELLOW = freezeObject(Color.fromCssColorString('#FFFF00'));
/**
* An immutable Color instance initialized to CSS color #9ACD32
* <span class="colorSwath" style="background: #9ACD32;"></span>
*
* @constant
* @type {Color}
*/
Color.YELLOWGREEN = freezeObject(Color.fromCssColorString('#9ACD32'));
/**
* An immutable Color instance initialized to CSS transparent.
* <span class="colorSwath" style="background: transparent;"></span>
*
* @constant
* @type {Color}
*/
Color.TRANSPARENT = freezeObject(new Color(0, 0, 0, 0));
return Color;
});
/*global define*/
define('Core/WebGLConstants',[
'./freezeObject'
], function(
freezeObject) {
'use strict';
/**
* Enum containing WebGL Constant values by name.
* for use without an active WebGL context, or in cases where certain constants are unavailable using the WebGL context
* (For example, in [Safari 9]{@link https://github.com/AnalyticalGraphicsInc/cesium/issues/2989}).
*
* These match the constants from the [WebGL 1.0]{@link https://www.khronos.org/registry/webgl/specs/latest/1.0/}
* and [WebGL 2.0]{@link https://www.khronos.org/registry/webgl/specs/latest/2.0/}
* specifications.
*
* @exports WebGLConstants
*/
var WebGLConstants = {
DEPTH_BUFFER_BIT : 0x00000100,
STENCIL_BUFFER_BIT : 0x00000400,
COLOR_BUFFER_BIT : 0x00004000,
POINTS : 0x0000,
LINES : 0x0001,
LINE_LOOP : 0x0002,
LINE_STRIP : 0x0003,
TRIANGLES : 0x0004,
TRIANGLE_STRIP : 0x0005,
TRIANGLE_FAN : 0x0006,
ZERO : 0,
ONE : 1,
SRC_COLOR : 0x0300,
ONE_MINUS_SRC_COLOR : 0x0301,
SRC_ALPHA : 0x0302,
ONE_MINUS_SRC_ALPHA : 0x0303,
DST_ALPHA : 0x0304,
ONE_MINUS_DST_ALPHA : 0x0305,
DST_COLOR : 0x0306,
ONE_MINUS_DST_COLOR : 0x0307,
SRC_ALPHA_SATURATE : 0x0308,
FUNC_ADD : 0x8006,
BLEND_EQUATION : 0x8009,
BLEND_EQUATION_RGB : 0x8009, // same as BLEND_EQUATION
BLEND_EQUATION_ALPHA : 0x883D,
FUNC_SUBTRACT : 0x800A,
FUNC_REVERSE_SUBTRACT : 0x800B,
BLEND_DST_RGB : 0x80C8,
BLEND_SRC_RGB : 0x80C9,
BLEND_DST_ALPHA : 0x80CA,
BLEND_SRC_ALPHA : 0x80CB,
CONSTANT_COLOR : 0x8001,
ONE_MINUS_CONSTANT_COLOR : 0x8002,
CONSTANT_ALPHA : 0x8003,
ONE_MINUS_CONSTANT_ALPHA : 0x8004,
BLEND_COLOR : 0x8005,
ARRAY_BUFFER : 0x8892,
ELEMENT_ARRAY_BUFFER : 0x8893,
ARRAY_BUFFER_BINDING : 0x8894,
ELEMENT_ARRAY_BUFFER_BINDING : 0x8895,
STREAM_DRAW : 0x88E0,
STATIC_DRAW : 0x88E4,
DYNAMIC_DRAW : 0x88E8,
BUFFER_SIZE : 0x8764,
BUFFER_USAGE : 0x8765,
CURRENT_VERTEX_ATTRIB : 0x8626,
FRONT : 0x0404,
BACK : 0x0405,
FRONT_AND_BACK : 0x0408,
CULL_FACE : 0x0B44,
BLEND : 0x0BE2,
DITHER : 0x0BD0,
STENCIL_TEST : 0x0B90,
DEPTH_TEST : 0x0B71,
SCISSOR_TEST : 0x0C11,
POLYGON_OFFSET_FILL : 0x8037,
SAMPLE_ALPHA_TO_COVERAGE : 0x809E,
SAMPLE_COVERAGE : 0x80A0,
NO_ERROR : 0,
INVALID_ENUM : 0x0500,
INVALID_VALUE : 0x0501,
INVALID_OPERATION : 0x0502,
OUT_OF_MEMORY : 0x0505,
CW : 0x0900,
CCW : 0x0901,
LINE_WIDTH : 0x0B21,
ALIASED_POINT_SIZE_RANGE : 0x846D,
ALIASED_LINE_WIDTH_RANGE : 0x846E,
CULL_FACE_MODE : 0x0B45,
FRONT_FACE : 0x0B46,
DEPTH_RANGE : 0x0B70,
DEPTH_WRITEMASK : 0x0B72,
DEPTH_CLEAR_VALUE : 0x0B73,
DEPTH_FUNC : 0x0B74,
STENCIL_CLEAR_VALUE : 0x0B91,
STENCIL_FUNC : 0x0B92,
STENCIL_FAIL : 0x0B94,
STENCIL_PASS_DEPTH_FAIL : 0x0B95,
STENCIL_PASS_DEPTH_PASS : 0x0B96,
STENCIL_REF : 0x0B97,
STENCIL_VALUE_MASK : 0x0B93,
STENCIL_WRITEMASK : 0x0B98,
STENCIL_BACK_FUNC : 0x8800,
STENCIL_BACK_FAIL : 0x8801,
STENCIL_BACK_PASS_DEPTH_FAIL : 0x8802,
STENCIL_BACK_PASS_DEPTH_PASS : 0x8803,
STENCIL_BACK_REF : 0x8CA3,
STENCIL_BACK_VALUE_MASK : 0x8CA4,
STENCIL_BACK_WRITEMASK : 0x8CA5,
VIEWPORT : 0x0BA2,
SCISSOR_BOX : 0x0C10,
COLOR_CLEAR_VALUE : 0x0C22,
COLOR_WRITEMASK : 0x0C23,
UNPACK_ALIGNMENT : 0x0CF5,
PACK_ALIGNMENT : 0x0D05,
MAX_TEXTURE_SIZE : 0x0D33,
MAX_VIEWPORT_DIMS : 0x0D3A,
SUBPIXEL_BITS : 0x0D50,
RED_BITS : 0x0D52,
GREEN_BITS : 0x0D53,
BLUE_BITS : 0x0D54,
ALPHA_BITS : 0x0D55,
DEPTH_BITS : 0x0D56,
STENCIL_BITS : 0x0D57,
POLYGON_OFFSET_UNITS : 0x2A00,
POLYGON_OFFSET_FACTOR : 0x8038,
TEXTURE_BINDING_2D : 0x8069,
SAMPLE_BUFFERS : 0x80A8,
SAMPLES : 0x80A9,
SAMPLE_COVERAGE_VALUE : 0x80AA,
SAMPLE_COVERAGE_INVERT : 0x80AB,
COMPRESSED_TEXTURE_FORMATS : 0x86A3,
DONT_CARE : 0x1100,
FASTEST : 0x1101,
NICEST : 0x1102,
GENERATE_MIPMAP_HINT : 0x8192,
BYTE : 0x1400,
UNSIGNED_BYTE : 0x1401,
SHORT : 0x1402,
UNSIGNED_SHORT : 0x1403,
INT : 0x1404,
UNSIGNED_INT : 0x1405,
FLOAT : 0x1406,
DEPTH_COMPONENT : 0x1902,
ALPHA : 0x1906,
RGB : 0x1907,
RGBA : 0x1908,
LUMINANCE : 0x1909,
LUMINANCE_ALPHA : 0x190A,
UNSIGNED_SHORT_4_4_4_4 : 0x8033,
UNSIGNED_SHORT_5_5_5_1 : 0x8034,
UNSIGNED_SHORT_5_6_5 : 0x8363,
FRAGMENT_SHADER : 0x8B30,
VERTEX_SHADER : 0x8B31,
MAX_VERTEX_ATTRIBS : 0x8869,
MAX_VERTEX_UNIFORM_VECTORS : 0x8DFB,
MAX_VARYING_VECTORS : 0x8DFC,
MAX_COMBINED_TEXTURE_IMAGE_UNITS : 0x8B4D,
MAX_VERTEX_TEXTURE_IMAGE_UNITS : 0x8B4C,
MAX_TEXTURE_IMAGE_UNITS : 0x8872,
MAX_FRAGMENT_UNIFORM_VECTORS : 0x8DFD,
SHADER_TYPE : 0x8B4F,
DELETE_STATUS : 0x8B80,
LINK_STATUS : 0x8B82,
VALIDATE_STATUS : 0x8B83,
ATTACHED_SHADERS : 0x8B85,
ACTIVE_UNIFORMS : 0x8B86,
ACTIVE_ATTRIBUTES : 0x8B89,
SHADING_LANGUAGE_VERSION : 0x8B8C,
CURRENT_PROGRAM : 0x8B8D,
NEVER : 0x0200,
LESS : 0x0201,
EQUAL : 0x0202,
LEQUAL : 0x0203,
GREATER : 0x0204,
NOTEQUAL : 0x0205,
GEQUAL : 0x0206,
ALWAYS : 0x0207,
KEEP : 0x1E00,
REPLACE : 0x1E01,
INCR : 0x1E02,
DECR : 0x1E03,
INVERT : 0x150A,
INCR_WRAP : 0x8507,
DECR_WRAP : 0x8508,
VENDOR : 0x1F00,
RENDERER : 0x1F01,
VERSION : 0x1F02,
NEAREST : 0x2600,
LINEAR : 0x2601,
NEAREST_MIPMAP_NEAREST : 0x2700,
LINEAR_MIPMAP_NEAREST : 0x2701,
NEAREST_MIPMAP_LINEAR : 0x2702,
LINEAR_MIPMAP_LINEAR : 0x2703,
TEXTURE_MAG_FILTER : 0x2800,
TEXTURE_MIN_FILTER : 0x2801,
TEXTURE_WRAP_S : 0x2802,
TEXTURE_WRAP_T : 0x2803,
TEXTURE_2D : 0x0DE1,
TEXTURE : 0x1702,
TEXTURE_CUBE_MAP : 0x8513,
TEXTURE_BINDING_CUBE_MAP : 0x8514,
TEXTURE_CUBE_MAP_POSITIVE_X : 0x8515,
TEXTURE_CUBE_MAP_NEGATIVE_X : 0x8516,
TEXTURE_CUBE_MAP_POSITIVE_Y : 0x8517,
TEXTURE_CUBE_MAP_NEGATIVE_Y : 0x8518,
TEXTURE_CUBE_MAP_POSITIVE_Z : 0x8519,
TEXTURE_CUBE_MAP_NEGATIVE_Z : 0x851A,
MAX_CUBE_MAP_TEXTURE_SIZE : 0x851C,
TEXTURE0 : 0x84C0,
TEXTURE1 : 0x84C1,
TEXTURE2 : 0x84C2,
TEXTURE3 : 0x84C3,
TEXTURE4 : 0x84C4,
TEXTURE5 : 0x84C5,
TEXTURE6 : 0x84C6,
TEXTURE7 : 0x84C7,
TEXTURE8 : 0x84C8,
TEXTURE9 : 0x84C9,
TEXTURE10 : 0x84CA,
TEXTURE11 : 0x84CB,
TEXTURE12 : 0x84CC,
TEXTURE13 : 0x84CD,
TEXTURE14 : 0x84CE,
TEXTURE15 : 0x84CF,
TEXTURE16 : 0x84D0,
TEXTURE17 : 0x84D1,
TEXTURE18 : 0x84D2,
TEXTURE19 : 0x84D3,
TEXTURE20 : 0x84D4,
TEXTURE21 : 0x84D5,
TEXTURE22 : 0x84D6,
TEXTURE23 : 0x84D7,
TEXTURE24 : 0x84D8,
TEXTURE25 : 0x84D9,
TEXTURE26 : 0x84DA,
TEXTURE27 : 0x84DB,
TEXTURE28 : 0x84DC,
TEXTURE29 : 0x84DD,
TEXTURE30 : 0x84DE,
TEXTURE31 : 0x84DF,
ACTIVE_TEXTURE : 0x84E0,
REPEAT : 0x2901,
CLAMP_TO_EDGE : 0x812F,
MIRRORED_REPEAT : 0x8370,
FLOAT_VEC2 : 0x8B50,
FLOAT_VEC3 : 0x8B51,
FLOAT_VEC4 : 0x8B52,
INT_VEC2 : 0x8B53,
INT_VEC3 : 0x8B54,
INT_VEC4 : 0x8B55,
BOOL : 0x8B56,
BOOL_VEC2 : 0x8B57,
BOOL_VEC3 : 0x8B58,
BOOL_VEC4 : 0x8B59,
FLOAT_MAT2 : 0x8B5A,
FLOAT_MAT3 : 0x8B5B,
FLOAT_MAT4 : 0x8B5C,
SAMPLER_2D : 0x8B5E,
SAMPLER_CUBE : 0x8B60,
VERTEX_ATTRIB_ARRAY_ENABLED : 0x8622,
VERTEX_ATTRIB_ARRAY_SIZE : 0x8623,
VERTEX_ATTRIB_ARRAY_STRIDE : 0x8624,
VERTEX_ATTRIB_ARRAY_TYPE : 0x8625,
VERTEX_ATTRIB_ARRAY_NORMALIZED : 0x886A,
VERTEX_ATTRIB_ARRAY_POINTER : 0x8645,
VERTEX_ATTRIB_ARRAY_BUFFER_BINDING : 0x889F,
IMPLEMENTATION_COLOR_READ_TYPE : 0x8B9A,
IMPLEMENTATION_COLOR_READ_FORMAT : 0x8B9B,
COMPILE_STATUS : 0x8B81,
LOW_FLOAT : 0x8DF0,
MEDIUM_FLOAT : 0x8DF1,
HIGH_FLOAT : 0x8DF2,
LOW_INT : 0x8DF3,
MEDIUM_INT : 0x8DF4,
HIGH_INT : 0x8DF5,
FRAMEBUFFER : 0x8D40,
RENDERBUFFER : 0x8D41,
RGBA4 : 0x8056,
RGB5_A1 : 0x8057,
RGB565 : 0x8D62,
DEPTH_COMPONENT16 : 0x81A5,
STENCIL_INDEX : 0x1901,
STENCIL_INDEX8 : 0x8D48,
DEPTH_STENCIL : 0x84F9,
RENDERBUFFER_WIDTH : 0x8D42,
RENDERBUFFER_HEIGHT : 0x8D43,
RENDERBUFFER_INTERNAL_FORMAT : 0x8D44,
RENDERBUFFER_RED_SIZE : 0x8D50,
RENDERBUFFER_GREEN_SIZE : 0x8D51,
RENDERBUFFER_BLUE_SIZE : 0x8D52,
RENDERBUFFER_ALPHA_SIZE : 0x8D53,
RENDERBUFFER_DEPTH_SIZE : 0x8D54,
RENDERBUFFER_STENCIL_SIZE : 0x8D55,
FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE : 0x8CD0,
FRAMEBUFFER_ATTACHMENT_OBJECT_NAME : 0x8CD1,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL : 0x8CD2,
FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE : 0x8CD3,
COLOR_ATTACHMENT0 : 0x8CE0,
DEPTH_ATTACHMENT : 0x8D00,
STENCIL_ATTACHMENT : 0x8D20,
DEPTH_STENCIL_ATTACHMENT : 0x821A,
NONE : 0,
FRAMEBUFFER_COMPLETE : 0x8CD5,
FRAMEBUFFER_INCOMPLETE_ATTACHMENT : 0x8CD6,
FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT : 0x8CD7,
FRAMEBUFFER_INCOMPLETE_DIMENSIONS : 0x8CD9,
FRAMEBUFFER_UNSUPPORTED : 0x8CDD,
FRAMEBUFFER_BINDING : 0x8CA6,
RENDERBUFFER_BINDING : 0x8CA7,
MAX_RENDERBUFFER_SIZE : 0x84E8,
INVALID_FRAMEBUFFER_OPERATION : 0x0506,
UNPACK_FLIP_Y_WEBGL : 0x9240,
UNPACK_PREMULTIPLY_ALPHA_WEBGL : 0x9241,
CONTEXT_LOST_WEBGL : 0x9242,
UNPACK_COLORSPACE_CONVERSION_WEBGL : 0x9243,
BROWSER_DEFAULT_WEBGL : 0x9244,
// WEBGL_compressed_texture_s3tc
COMPRESSED_RGB_S3TC_DXT1_EXT : 0x83F0,
COMPRESSED_RGBA_S3TC_DXT1_EXT : 0x83F1,
COMPRESSED_RGBA_S3TC_DXT3_EXT : 0x83F2,
COMPRESSED_RGBA_S3TC_DXT5_EXT : 0x83F3,
// WEBGL_compressed_texture_pvrtc
COMPRESSED_RGB_PVRTC_4BPPV1_IMG : 0x8C00,
COMPRESSED_RGB_PVRTC_2BPPV1_IMG : 0x8C01,
COMPRESSED_RGBA_PVRTC_4BPPV1_IMG : 0x8C02,
COMPRESSED_RGBA_PVRTC_2BPPV1_IMG : 0x8C03,
// WEBGL_compressed_texture_etc1
COMPRESSED_RGB_ETC1_WEBGL : 0x8D64,
// Desktop OpenGL
DOUBLE : 0x140A,
// WebGL 2
READ_BUFFER : 0x0C02,
UNPACK_ROW_LENGTH : 0x0CF2,
UNPACK_SKIP_ROWS : 0x0CF3,
UNPACK_SKIP_PIXELS : 0x0CF4,
PACK_ROW_LENGTH : 0x0D02,
PACK_SKIP_ROWS : 0x0D03,
PACK_SKIP_PIXELS : 0x0D04,
COLOR : 0x1800,
DEPTH : 0x1801,
STENCIL : 0x1802,
RED : 0x1903,
RGB8 : 0x8051,
RGBA8 : 0x8058,
RGB10_A2 : 0x8059,
TEXTURE_BINDING_3D : 0x806A,
UNPACK_SKIP_IMAGES : 0x806D,
UNPACK_IMAGE_HEIGHT : 0x806E,
TEXTURE_3D : 0x806F,
TEXTURE_WRAP_R : 0x8072,
MAX_3D_TEXTURE_SIZE : 0x8073,
UNSIGNED_INT_2_10_10_10_REV : 0x8368,
MAX_ELEMENTS_VERTICES : 0x80E8,
MAX_ELEMENTS_INDICES : 0x80E9,
TEXTURE_MIN_LOD : 0x813A,
TEXTURE_MAX_LOD : 0x813B,
TEXTURE_BASE_LEVEL : 0x813C,
TEXTURE_MAX_LEVEL : 0x813D,
MIN : 0x8007,
MAX : 0x8008,
DEPTH_COMPONENT24 : 0x81A6,
MAX_TEXTURE_LOD_BIAS : 0x84FD,
TEXTURE_COMPARE_MODE : 0x884C,
TEXTURE_COMPARE_FUNC : 0x884D,
CURRENT_QUERY : 0x8865,
QUERY_RESULT : 0x8866,
QUERY_RESULT_AVAILABLE : 0x8867,
STREAM_READ : 0x88E1,
STREAM_COPY : 0x88E2,
STATIC_READ : 0x88E5,
STATIC_COPY : 0x88E6,
DYNAMIC_READ : 0x88E9,
DYNAMIC_COPY : 0x88EA,
MAX_DRAW_BUFFERS : 0x8824,
DRAW_BUFFER0 : 0x8825,
DRAW_BUFFER1 : 0x8826,
DRAW_BUFFER2 : 0x8827,
DRAW_BUFFER3 : 0x8828,
DRAW_BUFFER4 : 0x8829,
DRAW_BUFFER5 : 0x882A,
DRAW_BUFFER6 : 0x882B,
DRAW_BUFFER7 : 0x882C,
DRAW_BUFFER8 : 0x882D,
DRAW_BUFFER9 : 0x882E,
DRAW_BUFFER10 : 0x882F,
DRAW_BUFFER11 : 0x8830,
DRAW_BUFFER12 : 0x8831,
DRAW_BUFFER13 : 0x8832,
DRAW_BUFFER14 : 0x8833,
DRAW_BUFFER15 : 0x8834,
MAX_FRAGMENT_UNIFORM_COMPONENTS : 0x8B49,
MAX_VERTEX_UNIFORM_COMPONENTS : 0x8B4A,
SAMPLER_3D : 0x8B5F,
SAMPLER_2D_SHADOW : 0x8B62,
FRAGMENT_SHADER_DERIVATIVE_HINT : 0x8B8B,
PIXEL_PACK_BUFFER : 0x88EB,
PIXEL_UNPACK_BUFFER : 0x88EC,
PIXEL_PACK_BUFFER_BINDING : 0x88ED,
PIXEL_UNPACK_BUFFER_BINDING : 0x88EF,
FLOAT_MAT2x3 : 0x8B65,
FLOAT_MAT2x4 : 0x8B66,
FLOAT_MAT3x2 : 0x8B67,
FLOAT_MAT3x4 : 0x8B68,
FLOAT_MAT4x2 : 0x8B69,
FLOAT_MAT4x3 : 0x8B6A,
SRGB : 0x8C40,
SRGB8 : 0x8C41,
SRGB8_ALPHA8 : 0x8C43,
COMPARE_REF_TO_TEXTURE : 0x884E,
RGBA32F : 0x8814,
RGB32F : 0x8815,
RGBA16F : 0x881A,
RGB16F : 0x881B,
VERTEX_ATTRIB_ARRAY_INTEGER : 0x88FD,
MAX_ARRAY_TEXTURE_LAYERS : 0x88FF,
MIN_PROGRAM_TEXEL_OFFSET : 0x8904,
MAX_PROGRAM_TEXEL_OFFSET : 0x8905,
MAX_VARYING_COMPONENTS : 0x8B4B,
TEXTURE_2D_ARRAY : 0x8C1A,
TEXTURE_BINDING_2D_ARRAY : 0x8C1D,
R11F_G11F_B10F : 0x8C3A,
UNSIGNED_INT_10F_11F_11F_REV : 0x8C3B,
RGB9_E5 : 0x8C3D,
UNSIGNED_INT_5_9_9_9_REV : 0x8C3E,
TRANSFORM_FEEDBACK_BUFFER_MODE : 0x8C7F,
MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS : 0x8C80,
TRANSFORM_FEEDBACK_VARYINGS : 0x8C83,
TRANSFORM_FEEDBACK_BUFFER_START : 0x8C84,
TRANSFORM_FEEDBACK_BUFFER_SIZE : 0x8C85,
TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN : 0x8C88,
RASTERIZER_DISCARD : 0x8C89,
MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS : 0x8C8A,
MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS : 0x8C8B,
INTERLEAVED_ATTRIBS : 0x8C8C,
SEPARATE_ATTRIBS : 0x8C8D,
TRANSFORM_FEEDBACK_BUFFER : 0x8C8E,
TRANSFORM_FEEDBACK_BUFFER_BINDING : 0x8C8F,
RGBA32UI : 0x8D70,
RGB32UI : 0x8D71,
RGBA16UI : 0x8D76,
RGB16UI : 0x8D77,
RGBA8UI : 0x8D7C,
RGB8UI : 0x8D7D,
RGBA32I : 0x8D82,
RGB32I : 0x8D83,
RGBA16I : 0x8D88,
RGB16I : 0x8D89,
RGBA8I : 0x8D8E,
RGB8I : 0x8D8F,
RED_INTEGER : 0x8D94,
RGB_INTEGER : 0x8D98,
RGBA_INTEGER : 0x8D99,
SAMPLER_2D_ARRAY : 0x8DC1,
SAMPLER_2D_ARRAY_SHADOW : 0x8DC4,
SAMPLER_CUBE_SHADOW : 0x8DC5,
UNSIGNED_INT_VEC2 : 0x8DC6,
UNSIGNED_INT_VEC3 : 0x8DC7,
UNSIGNED_INT_VEC4 : 0x8DC8,
INT_SAMPLER_2D : 0x8DCA,
INT_SAMPLER_3D : 0x8DCB,
INT_SAMPLER_CUBE : 0x8DCC,
INT_SAMPLER_2D_ARRAY : 0x8DCF,
UNSIGNED_INT_SAMPLER_2D : 0x8DD2,
UNSIGNED_INT_SAMPLER_3D : 0x8DD3,
UNSIGNED_INT_SAMPLER_CUBE : 0x8DD4,
UNSIGNED_INT_SAMPLER_2D_ARRAY : 0x8DD7,
DEPTH_COMPONENT32F : 0x8CAC,
DEPTH32F_STENCIL8 : 0x8CAD,
FLOAT_32_UNSIGNED_INT_24_8_REV : 0x8DAD,
FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING : 0x8210,
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE : 0x8211,
FRAMEBUFFER_ATTACHMENT_RED_SIZE : 0x8212,
FRAMEBUFFER_ATTACHMENT_GREEN_SIZE : 0x8213,
FRAMEBUFFER_ATTACHMENT_BLUE_SIZE : 0x8214,
FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE : 0x8215,
FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE : 0x8216,
FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE : 0x8217,
FRAMEBUFFER_DEFAULT : 0x8218,
UNSIGNED_INT_24_8 : 0x84FA,
DEPTH24_STENCIL8 : 0x88F0,
UNSIGNED_NORMALIZED : 0x8C17,
DRAW_FRAMEBUFFER_BINDING : 0x8CA6, // Same as FRAMEBUFFER_BINDING
READ_FRAMEBUFFER : 0x8CA8,
DRAW_FRAMEBUFFER : 0x8CA9,
READ_FRAMEBUFFER_BINDING : 0x8CAA,
RENDERBUFFER_SAMPLES : 0x8CAB,
FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER : 0x8CD4,
MAX_COLOR_ATTACHMENTS : 0x8CDF,
COLOR_ATTACHMENT1 : 0x8CE1,
COLOR_ATTACHMENT2 : 0x8CE2,
COLOR_ATTACHMENT3 : 0x8CE3,
COLOR_ATTACHMENT4 : 0x8CE4,
COLOR_ATTACHMENT5 : 0x8CE5,
COLOR_ATTACHMENT6 : 0x8CE6,
COLOR_ATTACHMENT7 : 0x8CE7,
COLOR_ATTACHMENT8 : 0x8CE8,
COLOR_ATTACHMENT9 : 0x8CE9,
COLOR_ATTACHMENT10 : 0x8CEA,
COLOR_ATTACHMENT11 : 0x8CEB,
COLOR_ATTACHMENT12 : 0x8CEC,
COLOR_ATTACHMENT13 : 0x8CED,
COLOR_ATTACHMENT14 : 0x8CEE,
COLOR_ATTACHMENT15 : 0x8CEF,
FRAMEBUFFER_INCOMPLETE_MULTISAMPLE : 0x8D56,
MAX_SAMPLES : 0x8D57,
HALF_FLOAT : 0x140B,
RG : 0x8227,
RG_INTEGER : 0x8228,
R8 : 0x8229,
RG8 : 0x822B,
R16F : 0x822D,
R32F : 0x822E,
RG16F : 0x822F,
RG32F : 0x8230,
R8I : 0x8231,
R8UI : 0x8232,
R16I : 0x8233,
R16UI : 0x8234,
R32I : 0x8235,
R32UI : 0x8236,
RG8I : 0x8237,
RG8UI : 0x8238,
RG16I : 0x8239,
RG16UI : 0x823A,
RG32I : 0x823B,
RG32UI : 0x823C,
VERTEX_ARRAY_BINDING : 0x85B5,
R8_SNORM : 0x8F94,
RG8_SNORM : 0x8F95,
RGB8_SNORM : 0x8F96,
RGBA8_SNORM : 0x8F97,
SIGNED_NORMALIZED : 0x8F9C,
COPY_READ_BUFFER : 0x8F36,
COPY_WRITE_BUFFER : 0x8F37,
COPY_READ_BUFFER_BINDING : 0x8F36, // Same as COPY_READ_BUFFER
COPY_WRITE_BUFFER_BINDING : 0x8F37, // Same as COPY_WRITE_BUFFER
UNIFORM_BUFFER : 0x8A11,
UNIFORM_BUFFER_BINDING : 0x8A28,
UNIFORM_BUFFER_START : 0x8A29,
UNIFORM_BUFFER_SIZE : 0x8A2A,
MAX_VERTEX_UNIFORM_BLOCKS : 0x8A2B,
MAX_FRAGMENT_UNIFORM_BLOCKS : 0x8A2D,
MAX_COMBINED_UNIFORM_BLOCKS : 0x8A2E,
MAX_UNIFORM_BUFFER_BINDINGS : 0x8A2F,
MAX_UNIFORM_BLOCK_SIZE : 0x8A30,
MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS : 0x8A31,
MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS : 0x8A33,
UNIFORM_BUFFER_OFFSET_ALIGNMENT : 0x8A34,
ACTIVE_UNIFORM_BLOCKS : 0x8A36,
UNIFORM_TYPE : 0x8A37,
UNIFORM_SIZE : 0x8A38,
UNIFORM_BLOCK_INDEX : 0x8A3A,
UNIFORM_OFFSET : 0x8A3B,
UNIFORM_ARRAY_STRIDE : 0x8A3C,
UNIFORM_MATRIX_STRIDE : 0x8A3D,
UNIFORM_IS_ROW_MAJOR : 0x8A3E,
UNIFORM_BLOCK_BINDING : 0x8A3F,
UNIFORM_BLOCK_DATA_SIZE : 0x8A40,
UNIFORM_BLOCK_ACTIVE_UNIFORMS : 0x8A42,
UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES : 0x8A43,
UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER : 0x8A44,
UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER : 0x8A46,
INVALID_INDEX : 0xFFFFFFFF,
MAX_VERTEX_OUTPUT_COMPONENTS : 0x9122,
MAX_FRAGMENT_INPUT_COMPONENTS : 0x9125,
MAX_SERVER_WAIT_TIMEOUT : 0x9111,
OBJECT_TYPE : 0x9112,
SYNC_CONDITION : 0x9113,
SYNC_STATUS : 0x9114,
SYNC_FLAGS : 0x9115,
SYNC_FENCE : 0x9116,
SYNC_GPU_COMMANDS_COMPLETE : 0x9117,
UNSIGNALED : 0x9118,
SIGNALED : 0x9119,
ALREADY_SIGNALED : 0x911A,
TIMEOUT_EXPIRED : 0x911B,
CONDITION_SATISFIED : 0x911C,
WAIT_FAILED : 0x911D,
SYNC_FLUSH_COMMANDS_BIT : 0x00000001,
VERTEX_ATTRIB_ARRAY_DIVISOR : 0x88FE,
ANY_SAMPLES_PASSED : 0x8C2F,
ANY_SAMPLES_PASSED_CONSERVATIVE : 0x8D6A,
SAMPLER_BINDING : 0x8919,
RGB10_A2UI : 0x906F,
INT_2_10_10_10_REV : 0x8D9F,
TRANSFORM_FEEDBACK : 0x8E22,
TRANSFORM_FEEDBACK_PAUSED : 0x8E23,
TRANSFORM_FEEDBACK_ACTIVE : 0x8E24,
TRANSFORM_FEEDBACK_BINDING : 0x8E25,
COMPRESSED_R11_EAC : 0x9270,
COMPRESSED_SIGNED_R11_EAC : 0x9271,
COMPRESSED_RG11_EAC : 0x9272,
COMPRESSED_SIGNED_RG11_EAC : 0x9273,
COMPRESSED_RGB8_ETC2 : 0x9274,
COMPRESSED_SRGB8_ETC2 : 0x9275,
COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9276,
COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9277,
COMPRESSED_RGBA8_ETC2_EAC : 0x9278,
COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : 0x9279,
TEXTURE_IMMUTABLE_FORMAT : 0x912F,
MAX_ELEMENT_INDEX : 0x8D6B,
TEXTURE_IMMUTABLE_LEVELS : 0x82DF,
// Extensions
MAX_TEXTURE_MAX_ANISOTROPY_EXT : 0x84FF
};
return freezeObject(WebGLConstants);
});
/*global define*/
define('Core/ComponentDatatype',[
'./defaultValue',
'./defined',
'./DeveloperError',
'./FeatureDetection',
'./freezeObject',
'./WebGLConstants'
], function(
defaultValue,
defined,
DeveloperError,
FeatureDetection,
freezeObject,
WebGLConstants) {
'use strict';
// Bail out if the browser doesn't support typed arrays, to prevent the setup function
// from failing, since we won't be able to create a WebGL context anyway.
if (!FeatureDetection.supportsTypedArrays()) {
return {};
}
/**
* WebGL component datatypes. Components are intrinsics,
* which form attributes, which form vertices.
*
* @exports ComponentDatatype
*/
var ComponentDatatype = {
/**
* 8-bit signed byte corresponding to <code>gl.BYTE</code> and the type
* of an element in <code>Int8Array</code>.
*
* @type {Number}
* @constant
*/
BYTE : WebGLConstants.BYTE,
/**
* 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
* of an element in <code>Uint8Array</code>.
*
* @type {Number}
* @constant
*/
UNSIGNED_BYTE : WebGLConstants.UNSIGNED_BYTE,
/**
* 16-bit signed short corresponding to <code>SHORT</code> and the type
* of an element in <code>Int16Array</code>.
*
* @type {Number}
* @constant
*/
SHORT : WebGLConstants.SHORT,
/**
* 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
* of an element in <code>Uint16Array</code>.
*
* @type {Number}
* @constant
*/
UNSIGNED_SHORT : WebGLConstants.UNSIGNED_SHORT,
/**
* 32-bit signed int corresponding to <code>INT</code> and the type
* of an element in <code>Int32Array</code>.
*
* @memberOf ComponentDatatype
*
* @type {Number}
* @constant
*/
INT : WebGLConstants.INT,
/**
* 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
* of an element in <code>Uint32Array</code>.
*
* @memberOf ComponentDatatype
*
* @type {Number}
* @constant
*/
UNSIGNED_INT : WebGLConstants.UNSIGNED_INT,
/**
* 32-bit floating-point corresponding to <code>FLOAT</code> and the type
* of an element in <code>Float32Array</code>.
*
* @type {Number}
* @constant
*/
FLOAT : WebGLConstants.FLOAT,
/**
* 64-bit floating-point corresponding to <code>gl.DOUBLE</code> (in Desktop OpenGL;
* this is not supported in WebGL, and is emulated in Cesium via {@link GeometryPipeline.encodeAttribute})
* and the type of an element in <code>Float64Array</code>.
*
* @memberOf ComponentDatatype
*
* @type {Number}
* @constant
* @default 0x140A
*/
DOUBLE : WebGLConstants.DOUBLE
};
/**
* Returns the size, in bytes, of the corresponding datatype.
*
* @param {ComponentDatatype} componentDatatype The component datatype to get the size of.
* @returns {Number} The size in bytes.
*
* @exception {DeveloperError} componentDatatype is not a valid value.
*
* @example
* // Returns Int8Array.BYTES_PER_ELEMENT
* var size = Cesium.ComponentDatatype.getSizeInBytes(Cesium.ComponentDatatype.BYTE);
*/
ComponentDatatype.getSizeInBytes = function(componentDatatype){
if (!defined(componentDatatype)) {
throw new DeveloperError('value is required.');
}
switch (componentDatatype) {
case ComponentDatatype.BYTE:
return Int8Array.BYTES_PER_ELEMENT;
case ComponentDatatype.UNSIGNED_BYTE:
return Uint8Array.BYTES_PER_ELEMENT;
case ComponentDatatype.SHORT:
return Int16Array.BYTES_PER_ELEMENT;
case ComponentDatatype.UNSIGNED_SHORT:
return Uint16Array.BYTES_PER_ELEMENT;
case ComponentDatatype.INT:
return Int32Array.BYTES_PER_ELEMENT;
case ComponentDatatype.UNSIGNED_INT:
return Uint32Array.BYTES_PER_ELEMENT;
case ComponentDatatype.FLOAT:
return Float32Array.BYTES_PER_ELEMENT;
case ComponentDatatype.DOUBLE:
return Float64Array.BYTES_PER_ELEMENT;
default:
throw new DeveloperError('componentDatatype is not a valid value.');
}
};
/**
* Gets the {@link ComponentDatatype} for the provided TypedArray instance.
*
* @param {TypedArray} array The typed array.
* @returns {ComponentDatatype} The ComponentDatatype for the provided array, or undefined if the array is not a TypedArray.
*/
ComponentDatatype.fromTypedArray = function(array) {
if (array instanceof Int8Array) {
return ComponentDatatype.BYTE;
}
if (array instanceof Uint8Array) {
return ComponentDatatype.UNSIGNED_BYTE;
}
if (array instanceof Int16Array) {
return ComponentDatatype.SHORT;
}
if (array instanceof Uint16Array) {
return ComponentDatatype.UNSIGNED_SHORT;
}
if (array instanceof Int32Array) {
return ComponentDatatype.INT;
}
if (array instanceof Uint32Array) {
return ComponentDatatype.UNSIGNED_INT;
}
if (array instanceof Float32Array) {
return ComponentDatatype.FLOAT;
}
if (array instanceof Float64Array) {
return ComponentDatatype.DOUBLE;
}
};
/**
* Validates that the provided component datatype is a valid {@link ComponentDatatype}
*
* @param {ComponentDatatype} componentDatatype The component datatype to validate.
* @returns {Boolean} <code>true</code> if the provided component datatype is a valid value; otherwise, <code>false</code>.
*
* @example
* if (!Cesium.ComponentDatatype.validate(componentDatatype)) {
* throw new Cesium.DeveloperError('componentDatatype must be a valid value.');
* }
*/
ComponentDatatype.validate = function(componentDatatype) {
return defined(componentDatatype) &&
(componentDatatype === ComponentDatatype.BYTE ||
componentDatatype === ComponentDatatype.UNSIGNED_BYTE ||
componentDatatype === ComponentDatatype.SHORT ||
componentDatatype === ComponentDatatype.UNSIGNED_SHORT ||
componentDatatype === ComponentDatatype.INT ||
componentDatatype === ComponentDatatype.UNSIGNED_INT ||
componentDatatype === ComponentDatatype.FLOAT ||
componentDatatype === ComponentDatatype.DOUBLE);
};
/**
* Creates a typed array corresponding to component data type.
*
* @param {ComponentDatatype} componentDatatype The component data type.
* @param {Number|Array} valuesOrLength The length of the array to create or an array.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array.
*
* @exception {DeveloperError} componentDatatype is not a valid value.
*
* @example
* // creates a Float32Array with length of 100
* var typedArray = Cesium.ComponentDatatype.createTypedArray(Cesium.ComponentDatatype.FLOAT, 100);
*/
ComponentDatatype.createTypedArray = function(componentDatatype, valuesOrLength) {
if (!defined(componentDatatype)) {
throw new DeveloperError('componentDatatype is required.');
}
if (!defined(valuesOrLength)) {
throw new DeveloperError('valuesOrLength is required.');
}
switch (componentDatatype) {
case ComponentDatatype.BYTE:
return new Int8Array(valuesOrLength);
case ComponentDatatype.UNSIGNED_BYTE:
return new Uint8Array(valuesOrLength);
case ComponentDatatype.SHORT:
return new Int16Array(valuesOrLength);
case ComponentDatatype.UNSIGNED_SHORT:
return new Uint16Array(valuesOrLength);
case ComponentDatatype.INT:
return new Int32Array(valuesOrLength);
case ComponentDatatype.UNSIGNED_INT:
return new Uint32Array(valuesOrLength);
case ComponentDatatype.FLOAT:
return new Float32Array(valuesOrLength);
case ComponentDatatype.DOUBLE:
return new Float64Array(valuesOrLength);
default:
throw new DeveloperError('componentDatatype is not a valid value.');
}
};
/**
* Creates a typed view of an array of bytes.
*
* @param {ComponentDatatype} componentDatatype The type of the view to create.
* @param {ArrayBuffer} buffer The buffer storage to use for the view.
* @param {Number} [byteOffset] The offset, in bytes, to the first element in the view.
* @param {Number} [length] The number of elements in the view.
* @returns {Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} A typed array view of the buffer.
*
* @exception {DeveloperError} componentDatatype is not a valid value.
*/
ComponentDatatype.createArrayBufferView = function(componentDatatype, buffer, byteOffset, length) {
if (!defined(componentDatatype)) {
throw new DeveloperError('componentDatatype is required.');
}
if (!defined(buffer)) {
throw new DeveloperError('buffer is required.');
}
byteOffset = defaultValue(byteOffset, 0);
length = defaultValue(length, (buffer.byteLength - byteOffset) / ComponentDatatype.getSizeInBytes(componentDatatype));
switch (componentDatatype) {
case ComponentDatatype.BYTE:
return new Int8Array(buffer, byteOffset, length);
case ComponentDatatype.UNSIGNED_BYTE:
return new Uint8Array(buffer, byteOffset, length);
case ComponentDatatype.SHORT:
return new Int16Array(buffer, byteOffset, length);
case ComponentDatatype.UNSIGNED_SHORT:
return new Uint16Array(buffer, byteOffset, length);
case ComponentDatatype.INT:
return new Int32Array(buffer, byteOffset, length);
case ComponentDatatype.UNSIGNED_INT:
return new Uint32Array(buffer, byteOffset, length);
case ComponentDatatype.FLOAT:
return new Float32Array(buffer, byteOffset, length);
case ComponentDatatype.DOUBLE:
return new Float64Array(buffer, byteOffset, length);
default:
throw new DeveloperError('componentDatatype is not a valid value.');
}
};
/**
* Get the ComponentDatatype from its name.
*
* @param {String} name The name of the ComponentDatatype.
* @returns {ComponentDatatype} The ComponentDatatype.
*
* @exception {DeveloperError} name is not a valid value.
*/
ComponentDatatype.fromName = function(name) {
switch (name) {
case 'BYTE':
return ComponentDatatype.BYTE;
case 'UNSIGNED_BYTE':
return ComponentDatatype.UNSIGNED_BYTE;
case 'SHORT':
return ComponentDatatype.SHORT;
case 'UNSIGNED_SHORT':
return ComponentDatatype.UNSIGNED_SHORT;
case 'INT':
return ComponentDatatype.INT;
case 'UNSIGNED_INT':
return ComponentDatatype.UNSIGNED_INT;
case 'FLOAT':
return ComponentDatatype.FLOAT;
case 'DOUBLE':
return ComponentDatatype.DOUBLE;
default:
throw new DeveloperError('name is not a valid value.');
}
};
return freezeObject(ComponentDatatype);
});
/*global define*/
define('Core/GeometryType',[
'./freezeObject'
], function(
freezeObject) {
'use strict';
/**
* @private
*/
var GeometryType = {
NONE : 0,
TRIANGLES : 1,
LINES : 2,
POLYLINES : 3
};
return freezeObject(GeometryType);
});
/*global define*/
define('Core/PrimitiveType',[
'./freezeObject',
'./WebGLConstants'
], function(
freezeObject,
WebGLConstants) {
'use strict';
/**
* The type of a geometric primitive, i.e., points, lines, and triangles.
*
* @exports PrimitiveType
*/
var PrimitiveType = {
/**
* Points primitive where each vertex (or index) is a separate point.
*
* @type {Number}
* @constant
*/
POINTS : WebGLConstants.POINTS,
/**
* Lines primitive where each two vertices (or indices) is a line segment. Line segments are not necessarily connected.
*
* @type {Number}
* @constant
*/
LINES : WebGLConstants.LINES,
/**
* Line loop primitive where each vertex (or index) after the first connects a line to
* the previous vertex, and the last vertex implicitly connects to the first.
*
* @type {Number}
* @constant
*/
LINE_LOOP : WebGLConstants.LINE_LOOP,
/**
* Line strip primitive where each vertex (or index) after the first connects a line to the previous vertex.
*
* @type {Number}
* @constant
*/
LINE_STRIP : WebGLConstants.LINE_STRIP,
/**
* Triangles primitive where each three vertices (or indices) is a triangle. Triangles do not necessarily share edges.
*
* @type {Number}
* @constant
*/
TRIANGLES : WebGLConstants.TRIANGLES,
/**
* Triangle strip primitive where each vertex (or index) after the first two connect to
* the previous two vertices forming a triangle. For example, this can be used to model a wall.
*
* @type {Number}
* @constant
*/
TRIANGLE_STRIP : WebGLConstants.TRIANGLE_STRIP,
/**
* Triangle fan primitive where each vertex (or index) after the first two connect to
* the previous vertex and the first vertex forming a triangle. For example, this can be used
* to model a cone or circle.
*
* @type {Number}
* @constant
*/
TRIANGLE_FAN : WebGLConstants.TRIANGLE_FAN,
/**
* @private
*/
validate : function(primitiveType) {
return primitiveType === PrimitiveType.POINTS ||
primitiveType === PrimitiveType.LINES ||
primitiveType === PrimitiveType.LINE_LOOP ||
primitiveType === PrimitiveType.LINE_STRIP ||
primitiveType === PrimitiveType.TRIANGLES ||
primitiveType === PrimitiveType.TRIANGLE_STRIP ||
primitiveType === PrimitiveType.TRIANGLE_FAN;
}
};
return freezeObject(PrimitiveType);
});
/*global define*/
define('Core/Geometry',[
'./defaultValue',
'./defined',
'./DeveloperError',
'./GeometryType',
'./PrimitiveType'
], function(
defaultValue,
defined,
DeveloperError,
GeometryType,
PrimitiveType) {
'use strict';
/**
* A geometry representation with attributes forming vertices and optional index data
* defining primitives. Geometries and an {@link Appearance}, which describes the shading,
* can be assigned to a {@link Primitive} for visualization. A <code>Primitive</code> can
* be created from many heterogeneous - in many cases - geometries for performance.
* <p>
* Geometries can be transformed and optimized using functions in {@link GeometryPipeline}.
* </p>
*
* @alias Geometry
* @constructor
*
* @param {Object} options Object with the following properties:
* @param {GeometryAttributes} options.attributes Attributes, which make up the geometry's vertices.
* @param {PrimitiveType} [options.primitiveType=PrimitiveType.TRIANGLES] The type of primitives in the geometry.
* @param {Uint16Array|Uint32Array} [options.indices] Optional index data that determines the primitives in the geometry.
* @param {BoundingSphere} [options.boundingSphere] An optional bounding sphere that fully enclosed the geometry.
*
* @see PolygonGeometry
* @see RectangleGeometry
* @see EllipseGeometry
* @see CircleGeometry
* @see WallGeometry
* @see SimplePolylineGeometry
* @see BoxGeometry
* @see EllipsoidGeometry
*
* @demo {@link http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Geometry%20and%20Appearances.html|Geometry and Appearances Demo}
*
* @example
* // Create geometry with a position attribute and indexed lines.
* var positions = new Float64Array([
* 0.0, 0.0, 0.0,
* 7500000.0, 0.0, 0.0,
* 0.0, 7500000.0, 0.0
* ]);
*
* var geometry = new Cesium.Geometry({
* attributes : {
* position : new Cesium.GeometryAttribute({
* componentDatatype : Cesium.ComponentDatatype.DOUBLE,
* componentsPerAttribute : 3,
* values : positions
* })
* },
* indices : new Uint16Array([0, 1, 1, 2, 2, 0]),
* primitiveType : Cesium.PrimitiveType.LINES,
* boundingSphere : Cesium.BoundingSphere.fromVertices(positions)
* });
*/
function Geometry(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
if (!defined(options.attributes)) {
throw new DeveloperError('options.attributes is required.');
}
/**
* Attributes, which make up the geometry's vertices. Each property in this object corresponds to a
* {@link GeometryAttribute} containing the attribute's data.
* <p>
* Attributes are always stored non-interleaved in a Geometry.
* </p>
* <p>
* There are reserved attribute names with well-known semantics. The following attributes
* are created by a Geometry (depending on the provided {@link VertexFormat}.
* <ul>
* <li><code>position</code> - 3D vertex position. 64-bit floating-point (for precision). 3 components per attribute. See {@link VertexFormat#position}.</li>
* <li><code>normal</code> - Normal (normalized), commonly used for lighting. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#normal}.</li>
* <li><code>st</code> - 2D texture coordinate. 32-bit floating-point. 2 components per attribute. See {@link VertexFormat#st}.</li>
* <li><code>bitangent</code> - Bitangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#bitangent}.</li>
* <li><code>tangent</code> - Tangent (normalized), used for tangent-space effects like bump mapping. 32-bit floating-point. 3 components per attribute. See {@link VertexFormat#tangent}.</li>
* </ul>
* </p>
* <p>
* The following attribute names are generally not created by a Geometry, but are added
* to a Geometry by a {@link Primitive} or {@link GeometryPipeline} functions to prepare
* the geometry for rendering.
* <ul>
* <li><code>position3DHigh</code> - High 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
* <li><code>position3DLow</code> - Low 32 bits for encoded 64-bit position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
* <li><code>position3DHigh</code> - High 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
* <li><code>position2DLow</code> - Low 32 bits for encoded 64-bit 2D (Columbus view) position computed with {@link GeometryPipeline.encodeAttribute}. 32-bit floating-point. 4 components per attribute.</li>
* <li><code>color</code> - RGBA color (normalized) usually from {@link GeometryInstance#color}. 32-bit floating-point. 4 components per attribute.</li>
* <li><code>pickColor</code> - RGBA color used for picking. 32-bit floating-point. 4 components per attribute.</li>
* </ul>
* </p>
*
* @type GeometryAttributes
*
* @default undefined
*
*
* @example
* geometry.attributes.position = new Cesium.GeometryAttribute({
* componentDatatype : Cesium.ComponentDatatype.FLOAT,
* componentsPerAttribute : 3,
* values : new Float32Array(0)
* });
*
* @see GeometryAttribute
* @see VertexFormat
*/
this.attributes = options.attributes;
/**
* Optional index data that - along with {@link Geometry#primitiveType} -
* determines the primitives in the geometry.
*
* @type Array
*
* @default undefined
*/
this.indices = options.indices;
/**
* The type of primitives in the geometry. This is most often {@link PrimitiveType.TRIANGLES},
* but can varying based on the specific geometry.
*
* @type PrimitiveType
*
* @default undefined
*/
this.primitiveType = defaultValue(options.primitiveType, PrimitiveType.TRIANGLES);
/**
* An optional bounding sphere that fully encloses the geometry. This is
* commonly used for culling.
*
* @type BoundingSphere
*
* @default undefined
*/
this.boundingSphere = options.boundingSphere;
/**
* @private
*/
this.geometryType = defaultValue(options.geometryType, GeometryType.NONE);
/**
* @private
*/
this.boundingSphereCV = options.boundingSphereCV;
}
/**
* Computes the number of vertices in a geometry. The runtime is linear with
* respect to the number of attributes in a vertex, not the number of vertices.
*
* @param {Geometry} geometry The geometry.
* @returns {Number} The number of vertices in the geometry.
*
* @example
* var numVertices = Cesium.Geometry.computeNumberOfVertices(geometry);
*/
Geometry.computeNumberOfVertices = function(geometry) {
if (!defined(geometry)) {
throw new DeveloperError('geometry is required.');
}
var numberOfVertices = -1;
for ( var property in geometry.attributes) {
if (geometry.attributes.hasOwnProperty(property) &&
defined(geometry.attributes[property]) &&
defined(geometry.attributes[property].values)) {
var attribute = geometry.attributes[property];
var num = attribute.values.length / attribute.componentsPerAttribute;
if ((numberOfVertices !== num) && (numberOfVertices !== -1)) {
throw new DeveloperError('All attribute lists must have the same number of attributes.');
}
numberOfVertices = num;
}
}
return numberOfVertices;
};
return Geometry;
});
/*global define*/
define('Core/GeometryAttribute',[
'./defaultValue',
'./defined',
'./DeveloperError'
], function(
defaultValue,
defined,
DeveloperError) {
'use strict';
/**
* Values and type information for geometry attributes. A {@link Geometry}
* generally contains one or more attributes. All attributes together form
* the geometry's vertices.
*
* @alias GeometryAttribute
* @constructor
*
* @param {Object} [options] Object with the following properties:
* @param {ComponentDatatype} [options.componentDatatype] The datatype of each component in the attribute, e.g., individual elements in values.
* @param {Number} [options.componentsPerAttribute] A number between 1 and 4 that defines the number of components in an attributes.
* @param {Boolean} [options.normalize=false] When <code>true</code> and <code>componentDatatype</code> is an integer format, indicate that the components should be mapped to the range [0, 1] (unsigned) or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* @param {TypedArray} [options.values] The values for the attributes stored in a typed array.
*
* @exception {DeveloperError} options.componentsPerAttribute must be between 1 and 4.
*
*
* @example
* var geometry = new Cesium.Geometry({
* attributes : {
* position : new Cesium.GeometryAttribute({
* componentDatatype : Cesium.ComponentDatatype.FLOAT,
* componentsPerAttribute : 3,
* values : new Float32Array([
* 0.0, 0.0, 0.0,
* 7500000.0, 0.0, 0.0,
* 0.0, 7500000.0, 0.0
* ])
* })
* },
* primitiveType : Cesium.PrimitiveType.LINE_LOOP
* });
*
* @see Geometry
*/
function GeometryAttribute(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
if (!defined(options.componentDatatype)) {
throw new DeveloperError('options.componentDatatype is required.');
}
if (!defined(options.componentsPerAttribute)) {
throw new DeveloperError('options.componentsPerAttribute is required.');
}
if (options.componentsPerAttribute < 1 || options.componentsPerAttribute > 4) {
throw new DeveloperError('options.componentsPerAttribute must be between 1 and 4.');
}
if (!defined(options.values)) {
throw new DeveloperError('options.values is required.');
}
/**
* The datatype of each component in the attribute, e.g., individual elements in
* {@link GeometryAttribute#values}.
*
* @type ComponentDatatype
*
* @default undefined
*/
this.componentDatatype = options.componentDatatype;
/**
* A number between 1 and 4 that defines the number of components in an attributes.
* For example, a position attribute with x, y, and z components would have 3 as
* shown in the code example.
*
* @type Number
*
* @default undefined
*
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
* attribute.values = new Float32Array([
* 0.0, 0.0, 0.0,
* 7500000.0, 0.0, 0.0,
* 0.0, 7500000.0, 0.0
* ]);
*/
this.componentsPerAttribute = options.componentsPerAttribute;
/**
* When <code>true</code> and <code>componentDatatype</code> is an integer format,
* indicate that the components should be mapped to the range [0, 1] (unsigned)
* or [-1, 1] (signed) when they are accessed as floating-point for rendering.
* <p>
* This is commonly used when storing colors using {@link ComponentDatatype.UNSIGNED_BYTE}.
* </p>
*
* @type Boolean
*
* @default false
*
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.UNSIGNED_BYTE;
* attribute.componentsPerAttribute = 4;
* attribute.normalize = true;
* attribute.values = new Uint8Array([
* Cesium.Color.floatToByte(color.red),
* Cesium.Color.floatToByte(color.green),
* Cesium.Color.floatToByte(color.blue),
* Cesium.Color.floatToByte(color.alpha)
* ]);
*/
this.normalize = defaultValue(options.normalize, false);
/**
* The values for the attributes stored in a typed array. In the code example,
* every three elements in <code>values</code> defines one attributes since
* <code>componentsPerAttribute</code> is 3.
*
* @type TypedArray
*
* @default undefined
*
* @example
* attribute.componentDatatype = Cesium.ComponentDatatype.FLOAT;
* attribute.componentsPerAttribute = 3;
* attribute.values = new Float32Array([
* 0.0, 0.0, 0.0,
* 7500000.0, 0.0, 0.0,
* 0.0, 7500000.0, 0.0
* ]);
*/
this.values = options.values;
}
return GeometryAttribute;
});
/*global define*/
define('Core/GeometryAttributes',[
'./defaultValue'
], function(
defaultValue) {
'use strict';
/**
* Attributes, which make up a geometry's vertices. Each property in this object corresponds to a
* {@link GeometryAttribute} containing the attribute's data.
* <p>
* Attributes are always stored non-interleaved in a Geometry.
* </p>
*
* @alias GeometryAttributes
* @constructor
*/
function GeometryAttributes(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
/**
* The 3D position attribute.
* <p>
* 64-bit floating-point (for precision). 3 components per attribute.
* </p>
*
* @type GeometryAttribute
*
* @default undefined
*/
this.position = options.position;
/**
* The normal attribute (normalized), which is commonly used for lighting.
* <p>
* 32-bit floating-point. 3 components per attribute.
* </p>
*
* @type GeometryAttribute
*
* @default undefined
*/
this.normal = options.normal;
/**
* The 2D texture coordinate attribute.
* <p>
* 32-bit floating-point. 2 components per attribute
* </p>
*
* @type GeometryAttribute
*
* @default undefined
*/
this.st = options.st;
/**
* The bitangent attribute (normalized), which is used for tangent-space effects like bump mapping.
* <p>
* 32-bit floating-point. 3 components per attribute.
* </p>
*
* @type GeometryAttribute
*
* @default undefined
*/
this.bitangent = options.bitangent;
/**
* The tangent attribute (normalized), which is used for tangent-space effects like bump mapping.
* <p>
* 32-bit floating-point. 3 components per attribute.
* </p>
*
* @type GeometryAttribute
*
* @default undefined
*/
this.tangent = options.tangent;
/**
* The color attribute.
* <p>
* 8-bit unsigned integer. 4 components per attribute.
* </p>
*
* @type GeometryAttribute
*
* @default undefined
*/
this.color = options.color;
}
return GeometryAttributes;
});
/*global define*/
define('Core/IndexDatatype',[
'./defined',
'./DeveloperError',
'./freezeObject',
'./Math',
'./WebGLConstants'
], function(
defined,
DeveloperError,
freezeObject,
CesiumMath,
WebGLConstants) {
'use strict';
/**
* Constants for WebGL index datatypes. These corresponds to the
* <code>type</code> parameter of {@link http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawElements.xml|drawElements}.
*
* @exports IndexDatatype
*/
var IndexDatatype = {
/**
* 8-bit unsigned byte corresponding to <code>UNSIGNED_BYTE</code> and the type
* of an element in <code>Uint8Array</code>.
*
* @type {Number}
* @constant
*/
UNSIGNED_BYTE : WebGLConstants.UNSIGNED_BYTE,
/**
* 16-bit unsigned short corresponding to <code>UNSIGNED_SHORT</code> and the type
* of an element in <code>Uint16Array</code>.
*
* @type {Number}
* @constant
*/
UNSIGNED_SHORT : WebGLConstants.UNSIGNED_SHORT,
/**
* 32-bit unsigned int corresponding to <code>UNSIGNED_INT</code> and the type
* of an element in <code>Uint32Array</code>.
*
* @type {Number}
* @constant
*/
UNSIGNED_INT : WebGLConstants.UNSIGNED_INT
};
/**
* Returns the size, in bytes, of the corresponding datatype.
*
* @param {IndexDatatype} indexDatatype The index datatype to get the size of.
* @returns {Number} The size in bytes.
*
* @example
* // Returns 2
* var size = Cesium.IndexDatatype.getSizeInBytes(Cesium.IndexDatatype.UNSIGNED_SHORT);
*/
IndexDatatype.getSizeInBytes = function(indexDatatype) {
switch(indexDatatype) {
case IndexDatatype.UNSIGNED_BYTE:
return Uint8Array.BYTES_PER_ELEMENT;
case IndexDatatype.UNSIGNED_SHORT:
return Uint16Array.BYTES_PER_ELEMENT;
case IndexDatatype.UNSIGNED_INT:
return Uint32Array.BYTES_PER_ELEMENT;
}
throw new DeveloperError('indexDatatype is required and must be a valid IndexDatatype constant.');
};
/**
* Validates that the provided index datatype is a valid {@link IndexDatatype}.
*
* @param {IndexDatatype} indexDatatype The index datatype to validate.
* @returns {Boolean} <code>true</code> if the provided index datatype is a valid value; otherwise, <code>false</code>.
*
* @example
* if (!Cesium.IndexDatatype.validate(indexDatatype)) {
* throw new Cesium.DeveloperError('indexDatatype must be a valid value.');
* }
*/
IndexDatatype.validate = function(indexDatatype) {
return defined(indexDatatype) &&
(indexDatatype === IndexDatatype.UNSIGNED_BYTE ||
indexDatatype === IndexDatatype.UNSIGNED_SHORT ||
indexDatatype === IndexDatatype.UNSIGNED_INT);
};
/**
* Creates a typed array that will store indices, using either <code><Uint16Array</code>
* or <code>Uint32Array</code> depending on the number of vertices.
*
* @param {Number} numberOfVertices Number of vertices that the indices will reference.
* @param {*} indicesLengthOrArray Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A <code>Uint16Array</code> or <code>Uint32Array</code> constructed with <code>indicesLengthOrArray</code>.
*
* @example
* this.indices = Cesium.IndexDatatype.createTypedArray(positions.length / 3, numberOfIndices);
*/
IndexDatatype.createTypedArray = function(numberOfVertices, indicesLengthOrArray) {
if (!defined(numberOfVertices)) {
throw new DeveloperError('numberOfVertices is required.');
}
if (numberOfVertices >= CesiumMath.SIXTY_FOUR_KILOBYTES) {
return new Uint32Array(indicesLengthOrArray);
}
return new Uint16Array(indicesLengthOrArray);
};
/**
* Creates a typed array from a source array buffer. The resulting typed array will store indices, using either <code><Uint16Array</code>
* or <code>Uint32Array</code> depending on the number of vertices.
*
* @param {Number} numberOfVertices Number of vertices that the indices will reference.
* @param {ArrayBuffer} sourceArray Passed through to the typed array constructor.
* @param {Number} byteOffset Passed through to the typed array constructor.
* @param {Number} length Passed through to the typed array constructor.
* @returns {Uint16Array|Uint32Array} A <code>Uint16Array</code> or <code>Uint32Array</code> constructed with <code>sourceArray</code>, <code>byteOffset</code>, and <code>length</code>.
*
*/
IndexDatatype.createTypedArrayFromArrayBuffer = function(numberOfVertices, sourceArray, byteOffset, length) {
if (!defined(numberOfVertices)) {
throw new DeveloperError('numberOfVertices is required.');
}
if (!defined(sourceArray)) {
throw new DeveloperError('sourceArray is required.');
}
if (!defined(byteOffset)) {
throw new DeveloperError('byteOffset is required.');
}
if (numberOfVertices >= CesiumMath.SIXTY_FOUR_KILOBYTES) {
return new Uint32Array(sourceArray, byteOffset, length);
}
return new Uint16Array(sourceArray, byteOffset, length);
};
return freezeObject(IndexDatatype);
});
/*global define*/
define('Core/EllipsoidGeodesic',[
'./Cartesian3',
'./Cartographic',
'./defaultValue',
'./defined',
'./defineProperties',
'./DeveloperError',
'./Ellipsoid',
'./Math'
], function(
Cartesian3,
Cartographic,
defaultValue,
defined,
defineProperties,
DeveloperError,
Ellipsoid,
CesiumMath) {
'use strict';
function setConstants(ellipsoidGeodesic) {
var uSquared = ellipsoidGeodesic._uSquared;
var a = ellipsoidGeodesic._ellipsoid.maximumRadius;
var b = ellipsoidGeodesic._ellipsoid.minimumRadius;
var f = (a - b) / a;
var cosineHeading = Math.cos(ellipsoidGeodesic._startHeading);
var sineHeading = Math.sin(ellipsoidGeodesic._startHeading);
var tanU = (1 - f) * Math.tan(ellipsoidGeodesic._start.latitude);
var cosineU = 1.0 / Math.sqrt(1.0 + tanU * tanU);
var sineU = cosineU * tanU;
var sigma = Math.atan2(tanU, cosineHeading);
var sineAlpha = cosineU * sineHeading;
var sineSquaredAlpha = sineAlpha * sineAlpha;
var cosineSquaredAlpha = 1.0 - sineSquaredAlpha;
var cosineAlpha = Math.sqrt(cosineSquaredAlpha);
var u2Over4 = uSquared / 4.0;
var u4Over16 = u2Over4 * u2Over4;
var u6Over64 = u4Over16 * u2Over4;
var u8Over256 = u4Over16 * u4Over16;
var a0 = (1.0 + u2Over4 - 3.0 * u4Over16 / 4.0 + 5.0 * u6Over64 / 4.0 - 175.0 * u8Over256 / 64.0);
var a1 = (1.0 - u2Over4 + 15.0 * u4Over16 / 8.0 - 35.0 * u6Over64 / 8.0);
var a2 = (1.0 - 3.0 * u2Over4 + 35.0 * u4Over16 / 4.0);
var a3 = (1.0 - 5.0 * u2Over4);
var distanceRatio = a0 * sigma - a1 * Math.sin(2.0 * sigma) * u2Over4 / 2.0 - a2 * Math.sin(4.0 * sigma) * u4Over16 / 16.0 -
a3 * Math.sin(6.0 * sigma) * u6Over64 / 48.0 - Math.sin(8.0 * sigma) * 5.0 * u8Over256 / 512;
var constants = ellipsoidGeodesic._constants;
constants.a = a;
constants.b = b;
constants.f = f;
constants.cosineHeading = cosineHeading;
constants.sineHeading = sineHeading;
constants.tanU = tanU;
constants.cosineU = cosineU;
constants.sineU = sineU;
constants.sigma = sigma;
constants.sineAlpha = sineAlpha;
constants.sineSquaredAlpha = sineSquaredAlpha;
constants.cosineSquaredAlpha = cosineSquaredAlpha;
constants.cosineAlpha = cosineAlpha;
constants.u2Over4 = u2Over4;
constants.u4Over16 = u4Over16;
constants.u6Over64 = u6Over64;
constants.u8Over256 = u8Over256;
constants.a0 = a0;
constants.a1 = a1;
constants.a2 = a2;
constants.a3 = a3;
constants.distanceRatio = distanceRatio;
}
function computeC(f, cosineSquaredAlpha) {
return f * cosineSquaredAlpha * (4.0 + f * (4.0 - 3.0 * cosineSquaredAlpha)) / 16.0;
}
function computeDeltaLambda(f, sineAlpha, cosineSquaredAlpha, sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint) {
var C = computeC(f, cosineSquaredAlpha);
return (1.0 - C) * f * sineAlpha * (sigma + C * sineSigma * (cosineTwiceSigmaMidpoint +
C * cosineSigma * (2.0 * cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint - 1.0)));
}
function vincentyInverseFormula(ellipsoidGeodesic, major, minor, firstLongitude, firstLatitude, secondLongitude, secondLatitude) {
var eff = (major - minor) / major;
var l = secondLongitude - firstLongitude;
var u1 = Math.atan((1 - eff) * Math.tan(firstLatitude));
var u2 = Math.atan((1 - eff) * Math.tan(secondLatitude));
var cosineU1 = Math.cos(u1);
var sineU1 = Math.sin(u1);
var cosineU2 = Math.cos(u2);
var sineU2 = Math.sin(u2);
var cc = cosineU1 * cosineU2;
var cs = cosineU1 * sineU2;
var ss = sineU1 * sineU2;
var sc = sineU1 * cosineU2;
var lambda = l;
var lambdaDot = CesiumMath.TWO_PI;
var cosineLambda = Math.cos(lambda);
var sineLambda = Math.sin(lambda);
var sigma;
var cosineSigma;
var sineSigma;
var cosineSquaredAlpha;
var cosineTwiceSigmaMidpoint;
do {
cosineLambda = Math.cos(lambda);
sineLambda = Math.sin(lambda);
var temp = cs - sc * cosineLambda;
sineSigma = Math.sqrt(cosineU2 * cosineU2 * sineLambda * sineLambda + temp * temp);
cosineSigma = ss + cc * cosineLambda;
sigma = Math.atan2(sineSigma, cosineSigma);
var sineAlpha;
if (sineSigma === 0.0) {
sineAlpha = 0.0;
cosineSquaredAlpha = 1.0;
} else {
sineAlpha = cc * sineLambda / sineSigma;
cosineSquaredAlpha = 1.0 - sineAlpha * sineAlpha;
}
lambdaDot = lambda;
cosineTwiceSigmaMidpoint = cosineSigma - 2.0 * ss / cosineSquaredAlpha;
if (isNaN(cosineTwiceSigmaMidpoint)) {
cosineTwiceSigmaMidpoint = 0.0;
}
lambda = l + computeDeltaLambda(eff, sineAlpha, cosineSquaredAlpha,
sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint);
} while (Math.abs(lambda - lambdaDot) > CesiumMath.EPSILON12);
var uSquared = cosineSquaredAlpha * (major * major - minor * minor) / (minor * minor);
var A = 1.0 + uSquared * (4096.0 + uSquared * (uSquared * (320.0 - 175.0 * uSquared) - 768.0)) / 16384.0;
var B = uSquared * (256.0 + uSquared * (uSquared * (74.0 - 47.0 * uSquared) - 128.0)) / 1024.0;
var cosineSquaredTwiceSigmaMidpoint = cosineTwiceSigmaMidpoint * cosineTwiceSigmaMidpoint;
var deltaSigma = B * sineSigma * (cosineTwiceSigmaMidpoint + B * (cosineSigma *
(2.0 * cosineSquaredTwiceSigmaMidpoint - 1.0) - B * cosineTwiceSigmaMidpoint *
(4.0 * sineSigma * sineSigma - 3.0) * (4.0 * cosineSquaredTwiceSigmaMidpoint - 3.0) / 6.0) / 4.0);
var distance = minor * A * (sigma - deltaSigma);
var startHeading = Math.atan2(cosineU2 * sineLambda, cs - sc * cosineLambda);
var endHeading = Math.atan2(cosineU1 * sineLambda, cs * cosineLambda - sc);
ellipsoidGeodesic._distance = distance;
ellipsoidGeodesic._startHeading = startHeading;
ellipsoidGeodesic._endHeading = endHeading;
ellipsoidGeodesic._uSquared = uSquared;
}
function computeProperties(ellipsoidGeodesic, start, end, ellipsoid) {
var firstCartesian = Cartesian3.normalize(ellipsoid.cartographicToCartesian(start, scratchCart2), scratchCart1);
var lastCartesian = Cartesian3.normalize(ellipsoid.cartographicToCartesian(end, scratchCart2), scratchCart2);
if (Math.abs(Math.abs(Cartesian3.angleBetween(firstCartesian, lastCartesian)) - Math.PI) < 0.0125) {
throw new DeveloperError('geodesic position is not unique');
}
vincentyInverseFormula(ellipsoidGeodesic, ellipsoid.maximumRadius, ellipsoid.minimumRadius,
start.longitude, start.latitude, end.longitude, end.latitude);
ellipsoidGeodesic._start = Cartographic.clone(start, ellipsoidGeodesic._start);
ellipsoidGeodesic._end = Cartographic.clone(end, ellipsoidGeodesic._end);
ellipsoidGeodesic._start.height = 0;
ellipsoidGeodesic._end.height = 0;
setConstants(ellipsoidGeodesic);
}
var scratchCart1 = new Cartesian3();
var scratchCart2 = new Cartesian3();
/**
* Initializes a geodesic on the ellipsoid connecting the two provided planetodetic points.
*
* @alias EllipsoidGeodesic
* @constructor
*
* @param {Cartographic} [start] The initial planetodetic point on the path.
* @param {Cartographic} [end] The final planetodetic point on the path.
* @param {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the geodesic lies.
*/
function EllipsoidGeodesic(start, end, ellipsoid) {
var e = defaultValue(ellipsoid, Ellipsoid.WGS84);
this._ellipsoid = e;
this._start = new Cartographic();
this._end = new Cartographic();
this._constants = {};
this._startHeading = undefined;
this._endHeading = undefined;
this._distance = undefined;
this._uSquared = undefined;
if (defined(start) && defined(end)) {
computeProperties(this, start, end, e);
}
}
defineProperties(EllipsoidGeodesic.prototype, {
/**
* Gets the ellipsoid.
* @memberof EllipsoidGeodesic.prototype
* @type {Ellipsoid}
* @readonly
*/
ellipsoid : {
get : function() {
return this._ellipsoid;
}
},
/**
* Gets the surface distance between the start and end point
* @memberof EllipsoidGeodesic.prototype
* @type {Number}
* @readonly
*/
surfaceDistance : {
get : function() {
if (!defined(this._distance)) {
throw new DeveloperError('set end positions before getting surfaceDistance');
}
return this._distance;
}
},
/**
* Gets the initial planetodetic point on the path.
* @memberof EllipsoidGeodesic.prototype
* @type {Cartographic}
* @readonly
*/
start : {
get : function() {
return this._start;
}
},
/**
* Gets the final planetodetic point on the path.
* @memberof EllipsoidGeodesic.prototype
* @type {Cartographic}
* @readonly
*/
end : {
get : function() {
return this._end;
}
},
/**
* Gets the heading at the initial point.
* @memberof EllipsoidGeodesic.prototype
* @type {Number}
* @readonly
*/
startHeading : {
get : function() {
if (!defined(this._distance)) {
throw new DeveloperError('set end positions before getting startHeading');
}
return this._startHeading;
}
},
/**
* Gets the heading at the final point.
* @memberof EllipsoidGeodesic.prototype
* @type {Number}
* @readonly
*/
endHeading : {
get : function() {
if (!defined(this._distance)) {
throw new DeveloperError('set end positions before getting endHeading');
}
return this._endHeading;
}
}
});
/**
* Sets the start and end points of the geodesic
*
* @param {Cartographic} start The initial planetodetic point on the path.
* @param {Cartographic} end The final planetodetic point on the path.
*/
EllipsoidGeodesic.prototype.setEndPoints = function(start, end) {
if (!defined(start)) {
throw new DeveloperError('start cartographic position is required');
}
if (!defined(end)) {
throw new DeveloperError('end cartgraphic position is required');
}
computeProperties(this, start, end, this._ellipsoid);
};
/**
* Provides the location of a point at the indicated portion along the geodesic.
*
* @param {Number} fraction The portion of the distance between the initial and final points.
* @param {Cartographic} result The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
*/
EllipsoidGeodesic.prototype.interpolateUsingFraction = function(fraction, result) {
return this.interpolateUsingSurfaceDistance(this._distance * fraction, result);
};
/**
* Provides the location of a point at the indicated distance along the geodesic.
*
* @param {Number} distance The distance from the inital point to the point of interest along the geodesic
* @param {Cartographic} result The object in which to store the result.
* @returns {Cartographic} The location of the point along the geodesic.
*
* @exception {DeveloperError} start and end must be set before calling function interpolateUsingSurfaceDistance
*/
EllipsoidGeodesic.prototype.interpolateUsingSurfaceDistance = function(distance, result) {
if (!defined(this._distance)) {
throw new DeveloperError('start and end must be set before calling function interpolateUsingSurfaceDistance');
}
var constants = this._constants;
var s = constants.distanceRatio + distance / constants.b;
var cosine2S = Math.cos(2.0 * s);
var cosine4S = Math.cos(4.0 * s);
var cosine6S = Math.cos(6.0 * s);
var sine2S = Math.sin(2.0 * s);
var sine4S = Math.sin(4.0 * s);
var sine6S = Math.sin(6.0 * s);
var sine8S = Math.sin(8.0 * s);
var s2 = s * s;
var s3 = s * s2;
var u8Over256 = constants.u8Over256;
var u2Over4 = constants.u2Over4;
var u6Over64 = constants.u6Over64;
var u4Over16 = constants.u4Over16;
var sigma = 2.0 * s3 * u8Over256 * cosine2S / 3.0 +
s * (1.0 - u2Over4 + 7.0 * u4Over16 / 4.0 - 15.0 * u6Over64 / 4.0 + 579.0 * u8Over256 / 64.0 -
(u4Over16 - 15.0 * u6Over64 / 4.0 + 187.0 * u8Over256 / 16.0) * cosine2S -
(5.0 * u6Over64 / 4.0 - 115.0 * u8Over256 / 16.0) * cosine4S -
29.0 * u8Over256 * cosine6S / 16.0) +
(u2Over4 / 2.0 - u4Over16 + 71.0 * u6Over64 / 32.0 - 85.0 * u8Over256 / 16.0) * sine2S +
(5.0 * u4Over16 / 16.0 - 5.0 * u6Over64 / 4.0 + 383.0 * u8Over256 / 96.0) * sine4S -
s2 * ((u6Over64 - 11.0 * u8Over256 / 2.0) * sine2S + 5.0 * u8Over256 * sine4S / 2.0) +
(29.0 * u6Over64 / 96.0 - 29.0 * u8Over256 / 16.0) * sine6S +
539.0 * u8Over256 * sine8S / 1536.0;
var theta = Math.asin(Math.sin(sigma) * constants.cosineAlpha);
var latitude = Math.atan(constants.a / constants.b * Math.tan(theta));
// Redefine in terms of relative argument of latitude.
sigma = sigma - constants.sigma;
var cosineTwiceSigmaMidpoint = Math.cos(2.0 * constants.sigma + sigma);
var sineSigma = Math.sin(sigma);
var cosineSigma = Math.cos(sigma);
var cc = constants.cosineU * cosineSigma;
var ss = constants.sineU * sineSigma;
var lambda = Math.atan2(sineSigma * constants.sineHeading, cc - ss * constants.cosineHeading);
var l = lambda - computeDeltaLambda(constants.f, constants.sineAlpha, constants.cosineSquaredAlpha,
sigma, sineSigma, cosineSigma, cosineTwiceSigmaMidpoint);
if (defined(result)) {
result.longitude = this._start.longitude + l;
result.latitude = latitude;
result.height = 0.0;
return result;
}
return new Cartographic(this._start.longitude + l, latitude, 0.0);
};
return EllipsoidGeodesic;
});
/*global define*/
define('Core/QuadraticRealPolynomial',[
'./DeveloperError',
'./Math'
], function(
DeveloperError,
CesiumMath) {
'use strict';
/**
* Defines functions for 2nd order polynomial functions of one variable with only real coefficients.
*
* @exports QuadraticRealPolynomial
*/
var QuadraticRealPolynomial = {};
/**
* Provides the discriminant of the quadratic equation from the supplied coefficients.
*
* @param {Number} a The coefficient of the 2nd order monomial.
* @param {Number} b The coefficient of the 1st order monomial.
* @param {Number} c The coefficient of the 0th order monomial.
* @returns {Number} The value of the discriminant.
*/
QuadraticRealPolynomial.computeDiscriminant = function(a, b, c) {
if (typeof a !== 'number') {
throw new DeveloperError('a is a required number.');
}
if (typeof b !== 'number') {
throw new DeveloperError('b is a required number.');
}
if (typeof c !== 'number') {
throw new DeveloperError('c is a required number.');
}
var discriminant = b * b - 4.0 * a * c;
return discriminant;
};
function addWithCancellationCheck(left, right, tolerance) {
var difference = left + right;
if ((CesiumMath.sign(left) !== CesiumMath.sign(right)) &&
Math.abs(difference / Math.max(Math.abs(left), Math.abs(right))) < tolerance) {
return 0.0;
}
return difference;
}
/**
* Provides the real valued roots of the quadratic polynomial with the provided coefficients.
*
* @param {Number} a The coefficient of the 2nd order monomial.
* @param {Number} b The coefficient of the 1st order monomial.
* @param {Number} c The coefficient of the 0th order monomial.
* @returns {Number[]} The real valued roots.
*/
QuadraticRealPolynomial.computeRealRoots = function(a, b, c) {
if (typeof a !== 'number') {
throw new DeveloperError('a is a required number.');
}
if (typeof b !== 'number') {
throw new DeveloperError('b is a required number.');
}
if (typeof c !== 'number') {
throw new DeveloperError('c is a required number.');
}
var ratio;
if (a === 0.0) {
if (b === 0.0) {
// Constant function: c = 0.
return [];
}
// Linear function: b * x + c = 0.
return [-c / b];
} else if (b === 0.0) {
if (c === 0.0) {
// 2nd order monomial: a * x^2 = 0.
return [0.0, 0.0];
}
var cMagnitude = Math.abs(c);
var aMagnitude = Math.abs(a);
if ((cMagnitude < aMagnitude) && (cMagnitude / aMagnitude < CesiumMath.EPSILON14)) { // c ~= 0.0.
// 2nd order monomial: a * x^2 = 0.
return [0.0, 0.0];
} else if ((cMagnitude > aMagnitude) && (aMagnitude / cMagnitude < CesiumMath.EPSILON14)) { // a ~= 0.0.
// Constant function: c = 0.
return [];
}
// a * x^2 + c = 0
ratio = -c / a;
if (ratio < 0.0) {
// Both roots are complex.
return [];
}
// Both roots are real.
var root = Math.sqrt(ratio);
return [-root, root];
} else if (c === 0.0) {
// a * x^2 + b * x = 0
ratio = -b / a;
if (ratio < 0.0) {
return [ratio, 0.0];
}
return [0.0, ratio];
}
// a * x^2 + b * x + c = 0
var b2 = b * b;
var four_ac = 4.0 * a * c;
var radicand = addWithCancellationCheck(b2, -four_ac, CesiumMath.EPSILON14);
if (radicand < 0.0) {
// Both roots are complex.
return [];
}
var q = -0.5 * addWithCancellationCheck(b, CesiumMath.sign(b) * Math.sqrt(radicand), CesiumMath.EPSILON14);
if (b > 0.0) {
return [q / a, c / q];
}
return [c / q, q / a];
};
return QuadraticRealPolynomial;
});
/*global define*/
define('Core/CubicRealPolynomial',[
'./DeveloperError',
'./QuadraticRealPolynomial'
], function(
DeveloperError,
QuadraticRealPolynomial) {
'use strict';
/**
* Defines functions for 3rd order polynomial functions of one variable with only real coefficients.
*
* @exports CubicRealPolynomial
*/
var CubicRealPolynomial = {};
/**
* Provides the discriminant of the cubic equation from the supplied coefficients.
*
* @param {Number} a The coefficient of the 3rd order monomial.
* @param {Number} b The coefficient of the 2nd order monomial.
* @param {Number} c The coefficient of the 1st order monomial.
* @param {Number} d The coefficient of the 0th order monomial.
* @returns {Number} The value of the discriminant.
*/
CubicRealPolynomial.computeDiscriminant = function(a, b, c, d) {
if (typeof a !== 'number') {
throw new DeveloperError('a is a required number.');
}
if (typeof b !== 'number') {
throw new DeveloperError('b is a required number.');
}
if (typeof c !== 'number') {
throw new DeveloperError('c is a required number.');
}
if (typeof d !== 'number') {
throw new DeveloperError('d is a required number.');
}
var a2 = a * a;
var b2 = b * b;
var c2 = c * c;
var d2 = d * d;
var discriminant = 18.0 * a * b * c * d + b2 * c2 - 27.0 * a2 * d2 - 4.0 * (a * c2 * c + b2 * b * d);
return discriminant;
};
function computeRealRoots(a, b, c, d) {
var A = a;
var B = b / 3.0;
var C = c / 3.0;
var D = d;
var AC = A * C;
var BD = B * D;
var B2 = B * B;
var C2 = C * C;
var delta1 = A * C - B2;
var delta2 = A * D - B * C;
var delta3 = B * D - C2;
var discriminant = 4.0 * delta1 * delta3 - delta2 * delta2;
var temp;
var temp1;
if (discriminant < 0.0) {
var ABar;
var CBar;
var DBar;
if (B2 * BD >= AC * C2) {
ABar = A;
CBar = delta1;
DBar = -2.0 * B * delta1 + A * delta2;
} else {
ABar = D;
CBar = delta3;
DBar = -D * delta2 + 2.0 * C * delta3;
}
var s = (DBar < 0.0) ? -1.0 : 1.0; // This is not Math.Sign()!
var temp0 = -s * Math.abs(ABar) * Math.sqrt(-discriminant);
temp1 = -DBar + temp0;
var x = temp1 / 2.0;
var p = x < 0.0 ? -Math.pow(-x, 1.0 / 3.0) : Math.pow(x, 1.0 / 3.0);
var q = (temp1 === temp0) ? -p : -CBar / p;
temp = (CBar <= 0.0) ? p + q : -DBar / (p * p + q * q + CBar);
if (B2 * BD >= AC * C2) {
return [(temp - B) / A];
}
return [-D / (temp + C)];
}
var CBarA = delta1;
var DBarA = -2.0 * B * delta1 + A * delta2;
var CBarD = delta3;
var DBarD = -D * delta2 + 2.0 * C * delta3;
var squareRootOfDiscriminant = Math.sqrt(discriminant);
var halfSquareRootOf3 = Math.sqrt(3.0) / 2.0;
var theta = Math.abs(Math.atan2(A * squareRootOfDiscriminant, -DBarA) / 3.0);
temp = 2.0 * Math.sqrt(-CBarA);
var cosine = Math.cos(theta);
temp1 = temp * cosine;
var temp3 = temp * (-cosine / 2.0 - halfSquareRootOf3 * Math.sin(theta));
var numeratorLarge = (temp1 + temp3 > 2.0 * B) ? temp1 - B : temp3 - B;
var denominatorLarge = A;
var root1 = numeratorLarge / denominatorLarge;
theta = Math.abs(Math.atan2(D * squareRootOfDiscriminant, -DBarD) / 3.0);
temp = 2.0 * Math.sqrt(-CBarD);
cosine = Math.cos(theta);
temp1 = temp * cosine;
temp3 = temp * (-cosine / 2.0 - halfSquareRootOf3 * Math.sin(theta));
var numeratorSmall = -D;
var denominatorSmall = (temp1 + temp3 < 2.0 * C) ? temp1 + C : temp3 + C;
var root3 = numeratorSmall / denominatorSmall;
var E = denominatorLarge * denominatorSmall;
var F = -numeratorLarge * denominatorSmall - denominatorLarge * numeratorSmall;
var G = numeratorLarge * numeratorSmall;
var root2 = (C * F - B * G) / (-B * F + C * E);
if (root1 <= root2) {
if (root1 <= root3) {
if (root2 <= root3) {
return [root1, root2, root3];
}
return [root1, root3, root2];
}
return [root3, root1, root2];
}
if (root1 <= root3) {
return [root2, root1, root3];
}
if (root2 <= root3) {
return [root2, root3, root1];
}
return [root3, root2, root1];
}
/**
* Provides the real valued roots of the cubic polynomial with the provided coefficients.
*
* @param {Number} a The coefficient of the 3rd order monomial.
* @param {Number} b The coefficient of the 2nd order monomial.
* @param {Number} c The coefficient of the 1st order monomial.
* @param {Number} d The coefficient of the 0th order monomial.
* @returns {Number[]} The real valued roots.
*/
CubicRealPolynomial.computeRealRoots = function(a, b, c, d) {
if (typeof a !== 'number') {
throw new DeveloperError('a is a required number.');
}
if (typeof b !== 'number') {
throw new DeveloperError('b is a required number.');
}
if (typeof c !== 'number') {
throw new DeveloperError('c is a required number.');
}
if (typeof d !== 'number') {
throw new DeveloperError('d is a required number.');
}
var roots;
var ratio;
if (a === 0.0) {
// Quadratic function: b * x^2 + c * x + d = 0.
return QuadraticRealPolynomial.computeRealRoots(b, c, d);
} else if (b === 0.0) {
if (c === 0.0) {
if (d === 0.0) {
// 3rd order monomial: a * x^3 = 0.
return [0.0, 0.0, 0.0];
}
// a * x^3 + d = 0
ratio = -d / a;
var root = (ratio < 0.0) ? -Math.pow(-ratio, 1.0 / 3.0) : Math.pow(ratio, 1.0 / 3.0);
return [root, root, root];
} else if (d === 0.0) {
// x * (a * x^2 + c) = 0.
roots = QuadraticRealPolynomial.computeRealRoots(a, 0, c);
// Return the roots in ascending order.
if (roots.Length === 0) {
return [0.0];
}
return [roots[0], 0.0, roots[1]];
}
// Deflated cubic polynomial: a * x^3 + c * x + d= 0.
return computeRealRoots(a, 0, c, d);
} else if (c === 0.0) {
if (d === 0.0) {
// x^2 * (a * x + b) = 0.
ratio = -b / a;
if (ratio < 0.0) {
return [ratio, 0.0, 0.0];
}
return [0.0, 0.0, ratio];
}
// a * x^3 + b * x^2 + d = 0.
return computeRealRoots(a, b, 0, d);
} else if (d === 0.0) {
// x * (a * x^2 + b * x + c) = 0
roots = QuadraticRealPolynomial.computeRealRoots(a, b, c);
// Return the roots in ascending order.
if (roots.length === 0) {
return [0.0];
} else if (roots[1] <= 0.0) {
return [roots[0], roots[1], 0.0];
} else if (roots[0] >= 0.0) {
return [0.0, roots[0], roots[1]];
}
return [roots[0], 0.0, roots[1]];
}
return computeRealRoots(a, b, c, d);
};
return CubicRealPolynomial;
});
/*global define*/
define('Core/QuarticRealPolynomial',[
'./CubicRealPolynomial',
'./DeveloperError',
'./Math',
'./QuadraticRealPolynomial'
], function(
CubicRealPolynomial,
DeveloperError,
CesiumMath,
QuadraticRealPolynomial) {
'use strict';
/**
* Defines functions for 4th order polynomial functions of one variable with only real coefficients.
*
* @exports QuarticRealPolynomial
*/
var QuarticRealPolynomial = {};
/**
* Provides the discriminant of the quartic equation from the supplied coefficients.
*
* @param {Number} a The coefficient of the 4th order monomial.
* @param {Number} b The coefficient of the 3rd order monomial.
* @param {Number} c The coefficient of the 2nd order monomial.
* @param {Number} d The coefficient of the 1st order monomial.
* @param {Number} e The coefficient of the 0th order monomial.
* @returns {Number} The value of the discriminant.
*/
QuarticRealPolynomial.computeDiscriminant = function(a, b, c, d, e) {
if (typeof a !== 'number') {
throw new DeveloperError('a is a required number.');
}
if (typeof b !== 'number') {
throw new DeveloperError('b is a required number.');
}
if (typeof c !== 'number') {
throw new DeveloperError('c is a required number.');
}
if (typeof d !== 'number') {
throw new DeveloperError('d is a required number.');
}
if (typeof e !== 'number') {
throw new DeveloperError('e is a required number.');
}
var a2 = a * a;
var a3 = a2 * a;
var b2 = b * b;
var b3 = b2 * b;
var c2 = c * c;
var c3 = c2 * c;
var d2 = d * d;
var d3 = d2 * d;
var e2 = e * e;
var e3 = e2 * e;
var discriminant = (b2 * c2 * d2 - 4.0 * b3 * d3 - 4.0 * a * c3 * d2 + 18 * a * b * c * d3 - 27.0 * a2 * d2 * d2 + 256.0 * a3 * e3) +
e * (18.0 * b3 * c * d - 4.0 * b2 * c3 + 16.0 * a * c2 * c2 - 80.0 * a * b * c2 * d - 6.0 * a * b2 * d2 + 144.0 * a2 * c * d2) +
e2 * (144.0 * a * b2 * c - 27.0 * b2 * b2 - 128.0 * a2 * c2 - 192.0 * a2 * b * d);
return discriminant;
};
function original(a3, a2, a1, a0) {
var a3Squared = a3 * a3;
var p = a2 - 3.0 * a3Squared / 8.0;
var q = a1 - a2 * a3 / 2.0 + a3Squared * a3 / 8.0;
var r = a0 - a1 * a3 / 4.0 + a2 * a3Squared / 16.0 - 3.0 * a3Squared * a3Squared / 256.0;
// Find the roots of the cubic equations: h^6 + 2 p h^4 + (p^2 - 4 r) h^2 - q^2 = 0.
var cubicRoots = CubicRealPolynomial.computeRealRoots(1.0, 2.0 * p, p * p - 4.0 * r, -q * q);
if (cubicRoots.length > 0) {
var temp = -a3 / 4.0;
// Use the largest positive root.
var hSquared = cubicRoots[cubicRoots.length - 1];
if (Math.abs(hSquared) < CesiumMath.EPSILON14) {
// y^4 + p y^2 + r = 0.
var roots = QuadraticRealPolynomial.computeRealRoots(1.0, p, r);
if (roots.length === 2) {
var root0 = roots[0];
var root1 = roots[1];
var y;
if (root0 >= 0.0 && root1 >= 0.0) {
var y0 = Math.sqrt(root0);
var y1 = Math.sqrt(root1);
return [temp - y1, temp - y0, temp + y0, temp + y1];
} else if (root0 >= 0.0 && root1 < 0.0) {
y = Math.sqrt(root0);
return [temp - y, temp + y];
} else if (root0 < 0.0 && root1 >= 0.0) {
y = Math.sqrt(root1);
return [temp - y, temp + y];
}
}
return [];
} else if (hSquared > 0.0) {
var h = Math.sqrt(hSquared);
var m = (p + hSquared - q / h) / 2.0;
var n = (p + hSquared + q / h) / 2.0;
// Now solve the two quadratic factors: (y^2 + h y + m)(y^2 - h y + n);
var roots1 = QuadraticRealPolynomial.computeRealRoots(1.0, h, m);
var roots2 = QuadraticRealPolynomial.computeRealRoots(1.0, -h, n);
if (roots1.length !== 0) {
roots1[0] += temp;
roots1[1] += temp;
if (roots2.length !== 0) {
roots2[0] += temp;
roots2[1] += temp;
if (roots1[1] <= roots2[0]) {
return [roots1[0], roots1[1], roots2[0], roots2[1]];
} else if (roots2[1] <= roots1[0]) {
return [roots2[0], roots2[1], roots1[0], roots1[1]];
} else if (roots1[0] >= roots2[0] && roots1[1] <= roots2[1]) {
return [roots2[0], roots1[0], roots1[1], roots2[1]];
} else if (roots2[0] >= roots1[0] && roots2[1] <= roots1[1]) {
return [roots1[0], roots2[0], roots2[1], roots1[1]];
} else if (roots1[0] > roots2[0] && roots1[0] < roots2[1]) {
return [roots2[0], roots1[0], roots2[1], roots1[1]];
}
return [roots1[0], roots2[0], roots1[1], roots2[1]];
}
return roots1;
}
if (roots2.length !== 0) {
roots2[0] += temp;
roots2[1] += temp;
return roots2;
}
return [];
}
}
return [];
}
function neumark(a3, a2, a1, a0) {
var a1Squared = a1 * a1;
var a2Squared = a2 * a2;
var a3Squared = a3 * a3;
var p = -2.0 * a2;
var q = a1 * a3 + a2Squared - 4.0 * a0;
var r = a3Squared * a0 - a1 * a2 * a3 + a1Squared;
var cubicRoots = CubicRealPolynomial.computeRealRoots(1.0, p, q, r);
if (cubicRoots.length > 0) {
// Use the most positive root
var y = cubicRoots[0];
var temp = (a2 - y);
var tempSquared = temp * temp;
var g1 = a3 / 2.0;
var h1 = temp / 2.0;
var m = tempSquared - 4.0 * a0;
var mError = tempSquared + 4.0 * Math.abs(a0);
var n = a3Squared - 4.0 * y;
var nError = a3Squared + 4.0 * Math.abs(y);
var g2;
var h2;
if (y < 0.0 || (m * nError < n * mError)) {
var squareRootOfN = Math.sqrt(n);
g2 = squareRootOfN / 2.0;
h2 = squareRootOfN === 0.0 ? 0.0 : (a3 * h1 - a1) / squareRootOfN;
} else {
var squareRootOfM = Math.sqrt(m);
g2 = squareRootOfM === 0.0 ? 0.0 : (a3 * h1 - a1) / squareRootOfM;
h2 = squareRootOfM / 2.0;
}
var G;
var g;
if (g1 === 0.0 && g2 === 0.0) {
G = 0.0;
g = 0.0;
} else if (CesiumMath.sign(g1) === CesiumMath.sign(g2)) {
G = g1 + g2;
g = y / G;
} else {
g = g1 - g2;
G = y / g;
}
var H;
var h;
if (h1 === 0.0 && h2 === 0.0) {
H = 0.0;
h = 0.0;
} else if (CesiumMath.sign(h1) === CesiumMath.sign(h2)) {
H = h1 + h2;
h = a0 / H;
} else {
h = h1 - h2;
H = a0 / h;
}
// Now solve the two quadratic factors: (y^2 + G y + H)(y^2 + g y + h);
var roots1 = QuadraticRealPolynomial.computeRealRoots(1.0, G, H);
var roots2 = QuadraticRealPolynomial.computeRealRoots(1.0, g, h);
if (roots1.length !== 0) {
if (roots2.length !== 0) {
if (roots1[1] <= roots2[0]) {
return [roots1[0], roots1[1], roots2[0], roots2[1]];
} else if (roots2[1] <= roots1[0]) {
return [roots2[0], roots2[1], roots1[0], roots1[1]];
} else if (roots1[0] >= roots2[0] && roots1[1] <= roots2[1]) {
return [roots2[0], roots1[0], roots1[1], roots2[1]];
} else if (roots2[0] >= roots1[0] && roots2[1] <= roots1[1]) {
return [roots1[0], roots2[0], roots2[1], roots1[1]];
} else if (roots1[0] > roots2[0] && roots1[0] < roots2[1]) {
return [roots2[0], roots1[0], roots2[1], roots1[1]];
} else {
return [roots1[0], roots2[0], roots1[1], roots2[1]];
}
}
return roots1;
}
if (roots2.length !== 0) {
return roots2;
}
}
return [];
}
/**
* Provides the real valued roots of the quartic polynomial with the provided coefficients.
*
* @param {Number} a The coefficient of the 4th order monomial.
* @param {Number} b The coefficient of the 3rd order monomial.
* @param {Number} c The coefficient of the 2nd order monomial.
* @param {Number} d The coefficient of the 1st order monomial.
* @param {Number} e The coefficient of the 0th order monomial.
* @returns {Number[]} The real valued roots.
*/
QuarticRealPolynomial.computeRealRoots = function(a, b, c, d, e) {
if (typeof a !== 'number') {
throw new DeveloperError('a is a required number.');
}
if (typeof b !== 'number') {
throw new DeveloperError('b is a required number.');
}
if (typeof c !== 'number') {
throw new DeveloperError('c is a required number.');
}
if (typeof d !== 'number') {
throw new DeveloperError('d is a required number.');
}
if (typeof e !== 'number') {
throw new DeveloperError('e is a required number.');
}
if (Math.abs(a) < CesiumMath.EPSILON15) {
return CubicRealPolynomial.computeRealRoots(b, c, d, e);
}
var a3 = b / a;
var a2 = c / a;
var a1 = d / a;
var a0 = e / a;
var k = (a3 < 0.0) ? 1 : 0;
k += (a2 < 0.0) ? k + 1 : k;
k += (a1 < 0.0) ? k + 1 : k;
k += (a0 < 0.0) ? k + 1 : k;
switch (k) {
case 0:
return original(a3, a2, a1, a0);
case 1:
return neumark(a3, a2, a1, a0);
case 2:
return neumark(a3, a2, a1, a0);
case 3:
return original(a3, a2, a1, a0);
case 4:
return original(a3, a2, a1, a0);
case 5:
return neumark(a3, a2, a1, a0);
case 6:
return original(a3, a2, a1, a0);
case 7:
return original(a3, a2, a1, a0);
case 8:
return neumark(a3, a2, a1, a0);
case 9:
return original(a3, a2, a1, a0);
case 10:
return original(a3, a2, a1, a0);
case 11:
return neumark(a3, a2, a1, a0);
case 12:
return original(a3, a2, a1, a0);
case 13:
return original(a3, a2, a1, a0);
case 14:
return original(a3, a2, a1, a0);
case 15:
return original(a3, a2, a1, a0);
default:
return undefined;
}
};
return QuarticRealPolynomial;
});
/*global define*/
define('Core/Ray',[
'./Cartesian3',
'./defaultValue',
'./defined',
'./DeveloperError'
], function(
Cartesian3,
defaultValue,
defined,
DeveloperError) {
'use strict';
/**
* Represents a ray that extends infinitely from the provided origin in the provided direction.
* @alias Ray
* @constructor
*
* @param {Cartesian3} [origin=Cartesian3.ZERO] The origin of the ray.
* @param {Cartesian3} [direction=Cartesian3.ZERO] The direction of the ray.
*/
function Ray(origin, direction) {
direction = Cartesian3.clone(defaultValue(direction, Cartesian3.ZERO));
if (!Cartesian3.equals(direction, Cartesian3.ZERO)) {
Cartesian3.normalize(direction, direction);
}
/**
* The origin of the ray.
* @type {Cartesian3}
* @default {@link Cartesian3.ZERO}
*/
this.origin = Cartesian3.clone(defaultValue(origin, Cartesian3.ZERO));
/**
* The direction of the ray.
* @type {Cartesian3}
*/
this.direction = direction;
}
/**
* Computes the point along the ray given by r(t) = o + t*d,
* where o is the origin of the ray and d is the direction.
*
* @param {Ray} ray The ray.
* @param {Number} t A scalar value.
* @param {Cartesian3} [result] The object in which the result will be stored.
* @returns {Cartesian3} The modified result parameter, or a new instance if none was provided.
*
* @example
* //Get the first intersection point of a ray and an ellipsoid.
* var intersection = Cesium.IntersectionTests.rayEllipsoid(ray, ellipsoid);
* var point = Cesium.Ray.getPoint(ray, intersection.start);
*/
Ray.getPoint = function(ray, t, result) {
if (!defined(ray)){
throw new DeveloperError('ray is requred');
}
if (typeof t !== 'number') {
throw new DeveloperError('t is a required number');
}
if (!defined(result)) {
result = new Cartesian3();
}
result = Cartesian3.multiplyByScalar(ray.direction, t, result);
return Cartesian3.add(ray.origin, result, result);
};
return Ray;
});
/*global define*/
define('Core/IntersectionTests',[
'./Cartesian3',
'./Cartographic',
'./defaultValue',
'./defined',
'./DeveloperError',
'./Interval',
'./Math',
'./Matrix3',
'./QuadraticRealPolynomial',
'./QuarticRealPolynomial',
'./Ray'
], function(
Cartesian3,
Cartographic,
defaultValue,
defined,
DeveloperError,
Interval,
CesiumMath,
Matrix3,
QuadraticRealPolynomial,
QuarticRealPolynomial,
Ray) {
'use strict';
/**
* Functions for computing the intersection between geometries such as rays, planes, triangles, and ellipsoids.
*
* @exports IntersectionTests
*/
var IntersectionTests = {};
/**
* Computes the intersection of a ray and a plane.
*
* @param {Ray} ray The ray.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersections.
*/
IntersectionTests.rayPlane = function(ray, plane, result) {
if (!defined(ray)) {
throw new DeveloperError('ray is required.');
}
if (!defined(plane)) {
throw new DeveloperError('plane is required.');
}
if (!defined(result)) {
result = new Cartesian3();
}
var origin = ray.origin;
var direction = ray.direction;
var normal = plane.normal;
var denominator = Cartesian3.dot(normal, direction);
if (Math.abs(denominator) < CesiumMath.EPSILON15) {
// Ray is parallel to plane. The ray may be in the polygon's plane.
return undefined;
}
var t = (-plane.distance - Cartesian3.dot(normal, origin)) / denominator;
if (t < 0) {
return undefined;
}
result = Cartesian3.multiplyByScalar(direction, t, result);
return Cartesian3.add(origin, result, result);
};
var scratchEdge0 = new Cartesian3();
var scratchEdge1 = new Cartesian3();
var scratchPVec = new Cartesian3();
var scratchTVec = new Cartesian3();
var scratchQVec = new Cartesian3();
/**
* Computes the intersection of a ray and a triangle as a parametric distance along the input ray.
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
*
* @memberof IntersectionTests
*
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
* @param {Boolean} [cullBackFaces=false] If <code>true</code>, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @returns {Number} The intersection as a parametric distance along the ray, or undefined if there is no intersection.
*/
IntersectionTests.rayTriangleParametric = function(ray, p0, p1, p2, cullBackFaces) {
if (!defined(ray)) {
throw new DeveloperError('ray is required.');
}
if (!defined(p0)) {
throw new DeveloperError('p0 is required.');
}
if (!defined(p1)) {
throw new DeveloperError('p1 is required.');
}
if (!defined(p2)) {
throw new DeveloperError('p2 is required.');
}
cullBackFaces = defaultValue(cullBackFaces, false);
var origin = ray.origin;
var direction = ray.direction;
var edge0 = Cartesian3.subtract(p1, p0, scratchEdge0);
var edge1 = Cartesian3.subtract(p2, p0, scratchEdge1);
var p = Cartesian3.cross(direction, edge1, scratchPVec);
var det = Cartesian3.dot(edge0, p);
var tvec;
var q;
var u;
var v;
var t;
if (cullBackFaces) {
if (det < CesiumMath.EPSILON6) {
return undefined;
}
tvec = Cartesian3.subtract(origin, p0, scratchTVec);
u = Cartesian3.dot(tvec, p);
if (u < 0.0 || u > det) {
return undefined;
}
q = Cartesian3.cross(tvec, edge0, scratchQVec);
v = Cartesian3.dot(direction, q);
if (v < 0.0 || u + v > det) {
return undefined;
}
t = Cartesian3.dot(edge1, q) / det;
} else {
if (Math.abs(det) < CesiumMath.EPSILON6) {
return undefined;
}
var invDet = 1.0 / det;
tvec = Cartesian3.subtract(origin, p0, scratchTVec);
u = Cartesian3.dot(tvec, p) * invDet;
if (u < 0.0 || u > 1.0) {
return undefined;
}
q = Cartesian3.cross(tvec, edge0, scratchQVec);
v = Cartesian3.dot(direction, q) * invDet;
if (v < 0.0 || u + v > 1.0) {
return undefined;
}
t = Cartesian3.dot(edge1, q) * invDet;
}
return t;
};
/**
* Computes the intersection of a ray and a triangle as a Cartesian3 coordinate.
*
* Implements {@link https://cadxfem.org/inf/Fast%20MinimumStorage%20RayTriangle%20Intersection.pdf|
* Fast Minimum Storage Ray/Triangle Intersection} by Tomas Moller and Ben Trumbore.
*
* @memberof IntersectionTests
*
* @param {Ray} ray The ray.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
* @param {Boolean} [cullBackFaces=false] If <code>true</code>, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @param {Cartesian3} [result] The <code>Cartesian3</code> onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersections.
*/
IntersectionTests.rayTriangle = function(ray, p0, p1, p2, cullBackFaces, result) {
var t = IntersectionTests.rayTriangleParametric(ray, p0, p1, p2, cullBackFaces);
if (!defined(t) || t < 0.0) {
return undefined;
}
if (!defined(result)) {
result = new Cartesian3();
}
Cartesian3.multiplyByScalar(ray.direction, t, result);
return Cartesian3.add(ray.origin, result, result);
};
var scratchLineSegmentTriangleRay = new Ray();
/**
* Computes the intersection of a line segment and a triangle.
* @memberof IntersectionTests
*
* @param {Cartesian3} v0 The an end point of the line segment.
* @param {Cartesian3} v1 The other end point of the line segment.
* @param {Cartesian3} p0 The first vertex of the triangle.
* @param {Cartesian3} p1 The second vertex of the triangle.
* @param {Cartesian3} p2 The third vertex of the triangle.
* @param {Boolean} [cullBackFaces=false] If <code>true</code>, will only compute an intersection with the front face of the triangle
* and return undefined for intersections with the back face.
* @param {Cartesian3} [result] The <code>Cartesian3</code> onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersections.
*/
IntersectionTests.lineSegmentTriangle = function(v0, v1, p0, p1, p2, cullBackFaces, result) {
if (!defined(v0)) {
throw new DeveloperError('v0 is required.');
}
if (!defined(v1)) {
throw new DeveloperError('v1 is required.');
}
if (!defined(p0)) {
throw new DeveloperError('p0 is required.');
}
if (!defined(p1)) {
throw new DeveloperError('p1 is required.');
}
if (!defined(p2)) {
throw new DeveloperError('p2 is required.');
}
var ray = scratchLineSegmentTriangleRay;
Cartesian3.clone(v0, ray.origin);
Cartesian3.subtract(v1, v0, ray.direction);
Cartesian3.normalize(ray.direction, ray.direction);
var t = IntersectionTests.rayTriangleParametric(ray, p0, p1, p2, cullBackFaces);
if (!defined(t) || t < 0.0 || t > Cartesian3.distance(v0, v1)) {
return undefined;
}
if (!defined(result)) {
result = new Cartesian3();
}
Cartesian3.multiplyByScalar(ray.direction, t, result);
return Cartesian3.add(ray.origin, result, result);
};
function solveQuadratic(a, b, c, result) {
var det = b * b - 4.0 * a * c;
if (det < 0.0) {
return undefined;
} else if (det > 0.0) {
var denom = 1.0 / (2.0 * a);
var disc = Math.sqrt(det);
var root0 = (-b + disc) * denom;
var root1 = (-b - disc) * denom;
if (root0 < root1) {
result.root0 = root0;
result.root1 = root1;
} else {
result.root0 = root1;
result.root1 = root0;
}
return result;
}
var root = -b / (2.0 * a);
if (root === 0.0) {
return undefined;
}
result.root0 = result.root1 = root;
return result;
}
var raySphereRoots = {
root0 : 0.0,
root1 : 0.0
};
function raySphere(ray, sphere, result) {
if (!defined(result)) {
result = new Interval();
}
var origin = ray.origin;
var direction = ray.direction;
var center = sphere.center;
var radiusSquared = sphere.radius * sphere.radius;
var diff = Cartesian3.subtract(origin, center, scratchPVec);
var a = Cartesian3.dot(direction, direction);
var b = 2.0 * Cartesian3.dot(direction, diff);
var c = Cartesian3.magnitudeSquared(diff) - radiusSquared;
var roots = solveQuadratic(a, b, c, raySphereRoots);
if (!defined(roots)) {
return undefined;
}
result.start = roots.root0;
result.stop = roots.root1;
return result;
}
/**
* Computes the intersection points of a ray with a sphere.
* @memberof IntersectionTests
*
* @param {Ray} ray The ray.
* @param {BoundingSphere} sphere The sphere.
* @param {Interval} [result] The result onto which to store the result.
* @returns {Interval} The interval containing scalar points along the ray or undefined if there are no intersections.
*/
IntersectionTests.raySphere = function(ray, sphere, result) {
if (!defined(ray)) {
throw new DeveloperError('ray is required.');
}
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}
result = raySphere(ray, sphere, result);
if (!defined(result) || result.stop < 0.0) {
return undefined;
}
result.start = Math.max(result.start, 0.0);
return result;
};
var scratchLineSegmentRay = new Ray();
/**
* Computes the intersection points of a line segment with a sphere.
* @memberof IntersectionTests
*
* @param {Cartesian3} p0 An end point of the line segment.
* @param {Cartesian3} p1 The other end point of the line segment.
* @param {BoundingSphere} sphere The sphere.
* @param {Interval} [result] The result onto which to store the result.
* @returns {Interval} The interval containing scalar points along the ray or undefined if there are no intersections.
*/
IntersectionTests.lineSegmentSphere = function(p0, p1, sphere, result) {
if (!defined(p0)) {
throw new DeveloperError('p0 is required.');
}
if (!defined(p1)) {
throw new DeveloperError('p1 is required.');
}
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}
var ray = scratchLineSegmentRay;
Cartesian3.clone(p0, ray.origin);
var direction = Cartesian3.subtract(p1, p0, ray.direction);
var maxT = Cartesian3.magnitude(direction);
Cartesian3.normalize(direction, direction);
result = raySphere(ray, sphere, result);
if (!defined(result) || result.stop < 0.0 || result.start > maxT) {
return undefined;
}
result.start = Math.max(result.start, 0.0);
result.stop = Math.min(result.stop, maxT);
return result;
};
var scratchQ = new Cartesian3();
var scratchW = new Cartesian3();
/**
* Computes the intersection points of a ray with an ellipsoid.
*
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Interval} The interval containing scalar points along the ray or undefined if there are no intersections.
*/
IntersectionTests.rayEllipsoid = function(ray, ellipsoid) {
if (!defined(ray)) {
throw new DeveloperError('ray is required.');
}
if (!defined(ellipsoid)) {
throw new DeveloperError('ellipsoid is required.');
}
var inverseRadii = ellipsoid.oneOverRadii;
var q = Cartesian3.multiplyComponents(inverseRadii, ray.origin, scratchQ);
var w = Cartesian3.multiplyComponents(inverseRadii, ray.direction, scratchW);
var q2 = Cartesian3.magnitudeSquared(q);
var qw = Cartesian3.dot(q, w);
var difference, w2, product, discriminant, temp;
if (q2 > 1.0) {
// Outside ellipsoid.
if (qw >= 0.0) {
// Looking outward or tangent (0 intersections).
return undefined;
}
// qw < 0.0.
var qw2 = qw * qw;
difference = q2 - 1.0; // Positively valued.
w2 = Cartesian3.magnitudeSquared(w);
product = w2 * difference;
if (qw2 < product) {
// Imaginary roots (0 intersections).
return undefined;
} else if (qw2 > product) {
// Distinct roots (2 intersections).
discriminant = qw * qw - product;
temp = -qw + Math.sqrt(discriminant); // Avoid cancellation.
var root0 = temp / w2;
var root1 = difference / temp;
if (root0 < root1) {
return new Interval(root0, root1);
}
return {
start : root1,
stop : root0
};
} else {
// qw2 == product. Repeated roots (2 intersections).
var root = Math.sqrt(difference / w2);
return new Interval(root, root);
}
} else if (q2 < 1.0) {
// Inside ellipsoid (2 intersections).
difference = q2 - 1.0; // Negatively valued.
w2 = Cartesian3.magnitudeSquared(w);
product = w2 * difference; // Negatively valued.
discriminant = qw * qw - product;
temp = -qw + Math.sqrt(discriminant); // Positively valued.
return new Interval(0.0, temp / w2);
} else {
// q2 == 1.0. On ellipsoid.
if (qw < 0.0) {
// Looking inward.
w2 = Cartesian3.magnitudeSquared(w);
return new Interval(0.0, -qw / w2);
}
// qw >= 0.0. Looking outward or tangent.
return undefined;
}
};
function addWithCancellationCheck(left, right, tolerance) {
var difference = left + right;
if ((CesiumMath.sign(left) !== CesiumMath.sign(right)) &&
Math.abs(difference / Math.max(Math.abs(left), Math.abs(right))) < tolerance) {
return 0.0;
}
return difference;
}
function quadraticVectorExpression(A, b, c, x, w) {
var xSquared = x * x;
var wSquared = w * w;
var l2 = (A[Matrix3.COLUMN1ROW1] - A[Matrix3.COLUMN2ROW2]) * wSquared;
var l1 = w * (x * addWithCancellationCheck(A[Matrix3.COLUMN1ROW0], A[Matrix3.COLUMN0ROW1], CesiumMath.EPSILON15) + b.y);
var l0 = (A[Matrix3.COLUMN0ROW0] * xSquared + A[Matrix3.COLUMN2ROW2] * wSquared) + x * b.x + c;
var r1 = wSquared * addWithCancellationCheck(A[Matrix3.COLUMN2ROW1], A[Matrix3.COLUMN1ROW2], CesiumMath.EPSILON15);
var r0 = w * (x * addWithCancellationCheck(A[Matrix3.COLUMN2ROW0], A[Matrix3.COLUMN0ROW2]) + b.z);
var cosines;
var solutions = [];
if (r0 === 0.0 && r1 === 0.0) {
cosines = QuadraticRealPolynomial.computeRealRoots(l2, l1, l0);
if (cosines.length === 0) {
return solutions;
}
var cosine0 = cosines[0];
var sine0 = Math.sqrt(Math.max(1.0 - cosine0 * cosine0, 0.0));
solutions.push(new Cartesian3(x, w * cosine0, w * -sine0));
solutions.push(new Cartesian3(x, w * cosine0, w * sine0));
if (cosines.length === 2) {
var cosine1 = cosines[1];
var sine1 = Math.sqrt(Math.max(1.0 - cosine1 * cosine1, 0.0));
solutions.push(new Cartesian3(x, w * cosine1, w * -sine1));
solutions.push(new Cartesian3(x, w * cosine1, w * sine1));
}
return solutions;
}
var r0Squared = r0 * r0;
var r1Squared = r1 * r1;
var l2Squared = l2 * l2;
var r0r1 = r0 * r1;
var c4 = l2Squared + r1Squared;
var c3 = 2.0 * (l1 * l2 + r0r1);
var c2 = 2.0 * l0 * l2 + l1 * l1 - r1Squared + r0Squared;
var c1 = 2.0 * (l0 * l1 - r0r1);
var c0 = l0 * l0 - r0Squared;
if (c4 === 0.0 && c3 === 0.0 && c2 === 0.0 && c1 === 0.0) {
return solutions;
}
cosines = QuarticRealPolynomial.computeRealRoots(c4, c3, c2, c1, c0);
var length = cosines.length;
if (length === 0) {
return solutions;
}
for ( var i = 0; i < length; ++i) {
var cosine = cosines[i];
var cosineSquared = cosine * cosine;
var sineSquared = Math.max(1.0 - cosineSquared, 0.0);
var sine = Math.sqrt(sineSquared);
//var left = l2 * cosineSquared + l1 * cosine + l0;
var left;
if (CesiumMath.sign(l2) === CesiumMath.sign(l0)) {
left = addWithCancellationCheck(l2 * cosineSquared + l0, l1 * cosine, CesiumMath.EPSILON12);
} else if (CesiumMath.sign(l0) === CesiumMath.sign(l1 * cosine)) {
left = addWithCancellationCheck(l2 * cosineSquared, l1 * cosine + l0, CesiumMath.EPSILON12);
} else {
left = addWithCancellationCheck(l2 * cosineSquared + l1 * cosine, l0, CesiumMath.EPSILON12);
}
var right = addWithCancellationCheck(r1 * cosine, r0, CesiumMath.EPSILON15);
var product = left * right;
if (product < 0.0) {
solutions.push(new Cartesian3(x, w * cosine, w * sine));
} else if (product > 0.0) {
solutions.push(new Cartesian3(x, w * cosine, w * -sine));
} else if (sine !== 0.0) {
solutions.push(new Cartesian3(x, w * cosine, w * -sine));
solutions.push(new Cartesian3(x, w * cosine, w * sine));
++i;
} else {
solutions.push(new Cartesian3(x, w * cosine, w * sine));
}
}
return solutions;
}
var firstAxisScratch = new Cartesian3();
var secondAxisScratch = new Cartesian3();
var thirdAxisScratch = new Cartesian3();
var referenceScratch = new Cartesian3();
var bCart = new Cartesian3();
var bScratch = new Matrix3();
var btScratch = new Matrix3();
var diScratch = new Matrix3();
var dScratch = new Matrix3();
var cScratch = new Matrix3();
var tempMatrix = new Matrix3();
var aScratch = new Matrix3();
var sScratch = new Cartesian3();
var closestScratch = new Cartesian3();
var surfPointScratch = new Cartographic();
/**
* Provides the point along the ray which is nearest to the ellipsoid.
*
* @param {Ray} ray The ray.
* @param {Ellipsoid} ellipsoid The ellipsoid.
* @returns {Cartesian3} The nearest planetodetic point on the ray.
*/
IntersectionTests.grazingAltitudeLocation = function(ray, ellipsoid) {
if (!defined(ray)) {
throw new DeveloperError('ray is required.');
}
if (!defined(ellipsoid)) {
throw new DeveloperError('ellipsoid is required.');
}
var position = ray.origin;
var direction = ray.direction;
if (!Cartesian3.equals(position, Cartesian3.ZERO)) {
var normal = ellipsoid.geodeticSurfaceNormal(position, firstAxisScratch);
if (Cartesian3.dot(direction, normal) >= 0.0) { // The location provided is the closest point in altitude
return position;
}
}
var intersects = defined(this.rayEllipsoid(ray, ellipsoid));
// Compute the scaled direction vector.
var f = ellipsoid.transformPositionToScaledSpace(direction, firstAxisScratch);
// Constructs a basis from the unit scaled direction vector. Construct its rotation and transpose.
var firstAxis = Cartesian3.normalize(f, f);
var reference = Cartesian3.mostOrthogonalAxis(f, referenceScratch);
var secondAxis = Cartesian3.normalize(Cartesian3.cross(reference, firstAxis, secondAxisScratch), secondAxisScratch);
var thirdAxis = Cartesian3.normalize(Cartesian3.cross(firstAxis, secondAxis, thirdAxisScratch), thirdAxisScratch);
var B = bScratch;
B[0] = firstAxis.x;
B[1] = firstAxis.y;
B[2] = firstAxis.z;
B[3] = secondAxis.x;
B[4] = secondAxis.y;
B[5] = secondAxis.z;
B[6] = thirdAxis.x;
B[7] = thirdAxis.y;
B[8] = thirdAxis.z;
var B_T = Matrix3.transpose(B, btScratch);
// Get the scaling matrix and its inverse.
var D_I = Matrix3.fromScale(ellipsoid.radii, diScratch);
var D = Matrix3.fromScale(ellipsoid.oneOverRadii, dScratch);
var C = cScratch;
C[0] = 0.0;
C[1] = -direction.z;
C[2] = direction.y;
C[3] = direction.z;
C[4] = 0.0;
C[5] = -direction.x;
C[6] = -direction.y;
C[7] = direction.x;
C[8] = 0.0;
var temp = Matrix3.multiply(Matrix3.multiply(B_T, D, tempMatrix), C, tempMatrix);
var A = Matrix3.multiply(Matrix3.multiply(temp, D_I, aScratch), B, aScratch);
var b = Matrix3.multiplyByVector(temp, position, bCart);
// Solve for the solutions to the expression in standard form:
var solutions = quadraticVectorExpression(A, Cartesian3.negate(b, firstAxisScratch), 0.0, 0.0, 1.0);
var s;
var altitude;
var length = solutions.length;
if (length > 0) {
var closest = Cartesian3.clone(Cartesian3.ZERO, closestScratch);
var maximumValue = Number.NEGATIVE_INFINITY;
for ( var i = 0; i < length; ++i) {
s = Matrix3.multiplyByVector(D_I, Matrix3.multiplyByVector(B, solutions[i], sScratch), sScratch);
var v = Cartesian3.normalize(Cartesian3.subtract(s, position, referenceScratch), referenceScratch);
var dotProduct = Cartesian3.dot(v, direction);
if (dotProduct > maximumValue) {
maximumValue = dotProduct;
closest = Cartesian3.clone(s, closest);
}
}
var surfacePoint = ellipsoid.cartesianToCartographic(closest, surfPointScratch);
maximumValue = CesiumMath.clamp(maximumValue, 0.0, 1.0);
altitude = Cartesian3.magnitude(Cartesian3.subtract(closest, position, referenceScratch)) * Math.sqrt(1.0 - maximumValue * maximumValue);
altitude = intersects ? -altitude : altitude;
surfacePoint.height = altitude;
return ellipsoid.cartographicToCartesian(surfacePoint, new Cartesian3());
}
return undefined;
};
var lineSegmentPlaneDifference = new Cartesian3();
/**
* Computes the intersection of a line segment and a plane.
*
* @param {Cartesian3} endPoint0 An end point of the line segment.
* @param {Cartesian3} endPoint1 The other end point of the line segment.
* @param {Plane} plane The plane.
* @param {Cartesian3} [result] The object onto which to store the result.
* @returns {Cartesian3} The intersection point or undefined if there is no intersection.
*
* @example
* var origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* var normal = ellipsoid.geodeticSurfaceNormal(origin);
* var plane = Cesium.Plane.fromPointNormal(origin, normal);
*
* var p0 = new Cesium.Cartesian3(...);
* var p1 = new Cesium.Cartesian3(...);
*
* // find the intersection of the line segment from p0 to p1 and the tangent plane at origin.
* var intersection = Cesium.IntersectionTests.lineSegmentPlane(p0, p1, plane);
*/
IntersectionTests.lineSegmentPlane = function(endPoint0, endPoint1, plane, result) {
if (!defined(endPoint0)) {
throw new DeveloperError('endPoint0 is required.');
}
if (!defined(endPoint1)) {
throw new DeveloperError('endPoint1 is required.');
}
if (!defined(plane)) {
throw new DeveloperError('plane is required.');
}
if (!defined(result)) {
result = new Cartesian3();
}
var difference = Cartesian3.subtract(endPoint1, endPoint0, lineSegmentPlaneDifference);
var normal = plane.normal;
var nDotDiff = Cartesian3.dot(normal, difference);
// check if the segment and plane are parallel
if (Math.abs(nDotDiff) < CesiumMath.EPSILON6) {
return undefined;
}
var nDotP0 = Cartesian3.dot(normal, endPoint0);
var t = -(plane.distance + nDotP0) / nDotDiff;
// intersection only if t is in [0, 1]
if (t < 0.0 || t > 1.0) {
return undefined;
}
// intersection is endPoint0 + t * (endPoint1 - endPoint0)
Cartesian3.multiplyByScalar(difference, t, result);
Cartesian3.add(endPoint0, result, result);
return result;
};
/**
* Computes the intersection of a triangle and a plane
*
* @param {Cartesian3} p0 First point of the triangle
* @param {Cartesian3} p1 Second point of the triangle
* @param {Cartesian3} p2 Third point of the triangle
* @param {Plane} plane Intersection plane
* @returns {Object} An object with properties <code>positions</code> and <code>indices</code>, which are arrays that represent three triangles that do not cross the plane. (Undefined if no intersection exists)
*
* @example
* var origin = Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883);
* var normal = ellipsoid.geodeticSurfaceNormal(origin);
* var plane = Cesium.Plane.fromPointNormal(origin, normal);
*
* var p0 = new Cesium.Cartesian3(...);
* var p1 = new Cesium.Cartesian3(...);
* var p2 = new Cesium.Cartesian3(...);
*
* // convert the triangle composed of points (p0, p1, p2) to three triangles that don't cross the plane
* var triangles = Cesium.IntersectionTests.trianglePlaneIntersection(p0, p1, p2, plane);
*/
IntersectionTests.trianglePlaneIntersection = function(p0, p1, p2, plane) {
if ((!defined(p0)) ||
(!defined(p1)) ||
(!defined(p2)) ||
(!defined(plane))) {
throw new DeveloperError('p0, p1, p2, and plane are required.');
}
var planeNormal = plane.normal;
var planeD = plane.distance;
var p0Behind = (Cartesian3.dot(planeNormal, p0) + planeD) < 0.0;
var p1Behind = (Cartesian3.dot(planeNormal, p1) + planeD) < 0.0;
var p2Behind = (Cartesian3.dot(planeNormal, p2) + planeD) < 0.0;
// Given these dots products, the calls to lineSegmentPlaneIntersection
// always have defined results.
var numBehind = 0;
numBehind += p0Behind ? 1 : 0;
numBehind += p1Behind ? 1 : 0;
numBehind += p2Behind ? 1 : 0;
var u1, u2;
if (numBehind === 1 || numBehind === 2) {
u1 = new Cartesian3();
u2 = new Cartesian3();
}
if (numBehind === 1) {
if (p0Behind) {
IntersectionTests.lineSegmentPlane(p0, p1, plane, u1);
IntersectionTests.lineSegmentPlane(p0, p2, plane, u2);
return {
positions : [p0, p1, p2, u1, u2 ],
indices : [
// Behind
0, 3, 4,
// In front
1, 2, 4,
1, 4, 3
]
};
} else if (p1Behind) {
IntersectionTests.lineSegmentPlane(p1, p2, plane, u1);
IntersectionTests.lineSegmentPlane(p1, p0, plane, u2);
return {
positions : [p0, p1, p2, u1, u2 ],
indices : [
// Behind
1, 3, 4,
// In front
2, 0, 4,
2, 4, 3
]
};
} else if (p2Behind) {
IntersectionTests.lineSegmentPlane(p2, p0, plane, u1);
IntersectionTests.lineSegmentPlane(p2, p1, plane, u2);
return {
positions : [p0, p1, p2, u1, u2 ],
indices : [
// Behind
2, 3, 4,
// In front
0, 1, 4,
0, 4, 3
]
};
}
} else if (numBehind === 2) {
if (!p0Behind) {
IntersectionTests.lineSegmentPlane(p1, p0, plane, u1);
IntersectionTests.lineSegmentPlane(p2, p0, plane, u2);
return {
positions : [p0, p1, p2, u1, u2 ],
indices : [
// Behind
1, 2, 4,
1, 4, 3,
// In front
0, 3, 4
]
};
} else if (!p1Behind) {
IntersectionTests.lineSegmentPlane(p2, p1, plane, u1);
IntersectionTests.lineSegmentPlane(p0, p1, plane, u2);
return {
positions : [p0, p1, p2, u1, u2 ],
indices : [
// Behind
2, 0, 4,
2, 4, 3,
// In front
1, 3, 4
]
};
} else if (!p2Behind) {
IntersectionTests.lineSegmentPlane(p0, p2, plane, u1);
IntersectionTests.lineSegmentPlane(p1, p2, plane, u2);
return {
positions : [p0, p1, p2, u1, u2 ],
indices : [
// Behind
0, 1, 4,
0, 4, 3,
// In front
2, 3, 4
]
};
}
}
// if numBehind is 3, the triangle is completely behind the plane;
// otherwise, it is completely in front (numBehind is 0).
return undefined;
};
return IntersectionTests;
});
/*global define*/
define('Core/isArray',[
'./defined'
], function(
defined) {
'use strict';
/**
* Tests an object to see if it is an array.
* @exports isArray
*
* @param {Object} value The value to test.
* @returns {Boolean} true if the value is an array, false otherwise.
*/
var isArray = Array.isArray;
if (!defined(isArray)) {
isArray = function(value) {
return Object.prototype.toString.call(value) === '[object Array]';
};
}
return isArray;
});
/*global define*/
define('Core/Plane',[
'./Cartesian3',
'./defined',
'./DeveloperError',
'./freezeObject'
], function(
Cartesian3,
defined,
DeveloperError,
freezeObject) {
'use strict';
/**
* A plane in Hessian Normal Form defined by
* <pre>
* ax + by + cz + d = 0
* </pre>
* where (a, b, c) is the plane's <code>normal</code>, d is the signed
* <code>distance</code> to the plane, and (x, y, z) is any point on
* the plane.
*
* @alias Plane
* @constructor
*
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {Number} distance The shortest distance from the origin to the plane. The sign of
* <code>distance</code> determines which side of the plane the origin
* is on. If <code>distance</code> is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
*
* @example
* // The plane x=0
* var plane = new Cesium.Plane(Cesium.Cartesian3.UNIT_X, 0.0);
*/
function Plane(normal, distance) {
if (!defined(normal)) {
throw new DeveloperError('normal is required.');
}
if (!defined(distance)) {
throw new DeveloperError('distance is required.');
}
/**
* The plane's normal.
*
* @type {Cartesian3}
*/
this.normal = Cartesian3.clone(normal);
/**
* The shortest distance from the origin to the plane. The sign of
* <code>distance</code> determines which side of the plane the origin
* is on. If <code>distance</code> is positive, the origin is in the half-space
* in the direction of the normal; if negative, the origin is in the half-space
* opposite to the normal; if zero, the plane passes through the origin.
*
* @type {Number}
*/
this.distance = distance;
}
/**
* Creates a plane from a normal and a point on the plane.
*
* @param {Cartesian3} point The point on the plane.
* @param {Cartesian3} normal The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
*
* @example
* var point = Cesium.Cartesian3.fromDegrees(-72.0, 40.0);
* var normal = ellipsoid.geodeticSurfaceNormal(point);
* var tangentPlane = Cesium.Plane.fromPointNormal(point, normal);
*/
Plane.fromPointNormal = function(point, normal, result) {
if (!defined(point)) {
throw new DeveloperError('point is required.');
}
if (!defined(normal)) {
throw new DeveloperError('normal is required.');
}
var distance = -Cartesian3.dot(normal, point);
if (!defined(result)) {
return new Plane(normal, distance);
}
Cartesian3.clone(normal, result.normal);
result.distance = distance;
return result;
};
var scratchNormal = new Cartesian3();
/**
* Creates a plane from the general equation
*
* @param {Cartesian4} coefficients The plane's normal (normalized).
* @param {Plane} [result] The object onto which to store the result.
* @returns {Plane} A new plane instance or the modified result parameter.
*/
Plane.fromCartesian4 = function(coefficients, result) {
if (!defined(coefficients)) {
throw new DeveloperError('coefficients is required.');
}
var normal = Cartesian3.fromCartesian4(coefficients, scratchNormal);
var distance = coefficients.w;
if (!defined(result)) {
return new Plane(normal, distance);
} else {
Cartesian3.clone(normal, result.normal);
result.distance = distance;
return result;
}
};
/**
* Computes the signed shortest distance of a point to a plane.
* The sign of the distance determines which side of the plane the point
* is on. If the distance is positive, the point is in the half-space
* in the direction of the normal; if negative, the point is in the half-space
* opposite to the normal; if zero, the plane passes through the point.
*
* @param {Plane} plane The plane.
* @param {Cartesian3} point The point.
* @returns {Number} The signed shortest distance of the point to the plane.
*/
Plane.getPointDistance = function(plane, point) {
if (!defined(plane)) {
throw new DeveloperError('plane is required.');
}
if (!defined(point)) {
throw new DeveloperError('point is required.');
}
return Cartesian3.dot(plane.normal, point) + plane.distance;
};
/**
* A constant initialized to the XY plane passing through the origin, with normal in positive Z.
*
* @type {Plane}
* @constant
*/
Plane.ORIGIN_XY_PLANE = freezeObject(new Plane(Cartesian3.UNIT_Z, 0.0));
/**
* A constant initialized to the YZ plane passing through the origin, with normal in positive X.
*
* @type {Plane}
* @constant
*/
Plane.ORIGIN_YZ_PLANE = freezeObject(new Plane(Cartesian3.UNIT_X, 0.0));
/**
* A constant initialized to the ZX plane passing through the origin, with normal in positive Y.
*
* @type {Plane}
* @constant
*/
Plane.ORIGIN_ZX_PLANE = freezeObject(new Plane(Cartesian3.UNIT_Y, 0.0));
return Plane;
});
/*global define*/
define('Core/PolylinePipeline',[
'./Cartesian3',
'./Cartographic',
'./defaultValue',
'./defined',
'./DeveloperError',
'./Ellipsoid',
'./EllipsoidGeodesic',
'./IntersectionTests',
'./isArray',
'./Math',
'./Matrix4',
'./Plane'
], function(
Cartesian3,
Cartographic,
defaultValue,
defined,
DeveloperError,
Ellipsoid,
EllipsoidGeodesic,
IntersectionTests,
isArray,
CesiumMath,
Matrix4,
Plane) {
'use strict';
/**
* @private
*/
var PolylinePipeline = {};
PolylinePipeline.numberOfPoints = function(p0, p1, minDistance) {
var distance = Cartesian3.distance(p0, p1);
return Math.ceil(distance / minDistance);
};
var cartoScratch = new Cartographic();
PolylinePipeline.extractHeights = function(positions, ellipsoid) {
var length = positions.length;
var heights = new Array(length);
for (var i = 0; i < length; i++) {
var p = positions[i];
heights[i] = ellipsoid.cartesianToCartographic(p, cartoScratch).height;
}
return heights;
};
var wrapLongitudeInversMatrix = new Matrix4();
var wrapLongitudeOrigin = new Cartesian3();
var wrapLongitudeXZNormal = new Cartesian3();
var wrapLongitudeXZPlane = new Plane(Cartesian3.ZERO, 0.0);
var wrapLongitudeYZNormal = new Cartesian3();
var wrapLongitudeYZPlane = new Plane(Cartesian3.ZERO, 0.0);
var wrapLongitudeIntersection = new Cartesian3();
var wrapLongitudeOffset = new Cartesian3();
var subdivideHeightsScratchArray = [];
function subdivideHeights(numPoints, h0, h1) {
var heights = subdivideHeightsScratchArray;
heights.length = numPoints;
var i;
if (h0 === h1) {
for (i = 0; i < numPoints; i++) {
heights[i] = h0;
}
return heights;
}
var dHeight = h1 - h0;
var heightPerVertex = dHeight / numPoints;
for (i = 0; i < numPoints; i++) {
var h = h0 + i*heightPerVertex;
heights[i] = h;
}
return heights;
}
var carto1 = new Cartographic();
var carto2 = new Cartographic();
var cartesian = new Cartesian3();
var scaleFirst = new Cartesian3();
var scaleLast = new Cartesian3();
var ellipsoidGeodesic = new EllipsoidGeodesic();
//Returns subdivided line scaled to ellipsoid surface starting at p1 and ending at p2.
//Result includes p1, but not include p2. This function is called for a sequence of line segments,
//and this prevents duplication of end point.
function generateCartesianArc(p0, p1, minDistance, ellipsoid, h0, h1, array, offset) {
var first = ellipsoid.scaleToGeodeticSurface(p0, scaleFirst);
var last = ellipsoid.scaleToGeodeticSurface(p1, scaleLast);
var numPoints = PolylinePipeline.numberOfPoints(p0, p1, minDistance);
var start = ellipsoid.cartesianToCartographic(first, carto1);
var end = ellipsoid.cartesianToCartographic(last, carto2);
var heights = subdivideHeights(numPoints, h0, h1);
ellipsoidGeodesic.setEndPoints(start, end);
var surfaceDistanceBetweenPoints = ellipsoidGeodesic.surfaceDistance / numPoints;
var index = offset;
start.height = h0;
var cart = ellipsoid.cartographicToCartesian(start, cartesian);
Cartesian3.pack(cart, array, index);
index += 3;
for (var i = 1; i < numPoints; i++) {
var carto = ellipsoidGeodesic.interpolateUsingSurfaceDistance(i * surfaceDistanceBetweenPoints, carto2);
carto.height = heights[i];
cart = ellipsoid.cartographicToCartesian(carto, cartesian);
Cartesian3.pack(cart, array, index);
index += 3;
}
return index;
}
/**
* Breaks a {@link Polyline} into segments such that it does not cross the ±180 degree meridian of an ellipsoid.
*
* @param {Cartesian3[]} positions The polyline's Cartesian positions.
* @param {Matrix4} [modelMatrix=Matrix4.IDENTITY] The polyline's model matrix. Assumed to be an affine
* transformation matrix, where the upper left 3x3 elements are a rotation matrix, and
* the upper three elements in the fourth column are the translation. The bottom row is assumed to be [0, 0, 0, 1].
* The matrix is not verified to be in the proper form.
* @returns {Object} An object with a <code>positions</code> property that is an array of positions and a
* <code>segments</code> property.
*
*
* @example
* var polylines = new Cesium.PolylineCollection();
* var polyline = polylines.add(...);
* var positions = polyline.positions;
* var modelMatrix = polylines.modelMatrix;
* var segments = Cesium.PolylinePipeline.wrapLongitude(positions, modelMatrix);
*
* @see PolygonPipeline.wrapLongitude
* @see Polyline
* @see PolylineCollection
*/
PolylinePipeline.wrapLongitude = function(positions, modelMatrix) {
var cartesians = [];
var segments = [];
if (defined(positions) && positions.length > 0) {
modelMatrix = defaultValue(modelMatrix, Matrix4.IDENTITY);
var inverseModelMatrix = Matrix4.inverseTransformation(modelMatrix, wrapLongitudeInversMatrix);
var origin = Matrix4.multiplyByPoint(inverseModelMatrix, Cartesian3.ZERO, wrapLongitudeOrigin);
var xzNormal = Matrix4.multiplyByPointAsVector(inverseModelMatrix, Cartesian3.UNIT_Y, wrapLongitudeXZNormal);
var xzPlane = Plane.fromPointNormal(origin, xzNormal, wrapLongitudeXZPlane);
var yzNormal = Matrix4.multiplyByPointAsVector(inverseModelMatrix, Cartesian3.UNIT_X, wrapLongitudeYZNormal);
var yzPlane = Plane.fromPointNormal(origin, yzNormal, wrapLongitudeYZPlane);
var count = 1;
cartesians.push(Cartesian3.clone(positions[0]));
var prev = cartesians[0];
var length = positions.length;
for (var i = 1; i < length; ++i) {
var cur = positions[i];
// intersects the IDL if either endpoint is on the negative side of the yz-plane
if (Plane.getPointDistance(yzPlane, prev) < 0.0 || Plane.getPointDistance(yzPlane, cur) < 0.0) {
// and intersects the xz-plane
var intersection = IntersectionTests.lineSegmentPlane(prev, cur, xzPlane, wrapLongitudeIntersection);
if (defined(intersection)) {
// move point on the xz-plane slightly away from the plane
var offset = Cartesian3.multiplyByScalar(xzNormal, 5.0e-9, wrapLongitudeOffset);
if (Plane.getPointDistance(xzPlane, prev) < 0.0) {
Cartesian3.negate(offset, offset);
}
cartesians.push(Cartesian3.add(intersection, offset, new Cartesian3()));
segments.push(count + 1);
Cartesian3.negate(offset, offset);
cartesians.push(Cartesian3.add(intersection, offset, new Cartesian3()));
count = 1;
}
}
cartesians.push(Cartesian3.clone(positions[i]));
count++;
prev = cur;
}
segments.push(count);
}
return {
positions : cartesians,
lengths : segments
};
};
/**
* Subdivides polyline and raises all points to the specified height. Returns an array of numbers to represent the positions.
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
* @param {Number|Number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
* @param {Number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {Number[]} A new array of positions of type {Number} that have been subdivided and raised to the surface of the ellipsoid.
*
* @example
* var positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
* -100.0, 38.0,
* -105.0, 35.0,
* -100.0, 32.0
* ]);
* var surfacePositions = Cesium.PolylinePipeline.generateArc({
* positons: positions
* });
*/
PolylinePipeline.generateArc = function(options) {
if (!defined(options)) {
options = {};
}
var positions = options.positions;
if (!defined(positions)) {
throw new DeveloperError('options.positions is required.');
}
var length = positions.length;
var ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
var height = defaultValue(options.height, 0);
var hasHeightArray = isArray(height);
if (length < 1) {
return [];
} else if (length === 1) {
var p = ellipsoid.scaleToGeodeticSurface(positions[0], scaleFirst);
height = hasHeightArray ? height[0] : height;
if (height !== 0) {
var n = ellipsoid.geodeticSurfaceNormal(p, cartesian);
Cartesian3.multiplyByScalar(n, height, n);
Cartesian3.add(p, n, p);
}
return [p.x, p.y, p.z];
}
var minDistance = options.minDistance;
if (!defined(minDistance)) {
var granularity = defaultValue(options.granularity, CesiumMath.RADIANS_PER_DEGREE);
minDistance = CesiumMath.chordLength(granularity, ellipsoid.maximumRadius);
}
var numPoints = 0;
var i;
for (i = 0; i < length -1; i++) {
numPoints += PolylinePipeline.numberOfPoints(positions[i], positions[i+1], minDistance);
}
var arrayLength = (numPoints + 1) * 3;
var newPositions = new Array(arrayLength);
var offset = 0;
for (i = 0; i < length - 1; i++) {
var p0 = positions[i];
var p1 = positions[i + 1];
var h0 = hasHeightArray ? height[i] : height;
var h1 = hasHeightArray ? height[i + 1] : height;
offset = generateCartesianArc(p0, p1, minDistance, ellipsoid, h0, h1, newPositions, offset);
}
subdivideHeightsScratchArray.length = 0;
var lastPoint = positions[length - 1];
var carto = ellipsoid.cartesianToCartographic(lastPoint, carto1);
carto.height = hasHeightArray ? height[length - 1] : height;
var cart = ellipsoid.cartographicToCartesian(carto, cartesian);
Cartesian3.pack(cart, newPositions, arrayLength - 3);
return newPositions;
};
/**
* Subdivides polyline and raises all points to the specified height. Returns an array of new {Cartesian3} positions.
* @param {Cartesian3[]} options.positions The array of type {Cartesian3} representing positions.
* @param {Number|Number[]} [options.height=0.0] A number or array of numbers representing the heights of each position.
* @param {Number} [options.granularity = CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid on which the positions lie.
* @returns {Cartesian3[]} A new array of cartesian3 positions that have been subdivided and raised to the surface of the ellipsoid.
*
* @example
* var positions = Cesium.Cartesian3.fromDegreesArray([
* -105.0, 40.0,
* -100.0, 38.0,
* -105.0, 35.0,
* -100.0, 32.0
* ]);
* var surfacePositions = Cesium.PolylinePipeline.generateCartesianArc({
* positons: positions
* });
*/
PolylinePipeline.generateCartesianArc = function(options) {
var numberArray = PolylinePipeline.generateArc(options);
var size = numberArray.length/3;
var newPositions = new Array(size);
for (var i = 0; i < size; i++) {
newPositions[i] = Cartesian3.unpack(numberArray, i*3);
}
return newPositions;
};
return PolylinePipeline;
});
/*global define*/
define('Core/SimplePolylineGeometry',[
'./BoundingSphere',
'./Cartesian3',
'./Color',
'./ComponentDatatype',
'./defaultValue',
'./defined',
'./DeveloperError',
'./Ellipsoid',
'./Geometry',
'./GeometryAttribute',
'./GeometryAttributes',
'./IndexDatatype',
'./Math',
'./PolylinePipeline',
'./PrimitiveType'
], function(
BoundingSphere,
Cartesian3,
Color,
ComponentDatatype,
defaultValue,
defined,
DeveloperError,
Ellipsoid,
Geometry,
GeometryAttribute,
GeometryAttributes,
IndexDatatype,
CesiumMath,
PolylinePipeline,
PrimitiveType) {
'use strict';
function interpolateColors(p0, p1, color0, color1, minDistance, array, offset) {
var numPoints = PolylinePipeline.numberOfPoints(p0, p1, minDistance);
var i;
var r0 = color0.red;
var g0 = color0.green;
var b0 = color0.blue;
var a0 = color0.alpha;
var r1 = color1.red;
var g1 = color1.green;
var b1 = color1.blue;
var a1 = color1.alpha;
if (Color.equals(color0, color1)) {
for (i = 0; i < numPoints; i++) {
array[offset++] = Color.floatToByte(r0);
array[offset++] = Color.floatToByte(g0);
array[offset++] = Color.floatToByte(b0);
array[offset++] = Color.floatToByte(a0);
}
return offset;
}
var redPerVertex = (r1 - r0) / numPoints;
var greenPerVertex = (g1 - g0) / numPoints;
var bluePerVertex = (b1 - b0) / numPoints;
var alphaPerVertex = (a1 - a0) / numPoints;
var index = offset;
for (i = 0; i < numPoints; i++) {
array[index++] = Color.floatToByte(r0 + i * redPerVertex);
array[index++] = Color.floatToByte(g0 + i * greenPerVertex);
array[index++] = Color.floatToByte(b0 + i * bluePerVertex);
array[index++] = Color.floatToByte(a0 + i * alphaPerVertex);
}
return index;
}
/**
* A description of a polyline modeled as a line strip; the first two positions define a line segment,
* and each additional position defines a line segment from the previous position.
*
* @alias SimplePolylineGeometry
* @constructor
*
* @param {Object} options Object with the following properties:
* @param {Cartesian3[]} options.positions An array of {@link Cartesian3} defining the positions in the polyline as a line strip.
* @param {Color[]} [options.colors] An Array of {@link Color} defining the per vertex or per segment colors.
* @param {Boolean} [options.colorsPerVertex=false] A boolean that determines whether the colors will be flat across each segment of the line or interpolated across the vertices.
* @param {Boolean} [options.followSurface=true] A boolean that determines whether positions will be adjusted to the surface of the ellipsoid via a great arc.
* @param {Number} [options.granularity=CesiumMath.RADIANS_PER_DEGREE] The distance, in radians, between each latitude and longitude if options.followSurface=true. Determines the number of positions in the buffer.
* @param {Ellipsoid} [options.ellipsoid=Ellipsoid.WGS84] The ellipsoid to be used as a reference.
*
* @exception {DeveloperError} At least two positions are required.
* @exception {DeveloperError} colors has an invalid length.
*
* @see SimplePolylineGeometry#createGeometry
*
* @example
* // A polyline with two connected line segments
* var polyline = new Cesium.SimplePolylineGeometry({
* positions : Cesium.Cartesian3.fromDegreesArray([
* 0.0, 0.0,
* 5.0, 0.0,
* 5.0, 5.0
* ])
* });
* var geometry = Cesium.SimplePolylineGeometry.createGeometry(polyline);
*/
function SimplePolylineGeometry(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
var positions = options.positions;
var colors = options.colors;
var colorsPerVertex = defaultValue(options.colorsPerVertex, false);
if ((!defined(positions)) || (positions.length < 2)) {
throw new DeveloperError('At least two positions are required.');
}
if (defined(colors) && ((colorsPerVertex && colors.length < positions.length) || (!colorsPerVertex && colors.length < positions.length - 1))) {
throw new DeveloperError('colors has an invalid length.');
}
this._positions = positions;
this._colors = colors;
this._colorsPerVertex = colorsPerVertex;
this._followSurface = defaultValue(options.followSurface, true);
this._granularity = defaultValue(options.granularity, CesiumMath.RADIANS_PER_DEGREE);
this._ellipsoid = defaultValue(options.ellipsoid, Ellipsoid.WGS84);
this._workerName = 'createSimplePolylineGeometry';
var numComponents = 1 + positions.length * Cartesian3.packedLength;
numComponents += defined(colors) ? 1 + colors.length * Color.packedLength : 1;
/**
* The number of elements used to pack the object into an array.
* @type {Number}
*/
this.packedLength = numComponents + Ellipsoid.packedLength + 3;
}
/**
* Stores the provided instance into the provided array.
*
* @param {SimplePolylineGeometry} value The value to pack.
* @param {Number[]} array The array to pack into.
* @param {Number} [startingIndex=0] The index into the array at which to start packing the elements.
*
* @returns {Number[]} The array that was packed into
*/
SimplePolylineGeometry.pack = function(value, array, startingIndex) {
if (!defined(value)) {
throw new DeveloperError('value is required');
}
if (!defined(array)) {
throw new DeveloperError('array is required');
}
startingIndex = defaultValue(startingIndex, 0);
var i;
var positions = value._positions;
var length = positions.length;
array[startingIndex++] = length;
for (i = 0; i < length; ++i, startingIndex += Cartesian3.packedLength) {
Cartesian3.pack(positions[i], array, startingIndex);
}
var colors = value._colors;
length = defined(colors) ? colors.length : 0.0;
array[startingIndex++] = length;
for (i = 0; i < length; ++i, startingIndex += Color.packedLength) {
Color.pack(colors[i], array, startingIndex);
}
Ellipsoid.pack(value._ellipsoid, array, startingIndex);
startingIndex += Ellipsoid.packedLength;
array[startingIndex++] = value._colorsPerVertex ? 1.0 : 0.0;
array[startingIndex++] = value._followSurface ? 1.0 : 0.0;
array[startingIndex] = value._granularity;
return array;
};
/**
* Retrieves an instance from a packed array.
*
* @param {Number[]} array The packed array.
* @param {Number} [startingIndex=0] The starting index of the element to be unpacked.
* @param {SimplePolylineGeometry} [result] The object into which to store the result.
* @returns {SimplePolylineGeometry} The modified result parameter or a new SimplePolylineGeometry instance if one was not provided.
*/
SimplePolylineGeometry.unpack = function(array, startingIndex, result) {
if (!defined(array)) {
throw new DeveloperError('array is required');
}
startingIndex = defaultValue(startingIndex, 0);
var i;
var length = array[startingIndex++];
var positions = new Array(length);
for (i = 0; i < length; ++i, startingIndex += Cartesian3.packedLength) {
positions[i] = Cartesian3.unpack(array, startingIndex);
}
length = array[startingIndex++];
var colors = length > 0 ? new Array(length) : undefined;
for (i = 0; i < length; ++i, startingIndex += Color.packedLength) {
colors[i] = Color.unpack(array, startingIndex);
}
var ellipsoid = Ellipsoid.unpack(array, startingIndex);
startingIndex += Ellipsoid.packedLength;
var colorsPerVertex = array[startingIndex++] === 1.0;
var followSurface = array[startingIndex++] === 1.0;
var granularity = array[startingIndex];
if (!defined(result)) {
return new SimplePolylineGeometry({
positions : positions,
colors : colors,
ellipsoid : ellipsoid,
colorsPerVertex : colorsPerVertex,
followSurface : followSurface,
granularity : granularity
});
}
result._positions = positions;
result._colors = colors;
result._ellipsoid = ellipsoid;
result._colorsPerVertex = colorsPerVertex;
result._followSurface = followSurface;
result._granularity = granularity;
return result;
};
var scratchArray1 = new Array(2);
var scratchArray2 = new Array(2);
var generateArcOptionsScratch = {
positions : scratchArray1,
height: scratchArray2,
ellipsoid: undefined,
minDistance : undefined
};
/**
* Computes the geometric representation of a simple polyline, including its vertices, indices, and a bounding sphere.
*
* @param {SimplePolylineGeometry} simplePolylineGeometry A description of the polyline.
* @returns {Geometry} The computed vertices and indices.
*/
SimplePolylineGeometry.createGeometry = function(simplePolylineGeometry) {
var positions = simplePolylineGeometry._positions;
var colors = simplePolylineGeometry._colors;
var colorsPerVertex = simplePolylineGeometry._colorsPerVertex;
var followSurface = simplePolylineGeometry._followSurface;
var granularity = simplePolylineGeometry._granularity;
var ellipsoid = simplePolylineGeometry._ellipsoid;
var minDistance = CesiumMath.chordLength(granularity, ellipsoid.maximumRadius);
var perSegmentColors = defined(colors) && !colorsPerVertex;
var i;
var length = positions.length;
var positionValues;
var numberOfPositions;
var colorValues;
var color;
var offset = 0;
if (followSurface) {
var heights = PolylinePipeline.extractHeights(positions, ellipsoid);
var generateArcOptions = generateArcOptionsScratch;
generateArcOptions.minDistance = minDistance;
generateArcOptions.ellipsoid = ellipsoid;
if (perSegmentColors) {
var positionCount = 0;
for (i = 0; i < length - 1; i++) {
positionCount += PolylinePipeline.numberOfPoints(positions[i], positions[i+1], minDistance) + 1;
}
positionValues = new Float64Array(positionCount * 3);
colorValues = new Uint8Array(positionCount * 4);
generateArcOptions.positions = scratchArray1;
generateArcOptions.height= scratchArray2;
var ci = 0;
for (i = 0; i < length - 1; ++i) {
scratchArray1[0] = positions[i];
scratchArray1[1] = positions[i + 1];
scratchArray2[0] = heights[i];
scratchArray2[1] = heights[i + 1];
var pos = PolylinePipeline.generateArc(generateArcOptions);
if (defined(colors)) {
var segLen = pos.length / 3;
color = colors[i];
for(var k = 0; k < segLen; ++k) {
colorValues[ci++] = Color.floatToByte(color.red);
colorValues[ci++] = Color.floatToByte(color.green);
colorValues[ci++] = Color.floatToByte(color.blue);
colorValues[ci++] = Color.floatToByte(color.alpha);
}
}
positionValues.set(pos, offset);
offset += pos.length;
}
} else {
generateArcOptions.positions = positions;
generateArcOptions.height= heights;
positionValues = new Float64Array(PolylinePipeline.generateArc(generateArcOptions));
if (defined(colors)) {
colorValues = new Uint8Array(positionValues.length / 3 * 4);
for (i = 0; i < length - 1; ++i) {
var p0 = positions[i];
var p1 = positions[i + 1];
var c0 = colors[i];
var c1 = colors[i + 1];
offset = interpolateColors(p0, p1, c0, c1, minDistance, colorValues, offset);
}
var lastColor = colors[length - 1];
colorValues[offset++] = Color.floatToByte(lastColor.red);
colorValues[offset++] = Color.floatToByte(lastColor.green);
colorValues[offset++] = Color.floatToByte(lastColor.blue);
colorValues[offset++] = Color.floatToByte(lastColor.alpha);
}
}
} else {
numberOfPositions = perSegmentColors ? length * 2 - 2 : length;
positionValues = new Float64Array(numberOfPositions * 3);
colorValues = defined(colors) ? new Uint8Array(numberOfPositions * 4) : undefined;
var positionIndex = 0;
var colorIndex = 0;
for (i = 0; i < length; ++i) {
var p = positions[i];
if (perSegmentColors && i > 0) {
Cartesian3.pack(p, positionValues, positionIndex);
positionIndex += 3;
color = colors[i - 1];
colorValues[colorIndex++] = Color.floatToByte(color.red);
colorValues[colorIndex++] = Color.floatToByte(color.green);
colorValues[colorIndex++] = Color.floatToByte(color.blue);
colorValues[colorIndex++] = Color.floatToByte(color.alpha);
}
if (perSegmentColors && i === length - 1) {
break;
}
Cartesian3.pack(p, positionValues, positionIndex);
positionIndex += 3;
if (defined(colors)) {
color = colors[i];
colorValues[colorIndex++] = Color.floatToByte(color.red);
colorValues[colorIndex++] = Color.floatToByte(color.green);
colorValues[colorIndex++] = Color.floatToByte(color.blue);
colorValues[colorIndex++] = Color.floatToByte(color.alpha);
}
}
}
var attributes = new GeometryAttributes();
attributes.position = new GeometryAttribute({
componentDatatype : ComponentDatatype.DOUBLE,
componentsPerAttribute : 3,
values : positionValues
});
if (defined(colors)) {
attributes.color = new GeometryAttribute({
componentDatatype : ComponentDatatype.UNSIGNED_BYTE,
componentsPerAttribute : 4,
values : colorValues,
normalize : true
});
}
numberOfPositions = positionValues.length / 3;
var numberOfIndices = (numberOfPositions - 1) * 2;
var indices = IndexDatatype.createTypedArray(numberOfPositions, numberOfIndices);
var index = 0;
for (i = 0; i < numberOfPositions - 1; ++i) {
indices[index++] = i;
indices[index++] = i + 1;
}
return new Geometry({
attributes : attributes,
indices : indices,
primitiveType : PrimitiveType.LINES,
boundingSphere : BoundingSphere.fromPoints(positions)
});
};
return SimplePolylineGeometry;
});
/*global define*/
define('Workers/createSimplePolylineGeometry',[
'../Core/defined',
'../Core/Ellipsoid',
'../Core/SimplePolylineGeometry'
], function(
defined,
Ellipsoid,
SimplePolylineGeometry) {
'use strict';
function createSimplePolylineGeometry(simplePolylineGeometry, offset) {
if (defined(offset)) {
simplePolylineGeometry = SimplePolylineGeometry.unpack(simplePolylineGeometry, offset);
}
simplePolylineGeometry._ellipsoid = Ellipsoid.clone(simplePolylineGeometry._ellipsoid);
return SimplePolylineGeometry.createGeometry(simplePolylineGeometry);
}
return createSimplePolylineGeometry;
});
}());
|
import _ from 'underscore';
/**
* Merge fetched array or object into local data
* TODO: Too manual. Use normalizr or something else.
*
* @param {Array} oldList
* @param {Array|Object} response
*/
export default function mergeResponse(oldList, response) {
const newList = _.isArray(response) ? response : [response];
const objects = {};
oldList.forEach((object) => objects[object.id] = object);
newList.forEach((object) => objects[object.id] = object);
const list = [];
for (const object in objects) {
if (objects.hasOwnProperty(object)) {
list.push(objects[object]);
}
}
return list;
}
|
const db_control = require('./database/db_control')()
function model() {
function create(req, user, callback) {
db_control.newRequest({
type: 'write',
filename: user.guid,
folder: 'data_user',
json: JSON.stringify(user),
callback: createResponse
})
function createResponse(err) {
// Error!
if (err) {
return callback(err, req)
}
// Success!
return callback(false, req)
}
}
function createSong(req, callback) {
db_control.newRequest({
type: 'edit',
filename: req.data.guid,
folder: 'data_user',
edit: createSong,
readData: null,
data: req.data,
callback: editResponse
})
// Edit function once we read the object from the database
function createSong(req) {
let readDataObject = JSON.parse(req.readData)
readDataObject.votes.push({
code: req.data.code,
id: req.data.id,
vote: null
})
req.json = JSON.stringify(readDataObject)
return req
}
function editResponse(err) {
// Error!
if (err) {
return callback(err, req)
}
// Success!
return callback(false, req)
}
}
function voteSong(req, callback) {
let oldReq = req
db_control.newRequest({
type: 'edit',
filename: req.data.guid,
folder: 'data_user',
edit: voteSong,
readData: null,
data: req.data,
callback: editResponse
})
// Edit function once we read the object from the database
function voteSong(req) {
let readDataObject = JSON.parse(req.readData)
for (let i=0; i<readDataObject.votes.length; i++) {
if (readDataObject.votes[i].code === req.data.code &&
readDataObject.votes[i].id === req.data.id) {
oldReq.voteValue = getVoteValue(readDataObject.votes[i].vote, req.data.vote)
readDataObject.votes[i].vote = assignVote(readDataObject.votes[i].vote, req.data.vote)
}
}
req.json = JSON.stringify(readDataObject)
return req
}
function assignVote(currentVote, newVote) {
currentVote = parseInt(currentVote)
newVote = parseInt(newVote)
if (Math.abs(currentVote + newVote) > 1) {
return 0
}
if (newVote > 0) {
return 1
}
if (newVote < 0) {
return -1
}
}
function getVoteValue(currentVote, newVote) {
currentVote = parseInt(currentVote)
newVote = parseInt(newVote)
if (currentVote + newVote > 1) {
return {
up: -1,
down: 0
}
}
if (currentVote + newVote < -1) {
return {
up: 0,
down: -1
}
}
if (newVote > 0) {
if (currentVote < 0) {
return {
up: 1,
down: -1
}
}
return {
up: 1,
down: 0
}
}
if (newVote < 0) {
if (currentVote > 0) {
return {
up: -1,
down: 1
}
}
return {
up: 0,
down: 1
}
}
}
function editResponse(err) {
// Error!
if (err) {
return callback(err, oldReq)
}
// Success!
return callback(false, oldReq)
}
}
return {
create: create,
createSong: createSong,
voteSong: voteSong
}
}
module.exports = model
|
export default class DeviceProcessorController {
constructor(adb) {
this.adb = adb;
this.stats = null;
this.cpus = null;
this.loads = [];
}
init(device) {
this.adb.client.openProcStat(device.id).then(stats => {
stats.on('load', load => {
this.cpus = Object.keys(load);
this.loads = [];
for (const cpu of this.cpus) {
this.loads[cpu] = [];
Object.getOwnPropertyNames(load[cpu]).forEach((val, idx, vals) => {
let item = {
name: val,
value: load[cpu][val]
};
this.loads[cpu].push(item);
});
}
this.$scope.$digest();
});
this.stats = stats;
this.$scope.$digest();
});
}
close() {
if (this.stats) {
this.stats.end();
this.stats = null;
}
}
}
DeviceProcessorController.$inject = ["AndroidDeviceService"];
|
let stack = {
init(){
this.peek();
},
listenObjById(id, type, callback){
return document.getElementById(id).addEventListener(type, callback);
},
peek(){
let obj = this.listenObjById('stack', 'click', () => {
function Stack(){
let item = [];
this.push = function(element){
item.push(element);
};
this.pop = function(){
item.pop();
};
this.peek = function(){
return item[item.length - 1];
};
this.isEmpty = function(){
return item == 0;
};
this.size = function(){
return item.length;
};
this.clear = function(){
item = [];
};
this.print = function(){
console.log(item.toString());
};
this.item = () => item;
}
let stack = new Stack();
console.log(stack);
console.log(stack.isEmpty());
stack.push(5);
stack.push(8);
console.log(stack.peek());
console.log(stack.size());
console.log(stack.isEmpty());
stack.pop();
console.log(stack.item());
});
}
};
|
/**
* @author adoankim <adoankim@alumnos.uvigo.es>
* @copyright 2014 adoankim
* @license {@link https://github.com/adoankim/PhaserGoF/blob/master/LICENSE|MIT License}
*
* testCell.js
*/
var chai = require('chai');
var assert = chai.assert,
expect = chai.expect,
should = chai.should();
var GOFManagerClass = require('../public/js/unit/GOFManager.js');
describe('GOFManager', function(){
describe('#addCell(pos)', function(){
var GOFMan = new GOFManagerClass(3, 3);
it('should permit to add a cell in a given position', function(){
var newCell = {'x' : 0, 'y' : 0};
var addedCell = GOFMan.addCell(newCell);
addedCell.should.deep.equal(newCell);
})
})
describe('#getLivingCells()', function(){
var GOFMan = new GOFManagerClass(3, 3);
it('should return a list of living cells', function(){
var cellA = {'x' : 0, 'y' : 0};
var cellB = {'x' : 1, 'y' : 0};
GOFMan.addCell(cellA);
GOFMan.addCell(cellB);
var livingCells = GOFMan.getLivingCells();
livingCells.should.deep.equal([cellA, cellB]);
})
})
describe('#checkCell(pos)', function(){
var GOFMan = new GOFManagerClass(3, 3);
it('should return if a cell is alive or not', function(){
var cell = {'x' : 0, 'y' : 0};
GOFMan.addCell(cell);
var cellIsAlive = GOFMan.checkCell(cell);
var cell = {'x' : 0, 'y' : 1};
var cellIsDead = GOFMan.checkCell(cell);
expect(cellIsAlive).to.be.ok;
expect(cellIsDead).to.not.be.ok;
})
})
describe('#calculateNextGeneration()', function(){
it('Any live cell with fewer than two live neighbours dies', function(){
var GOFMan = new GOFManagerClass(3, 3);
var cellA = {'x' : 0, 'y' : 0};
var cellB = {'x' : 1, 'y' : 1};
GOFMan.addCell(cellA);
GOFMan.addCell(cellB);
GOFMan.calculateNextGeneration();
var cellMustBeDead = GOFMan.checkCell(cellA);
expect(cellMustBeDead).to.not.be.ok;
cellMustBeDead = GOFMan.checkCell(cellB);
expect(cellMustBeDead).to.not.be.ok;
});
it('Any live cell with more than three live neighbours dies', function(){
var GOFMan = new GOFManagerClass(3, 3);
var cellA = {'x' : 0, 'y' : 0};
var cellB = {'x' : 0, 'y' : 2};
var cellC = {'x' : 1, 'y' : 1};
var cellD = {'x' : 0, 'y' : 2};
var cellE = {'x' : 2, 'y' : 2};
GOFMan.addCell(cellA);
GOFMan.addCell(cellB);
GOFMan.addCell(cellC);
GOFMan.addCell(cellD);
GOFMan.addCell(cellE);
GOFMan.calculateNextGeneration();
var cellMustBeDead = GOFMan.checkCell(cellC);
expect(cellMustBeDead).to.not.be.ok;
});
it('Any live cell with two or three live neighbours lives', function(){
var GOFMan = new GOFManagerClass(3, 3);
var cellA = {'x' : 0, 'y' : 0};
var cellB = {'x' : 1, 'y' : 0};
var cellC = {'x' : 0, 'y' : 1};
GOFMan.addCell(cellA);
GOFMan.addCell(cellB);
GOFMan.addCell(cellC);
GOFMan.calculateNextGeneration();
var cellMustBeAlive = GOFMan.checkCell(cellA);
expect(cellMustBeAlive).to.be.ok;
});
it('Any dead cell with exactly three live neighbours becomes a live cell', function(){
var GOFMan = new GOFManagerClass(3, 3);
var cellA = {'x' : 0, 'y' : 0};
var cellB = {'x' : 0, 'y' : 2};
var cellC = {'x' : 2, 'y' : 0};
GOFMan.addCell(cellA);
GOFMan.addCell(cellB);
GOFMan.addCell(cellC);
GOFMan.calculateNextGeneration();
var newCell = {'x' : 1, 'y' : 1};
var cellMustBeAlive = GOFMan.checkCell(newCell);
expect(cellMustBeAlive).to.be.ok;
});
})
})
|
'use strict';
var PDF = require('pdfkit');
var utils = {};
var cmToPx = val => val * 0.393701 * 72;
var round = number => Math.max(Math.floor(number), 1);
utils.addText = (doc, text, start, end) => {
doc.text(text.substring(start, end), { continued: true });
};
utils.getDocument = options => {
var margin = 10;
if (Array.isArray(options.size)) {
options.size = [cmToPx(options.size[0]), cmToPx(options.size[1])];
margin = Math.min(options.size[0], options.size[1]) * 0.01;
} else {
options.size = 'A4';
}
// TODO: these need to alternate based on the page
options.margins = { top: margin, bottom: margin, right: margin, left: margin };
return new PDF(options).font('./font/SourceCodePro-Regular.ttf').fontSize(options.fontSize || 6);
};
utils.measure = (doc, text) => {
var pageWidth = doc.page.width;
var pageHeight = doc.page.height;
var opts = doc.options;
if (doc.options.margin) {
pageWidth -= opts.margin * 2;
pageHeight -= opts.margin * 2;
}else if (opts.margins) {
pageWidth -= ((opts.margins.left || 0) + (opts.margins.right || 0));
pageHeight -= ((opts.margins.top || 0) + (opts.margins.bottom || 0));
}
var characterWidth = doc.widthOfString(text.substring(0, 1));
var charactersPerLine = round(pageWidth / characterWidth);
var linesPerPage = round(pageHeight / doc.currentLineHeight());
return {
pageWidth: pageWidth,
pageHeight: pageHeight,
charactersPerLine: charactersPerLine,
linesPerPage: linesPerPage,
totalPages: Math.round(text.length / linesPerPage / charactersPerLine)
};
};
module.exports = utils;
|
const { presetWeb } = require('@fower/preset-web')
const { upFirst } = require('@fower/utils')
const { SemicolonPreference } = require('typescript')
const { join } = require('path')
const { Project } = require('ts-morph')
/** init somethings */
const project = new Project()
const cwd = process.cwd()
const outPath = join(cwd, 'types', 'index.d.ts')
const sourceFile = project.createSourceFile(outPath, undefined, {
overwrite: true,
})
/** add something to sourceFile */
sourceFile.addImportDeclarations([
{
namedImports: ['FowerPlugin', 'ResponsiveValue', 'ResponsiveBoolean'],
moduleSpecifier: '@fower/core',
},
])
sourceFile.addStatements(`import * as CSS from 'csstype'`)
sourceFile.addStatements('declare const _default: () => FowerPlugin')
sourceFile.addStatements('export default _default')
const typingModule = sourceFile.addModule({
name: `'@fower/atomic-props'`,
})
const entries = Object.entries(presetWeb?.theme?.shadows || {})
const properties = entries.map(([key, value]) => {
return {
name: 'shadow' + upFirst(key) + '?',
type: 'ResponsiveBoolean',
docs: [
{
description: [`set box shadow to ${key}`, '```css', `{ box-shadow: ${value};}`, '```'].join(
'\n',
),
tags: [
{
tagName: 'example',
text: ['\n', '```tsx', `<Box shadow${upFirst(key)}></Box>`, '```'],
},
{
tagName: 'see',
text: [`https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow`],
},
],
},
],
}
})
properties.unshift({
name: 'shadow?',
type: 'ResponsiveValue<string|boolean>',
docs: [
{
description: [`set box shadow`, '```css', `{ box-shadow: $value;}`, '```'].join('\n'),
tags: [
{
tagName: 'example',
text: [
'\n',
'```tsx',
`<Box shadow></Box>`,
`<Box shadow="0 0 0 1px rgba(0, 0, 0, 0.05)"></Box>`,
'```',
],
},
{
tagName: 'see',
text: [`https://developer.mozilla.org/en-US/docs/Web/CSS/box-shadow`],
},
],
},
],
})
typingModule.addInterface({
name: 'AtomicProps',
isExported: true,
properties,
})
/** format types code */
sourceFile.formatText({
indentSize: 2,
semicolons: SemicolonPreference.Remove,
})
/** save to file */
sourceFile.save().then(function () {
console.log('typing file created...')
})
|
/*!
* reveal.js
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2016 Hakim El Hattab, http://hakim.se
*/
(function( root, factory ) {
if( typeof define === 'function' && define.amd ) {
// AMD. Register as an anonymous module.
define( function() {
root.Reveal = factory();
return root.Reveal;
} );
} else if( typeof exports === 'object' ) {
// Node. Does not work with strict CommonJS.
module.exports = factory();
} else {
// Browser globals.
root.Reveal = factory();
}
}( this, function() {
'use strict';
var Reveal;
// The reveal.js version
var VERSION = '3.3.0';
var SLIDES_SELECTOR = '.slides section',
HORIZONTAL_SLIDES_SELECTOR = '.slides>section',
VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section',
HOME_SLIDE_SELECTOR = '.slides>section:first-of-type',
UA = navigator.userAgent,
// Configuration defaults, can be overridden at initialization time
config = {
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions
width: 960,
height: 700,
// Factor of the display size that should remain empty around the content
margin: 0.1,
// Bounds for smallest/largest possible scale to apply to content
minScale: 0.2,
maxScale: 1.5,
// Display controls in the bottom right corner
controls: true,
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: false,
// Push each slide change to the browser history
history: false,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Optional function that blocks keyboard events when retuning false
keyboardCondition: null,
// Enable the slide overview mode
overview: true,
// Vertical centering of slides
center: true,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if it should be possible to pause the presentation (blackout)
pause: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding (defaults to navigateNext)
autoSlideMethod: null,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// Apply a 3D roll to links on hover
rollingLinks: false,
// Hides the address bar on mobile devices
hideAddressBar: true,
// Opens links in an iframe preview overlay
previewLinks: false,
// Exposes the reveal.js API through window.postMessage
postMessage: true,
// Dispatches all reveal.js events to the parent window through postMessage
postMessageEvents: false,
// Focuses body when page changes visiblity to ensure keyboard shortcuts work
focusBodyOnPageVisibilityChange: true,
// Transition style
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Transition speed
transitionSpeed: 'default', // default/fast/slow
// Transition style for full page slide backgrounds
backgroundTransition: 'fade', // none/fade/slide/convex/concave/zoom
// Parallax background image
parallaxBackgroundImage: '', // CSS syntax, e.g. "a.jpg"
// Parallax background size
parallaxBackgroundSize: '', // CSS syntax, e.g. "3000px 2000px"
// Amount of pixels to move the parallax background per slide step
parallaxBackgroundHorizontal: null,
parallaxBackgroundVertical: null,
// Number of slides away from the current that are visible
viewDistance: 3,
// Script dependencies to load
dependencies: []
},
// Flags if reveal.js is loaded (has dispatched the 'ready' event)
loaded = false,
// Flags if the overview mode is currently active
overview = false,
// Holds the dimensions of our overview slides, including margins
overviewSlideWidth = null,
overviewSlideHeight = null,
// The horizontal and vertical index of the currently active slide
indexh,
indexv,
// The previous and current slide HTML elements
previousSlide,
currentSlide,
previousBackground,
// Slides may hold a data-state attribute which we pick up and apply
// as a class to the body. This list contains the combined state of
// all current slides.
state = [],
// The current scale of the presentation (see width/height config)
scale = 1,
// CSS transform that is currently applied to the slides container,
// split into two groups
slidesTransform = { layout: '', overview: '' },
// Cached references to DOM elements
dom = {},
// Features supported by the browser, see #checkCapabilities()
features = {},
// Client is a mobile device, see #checkCapabilities()
isMobileDevice,
// Client is a desktop Chrome, see #checkCapabilities()
isChrome,
// Throttles mouse wheel navigation
lastMouseWheelStep = 0,
// Delays updates to the URL due to a Chrome thumbnailer bug
writeURLTimeout = 0,
// Flags if the interaction event listeners are bound
eventsAreBound = false,
// The current auto-slide duration
autoSlide = 0,
// Auto slide properties
autoSlidePlayer,
autoSlideTimeout = 0,
autoSlideStartTime = -1,
autoSlidePaused = false,
// Holds information about the currently ongoing touch input
touch = {
startX: 0,
startY: 0,
startSpan: 0,
startCount: 0,
captured: false,
threshold: 40
},
// Holds information about the keyboard shortcuts
keyboardShortcuts = {
'N , SPACE': 'Next slide',
'P': 'Previous slide',
'← , H': 'Navigate left',
'→ , L': 'Navigate right',
'↑ , K': 'Navigate up',
'↓ , J': 'Navigate down',
'Home': 'First slide',
'End': 'Last slide',
'B , .': 'Pause',
'F': 'Fullscreen',
'ESC, O': 'Slide overview'
};
/**
* Starts up the presentation if the client is capable.
*/
function initialize( options ) {
checkCapabilities();
if( !features.transforms2d && !features.transforms3d ) {
document.body.setAttribute( 'class', 'no-transforms' );
// Since JS won't be running any further, we load all lazy
// loading elements upfront
var images = toArray( document.getElementsByTagName( 'img' ) ),
iframes = toArray( document.getElementsByTagName( 'iframe' ) );
var lazyLoadable = images.concat( iframes );
for( var i = 0, len = lazyLoadable.length; i < len; i++ ) {
var element = lazyLoadable[i];
if( element.getAttribute( 'data-src' ) ) {
element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
element.removeAttribute( 'data-src' );
}
}
// If the browser doesn't support core features we won't be
// using JavaScript to control the presentation
return;
}
// Cache references to key DOM elements
dom.wrapper = document.querySelector( '.reveal' );
dom.slides = document.querySelector( '.reveal .slides' );
// Force a layout when the whole page, incl fonts, has loaded
window.addEventListener( 'load', layout, false );
var query = Reveal.getQueryHash();
// Do not accept new dependencies via query config to avoid
// the potential of malicious script injection
if( typeof query['dependencies'] !== 'undefined' ) delete query['dependencies'];
// Copy options over to our config object
extend( config, options );
extend( config, query );
// Hide the address bar in mobile browsers
hideAddressBar();
// Loads the dependencies and continues to #start() once done
load();
}
/**
* Inspect the client to see what it's capable of, this
* should only happens once per runtime.
*/
function checkCapabilities() {
isMobileDevice = /(iphone|ipod|ipad|android)/gi.test( UA );
isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );
var testElement = document.createElement( 'div' );
features.transforms3d = 'WebkitPerspective' in testElement.style ||
'MozPerspective' in testElement.style ||
'msPerspective' in testElement.style ||
'OPerspective' in testElement.style ||
'perspective' in testElement.style;
features.transforms2d = 'WebkitTransform' in testElement.style ||
'MozTransform' in testElement.style ||
'msTransform' in testElement.style ||
'OTransform' in testElement.style ||
'transform' in testElement.style;
features.requestAnimationFrameMethod = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
features.requestAnimationFrame = typeof features.requestAnimationFrameMethod === 'function';
features.canvas = !!document.createElement( 'canvas' ).getContext;
// Transitions in the overview are disabled in desktop and
// Safari due to lag
features.overviewTransitions = !/Version\/[\d\.]+.*Safari/.test( UA );
// Flags if we should use zoom instead of transform to scale
// up slides. Zoom produces crisper results but has a lot of
// xbrowser quirks so we only use it in whitelsited browsers.
features.zoom = 'zoom' in testElement.style && !isMobileDevice &&
( isChrome || /Version\/[\d\.]+.*Safari/.test( UA ) );
}
/**
* Loads the dependencies of reveal.js. Dependencies are
* defined via the configuration option 'dependencies'
* and will be loaded prior to starting/binding reveal.js.
* Some dependencies may have an 'async' flag, if so they
* will load after reveal.js has been started up.
*/
function load() {
var scripts = [],
scriptsAsync = [],
scriptsToPreload = 0;
// Called once synchronous scripts finish loading
function proceed() {
if( scriptsAsync.length ) {
// Load asynchronous scripts
head.js.apply( null, scriptsAsync );
}
start();
}
function loadScript( s ) {
head.ready( s.src.match( /([\w\d_\-]*)\.?js$|[^\\\/]*$/i )[0], function() {
// Extension may contain callback functions
if( typeof s.callback === 'function' ) {
s.callback.apply( this );
}
if( --scriptsToPreload === 0 ) {
proceed();
}
});
}
for( var i = 0, len = config.dependencies.length; i < len; i++ ) {
var s = config.dependencies[i];
// Load if there's no condition or the condition is truthy
if( !s.condition || s.condition() ) {
if( s.async ) {
scriptsAsync.push( s.src );
}
else {
scripts.push( s.src );
}
loadScript( s );
}
}
if( scripts.length ) {
scriptsToPreload = scripts.length;
// Load synchronous scripts
head.js.apply( null, scripts );
}
else {
proceed();
}
}
/**
* Starts up reveal.js by binding input events and navigating
* to the current URL deeplink if there is one.
*/
function start() {
// Make sure we've got all the DOM elements we need
setupDOM();
// Listen to messages posted to this window
setupPostMessage();
// Prevent the slides from being scrolled out of view
setupScrollPrevention();
// Resets all vertical slides so that only the first is visible
resetVerticalSlides();
// Updates the presentation to match the current configuration values
configure();
// Read the initial hash
readURL();
// Update all backgrounds
updateBackground( true );
// Notify listeners that the presentation is ready but use a 1ms
// timeout to ensure it's not fired synchronously after #initialize()
setTimeout( function() {
// Enable transitions now that we're loaded
dom.slides.classList.remove( 'no-transition' );
loaded = true;
dispatchEvent( 'ready', {
'indexh': indexh,
'indexv': indexv,
'currentSlide': currentSlide
} );
}, 1 );
// Special setup and config is required when printing to PDF
if( isPrintingPDF() ) {
removeEventListeners();
// The document needs to have loaded for the PDF layout
// measurements to be accurate
if( document.readyState === 'complete' ) {
setupPDF();
}
else {
window.addEventListener( 'load', setupPDF );
}
}
}
/**
* Finds and stores references to DOM elements which are
* required by the presentation. If a required element is
* not found, it is created.
*/
function setupDOM() {
// Prevent transitions while we're loading
dom.slides.classList.add( 'no-transition' );
// Background element
dom.background = createSingletonNode( dom.wrapper, 'div', 'backgrounds', null );
// Progress bar
dom.progress = createSingletonNode( dom.wrapper, 'div', 'progress', '<span></span>' );
dom.progressbar = dom.progress.querySelector( 'span' );
// Arrow controls
createSingletonNode( dom.wrapper, 'aside', 'controls',
'<button class="navigate-left" aria-label="previous slide"></button>' +
'<button class="navigate-right" aria-label="next slide"></button>' +
'<button class="navigate-up" aria-label="above slide"></button>' +
'<button class="navigate-down" aria-label="below slide"></button>' );
// Slide number
dom.slideNumber = createSingletonNode( dom.wrapper, 'div', 'slide-number', '' );
// Element containing notes that are visible to the audience
dom.speakerNotes = createSingletonNode( dom.wrapper, 'div', 'speaker-notes', null );
dom.speakerNotes.setAttribute( 'data-prevent-swipe', '' );
// Overlay graphic which is displayed during the paused mode
createSingletonNode( dom.wrapper, 'div', 'pause-overlay', null );
// Cache references to elements
dom.controls = document.querySelector( '.reveal .controls' );
dom.theme = document.querySelector( '#theme' );
dom.wrapper.setAttribute( 'role', 'application' );
// There can be multiple instances of controls throughout the page
dom.controlsLeft = toArray( document.querySelectorAll( '.navigate-left' ) );
dom.controlsRight = toArray( document.querySelectorAll( '.navigate-right' ) );
dom.controlsUp = toArray( document.querySelectorAll( '.navigate-up' ) );
dom.controlsDown = toArray( document.querySelectorAll( '.navigate-down' ) );
dom.controlsPrev = toArray( document.querySelectorAll( '.navigate-prev' ) );
dom.controlsNext = toArray( document.querySelectorAll( '.navigate-next' ) );
dom.statusDiv = createStatusDiv();
}
/**
* Creates a hidden div with role aria-live to announce the
* current slide content. Hide the div off-screen to make it
* available only to Assistive Technologies.
*/
function createStatusDiv() {
var statusDiv = document.getElementById( 'aria-status-div' );
if( !statusDiv ) {
statusDiv = document.createElement( 'div' );
statusDiv.style.position = 'absolute';
statusDiv.style.height = '1px';
statusDiv.style.width = '1px';
statusDiv.style.overflow ='hidden';
statusDiv.style.clip = 'rect( 1px, 1px, 1px, 1px )';
statusDiv.setAttribute( 'id', 'aria-status-div' );
statusDiv.setAttribute( 'aria-live', 'polite' );
statusDiv.setAttribute( 'aria-atomic','true' );
dom.wrapper.appendChild( statusDiv );
}
return statusDiv;
}
/**
* Configures the presentation for printing to a static
* PDF.
*/
function setupPDF() {
var slideSize = getComputedSlideSize( window.innerWidth, window.innerHeight );
// Dimensions of the PDF pages
var pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ),
pageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) );
// Dimensions of slides within the pages
var slideWidth = slideSize.width,
slideHeight = slideSize.height;
// Let the browser know what page size we want to print
injectStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0;}' );
// Limit the size of certain elements to the dimensions of the slide
injectStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );
document.body.classList.add( 'print-pdf' );
document.body.style.width = pageWidth + 'px';
document.body.style.height = pageHeight + 'px';
// Add each slide's index as attributes on itself, we need these
// indices to generate slide numbers below
toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) {
hslide.setAttribute( 'data-index-h', h );
if( hslide.classList.contains( 'stack' ) ) {
toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) {
vslide.setAttribute( 'data-index-h', h );
vslide.setAttribute( 'data-index-v', v );
} );
}
} );
// Slide and slide background layout
toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) {
// Vertical stacks are not centred since their section
// children will be
if( slide.classList.contains( 'stack' ) === false ) {
// Center the slide inside of the page, giving the slide some margin
var left = ( pageWidth - slideWidth ) / 2,
top = ( pageHeight - slideHeight ) / 2;
var contentHeight = getAbsoluteHeight( slide );
var numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );
// Center slides vertically
if( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {
top = Math.max( ( pageHeight - contentHeight ) / 2, 0 );
}
// Position the slide inside of the page
slide.style.left = left + 'px';
slide.style.top = top + 'px';
slide.style.width = slideWidth + 'px';
// TODO Backgrounds need to be multiplied when the slide
// stretches over multiple pages
var background = slide.querySelector( '.slide-background' );
if( background ) {
background.style.width = pageWidth + 'px';
background.style.height = ( pageHeight * numberOfPages ) + 'px';
background.style.top = -top + 'px';
background.style.left = -left + 'px';
}
// Inject notes if `showNotes` is enabled
if( config.showNotes ) {
var notes = getSlideNotes( slide );
if( notes ) {
var notesSpacing = 8;
var notesElement = document.createElement( 'div' );
notesElement.classList.add( 'speaker-notes' );
notesElement.classList.add( 'speaker-notes-pdf' );
notesElement.innerHTML = notes;
notesElement.style.left = ( notesSpacing - left ) + 'px';
notesElement.style.bottom = ( notesSpacing - top ) + 'px';
notesElement.style.width = ( pageWidth - notesSpacing*2 ) + 'px';
slide.appendChild( notesElement );
}
}
// Inject slide numbers if `slideNumbers` are enabled
if( config.slideNumber ) {
var slideNumberH = parseInt( slide.getAttribute( 'data-index-h' ), 10 ) + 1,
slideNumberV = parseInt( slide.getAttribute( 'data-index-v' ), 10 ) + 1;
var numberElement = document.createElement( 'div' );
numberElement.classList.add( 'slide-number' );
numberElement.classList.add( 'slide-number-pdf' );
numberElement.innerHTML = formatSlideNumber( slideNumberH, '.', slideNumberV );
background.appendChild( numberElement );
}
}
} );
// Show all fragments
toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' .fragment' ) ).forEach( function( fragment ) {
fragment.classList.add( 'visible' );
} );
}
/**
* This is an unfortunate necessity. Some actions – such as
* an input field being focused in an iframe or using the
* keyboard to expand text selection beyond the bounds of
* a slide – can trigger our content to be pushed out of view.
* This scrolling can not be prevented by hiding overflow in
* CSS (we already do) so we have to resort to repeatedly
* checking if the slides have been offset :(
*/
function setupScrollPrevention() {
setInterval( function() {
if( dom.wrapper.scrollTop !== 0 || dom.wrapper.scrollLeft !== 0 ) {
dom.wrapper.scrollTop = 0;
dom.wrapper.scrollLeft = 0;
}
}, 1000 );
}
/**
* Creates an HTML element and returns a reference to it.
* If the element already exists the existing instance will
* be returned.
*/
function createSingletonNode( container, tagname, classname, innerHTML ) {
// Find all nodes matching the description
var nodes = container.querySelectorAll( '.' + classname );
// Check all matches to find one which is a direct child of
// the specified container
for( var i = 0; i < nodes.length; i++ ) {
var testNode = nodes[i];
if( testNode.parentNode === container ) {
return testNode;
}
}
// If no node was found, create it now
var node = document.createElement( tagname );
node.classList.add( classname );
if( typeof innerHTML === 'string' ) {
node.innerHTML = innerHTML;
}
container.appendChild( node );
return node;
}
/**
* Creates the slide background elements and appends them
* to the background container. One element is created per
* slide no matter if the given slide has visible background.
*/
function createBackgrounds() {
var printMode = isPrintingPDF();
// Clear prior backgrounds
dom.background.innerHTML = '';
dom.background.classList.add( 'no-transition' );
// Iterate over all horizontal slides
toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( slideh ) {
var backgroundStack;
if( printMode ) {
backgroundStack = createBackground( slideh, slideh );
}
else {
backgroundStack = createBackground( slideh, dom.background );
}
// Iterate over all vertical slides
toArray( slideh.querySelectorAll( 'section' ) ).forEach( function( slidev ) {
if( printMode ) {
createBackground( slidev, slidev );
}
else {
createBackground( slidev, backgroundStack );
}
backgroundStack.classList.add( 'stack' );
} );
} );
// Add parallax background if specified
if( config.parallaxBackgroundImage ) {
dom.background.style.backgroundImage = 'url("' + config.parallaxBackgroundImage + '")';
dom.background.style.backgroundSize = config.parallaxBackgroundSize;
// Make sure the below properties are set on the element - these properties are
// needed for proper transitions to be set on the element via CSS. To remove
// annoying background slide-in effect when the presentation starts, apply
// these properties after short time delay
setTimeout( function() {
dom.wrapper.classList.add( 'has-parallax-background' );
}, 1 );
}
else {
dom.background.style.backgroundImage = '';
dom.wrapper.classList.remove( 'has-parallax-background' );
}
}
/**
* Creates a background for the given slide.
*
* @param {HTMLElement} slide
* @param {HTMLElement} container The element that the background
* should be appended to
*/
function createBackground( slide, container ) {
var data = {
background: slide.getAttribute( 'data-background' ),
backgroundSize: slide.getAttribute( 'data-background-size' ),
backgroundImage: slide.getAttribute( 'data-background-image' ),
backgroundVideo: slide.getAttribute( 'data-background-video' ),
backgroundIframe: slide.getAttribute( 'data-background-iframe' ),
backgroundColor: slide.getAttribute( 'data-background-color' ),
backgroundRepeat: slide.getAttribute( 'data-background-repeat' ),
backgroundPosition: slide.getAttribute( 'data-background-position' ),
backgroundTransition: slide.getAttribute( 'data-background-transition' )
};
var element = document.createElement( 'div' );
// Carry over custom classes from the slide to the background
element.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' );
if( data.background ) {
// Auto-wrap image urls in url(...)
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) {
slide.setAttribute( 'data-background-image', data.background );
}
else {
element.style.background = data.background;
}
}
// Create a hash for this combination of background settings.
// This is used to determine when two slide backgrounds are
// the same.
if( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) {
element.setAttribute( 'data-background-hash', data.background +
data.backgroundSize +
data.backgroundImage +
data.backgroundVideo +
data.backgroundIframe +
data.backgroundColor +
data.backgroundRepeat +
data.backgroundPosition +
data.backgroundTransition );
}
// Additional and optional background properties
if( data.backgroundSize ) element.style.backgroundSize = data.backgroundSize;
if( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;
if( data.backgroundRepeat ) element.style.backgroundRepeat = data.backgroundRepeat;
if( data.backgroundPosition ) element.style.backgroundPosition = data.backgroundPosition;
if( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );
container.appendChild( element );
// If backgrounds are being recreated, clear old classes
slide.classList.remove( 'has-dark-background' );
slide.classList.remove( 'has-light-background' );
// If this slide has a background color, add a class that
// signals if it is light or dark. If the slide has no background
// color, no class will be set
var computedBackgroundColor = window.getComputedStyle( element ).backgroundColor;
if( computedBackgroundColor ) {
var rgb = colorToRgb( computedBackgroundColor );
// Ignore fully transparent backgrounds. Some browsers return
// rgba(0,0,0,0) when reading the computed background color of
// an element with no background
if( rgb && rgb.a !== 0 ) {
if( colorBrightness( computedBackgroundColor ) < 128 ) {
slide.classList.add( 'has-dark-background' );
}
else {
slide.classList.add( 'has-light-background' );
}
}
}
return element;
}
/**
* Registers a listener to postMessage events, this makes it
* possible to call all reveal.js API methods from another
* window. For example:
*
* revealWindow.postMessage( JSON.stringify({
* method: 'slide',
* args: [ 2 ]
* }), '*' );
*/
function setupPostMessage() {
if( config.postMessage ) {
window.addEventListener( 'message', function ( event ) {
var data = event.data;
// Make sure we're dealing with JSON
if( typeof data === 'string' && data.charAt( 0 ) === '{' && data.charAt( data.length - 1 ) === '}' ) {
data = JSON.parse( data );
// Check if the requested method can be found
if( data.method && typeof Reveal[data.method] === 'function' ) {
Reveal[data.method].apply( Reveal, data.args );
}
}
}, false );
}
}
/**
* Applies the configuration settings from the config
* object. May be called multiple times.
*/
function configure( options ) {
var numberOfSlides = dom.wrapper.querySelectorAll( SLIDES_SELECTOR ).length;
dom.wrapper.classList.remove( config.transition );
// New config options may be passed when this method
// is invoked through the API after initialization
if( typeof options === 'object' ) extend( config, options );
// Force linear transition based on browser capabilities
if( features.transforms3d === false ) config.transition = 'linear';
dom.wrapper.classList.add( config.transition );
dom.wrapper.setAttribute( 'data-transition-speed', config.transitionSpeed );
dom.wrapper.setAttribute( 'data-background-transition', config.backgroundTransition );
dom.controls.style.display = config.controls ? 'block' : 'none';
dom.progress.style.display = config.progress ? 'block' : 'none';
dom.slideNumber.style.display = config.slideNumber && !isPrintingPDF() ? 'block' : 'none';
if( config.shuffle ) {
shuffle();
}
if( config.rtl ) {
dom.wrapper.classList.add( 'rtl' );
}
else {
dom.wrapper.classList.remove( 'rtl' );
}
if( config.center ) {
dom.wrapper.classList.add( 'center' );
}
else {
dom.wrapper.classList.remove( 'center' );
}
// Exit the paused mode if it was configured off
if( config.pause === false ) {
resume();
}
if( config.showNotes ) {
dom.speakerNotes.classList.add( 'visible' );
}
else {
dom.speakerNotes.classList.remove( 'visible' );
}
if( config.mouseWheel ) {
document.addEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF
document.addEventListener( 'mousewheel', onDocumentMouseScroll, false );
}
else {
document.removeEventListener( 'DOMMouseScroll', onDocumentMouseScroll, false ); // FF
document.removeEventListener( 'mousewheel', onDocumentMouseScroll, false );
}
// Rolling 3D links
if( config.rollingLinks ) {
enableRollingLinks();
}
else {
disableRollingLinks();
}
// Iframe link previews
if( config.previewLinks ) {
enablePreviewLinks();
}
else {
disablePreviewLinks();
enablePreviewLinks( '[data-preview-link]' );
}
// Remove existing auto-slide controls
if( autoSlidePlayer ) {
autoSlidePlayer.destroy();
autoSlidePlayer = null;
}
// Generate auto-slide controls if needed
if( numberOfSlides > 1 && config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame ) {
autoSlidePlayer = new Playback( dom.wrapper, function() {
return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 );
} );
autoSlidePlayer.on( 'click', onAutoSlidePlayerClick );
autoSlidePaused = false;
}
// When fragments are turned off they should be visible
if( config.fragments === false ) {
toArray( dom.slides.querySelectorAll( '.fragment' ) ).forEach( function( element ) {
element.classList.add( 'visible' );
element.classList.remove( 'current-fragment' );
} );
}
sync();
}
/**
* Binds all event listeners.
*/
function addEventListeners() {
eventsAreBound = true;
window.addEventListener( 'hashchange', onWindowHashChange, false );
window.addEventListener( 'resize', onWindowResize, false );
if( config.touch ) {
dom.wrapper.addEventListener( 'touchstart', onTouchStart, false );
dom.wrapper.addEventListener( 'touchmove', onTouchMove, false );
dom.wrapper.addEventListener( 'touchend', onTouchEnd, false );
// Support pointer-style touch interaction as well
if( window.navigator.pointerEnabled ) {
// IE 11 uses un-prefixed version of pointer events
dom.wrapper.addEventListener( 'pointerdown', onPointerDown, false );
dom.wrapper.addEventListener( 'pointermove', onPointerMove, false );
dom.wrapper.addEventListener( 'pointerup', onPointerUp, false );
}
else if( window.navigator.msPointerEnabled ) {
// IE 10 uses prefixed version of pointer events
dom.wrapper.addEventListener( 'MSPointerDown', onPointerDown, false );
dom.wrapper.addEventListener( 'MSPointerMove', onPointerMove, false );
dom.wrapper.addEventListener( 'MSPointerUp', onPointerUp, false );
}
}
if( config.keyboard ) {
document.addEventListener( 'keydown', onDocumentKeyDown, false );
document.addEventListener( 'keypress', onDocumentKeyPress, false );
}
if( config.progress && dom.progress ) {
dom.progress.addEventListener( 'click', onProgressClicked, false );
}
if( config.focusBodyOnPageVisibilityChange ) {
var visibilityChange;
if( 'hidden' in document ) {
visibilityChange = 'visibilitychange';
}
else if( 'msHidden' in document ) {
visibilityChange = 'msvisibilitychange';
}
else if( 'webkitHidden' in document ) {
visibilityChange = 'webkitvisibilitychange';
}
if( visibilityChange ) {
document.addEventListener( visibilityChange, onPageVisibilityChange, false );
}
}
// Listen to both touch and click events, in case the device
// supports both
var pointerEvents = [ 'touchstart', 'click' ];
// Only support touch for Android, fixes double navigations in
// stock browser
if( UA.match( /android/gi ) ) {
pointerEvents = [ 'touchstart' ];
}
pointerEvents.forEach( function( eventName ) {
dom.controlsLeft.forEach( function( el ) { el.addEventListener( eventName, onNavigateLeftClicked, false ); } );
dom.controlsRight.forEach( function( el ) { el.addEventListener( eventName, onNavigateRightClicked, false ); } );
dom.controlsUp.forEach( function( el ) { el.addEventListener( eventName, onNavigateUpClicked, false ); } );
dom.controlsDown.forEach( function( el ) { el.addEventListener( eventName, onNavigateDownClicked, false ); } );
dom.controlsPrev.forEach( function( el ) { el.addEventListener( eventName, onNavigatePrevClicked, false ); } );
dom.controlsNext.forEach( function( el ) { el.addEventListener( eventName, onNavigateNextClicked, false ); } );
} );
}
/**
* Unbinds all event listeners.
*/
function removeEventListeners() {
eventsAreBound = false;
document.removeEventListener( 'keydown', onDocumentKeyDown, false );
document.removeEventListener( 'keypress', onDocumentKeyPress, false );
window.removeEventListener( 'hashchange', onWindowHashChange, false );
window.removeEventListener( 'resize', onWindowResize, false );
dom.wrapper.removeEventListener( 'touchstart', onTouchStart, false );
dom.wrapper.removeEventListener( 'touchmove', onTouchMove, false );
dom.wrapper.removeEventListener( 'touchend', onTouchEnd, false );
// IE11
if( window.navigator.pointerEnabled ) {
dom.wrapper.removeEventListener( 'pointerdown', onPointerDown, false );
dom.wrapper.removeEventListener( 'pointermove', onPointerMove, false );
dom.wrapper.removeEventListener( 'pointerup', onPointerUp, false );
}
// IE10
else if( window.navigator.msPointerEnabled ) {
dom.wrapper.removeEventListener( 'MSPointerDown', onPointerDown, false );
dom.wrapper.removeEventListener( 'MSPointerMove', onPointerMove, false );
dom.wrapper.removeEventListener( 'MSPointerUp', onPointerUp, false );
}
if ( config.progress && dom.progress ) {
dom.progress.removeEventListener( 'click', onProgressClicked, false );
}
[ 'touchstart', 'click' ].forEach( function( eventName ) {
dom.controlsLeft.forEach( function( el ) { el.removeEventListener( eventName, onNavigateLeftClicked, false ); } );
dom.controlsRight.forEach( function( el ) { el.removeEventListener( eventName, onNavigateRightClicked, false ); } );
dom.controlsUp.forEach( function( el ) { el.removeEventListener( eventName, onNavigateUpClicked, false ); } );
dom.controlsDown.forEach( function( el ) { el.removeEventListener( eventName, onNavigateDownClicked, false ); } );
dom.controlsPrev.forEach( function( el ) { el.removeEventListener( eventName, onNavigatePrevClicked, false ); } );
dom.controlsNext.forEach( function( el ) { el.removeEventListener( eventName, onNavigateNextClicked, false ); } );
} );
}
/**
* Extend object a with the properties of object b.
* If there's a conflict, object b takes precedence.
*/
function extend( a, b ) {
for( var i in b ) {
a[ i ] = b[ i ];
}
}
/**
* Converts the target object to an array.
*/
function toArray( o ) {
return Array.prototype.slice.call( o );
}
/**
* Utility for deserializing a value.
*/
function deserialize( value ) {
if( typeof value === 'string' ) {
if( value === 'null' ) return null;
else if( value === 'true' ) return true;
else if( value === 'false' ) return false;
else if( value.match( /^\d+$/ ) ) return parseFloat( value );
}
return value;
}
/**
* Measures the distance in pixels between point a
* and point b.
*
* @param {Object} a point with x/y properties
* @param {Object} b point with x/y properties
*/
function distanceBetween( a, b ) {
var dx = a.x - b.x,
dy = a.y - b.y;
return Math.sqrt( dx*dx + dy*dy );
}
/**
* Applies a CSS transform to the target element.
*/
function transformElement( element, transform ) {
element.style.WebkitTransform = transform;
element.style.MozTransform = transform;
element.style.msTransform = transform;
element.style.transform = transform;
}
/**
* Applies CSS transforms to the slides container. The container
* is transformed from two separate sources: layout and the overview
* mode.
*/
function transformSlides( transforms ) {
// Pick up new transforms from arguments
if( typeof transforms.layout === 'string' ) slidesTransform.layout = transforms.layout;
if( typeof transforms.overview === 'string' ) slidesTransform.overview = transforms.overview;
// Apply the transforms to the slides container
if( slidesTransform.layout ) {
transformElement( dom.slides, slidesTransform.layout + ' ' + slidesTransform.overview );
}
else {
transformElement( dom.slides, slidesTransform.overview );
}
}
/**
* Injects the given CSS styles into the DOM.
*/
function injectStyleSheet( value ) {
var tag = document.createElement( 'style' );
tag.type = 'text/css';
if( tag.styleSheet ) {
tag.styleSheet.cssText = value;
}
else {
tag.appendChild( document.createTextNode( value ) );
}
document.getElementsByTagName( 'head' )[0].appendChild( tag );
}
/**
* Converts various color input formats to an {r:0,g:0,b:0} object.
*
* @param {String} color The string representation of a color,
* the following formats are supported:
* - #000
* - #000000
* - rgb(0,0,0)
*/
function colorToRgb( color ) {
var hex3 = color.match( /^#([0-9a-f]{3})$/i );
if( hex3 && hex3[1] ) {
hex3 = hex3[1];
return {
r: parseInt( hex3.charAt( 0 ), 16 ) * 0x11,
g: parseInt( hex3.charAt( 1 ), 16 ) * 0x11,
b: parseInt( hex3.charAt( 2 ), 16 ) * 0x11
};
}
var hex6 = color.match( /^#([0-9a-f]{6})$/i );
if( hex6 && hex6[1] ) {
hex6 = hex6[1];
return {
r: parseInt( hex6.substr( 0, 2 ), 16 ),
g: parseInt( hex6.substr( 2, 2 ), 16 ),
b: parseInt( hex6.substr( 4, 2 ), 16 )
};
}
var rgb = color.match( /^rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i );
if( rgb ) {
return {
r: parseInt( rgb[1], 10 ),
g: parseInt( rgb[2], 10 ),
b: parseInt( rgb[3], 10 )
};
}
var rgba = color.match( /^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i );
if( rgba ) {
return {
r: parseInt( rgba[1], 10 ),
g: parseInt( rgba[2], 10 ),
b: parseInt( rgba[3], 10 ),
a: parseFloat( rgba[4] )
};
}
return null;
}
/**
* Calculates brightness on a scale of 0-255.
*
* @param color See colorStringToRgb for supported formats.
*/
function colorBrightness( color ) {
if( typeof color === 'string' ) color = colorToRgb( color );
if( color ) {
return ( color.r * 299 + color.g * 587 + color.b * 114 ) / 1000;
}
return null;
}
/**
* Retrieves the height of the given element by looking
* at the position and height of its immediate children.
*/
function getAbsoluteHeight( element ) {
var height = 0;
if( element ) {
var absoluteChildren = 0;
toArray( element.childNodes ).forEach( function( child ) {
if( typeof child.offsetTop === 'number' && child.style ) {
// Count # of abs children
if( window.getComputedStyle( child ).position === 'absolute' ) {
absoluteChildren += 1;
}
height = Math.max( height, child.offsetTop + child.offsetHeight );
}
} );
// If there are no absolute children, use offsetHeight
if( absoluteChildren === 0 ) {
height = element.offsetHeight;
}
}
return height;
}
/**
* Returns the remaining height within the parent of the
* target element.
*
* remaining height = [ configured parent height ] - [ current parent height ]
*/
function getRemainingHeight( element, height ) {
height = height || 0;
if( element ) {
var newHeight, oldHeight = element.style.height;
// Change the .stretch element height to 0 in order find the height of all
// the other elements
element.style.height = '0px';
newHeight = height - element.parentNode.offsetHeight;
// Restore the old height, just in case
element.style.height = oldHeight + 'px';
return newHeight;
}
return height;
}
/**
* Checks if this instance is being used to print a PDF.
*/
function isPrintingPDF() {
return ( /print-pdf/gi ).test( window.location.search );
}
/**
* Hides the address bar if we're on a mobile device.
*/
function hideAddressBar() {
if( config.hideAddressBar && isMobileDevice ) {
// Events that should trigger the address bar to hide
window.addEventListener( 'load', removeAddressBar, false );
window.addEventListener( 'orientationchange', removeAddressBar, false );
}
}
/**
* Causes the address bar to hide on mobile devices,
* more vertical space ftw.
*/
function removeAddressBar() {
setTimeout( function() {
window.scrollTo( 0, 1 );
}, 10 );
}
/**
* Dispatches an event of the specified type from the
* reveal DOM element.
*/
function dispatchEvent( type, args ) {
var event = document.createEvent( 'HTMLEvents', 1, 2 );
event.initEvent( type, true, true );
extend( event, args );
dom.wrapper.dispatchEvent( event );
// If we're in an iframe, post each reveal.js event to the
// parent window. Used by the notes plugin
if( config.postMessageEvents && window.parent !== window.self ) {
window.parent.postMessage( JSON.stringify({ namespace: 'reveal', eventName: type, state: getState() }), '*' );
}
}
/**
* Wrap all links in 3D goodness.
*/
function enableRollingLinks() {
if( features.transforms3d && !( 'msPerspective' in document.body.style ) ) {
var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a' );
for( var i = 0, len = anchors.length; i < len; i++ ) {
var anchor = anchors[i];
if( anchor.textContent && !anchor.querySelector( '*' ) && ( !anchor.className || !anchor.classList.contains( anchor, 'roll' ) ) ) {
var span = document.createElement('span');
span.setAttribute('data-title', anchor.text);
span.innerHTML = anchor.innerHTML;
anchor.classList.add( 'roll' );
anchor.innerHTML = '';
anchor.appendChild(span);
}
}
}
}
/**
* Unwrap all 3D links.
*/
function disableRollingLinks() {
var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a.roll' );
for( var i = 0, len = anchors.length; i < len; i++ ) {
var anchor = anchors[i];
var span = anchor.querySelector( 'span' );
if( span ) {
anchor.classList.remove( 'roll' );
anchor.innerHTML = span.innerHTML;
}
}
}
/**
* Bind preview frame links.
*/
function enablePreviewLinks( selector ) {
var anchors = toArray( document.querySelectorAll( selector ? selector : 'a' ) );
anchors.forEach( function( element ) {
if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) {
element.addEventListener( 'click', onPreviewLinkClicked, false );
}
} );
}
/**
* Unbind preview frame links.
*/
function disablePreviewLinks() {
var anchors = toArray( document.querySelectorAll( 'a' ) );
anchors.forEach( function( element ) {
if( /^(http|www)/gi.test( element.getAttribute( 'href' ) ) ) {
element.removeEventListener( 'click', onPreviewLinkClicked, false );
}
} );
}
/**
* Opens a preview window for the target URL.
*/
function showPreview( url ) {
closeOverlay();
dom.overlay = document.createElement( 'div' );
dom.overlay.classList.add( 'overlay' );
dom.overlay.classList.add( 'overlay-preview' );
dom.wrapper.appendChild( dom.overlay );
dom.overlay.innerHTML = [
'<header>',
'<a class="close" href="#"><span class="icon"></span></a>',
'<a class="external" href="'+ url +'" target="_blank"><span class="icon"></span></a>',
'</header>',
'<div class="spinner"></div>',
'<div class="viewport">',
'<iframe src="'+ url +'"></iframe>',
'</div>'
].join('');
dom.overlay.querySelector( 'iframe' ).addEventListener( 'load', function( event ) {
dom.overlay.classList.add( 'loaded' );
}, false );
dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) {
closeOverlay();
event.preventDefault();
}, false );
dom.overlay.querySelector( '.external' ).addEventListener( 'click', function( event ) {
closeOverlay();
}, false );
setTimeout( function() {
dom.overlay.classList.add( 'visible' );
}, 1 );
}
/**
* Opens a overlay window with help material.
*/
function showHelp() {
if( config.help ) {
closeOverlay();
dom.overlay = document.createElement( 'div' );
dom.overlay.classList.add( 'overlay' );
dom.overlay.classList.add( 'overlay-help' );
dom.wrapper.appendChild( dom.overlay );
var html = '<p class="title">Keyboard Shortcuts</p><br/>';
html += '<table><th>KEY</th><th>ACTION</th>';
for( var key in keyboardShortcuts ) {
html += '<tr><td>' + key + '</td><td>' + keyboardShortcuts[ key ] + '</td></tr>';
}
html += '</table>';
dom.overlay.innerHTML = [
'<header>',
'<a class="close" href="#"><span class="icon"></span></a>',
'</header>',
'<div class="viewport">',
'<div class="viewport-inner">'+ html +'</div>',
'</div>'
].join('');
dom.overlay.querySelector( '.close' ).addEventListener( 'click', function( event ) {
closeOverlay();
event.preventDefault();
}, false );
setTimeout( function() {
dom.overlay.classList.add( 'visible' );
}, 1 );
}
}
/**
* Closes any currently open overlay.
*/
function closeOverlay() {
if( dom.overlay ) {
dom.overlay.parentNode.removeChild( dom.overlay );
dom.overlay = null;
}
}
/**
* Applies JavaScript-controlled layout rules to the
* presentation.
*/
function layout() {
if( dom.wrapper && !isPrintingPDF() ) {
var size = getComputedSlideSize();
var slidePadding = 20; // TODO Dig this out of DOM
// Layout the contents of the slides
layoutSlideContents( config.width, config.height, slidePadding );
dom.slides.style.width = size.width + 'px';
dom.slides.style.height = size.height + 'px';
// Determine scale of content to fit within available space
scale = Math.min( size.presentationWidth / size.width, size.presentationHeight / size.height );
// Respect max/min scale settings
scale = Math.max( scale, config.minScale );
scale = Math.min( scale, config.maxScale );
// Don't apply any scaling styles if scale is 1
if( scale === 1 ) {
dom.slides.style.zoom = '';
dom.slides.style.left = '';
dom.slides.style.top = '';
dom.slides.style.bottom = '';
dom.slides.style.right = '';
transformSlides( { layout: '' } );
}
else {
// Prefer zoom for scaling up so that content remains crisp.
// Don't use zoom to scale down since that can lead to shifts
// in text layout/line breaks.
if( scale > 1 && features.zoom ) {
dom.slides.style.zoom = scale;
dom.slides.style.left = '';
dom.slides.style.top = '';
dom.slides.style.bottom = '';
dom.slides.style.right = '';
transformSlides( { layout: '' } );
}
// Apply scale transform as a fallback
else {
dom.slides.style.zoom = '';
dom.slides.style.left = '50%';
dom.slides.style.top = '50%';
dom.slides.style.bottom = 'auto';
dom.slides.style.right = 'auto';
transformSlides( { layout: 'translate(-50%, -50%) scale('+ scale +')' } );
}
}
// Select all slides, vertical and horizontal
var slides = toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) );
for( var i = 0, len = slides.length; i < len; i++ ) {
var slide = slides[ i ];
// Don't bother updating invisible slides
if( slide.style.display === 'none' ) {
continue;
}
if( config.center || slide.classList.contains( 'center' ) ) {
// Vertical stacks are not centred since their section
// children will be
if( slide.classList.contains( 'stack' ) ) {
slide.style.top = 0;
}
else {
slide.style.top = Math.max( ( ( size.height - getAbsoluteHeight( slide ) ) / 2 ) - slidePadding, 0 ) + 'px';
}
}
else {
slide.style.top = '';
}
}
updateProgress();
updateParallax();
}
}
/**
* Applies layout logic to the contents of all slides in
* the presentation.
*/
function layoutSlideContents( width, height, padding ) {
// Handle sizing of elements with the 'stretch' class
toArray( dom.slides.querySelectorAll( 'section > .stretch' ) ).forEach( function( element ) {
// Determine how much vertical space we can use
var remainingHeight = getRemainingHeight( element, height );
// Consider the aspect ratio of media elements
if( /(img|video)/gi.test( element.nodeName ) ) {
var nw = element.naturalWidth || element.videoWidth,
nh = element.naturalHeight || element.videoHeight;
var es = Math.min( width / nw, remainingHeight / nh );
element.style.width = ( nw * es ) + 'px';
element.style.height = ( nh * es ) + 'px';
}
else {
element.style.width = width + 'px';
element.style.height = remainingHeight + 'px';
}
} );
}
/**
* Calculates the computed pixel size of our slides. These
* values are based on the width and height configuration
* options.
*/
function getComputedSlideSize( presentationWidth, presentationHeight ) {
var size = {
// Slide size
width: config.width,
height: config.height,
// Presentation size
presentationWidth: presentationWidth || dom.wrapper.offsetWidth,
presentationHeight: presentationHeight || dom.wrapper.offsetHeight
};
// Reduce available space by margin
size.presentationWidth -= ( size.presentationWidth * config.margin );
size.presentationHeight -= ( size.presentationHeight * config.margin );
// Slide width may be a percentage of available width
if( typeof size.width === 'string' && /%$/.test( size.width ) ) {
size.width = parseInt( size.width, 10 ) / 100 * size.presentationWidth;
}
// Slide height may be a percentage of available height
if( typeof size.height === 'string' && /%$/.test( size.height ) ) {
size.height = parseInt( size.height, 10 ) / 100 * size.presentationHeight;
}
return size;
}
/**
* Stores the vertical index of a stack so that the same
* vertical slide can be selected when navigating to and
* from the stack.
*
* @param {HTMLElement} stack The vertical stack element
* @param {int} v Index to memorize
*/
function setPreviousVerticalIndex( stack, v ) {
if( typeof stack === 'object' && typeof stack.setAttribute === 'function' ) {
stack.setAttribute( 'data-previous-indexv', v || 0 );
}
}
/**
* Retrieves the vertical index which was stored using
* #setPreviousVerticalIndex() or 0 if no previous index
* exists.
*
* @param {HTMLElement} stack The vertical stack element
*/
function getPreviousVerticalIndex( stack ) {
if( typeof stack === 'object' && typeof stack.setAttribute === 'function' && stack.classList.contains( 'stack' ) ) {
// Prefer manually defined start-indexv
var attributeName = stack.hasAttribute( 'data-start-indexv' ) ? 'data-start-indexv' : 'data-previous-indexv';
return parseInt( stack.getAttribute( attributeName ) || 0, 10 );
}
return 0;
}
/**
* Displays the overview of slides (quick nav) by scaling
* down and arranging all slide elements.
*/
function activateOverview() {
// Only proceed if enabled in config
if( config.overview && !isOverview() ) {
overview = true;
dom.wrapper.classList.add( 'overview' );
dom.wrapper.classList.remove( 'overview-deactivating' );
if( features.overviewTransitions ) {
setTimeout( function() {
dom.wrapper.classList.add( 'overview-animated' );
}, 1 );
}
// Don't auto-slide while in overview mode
cancelAutoSlide();
// Move the backgrounds element into the slide container to
// that the same scaling is applied
dom.slides.appendChild( dom.background );
// Clicking on an overview slide navigates to it
toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) {
if( !slide.classList.contains( 'stack' ) ) {
slide.addEventListener( 'click', onOverviewSlideClicked, true );
}
} );
// Calculate slide sizes
var margin = 70;
var slideSize = getComputedSlideSize();
overviewSlideWidth = slideSize.width + margin;
overviewSlideHeight = slideSize.height + margin;
// Reverse in RTL mode
if( config.rtl ) {
overviewSlideWidth = -overviewSlideWidth;
}
updateSlidesVisibility();
layoutOverview();
updateOverview();
layout();
// Notify observers of the overview showing
dispatchEvent( 'overviewshown', {
'indexh': indexh,
'indexv': indexv,
'currentSlide': currentSlide
} );
}
}
/**
* Uses CSS transforms to position all slides in a grid for
* display inside of the overview mode.
*/
function layoutOverview() {
// Layout slides
toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).forEach( function( hslide, h ) {
hslide.setAttribute( 'data-index-h', h );
transformElement( hslide, 'translate3d(' + ( h * overviewSlideWidth ) + 'px, 0, 0)' );
if( hslide.classList.contains( 'stack' ) ) {
toArray( hslide.querySelectorAll( 'section' ) ).forEach( function( vslide, v ) {
vslide.setAttribute( 'data-index-h', h );
vslide.setAttribute( 'data-index-v', v );
transformElement( vslide, 'translate3d(0, ' + ( v * overviewSlideHeight ) + 'px, 0)' );
} );
}
} );
// Layout slide backgrounds
toArray( dom.background.childNodes ).forEach( function( hbackground, h ) {
transformElement( hbackground, 'translate3d(' + ( h * overviewSlideWidth ) + 'px, 0, 0)' );
toArray( hbackground.querySelectorAll( '.slide-background' ) ).forEach( function( vbackground, v ) {
transformElement( vbackground, 'translate3d(0, ' + ( v * overviewSlideHeight ) + 'px, 0)' );
} );
} );
}
/**
* Moves the overview viewport to the current slides.
* Called each time the current slide changes.
*/
function updateOverview() {
transformSlides( {
overview: [
'translateX('+ ( -indexh * overviewSlideWidth ) +'px)',
'translateY('+ ( -indexv * overviewSlideHeight ) +'px)',
'translateZ('+ ( window.innerWidth < 400 ? -1000 : -2500 ) +'px)'
].join( ' ' )
} );
}
/**
* Exits the slide overview and enters the currently
* active slide.
*/
function deactivateOverview() {
// Only proceed if enabled in config
if( config.overview ) {
overview = false;
dom.wrapper.classList.remove( 'overview' );
dom.wrapper.classList.remove( 'overview-animated' );
// Temporarily add a class so that transitions can do different things
// depending on whether they are exiting/entering overview, or just
// moving from slide to slide
dom.wrapper.classList.add( 'overview-deactivating' );
setTimeout( function () {
dom.wrapper.classList.remove( 'overview-deactivating' );
}, 1 );
// Move the background element back out
dom.wrapper.appendChild( dom.background );
// Clean up changes made to slides
toArray( dom.wrapper.querySelectorAll( SLIDES_SELECTOR ) ).forEach( function( slide ) {
transformElement( slide, '' );
slide.removeEventListener( 'click', onOverviewSlideClicked, true );
} );
// Clean up changes made to backgrounds
toArray( dom.background.querySelectorAll( '.slide-background' ) ).forEach( function( background ) {
transformElement( background, '' );
} );
transformSlides( { overview: '' } );
slide( indexh, indexv );
layout();
cueAutoSlide();
// Notify observers of the overview hiding
dispatchEvent( 'overviewhidden', {
'indexh': indexh,
'indexv': indexv,
'currentSlide': currentSlide
} );
}
}
/**
* Toggles the slide overview mode on and off.
*
* @param {Boolean} override Optional flag which overrides the
* toggle logic and forcibly sets the desired state. True means
* overview is open, false means it's closed.
*/
function toggleOverview( override ) {
if( typeof override === 'boolean' ) {
override ? activateOverview() : deactivateOverview();
}
else {
isOverview() ? deactivateOverview() : activateOverview();
}
}
/**
* Checks if the overview is currently active.
*
* @return {Boolean} true if the overview is active,
* false otherwise
*/
function isOverview() {
return overview;
}
/**
* Checks if the current or specified slide is vertical
* (nested within another slide).
*
* @param {HTMLElement} slide [optional] The slide to check
* orientation of
*/
function isVerticalSlide( slide ) {
// Prefer slide argument, otherwise use current slide
slide = slide ? slide : currentSlide;
return slide && slide.parentNode && !!slide.parentNode.nodeName.match( /section/i );
}
/**
* Handling the fullscreen functionality via the fullscreen API
*
* @see http://fullscreen.spec.whatwg.org/
* @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode
*/
function enterFullscreen() {
var element = document.documentElement;
// Check which implementation is available
var requestMethod = element.requestFullscreen ||
element.webkitRequestFullscreen ||
element.webkitRequestFullScreen ||
element.mozRequestFullScreen ||
element.msRequestFullscreen;
if( requestMethod ) {
requestMethod.apply( element );
}
}
/**
* Enters the paused mode which fades everything on screen to
* black.
*/
function pause() {
if( config.pause ) {
var wasPaused = dom.wrapper.classList.contains( 'paused' );
cancelAutoSlide();
dom.wrapper.classList.add( 'paused' );
if( wasPaused === false ) {
dispatchEvent( 'paused' );
}
}
}
/**
* Exits from the paused mode.
*/
function resume() {
var wasPaused = dom.wrapper.classList.contains( 'paused' );
dom.wrapper.classList.remove( 'paused' );
cueAutoSlide();
if( wasPaused ) {
dispatchEvent( 'resumed' );
}
}
/**
* Toggles the paused mode on and off.
*/
function togglePause( override ) {
if( typeof override === 'boolean' ) {
override ? pause() : resume();
}
else {
isPaused() ? resume() : pause();
}
}
/**
* Checks if we are currently in the paused mode.
*/
function isPaused() {
return dom.wrapper.classList.contains( 'paused' );
}
/**
* Toggles the auto slide mode on and off.
*
* @param {Boolean} override Optional flag which sets the desired state.
* True means autoplay starts, false means it stops.
*/
function toggleAutoSlide( override ) {
if( typeof override === 'boolean' ) {
override ? resumeAutoSlide() : pauseAutoSlide();
}
else {
autoSlidePaused ? resumeAutoSlide() : pauseAutoSlide();
}
}
/**
* Checks if the auto slide mode is currently on.
*/
function isAutoSliding() {
return !!( autoSlide && !autoSlidePaused );
}
/**
* Steps from the current point in the presentation to the
* slide which matches the specified horizontal and vertical
* indices.
*
* @param {int} h Horizontal index of the target slide
* @param {int} v Vertical index of the target slide
* @param {int} f Optional index of a fragment within the
* target slide to activate
* @param {int} o Optional origin for use in multimaster environments
*/
function slide( h, v, f, o ) {
// Remember where we were at before
previousSlide = currentSlide;
// Query all horizontal slides in the deck
var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR );
// If no vertical index is specified and the upcoming slide is a
// stack, resume at its previous vertical index
if( v === undefined && !isOverview() ) {
v = getPreviousVerticalIndex( horizontalSlides[ h ] );
}
// If we were on a vertical stack, remember what vertical index
// it was on so we can resume at the same position when returning
if( previousSlide && previousSlide.parentNode && previousSlide.parentNode.classList.contains( 'stack' ) ) {
setPreviousVerticalIndex( previousSlide.parentNode, indexv );
}
// Remember the state before this slide
var stateBefore = state.concat();
// Reset the state array
state.length = 0;
var indexhBefore = indexh || 0,
indexvBefore = indexv || 0;
// Activate and transition to the new slide
indexh = updateSlides( HORIZONTAL_SLIDES_SELECTOR, h === undefined ? indexh : h );
indexv = updateSlides( VERTICAL_SLIDES_SELECTOR, v === undefined ? indexv : v );
// Update the visibility of slides now that the indices have changed
updateSlidesVisibility();
layout();
// Apply the new state
stateLoop: for( var i = 0, len = state.length; i < len; i++ ) {
// Check if this state existed on the previous slide. If it
// did, we will avoid adding it repeatedly
for( var j = 0; j < stateBefore.length; j++ ) {
if( stateBefore[j] === state[i] ) {
stateBefore.splice( j, 1 );
continue stateLoop;
}
}
document.documentElement.classList.add( state[i] );
// Dispatch custom event matching the state's name
dispatchEvent( state[i] );
}
// Clean up the remains of the previous state
while( stateBefore.length ) {
document.documentElement.classList.remove( stateBefore.pop() );
}
// Update the overview if it's currently active
if( isOverview() ) {
updateOverview();
}
// Find the current horizontal slide and any possible vertical slides
// within it
var currentHorizontalSlide = horizontalSlides[ indexh ],
currentVerticalSlides = currentHorizontalSlide.querySelectorAll( 'section' );
// Store references to the previous and current slides
currentSlide = currentVerticalSlides[ indexv ] || currentHorizontalSlide;
// Show fragment, if specified
if( typeof f !== 'undefined' ) {
navigateFragment( f );
}
// Dispatch an event if the slide changed
var slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore );
if( slideChanged ) {
dispatchEvent( 'slidechanged', {
'indexh': indexh,
'indexv': indexv,
'previousSlide': previousSlide,
'currentSlide': currentSlide,
'origin': o
} );
}
else {
// Ensure that the previous slide is never the same as the current
previousSlide = null;
}
// Solves an edge case where the previous slide maintains the
// 'present' class when navigating between adjacent vertical
// stacks
if( previousSlide ) {
previousSlide.classList.remove( 'present' );
previousSlide.setAttribute( 'aria-hidden', 'true' );
// Reset all slides upon navigate to home
// Issue: #285
if ( dom.wrapper.querySelector( HOME_SLIDE_SELECTOR ).classList.contains( 'present' ) ) {
// Launch async task
setTimeout( function () {
var slides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.stack') ), i;
for( i in slides ) {
if( slides[i] ) {
// Reset stack
setPreviousVerticalIndex( slides[i], 0 );
}
}
}, 0 );
}
}
// Handle embedded content
if( slideChanged || !previousSlide ) {
stopEmbeddedContent( previousSlide );
startEmbeddedContent( currentSlide );
}
// Announce the current slide contents, for screen readers
dom.statusDiv.textContent = currentSlide.textContent;
updateControls();
updateProgress();
updateBackground();
updateParallax();
updateSlideNumber();
updateNotes();
// Update the URL hash
writeURL();
cueAutoSlide();
}
/**
* Syncs the presentation with the current DOM. Useful
* when new slides or control elements are added or when
* the configuration has changed.
*/
function sync() {
// Subscribe to input
removeEventListeners();
addEventListeners();
// Force a layout to make sure the current config is accounted for
layout();
// Reflect the current autoSlide value
autoSlide = config.autoSlide;
// Start auto-sliding if it's enabled
cueAutoSlide();
// Re-create the slide backgrounds
createBackgrounds();
// Write the current hash to the URL
writeURL();
sortAllFragments();
updateControls();
updateProgress();
updateBackground( true );
updateSlideNumber();
updateSlidesVisibility();
updateNotes();
formatEmbeddedContent();
startEmbeddedContent( currentSlide );
if( isOverview() ) {
layoutOverview();
}
}
/**
* Resets all vertical slides so that only the first
* is visible.
*/
function resetVerticalSlides() {
var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
horizontalSlides.forEach( function( horizontalSlide ) {
var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) );
verticalSlides.forEach( function( verticalSlide, y ) {
if( y > 0 ) {
verticalSlide.classList.remove( 'present' );
verticalSlide.classList.remove( 'past' );
verticalSlide.classList.add( 'future' );
verticalSlide.setAttribute( 'aria-hidden', 'true' );
}
} );
} );
}
/**
* Sorts and formats all of fragments in the
* presentation.
*/
function sortAllFragments() {
var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
horizontalSlides.forEach( function( horizontalSlide ) {
var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) );
verticalSlides.forEach( function( verticalSlide, y ) {
sortFragments( verticalSlide.querySelectorAll( '.fragment' ) );
} );
if( verticalSlides.length === 0 ) sortFragments( horizontalSlide.querySelectorAll( '.fragment' ) );
} );
}
/**
* Randomly shuffles all slides in the deck.
*/
function shuffle() {
var slides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
slides.forEach( function( slide ) {
// Insert this slide next to another random slide. This may
// cause the slide to insert before itself but that's fine.
dom.slides.insertBefore( slide, slides[ Math.floor( Math.random() * slides.length ) ] );
} );
}
/**
* Updates one dimension of slides by showing the slide
* with the specified index.
*
* @param {String} selector A CSS selector that will fetch
* the group of slides we are working with
* @param {Number} index The index of the slide that should be
* shown
*
* @return {Number} The index of the slide that is now shown,
* might differ from the passed in index if it was out of
* bounds.
*/
function updateSlides( selector, index ) {
// Select all slides and convert the NodeList result to
// an array
var slides = toArray( dom.wrapper.querySelectorAll( selector ) ),
slidesLength = slides.length;
var printMode = isPrintingPDF();
if( slidesLength ) {
// Should the index loop?
if( config.loop ) {
index %= slidesLength;
if( index < 0 ) {
index = slidesLength + index;
}
}
// Enforce max and minimum index bounds
index = Math.max( Math.min( index, slidesLength - 1 ), 0 );
for( var i = 0; i < slidesLength; i++ ) {
var element = slides[i];
var reverse = config.rtl && !isVerticalSlide( element );
element.classList.remove( 'past' );
element.classList.remove( 'present' );
element.classList.remove( 'future' );
// http://www.w3.org/html/wg/drafts/html/master/editing.html#the-hidden-attribute
element.setAttribute( 'hidden', '' );
element.setAttribute( 'aria-hidden', 'true' );
// If this element contains vertical slides
if( element.querySelector( 'section' ) ) {
element.classList.add( 'stack' );
}
// If we're printing static slides, all slides are "present"
if( printMode ) {
element.classList.add( 'present' );
continue;
}
if( i < index ) {
// Any element previous to index is given the 'past' class
element.classList.add( reverse ? 'future' : 'past' );
if( config.fragments ) {
var pastFragments = toArray( element.querySelectorAll( '.fragment' ) );
// Show all fragments on prior slides
while( pastFragments.length ) {
var pastFragment = pastFragments.pop();
pastFragment.classList.add( 'visible' );
pastFragment.classList.remove( 'current-fragment' );
}
}
}
else if( i > index ) {
// Any element subsequent to index is given the 'future' class
element.classList.add( reverse ? 'past' : 'future' );
if( config.fragments ) {
var futureFragments = toArray( element.querySelectorAll( '.fragment.visible' ) );
// No fragments in future slides should be visible ahead of time
while( futureFragments.length ) {
var futureFragment = futureFragments.pop();
futureFragment.classList.remove( 'visible' );
futureFragment.classList.remove( 'current-fragment' );
}
}
}
}
// Mark the current slide as present
slides[index].classList.add( 'present' );
slides[index].removeAttribute( 'hidden' );
slides[index].removeAttribute( 'aria-hidden' );
// If this slide has a state associated with it, add it
// onto the current state of the deck
var slideState = slides[index].getAttribute( 'data-state' );
if( slideState ) {
state = state.concat( slideState.split( ' ' ) );
}
}
else {
// Since there are no slides we can't be anywhere beyond the
// zeroth index
index = 0;
}
return index;
}
/**
* Optimization method; hide all slides that are far away
* from the present slide.
*/
function updateSlidesVisibility() {
// Select all slides and convert the NodeList result to
// an array
var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ),
horizontalSlidesLength = horizontalSlides.length,
distanceX,
distanceY;
if( horizontalSlidesLength && typeof indexh !== 'undefined' ) {
// The number of steps away from the present slide that will
// be visible
var viewDistance = isOverview() ? 10 : config.viewDistance;
// Limit view distance on weaker devices
if( isMobileDevice ) {
viewDistance = isOverview() ? 6 : 2;
}
// All slides need to be visible when exporting to PDF
if( isPrintingPDF() ) {
viewDistance = Number.MAX_VALUE;
}
for( var x = 0; x < horizontalSlidesLength; x++ ) {
var horizontalSlide = horizontalSlides[x];
var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) ),
verticalSlidesLength = verticalSlides.length;
// Determine how far away this slide is from the present
distanceX = Math.abs( ( indexh || 0 ) - x ) || 0;
// If the presentation is looped, distance should measure
// 1 between the first and last slides
if( config.loop ) {
distanceX = Math.abs( ( ( indexh || 0 ) - x ) % ( horizontalSlidesLength - viewDistance ) ) || 0;
}
// Show the horizontal slide if it's within the view distance
if( distanceX < viewDistance ) {
showSlide( horizontalSlide );
}
else {
hideSlide( horizontalSlide );
}
if( verticalSlidesLength ) {
var oy = getPreviousVerticalIndex( horizontalSlide );
for( var y = 0; y < verticalSlidesLength; y++ ) {
var verticalSlide = verticalSlides[y];
distanceY = x === ( indexh || 0 ) ? Math.abs( ( indexv || 0 ) - y ) : Math.abs( y - oy );
if( distanceX + distanceY < viewDistance ) {
showSlide( verticalSlide );
}
else {
hideSlide( verticalSlide );
}
}
}
}
}
}
/**
* Pick up notes from the current slide and display tham
* to the viewer.
*
* @see `showNotes` config value
*/
function updateNotes() {
if( config.showNotes && dom.speakerNotes && currentSlide && !isPrintingPDF() ) {
dom.speakerNotes.innerHTML = getSlideNotes() || '';
}
}
/**
* Updates the progress bar to reflect the current slide.
*/
function updateProgress() {
// Update progress if enabled
if( config.progress && dom.progressbar ) {
dom.progressbar.style.width = getProgress() * dom.wrapper.offsetWidth + 'px';
}
}
/**
* Updates the slide number div to reflect the current slide.
*
* The following slide number formats are available:
* "h.v": horizontal . vertical slide number (default)
* "h/v": horizontal / vertical slide number
* "c": flattened slide number
* "c/t": flattened slide number / total slides
*/
function updateSlideNumber() {
// Update slide number if enabled
if( config.slideNumber && dom.slideNumber ) {
var value = [];
var format = 'h.v';
// Check if a custom number format is available
if( typeof config.slideNumber === 'string' ) {
format = config.slideNumber;
}
switch( format ) {
case 'c':
value.push( getSlidePastCount() + 1 );
break;
case 'c/t':
value.push( getSlidePastCount() + 1, '/', getTotalSlides() );
break;
case 'h/v':
value.push( indexh + 1 );
if( isVerticalSlide() ) value.push( '/', indexv + 1 );
break;
default:
value.push( indexh + 1 );
if( isVerticalSlide() ) value.push( '.', indexv + 1 );
}
dom.slideNumber.innerHTML = formatSlideNumber( value[0], value[1], value[2] );
}
}
/**
* Applies HTML formatting to a slide number before it's
* written to the DOM.
*/
function formatSlideNumber( a, delimiter, b ) {
if( typeof b === 'number' && !isNaN( b ) ) {
return '<span class="slide-number-a">'+ a +'</span>' +
'<span class="slide-number-delimiter">'+ delimiter +'</span>' +
'<span class="slide-number-b">'+ b +'</span>';
}
else {
return '<span class="slide-number-a">'+ a +'</span>';
}
}
/**
* Updates the state of all control/navigation arrows.
*/
function updateControls() {
var routes = availableRoutes();
var fragments = availableFragments();
// Remove the 'enabled' class from all directions
dom.controlsLeft.concat( dom.controlsRight )
.concat( dom.controlsUp )
.concat( dom.controlsDown )
.concat( dom.controlsPrev )
.concat( dom.controlsNext ).forEach( function( node ) {
node.classList.remove( 'enabled' );
node.classList.remove( 'fragmented' );
} );
// Add the 'enabled' class to the available routes
if( routes.left ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'enabled' ); } );
if( routes.right ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'enabled' ); } );
if( routes.up ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'enabled' ); } );
if( routes.down ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'enabled' ); } );
// Prev/next buttons
if( routes.left || routes.up ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'enabled' ); } );
if( routes.right || routes.down ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'enabled' ); } );
// Highlight fragment directions
if( currentSlide ) {
// Always apply fragment decorator to prev/next buttons
if( fragments.prev ) dom.controlsPrev.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
if( fragments.next ) dom.controlsNext.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
// Apply fragment decorators to directional buttons based on
// what slide axis they are in
if( isVerticalSlide( currentSlide ) ) {
if( fragments.prev ) dom.controlsUp.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
if( fragments.next ) dom.controlsDown.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
}
else {
if( fragments.prev ) dom.controlsLeft.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
if( fragments.next ) dom.controlsRight.forEach( function( el ) { el.classList.add( 'fragmented', 'enabled' ); } );
}
}
}
/**
* Updates the background elements to reflect the current
* slide.
*
* @param {Boolean} includeAll If true, the backgrounds of
* all vertical slides (not just the present) will be updated.
*/
function updateBackground( includeAll ) {
var currentBackground = null;
// Reverse past/future classes when in RTL mode
var horizontalPast = config.rtl ? 'future' : 'past',
horizontalFuture = config.rtl ? 'past' : 'future';
// Update the classes of all backgrounds to match the
// states of their slides (past/present/future)
toArray( dom.background.childNodes ).forEach( function( backgroundh, h ) {
backgroundh.classList.remove( 'past' );
backgroundh.classList.remove( 'present' );
backgroundh.classList.remove( 'future' );
if( h < indexh ) {
backgroundh.classList.add( horizontalPast );
}
else if ( h > indexh ) {
backgroundh.classList.add( horizontalFuture );
}
else {
backgroundh.classList.add( 'present' );
// Store a reference to the current background element
currentBackground = backgroundh;
}
if( includeAll || h === indexh ) {
toArray( backgroundh.querySelectorAll( '.slide-background' ) ).forEach( function( backgroundv, v ) {
backgroundv.classList.remove( 'past' );
backgroundv.classList.remove( 'present' );
backgroundv.classList.remove( 'future' );
if( v < indexv ) {
backgroundv.classList.add( 'past' );
}
else if ( v > indexv ) {
backgroundv.classList.add( 'future' );
}
else {
backgroundv.classList.add( 'present' );
// Only if this is the present horizontal and vertical slide
if( h === indexh ) currentBackground = backgroundv;
}
} );
}
} );
// Stop any currently playing video background
if( previousBackground ) {
var previousVideo = previousBackground.querySelector( 'video' );
if( previousVideo ) previousVideo.pause();
}
if( currentBackground ) {
// Start video playback
var currentVideo = currentBackground.querySelector( 'video' );
if( currentVideo ) {
var startVideo = function() {
currentVideo.currentTime = 0;
currentVideo.play();
currentVideo.removeEventListener( 'loadeddata', startVideo );
};
if( currentVideo.readyState > 1 ) {
startVideo();
}
else {
currentVideo.addEventListener( 'loadeddata', startVideo );
}
}
var backgroundImageURL = currentBackground.style.backgroundImage || '';
// Restart GIFs (doesn't work in Firefox)
if( /\.gif/i.test( backgroundImageURL ) ) {
currentBackground.style.backgroundImage = '';
window.getComputedStyle( currentBackground ).opacity;
currentBackground.style.backgroundImage = backgroundImageURL;
}
// Don't transition between identical backgrounds. This
// prevents unwanted flicker.
var previousBackgroundHash = previousBackground ? previousBackground.getAttribute( 'data-background-hash' ) : null;
var currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' );
if( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== previousBackground ) {
dom.background.classList.add( 'no-transition' );
}
previousBackground = currentBackground;
}
// If there's a background brightness flag for this slide,
// bubble it to the .reveal container
if( currentSlide ) {
[ 'has-light-background', 'has-dark-background' ].forEach( function( classToBubble ) {
if( currentSlide.classList.contains( classToBubble ) ) {
dom.wrapper.classList.add( classToBubble );
}
else {
dom.wrapper.classList.remove( classToBubble );
}
} );
}
// Allow the first background to apply without transition
setTimeout( function() {
dom.background.classList.remove( 'no-transition' );
}, 1 );
}
/**
* Updates the position of the parallax background based
* on the current slide index.
*/
function updateParallax() {
if( config.parallaxBackgroundImage ) {
var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ),
verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
var backgroundSize = dom.background.style.backgroundSize.split( ' ' ),
backgroundWidth, backgroundHeight;
if( backgroundSize.length === 1 ) {
backgroundWidth = backgroundHeight = parseInt( backgroundSize[0], 10 );
}
else {
backgroundWidth = parseInt( backgroundSize[0], 10 );
backgroundHeight = parseInt( backgroundSize[1], 10 );
}
var slideWidth = dom.background.offsetWidth,
horizontalSlideCount = horizontalSlides.length,
horizontalOffsetMultiplier,
horizontalOffset;
if( typeof config.parallaxBackgroundHorizontal === 'number' ) {
horizontalOffsetMultiplier = config.parallaxBackgroundHorizontal;
}
else {
horizontalOffsetMultiplier = horizontalSlideCount > 1 ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0;
}
horizontalOffset = horizontalOffsetMultiplier * indexh * -1;
var slideHeight = dom.background.offsetHeight,
verticalSlideCount = verticalSlides.length,
verticalOffsetMultiplier,
verticalOffset;
if( typeof config.parallaxBackgroundVertical === 'number' ) {
verticalOffsetMultiplier = config.parallaxBackgroundVertical;
}
else {
verticalOffsetMultiplier = ( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 );
}
verticalOffset = verticalSlideCount > 0 ? verticalOffsetMultiplier * indexv * 1 : 0;
dom.background.style.backgroundPosition = horizontalOffset + 'px ' + -verticalOffset + 'px';
}
}
/**
* Called when the given slide is within the configured view
* distance. Shows the slide element and loads any content
* that is set to load lazily (data-src).
*/
function showSlide( slide ) {
// Show the slide element
slide.style.display = 'block';
// Media elements with data-src attributes
toArray( slide.querySelectorAll( 'img[data-src], video[data-src], audio[data-src]' ) ).forEach( function( element ) {
element.setAttribute( 'src', element.getAttribute( 'data-src' ) );
element.removeAttribute( 'data-src' );
} );
// Media elements with <source> children
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( media ) {
var sources = 0;
toArray( media.querySelectorAll( 'source[data-src]' ) ).forEach( function( source ) {
source.setAttribute( 'src', source.getAttribute( 'data-src' ) );
source.removeAttribute( 'data-src' );
sources += 1;
} );
// If we rewrote sources for this video/audio element, we need
// to manually tell it to load from its new origin
if( sources > 0 ) {
media.load();
}
} );
// Show the corresponding background element
var indices = getIndices( slide );
var background = getSlideBackground( indices.h, indices.v );
if( background ) {
background.style.display = 'block';
// If the background contains media, load it
if( background.hasAttribute( 'data-loaded' ) === false ) {
background.setAttribute( 'data-loaded', 'true' );
var backgroundImage = slide.getAttribute( 'data-background-image' ),
backgroundVideo = slide.getAttribute( 'data-background-video' ),
backgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ),
backgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' ),
backgroundIframe = slide.getAttribute( 'data-background-iframe' );
// Images
if( backgroundImage ) {
background.style.backgroundImage = 'url('+ backgroundImage +')';
}
// Videos
else if ( backgroundVideo && !isSpeakerNotes() ) {
var video = document.createElement( 'video' );
if( backgroundVideoLoop ) {
video.setAttribute( 'loop', '' );
}
if( backgroundVideoMuted ) {
video.muted = true;
}
// Support comma separated lists of video sources
backgroundVideo.split( ',' ).forEach( function( source ) {
video.innerHTML += '<source src="'+ source +'">';
} );
background.appendChild( video );
}
// Iframes
else if( backgroundIframe ) {
var iframe = document.createElement( 'iframe' );
iframe.setAttribute( 'src', backgroundIframe );
iframe.style.width = '100%';
iframe.style.height = '100%';
iframe.style.maxHeight = '100%';
iframe.style.maxWidth = '100%';
background.appendChild( iframe );
document.querySelector('.reveal > .backgrounds').style['z-index'] = 1;
}
}
}
}
/**
* Called when the given slide is moved outside of the
* configured view distance.
*/
function hideSlide( slide ) {
// Hide the slide element
slide.style.display = 'none';
// Hide the corresponding background element
var indices = getIndices( slide );
var background = getSlideBackground( indices.h, indices.v );
if( background ) {
background.style.display = 'none';
}
}
/**
* Determine what available routes there are for navigation.
*
* @return {Object} containing four booleans: left/right/up/down
*/
function availableRoutes() {
var horizontalSlides = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ),
verticalSlides = dom.wrapper.querySelectorAll( VERTICAL_SLIDES_SELECTOR );
var routes = {
left: indexh > 0 || config.loop,
right: indexh < horizontalSlides.length - 1 || config.loop,
up: indexv > 0,
down: indexv < verticalSlides.length - 1
};
// reverse horizontal controls for rtl
if( config.rtl ) {
var left = routes.left;
routes.left = routes.right;
routes.right = left;
}
return routes;
}
/**
* Returns an object describing the available fragment
* directions.
*
* @return {Object} two boolean properties: prev/next
*/
function availableFragments() {
if( currentSlide && config.fragments ) {
var fragments = currentSlide.querySelectorAll( '.fragment' );
var hiddenFragments = currentSlide.querySelectorAll( '.fragment:not(.visible)' );
return {
prev: fragments.length - hiddenFragments.length > 0,
next: !!hiddenFragments.length
};
}
else {
return { prev: false, next: false };
}
}
/**
* Enforces origin-specific format rules for embedded media.
*/
function formatEmbeddedContent() {
var _appendParamToIframeSource = function( sourceAttribute, sourceURL, param ) {
toArray( dom.slides.querySelectorAll( 'iframe['+ sourceAttribute +'*="'+ sourceURL +'"]' ) ).forEach( function( el ) {
var src = el.getAttribute( sourceAttribute );
if( src && src.indexOf( param ) === -1 ) {
el.setAttribute( sourceAttribute, src + ( !/\?/.test( src ) ? '?' : '&' ) + param );
}
});
};
// YouTube frames must include "?enablejsapi=1"
_appendParamToIframeSource( 'src', 'youtube.com/embed/', 'enablejsapi=1' );
_appendParamToIframeSource( 'data-src', 'youtube.com/embed/', 'enablejsapi=1' );
// Vimeo frames must include "?api=1"
_appendParamToIframeSource( 'src', 'player.vimeo.com/', 'api=1' );
_appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' );
}
/**
* Start playback of any embedded content inside of
* the targeted slide.
*/
function startEmbeddedContent( slide ) {
if( slide && !isSpeakerNotes() ) {
// Restart GIFs
toArray( slide.querySelectorAll( 'img[src$=".gif"]' ) ).forEach( function( el ) {
// Setting the same unchanged source like this was confirmed
// to work in Chrome, FF & Safari
el.setAttribute( 'src', el.getAttribute( 'src' ) );
} );
// HTML5 media elements
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
if( el.hasAttribute( 'data-autoplay' ) && typeof el.play === 'function' ) {
el.play();
}
} );
// Normal iframes
toArray( slide.querySelectorAll( 'iframe[src]' ) ).forEach( function( el ) {
startEmbeddedIframe( { target: el } );
} );
// Lazy loading iframes
toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) {
if( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) {
el.removeEventListener( 'load', startEmbeddedIframe ); // remove first to avoid dupes
el.addEventListener( 'load', startEmbeddedIframe );
el.setAttribute( 'src', el.getAttribute( 'data-src' ) );
}
} );
}
}
/**
* "Starts" the content of an embedded iframe using the
* postmessage API.
*/
function startEmbeddedIframe( event ) {
var iframe = event.target;
// YouTube postMessage API
if( /youtube\.com\/embed\//.test( iframe.getAttribute( 'src' ) ) && iframe.hasAttribute( 'data-autoplay' ) ) {
iframe.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' );
}
// Vimeo postMessage API
else if( /player\.vimeo\.com\//.test( iframe.getAttribute( 'src' ) ) && iframe.hasAttribute( 'data-autoplay' ) ) {
iframe.contentWindow.postMessage( '{"method":"play"}', '*' );
}
// Generic postMessage API
else {
iframe.contentWindow.postMessage( 'slide:start', '*' );
}
}
/**
* Stop playback of any embedded content inside of
* the targeted slide.
*/
function stopEmbeddedContent( slide ) {
if( slide && slide.parentNode ) {
// HTML5 media elements
toArray( slide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
if( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {
el.pause();
}
} );
// Generic postMessage API for non-lazy loaded iframes
toArray( slide.querySelectorAll( 'iframe' ) ).forEach( function( el ) {
el.contentWindow.postMessage( 'slide:stop', '*' );
el.removeEventListener( 'load', startEmbeddedIframe );
});
// YouTube postMessage API
toArray( slide.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) {
el.contentWindow.postMessage( '{"event":"command","func":"pauseVideo","args":""}', '*' );
}
});
// Vimeo postMessage API
toArray( slide.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) {
if( !el.hasAttribute( 'data-ignore' ) && typeof el.contentWindow.postMessage === 'function' ) {
el.contentWindow.postMessage( '{"method":"pause"}', '*' );
}
});
// Lazy loading iframes
toArray( slide.querySelectorAll( 'iframe[data-src]' ) ).forEach( function( el ) {
// Only removing the src doesn't actually unload the frame
// in all browsers (Firefox) so we set it to blank first
el.setAttribute( 'src', 'about:blank' );
el.removeAttribute( 'src' );
} );
}
}
/**
* Returns the number of past slides. This can be used as a global
* flattened index for slides.
*/
function getSlidePastCount() {
var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
// The number of past slides
var pastCount = 0;
// Step through all slides and count the past ones
mainLoop: for( var i = 0; i < horizontalSlides.length; i++ ) {
var horizontalSlide = horizontalSlides[i];
var verticalSlides = toArray( horizontalSlide.querySelectorAll( 'section' ) );
for( var j = 0; j < verticalSlides.length; j++ ) {
// Stop as soon as we arrive at the present
if( verticalSlides[j].classList.contains( 'present' ) ) {
break mainLoop;
}
pastCount++;
}
// Stop as soon as we arrive at the present
if( horizontalSlide.classList.contains( 'present' ) ) {
break;
}
// Don't count the wrapping section for vertical slides
if( horizontalSlide.classList.contains( 'stack' ) === false ) {
pastCount++;
}
}
return pastCount;
}
/**
* Returns a value ranging from 0-1 that represents
* how far into the presentation we have navigated.
*/
function getProgress() {
// The number of past and total slides
var totalCount = getTotalSlides();
var pastCount = getSlidePastCount();
if( currentSlide ) {
var allFragments = currentSlide.querySelectorAll( '.fragment' );
// If there are fragments in the current slide those should be
// accounted for in the progress.
if( allFragments.length > 0 ) {
var visibleFragments = currentSlide.querySelectorAll( '.fragment.visible' );
// This value represents how big a portion of the slide progress
// that is made up by its fragments (0-1)
var fragmentWeight = 0.9;
// Add fragment progress to the past slide count
pastCount += ( visibleFragments.length / allFragments.length ) * fragmentWeight;
}
}
return pastCount / ( totalCount - 1 );
}
/**
* Checks if this presentation is running inside of the
* speaker notes window.
*/
function isSpeakerNotes() {
return !!window.location.search.match( /receiver/gi );
}
/**
* Reads the current URL (hash) and navigates accordingly.
*/
function readURL() {
var hash = window.location.hash;
// Attempt to parse the hash as either an index or name
var bits = hash.slice( 2 ).split( '/' ),
name = hash.replace( /#|\//gi, '' );
// If the first bit is invalid and there is a name we can
// assume that this is a named link
if( isNaN( parseInt( bits[0], 10 ) ) && name.length ) {
var element;
// Ensure the named link is a valid HTML ID attribute
if( /^[a-zA-Z][\w:.-]*$/.test( name ) ) {
// Find the slide with the specified ID
element = document.getElementById( name );
}
if( element ) {
// Find the position of the named slide and navigate to it
var indices = Reveal.getIndices( element );
slide( indices.h, indices.v );
}
// If the slide doesn't exist, navigate to the current slide
else {
slide( indexh || 0, indexv || 0 );
}
}
else {
// Read the index components of the hash
var h = parseInt( bits[0], 10 ) || 0,
v = parseInt( bits[1], 10 ) || 0;
if( h !== indexh || v !== indexv ) {
slide( h, v );
}
}
}
/**
* Updates the page URL (hash) to reflect the current
* state.
*
* @param {Number} delay The time in ms to wait before
* writing the hash
*/
function writeURL( delay ) {
if( config.history ) {
// Make sure there's never more than one timeout running
clearTimeout( writeURLTimeout );
// If a delay is specified, timeout this call
if( typeof delay === 'number' ) {
writeURLTimeout = setTimeout( writeURL, delay );
}
else if( currentSlide ) {
var url = '/';
// Attempt to create a named link based on the slide's ID
var id = currentSlide.getAttribute( 'id' );
if( id ) {
id = id.replace( /[^a-zA-Z0-9\-\_\:\.]/g, '' );
}
// If the current slide has an ID, use that as a named link
if( typeof id === 'string' && id.length ) {
url = '/' + id;
}
// Otherwise use the /h/v index
else {
if( indexh > 0 || indexv > 0 ) url += indexh;
if( indexv > 0 ) url += '/' + indexv;
}
window.location.hash = url;
}
}
}
/**
* Retrieves the h/v location of the current, or specified,
* slide.
*
* @param {HTMLElement} slide If specified, the returned
* index will be for this slide rather than the currently
* active one
*
* @return {Object} { h: <int>, v: <int>, f: <int> }
*/
function getIndices( slide ) {
// By default, return the current indices
var h = indexh,
v = indexv,
f;
// If a slide is specified, return the indices of that slide
if( slide ) {
var isVertical = isVerticalSlide( slide );
var slideh = isVertical ? slide.parentNode : slide;
// Select all horizontal slides
var horizontalSlides = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) );
// Now that we know which the horizontal slide is, get its index
h = Math.max( horizontalSlides.indexOf( slideh ), 0 );
// Assume we're not vertical
v = undefined;
// If this is a vertical slide, grab the vertical index
if( isVertical ) {
v = Math.max( toArray( slide.parentNode.querySelectorAll( 'section' ) ).indexOf( slide ), 0 );
}
}
if( !slide && currentSlide ) {
var hasFragments = currentSlide.querySelectorAll( '.fragment' ).length > 0;
if( hasFragments ) {
var currentFragment = currentSlide.querySelector( '.current-fragment' );
if( currentFragment && currentFragment.hasAttribute( 'data-fragment-index' ) ) {
f = parseInt( currentFragment.getAttribute( 'data-fragment-index' ), 10 );
}
else {
f = currentSlide.querySelectorAll( '.fragment.visible' ).length - 1;
}
}
}
return { h: h, v: v, f: f };
}
/**
* Retrieves the total number of slides in this presentation.
*/
function getTotalSlides() {
return dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ':not(.stack)' ).length;
}
/**
* Returns the slide element matching the specified index.
*/
function getSlide( x, y ) {
var horizontalSlide = dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR )[ x ];
var verticalSlides = horizontalSlide && horizontalSlide.querySelectorAll( 'section' );
if( verticalSlides && verticalSlides.length && typeof y === 'number' ) {
return verticalSlides ? verticalSlides[ y ] : undefined;
}
return horizontalSlide;
}
/**
* Returns the background element for the given slide.
* All slides, even the ones with no background properties
* defined, have a background element so as long as the
* index is valid an element will be returned.
*/
function getSlideBackground( x, y ) {
// When printing to PDF the slide backgrounds are nested
// inside of the slides
if( isPrintingPDF() ) {
var slide = getSlide( x, y );
if( slide ) {
var background = slide.querySelector( '.slide-background' );
if( background && background.parentNode === slide ) {
return background;
}
}
return undefined;
}
var horizontalBackground = dom.wrapper.querySelectorAll( '.backgrounds>.slide-background' )[ x ];
var verticalBackgrounds = horizontalBackground && horizontalBackground.querySelectorAll( '.slide-background' );
if( verticalBackgrounds && verticalBackgrounds.length && typeof y === 'number' ) {
return verticalBackgrounds ? verticalBackgrounds[ y ] : undefined;
}
return horizontalBackground;
}
/**
* Retrieves the speaker notes from a slide. Notes can be
* defined in two ways:
* 1. As a data-notes attribute on the slide <section>
* 2. As an <aside class="notes"> inside of the slide
*/
function getSlideNotes( slide ) {
// Default to the current slide
slide = slide || currentSlide;
// Notes can be specified via the data-notes attribute...
if( slide.hasAttribute( 'data-notes' ) ) {
return slide.getAttribute( 'data-notes' );
}
// ... or using an <aside class="notes"> element
var notesElement = slide.querySelector( 'aside.notes' );
if( notesElement ) {
return notesElement.innerHTML;
}
return null;
}
/**
* Retrieves the current state of the presentation as
* an object. This state can then be restored at any
* time.
*/
function getState() {
var indices = getIndices();
return {
indexh: indices.h,
indexv: indices.v,
indexf: indices.f,
paused: isPaused(),
overview: isOverview()
};
}
/**
* Restores the presentation to the given state.
*
* @param {Object} state As generated by getState()
*/
function setState( state ) {
if( typeof state === 'object' ) {
slide( deserialize( state.indexh ), deserialize( state.indexv ), deserialize( state.indexf ) );
var pausedFlag = deserialize( state.paused ),
overviewFlag = deserialize( state.overview );
if( typeof pausedFlag === 'boolean' && pausedFlag !== isPaused() ) {
togglePause( pausedFlag );
}
if( typeof overviewFlag === 'boolean' && overviewFlag !== isOverview() ) {
toggleOverview( overviewFlag );
}
}
}
/**
* Return a sorted fragments list, ordered by an increasing
* "data-fragment-index" attribute.
*
* Fragments will be revealed in the order that they are returned by
* this function, so you can use the index attributes to control the
* order of fragment appearance.
*
* To maintain a sensible default fragment order, fragments are presumed
* to be passed in document order. This function adds a "fragment-index"
* attribute to each node if such an attribute is not already present,
* and sets that attribute to an integer value which is the position of
* the fragment within the fragments list.
*/
function sortFragments( fragments ) {
fragments = toArray( fragments );
var ordered = [],
unordered = [],
sorted = [];
// Group ordered and unordered elements
fragments.forEach( function( fragment, i ) {
if( fragment.hasAttribute( 'data-fragment-index' ) ) {
var index = parseInt( fragment.getAttribute( 'data-fragment-index' ), 10 );
if( !ordered[index] ) {
ordered[index] = [];
}
ordered[index].push( fragment );
}
else {
unordered.push( [ fragment ] );
}
} );
// Append fragments without explicit indices in their
// DOM order
ordered = ordered.concat( unordered );
// Manually count the index up per group to ensure there
// are no gaps
var index = 0;
// Push all fragments in their sorted order to an array,
// this flattens the groups
ordered.forEach( function( group ) {
group.forEach( function( fragment ) {
sorted.push( fragment );
fragment.setAttribute( 'data-fragment-index', index );
} );
index ++;
} );
return sorted;
}
/**
* Navigate to the specified slide fragment.
*
* @param {Number} index The index of the fragment that
* should be shown, -1 means all are invisible
* @param {Number} offset Integer offset to apply to the
* fragment index
*
* @return {Boolean} true if a change was made in any
* fragments visibility as part of this call
*/
function navigateFragment( index, offset ) {
if( currentSlide && config.fragments ) {
var fragments = sortFragments( currentSlide.querySelectorAll( '.fragment' ) );
if( fragments.length ) {
// If no index is specified, find the current
if( typeof index !== 'number' ) {
var lastVisibleFragment = sortFragments( currentSlide.querySelectorAll( '.fragment.visible' ) ).pop();
if( lastVisibleFragment ) {
index = parseInt( lastVisibleFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );
}
else {
index = -1;
}
}
// If an offset is specified, apply it to the index
if( typeof offset === 'number' ) {
index += offset;
}
var fragmentsShown = [],
fragmentsHidden = [];
toArray( fragments ).forEach( function( element, i ) {
if( element.hasAttribute( 'data-fragment-index' ) ) {
i = parseInt( element.getAttribute( 'data-fragment-index' ), 10 );
}
// Visible fragments
if( i <= index ) {
if( !element.classList.contains( 'visible' ) ) fragmentsShown.push( element );
element.classList.add( 'visible' );
element.classList.remove( 'current-fragment' );
// Announce the fragments one by one to the Screen Reader
dom.statusDiv.textContent = element.textContent;
if( i === index ) {
element.classList.add( 'current-fragment' );
}
}
// Hidden fragments
else {
if( element.classList.contains( 'visible' ) ) fragmentsHidden.push( element );
element.classList.remove( 'visible' );
element.classList.remove( 'current-fragment' );
}
} );
if( fragmentsHidden.length ) {
dispatchEvent( 'fragmenthidden', { fragment: fragmentsHidden[0], fragments: fragmentsHidden } );
}
if( fragmentsShown.length ) {
dispatchEvent( 'fragmentshown', { fragment: fragmentsShown[0], fragments: fragmentsShown } );
}
updateControls();
updateProgress();
return !!( fragmentsShown.length || fragmentsHidden.length );
}
}
return false;
}
/**
* Navigate to the next slide fragment.
*
* @return {Boolean} true if there was a next fragment,
* false otherwise
*/
function nextFragment() {
return navigateFragment( null, 1 );
}
/**
* Navigate to the previous slide fragment.
*
* @return {Boolean} true if there was a previous fragment,
* false otherwise
*/
function previousFragment() {
return navigateFragment( null, -1 );
}
/**
* Cues a new automated slide if enabled in the config.
*/
function cueAutoSlide() {
cancelAutoSlide();
if( currentSlide ) {
var currentFragment = currentSlide.querySelector( '.current-fragment' );
var fragmentAutoSlide = currentFragment ? currentFragment.getAttribute( 'data-autoslide' ) : null;
var parentAutoSlide = currentSlide.parentNode ? currentSlide.parentNode.getAttribute( 'data-autoslide' ) : null;
var slideAutoSlide = currentSlide.getAttribute( 'data-autoslide' );
// Pick value in the following priority order:
// 1. Current fragment's data-autoslide
// 2. Current slide's data-autoslide
// 3. Parent slide's data-autoslide
// 4. Global autoSlide setting
if( fragmentAutoSlide ) {
autoSlide = parseInt( fragmentAutoSlide, 10 );
}
else if( slideAutoSlide ) {
autoSlide = parseInt( slideAutoSlide, 10 );
}
else if( parentAutoSlide ) {
autoSlide = parseInt( parentAutoSlide, 10 );
}
else {
autoSlide = config.autoSlide;
}
// If there are media elements with data-autoplay,
// automatically set the autoSlide duration to the
// length of that media. Not applicable if the slide
// is divided up into fragments.
if( currentSlide.querySelectorAll( '.fragment' ).length === 0 ) {
toArray( currentSlide.querySelectorAll( 'video, audio' ) ).forEach( function( el ) {
if( el.hasAttribute( 'data-autoplay' ) ) {
if( autoSlide && el.duration * 1000 > autoSlide ) {
autoSlide = ( el.duration * 1000 ) + 1000;
}
}
} );
}
// Cue the next auto-slide if:
// - There is an autoSlide value
// - Auto-sliding isn't paused by the user
// - The presentation isn't paused
// - The overview isn't active
// - The presentation isn't over
if( autoSlide && !autoSlidePaused && !isPaused() && !isOverview() && ( !Reveal.isLastSlide() || availableFragments().next || config.loop === true ) ) {
autoSlideTimeout = setTimeout( function() {
typeof config.autoSlideMethod === 'function' ? config.autoSlideMethod() : navigateNext();
cueAutoSlide();
}, autoSlide );
autoSlideStartTime = Date.now();
}
if( autoSlidePlayer ) {
autoSlidePlayer.setPlaying( autoSlideTimeout !== -1 );
}
}
}
/**
* Cancels any ongoing request to auto-slide.
*/
function cancelAutoSlide() {
clearTimeout( autoSlideTimeout );
autoSlideTimeout = -1;
}
function pauseAutoSlide() {
if( autoSlide && !autoSlidePaused ) {
autoSlidePaused = true;
dispatchEvent( 'autoslidepaused' );
clearTimeout( autoSlideTimeout );
if( autoSlidePlayer ) {
autoSlidePlayer.setPlaying( false );
}
}
}
function resumeAutoSlide() {
if( autoSlide && autoSlidePaused ) {
autoSlidePaused = false;
dispatchEvent( 'autoslideresumed' );
cueAutoSlide();
}
}
function navigateLeft() {
// Reverse for RTL
if( config.rtl ) {
if( ( isOverview() || nextFragment() === false ) && availableRoutes().left ) {
slide( indexh + 1 );
}
}
// Normal navigation
else if( ( isOverview() || previousFragment() === false ) && availableRoutes().left ) {
slide( indexh - 1 );
}
}
function navigateRight() {
// Reverse for RTL
if( config.rtl ) {
if( ( isOverview() || previousFragment() === false ) && availableRoutes().right ) {
slide( indexh - 1 );
}
}
// Normal navigation
else if( ( isOverview() || nextFragment() === false ) && availableRoutes().right ) {
slide( indexh + 1 );
}
}
function navigateUp() {
// Prioritize hiding fragments
if( ( isOverview() || previousFragment() === false ) && availableRoutes().up ) {
slide( indexh, indexv - 1 );
}
}
function navigateDown() {
// Prioritize revealing fragments
if( ( isOverview() || nextFragment() === false ) && availableRoutes().down ) {
slide( indexh, indexv + 1 );
}
}
/**
* Navigates backwards, prioritized in the following order:
* 1) Previous fragment
* 2) Previous vertical slide
* 3) Previous horizontal slide
*/
function navigatePrev() {
// Prioritize revealing fragments
if( previousFragment() === false ) {
if( availableRoutes().up ) {
navigateUp();
}
else {
// Fetch the previous horizontal slide, if there is one
var previousSlide;
if( config.rtl ) {
previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.future' ) ).pop();
}
else {
previousSlide = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR + '.past' ) ).pop();
}
if( previousSlide ) {
var v = ( previousSlide.querySelectorAll( 'section' ).length - 1 ) || undefined;
var h = indexh - 1;
slide( h, v );
}
}
}
}
/**
* The reverse of #navigatePrev().
*/
function navigateNext() {
// Prioritize revealing fragments
if( nextFragment() === false ) {
if( availableRoutes().down ) {
navigateDown();
}
else if( config.rtl ) {
navigateLeft();
}
else {
navigateRight();
}
}
}
/**
* Checks if the target element prevents the triggering of
* swipe navigation.
*/
function isSwipePrevented( target ) {
while( target && typeof target.hasAttribute === 'function' ) {
if( target.hasAttribute( 'data-prevent-swipe' ) ) return true;
target = target.parentNode;
}
return false;
}
// --------------------------------------------------------------------//
// ----------------------------- EVENTS -------------------------------//
// --------------------------------------------------------------------//
/**
* Called by all event handlers that are based on user
* input.
*/
function onUserInput( event ) {
if( config.autoSlideStoppable ) {
pauseAutoSlide();
}
}
/**
* Handler for the document level 'keypress' event.
*/
function onDocumentKeyPress( event ) {
// Check if the pressed key is question mark
if( event.shiftKey && event.charCode === 63 ) {
if( dom.overlay ) {
closeOverlay();
}
else {
showHelp( true );
}
}
}
/**
* Handler for the document level 'keydown' event.
*/
function onDocumentKeyDown( event ) {
// If there's a condition specified and it returns false,
// ignore this event
if( typeof config.keyboardCondition === 'function' && config.keyboardCondition() === false ) {
return true;
}
// Remember if auto-sliding was paused so we can toggle it
var autoSlideWasPaused = autoSlidePaused;
onUserInput( event );
// Check if there's a focused element that could be using
// the keyboard
var activeElementIsCE = document.activeElement && document.activeElement.contentEditable !== 'inherit';
var activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName );
// Disregard the event if there's a focused element or a
// keyboard modifier key is present
if( activeElementIsCE || activeElementIsInput || (event.shiftKey && event.keyCode !== 32) || event.altKey || event.ctrlKey || event.metaKey ) return;
// While paused only allow resume keyboard events; 'b', '.''
var resumeKeyCodes = [66,190,191];
var key;
// Custom key bindings for togglePause should be able to resume
if( typeof config.keyboard === 'object' ) {
for( key in config.keyboard ) {
if( config.keyboard[key] === 'togglePause' ) {
resumeKeyCodes.push( parseInt( key, 10 ) );
}
}
}
if( isPaused() && resumeKeyCodes.indexOf( event.keyCode ) === -1 ) {
return false;
}
var triggered = false;
// 1. User defined key bindings
if( typeof config.keyboard === 'object' ) {
for( key in config.keyboard ) {
// Check if this binding matches the pressed key
if( parseInt( key, 10 ) === event.keyCode ) {
var value = config.keyboard[ key ];
// Callback function
if( typeof value === 'function' ) {
value.apply( null, [ event ] );
}
// String shortcuts to reveal.js API
else if( typeof value === 'string' && typeof Reveal[ value ] === 'function' ) {
Reveal[ value ].call();
}
triggered = true;
}
}
}
// 2. System defined key bindings
if( triggered === false ) {
// Assume true and try to prove false
triggered = true;
switch( event.keyCode ) {
// p, page up
case 80: case 33: navigatePrev(); break;
// n, page down
case 78: case 34: navigateNext(); break;
// h, left
case 72: case 37: navigateLeft(); break;
// l, right
case 76: case 39: navigateRight(); break;
// k, up
case 75: case 38: navigateUp(); break;
// j, down
case 74: case 40: navigateDown(); break;
// home
case 36: slide( 0 ); break;
// end
case 35: slide( Number.MAX_VALUE ); break;
// space
case 32: isOverview() ? deactivateOverview() : event.shiftKey ? navigatePrev() : navigateNext(); break;
// return
case 13: isOverview() ? deactivateOverview() : triggered = false; break;
// two-spot, semicolon, b, period, Logitech presenter tools "black screen" button
case 58: case 59: case 66: case 190: case 191: togglePause(); break;
// f
case 70: enterFullscreen(); break;
// a
case 65: if ( config.autoSlideStoppable ) toggleAutoSlide( autoSlideWasPaused ); break;
default:
triggered = false;
}
}
// If the input resulted in a triggered action we should prevent
// the browsers default behavior
if( triggered ) {
event.preventDefault && event.preventDefault();
}
// ESC or O key
else if ( ( event.keyCode === 27 || event.keyCode === 79 ) && features.transforms3d ) {
if( dom.overlay ) {
closeOverlay();
}
else {
toggleOverview();
}
event.preventDefault && event.preventDefault();
}
// If auto-sliding is enabled we need to cue up
// another timeout
cueAutoSlide();
}
/**
* Handler for the 'touchstart' event, enables support for
* swipe and pinch gestures.
*/
function onTouchStart( event ) {
if( isSwipePrevented( event.target ) ) return true;
touch.startX = event.touches[0].clientX;
touch.startY = event.touches[0].clientY;
touch.startCount = event.touches.length;
// If there's two touches we need to memorize the distance
// between those two points to detect pinching
if( event.touches.length === 2 && config.overview ) {
touch.startSpan = distanceBetween( {
x: event.touches[1].clientX,
y: event.touches[1].clientY
}, {
x: touch.startX,
y: touch.startY
} );
}
}
/**
* Handler for the 'touchmove' event.
*/
function onTouchMove( event ) {
if( isSwipePrevented( event.target ) ) return true;
// Each touch should only trigger one action
if( !touch.captured ) {
onUserInput( event );
var currentX = event.touches[0].clientX;
var currentY = event.touches[0].clientY;
// If the touch started with two points and still has
// two active touches; test for the pinch gesture
if( event.touches.length === 2 && touch.startCount === 2 && config.overview ) {
// The current distance in pixels between the two touch points
var currentSpan = distanceBetween( {
x: event.touches[1].clientX,
y: event.touches[1].clientY
}, {
x: touch.startX,
y: touch.startY
} );
// If the span is larger than the desire amount we've got
// ourselves a pinch
if( Math.abs( touch.startSpan - currentSpan ) > touch.threshold ) {
touch.captured = true;
if( currentSpan < touch.startSpan ) {
activateOverview();
}
else {
deactivateOverview();
}
}
event.preventDefault();
}
// There was only one touch point, look for a swipe
else if( event.touches.length === 1 && touch.startCount !== 2 ) {
var deltaX = currentX - touch.startX,
deltaY = currentY - touch.startY;
if( deltaX > touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
touch.captured = true;
navigateLeft();
}
else if( deltaX < -touch.threshold && Math.abs( deltaX ) > Math.abs( deltaY ) ) {
touch.captured = true;
navigateRight();
}
else if( deltaY > touch.threshold ) {
touch.captured = true;
navigateUp();
}
else if( deltaY < -touch.threshold ) {
touch.captured = true;
navigateDown();
}
// If we're embedded, only block touch events if they have
// triggered an action
if( config.embedded ) {
if( touch.captured || isVerticalSlide( currentSlide ) ) {
event.preventDefault();
}
}
// Not embedded? Block them all to avoid needless tossing
// around of the viewport in iOS
else {
event.preventDefault();
}
}
}
// There's a bug with swiping on some Android devices unless
// the default action is always prevented
else if( UA.match( /android/gi ) ) {
event.preventDefault();
}
}
/**
* Handler for the 'touchend' event.
*/
function onTouchEnd( event ) {
touch.captured = false;
}
/**
* Convert pointer down to touch start.
*/
function onPointerDown( event ) {
if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
event.touches = [{ clientX: event.clientX, clientY: event.clientY }];
onTouchStart( event );
}
}
/**
* Convert pointer move to touch move.
*/
function onPointerMove( event ) {
if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
event.touches = [{ clientX: event.clientX, clientY: event.clientY }];
onTouchMove( event );
}
}
/**
* Convert pointer up to touch end.
*/
function onPointerUp( event ) {
if( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === "touch" ) {
event.touches = [{ clientX: event.clientX, clientY: event.clientY }];
onTouchEnd( event );
}
}
/**
* Handles mouse wheel scrolling, throttled to avoid skipping
* multiple slides.
*/
function onDocumentMouseScroll( event ) {
if( Date.now() - lastMouseWheelStep > 600 ) {
lastMouseWheelStep = Date.now();
var delta = event.detail || -event.wheelDelta;
if( delta > 0 ) {
navigateNext();
}
else {
navigatePrev();
}
}
}
/**
* Clicking on the progress bar results in a navigation to the
* closest approximate horizontal slide using this equation:
*
* ( clickX / presentationWidth ) * numberOfSlides
*/
function onProgressClicked( event ) {
onUserInput( event );
event.preventDefault();
var slidesTotal = toArray( dom.wrapper.querySelectorAll( HORIZONTAL_SLIDES_SELECTOR ) ).length;
var slideIndex = Math.floor( ( event.clientX / dom.wrapper.offsetWidth ) * slidesTotal );
if( config.rtl ) {
slideIndex = slidesTotal - slideIndex;
}
slide( slideIndex );
}
/**
* Event handler for navigation control buttons.
*/
function onNavigateLeftClicked( event ) { event.preventDefault(); onUserInput(); navigateLeft(); }
function onNavigateRightClicked( event ) { event.preventDefault(); onUserInput(); navigateRight(); }
function onNavigateUpClicked( event ) { event.preventDefault(); onUserInput(); navigateUp(); }
function onNavigateDownClicked( event ) { event.preventDefault(); onUserInput(); navigateDown(); }
function onNavigatePrevClicked( event ) { event.preventDefault(); onUserInput(); navigatePrev(); }
function onNavigateNextClicked( event ) { event.preventDefault(); onUserInput(); navigateNext(); }
/**
* Handler for the window level 'hashchange' event.
*/
function onWindowHashChange( event ) {
readURL();
}
/**
* Handler for the window level 'resize' event.
*/
function onWindowResize( event ) {
layout();
}
/**
* Handle for the window level 'visibilitychange' event.
*/
function onPageVisibilityChange( event ) {
var isHidden = document.webkitHidden ||
document.msHidden ||
document.hidden;
// If, after clicking a link or similar and we're coming back,
// focus the document.body to ensure we can use keyboard shortcuts
if( isHidden === false && document.activeElement !== document.body ) {
// Not all elements support .blur() - SVGs among them.
if( typeof document.activeElement.blur === 'function' ) {
document.activeElement.blur();
}
document.body.focus();
}
}
/**
* Invoked when a slide is and we're in the overview.
*/
function onOverviewSlideClicked( event ) {
// TODO There's a bug here where the event listeners are not
// removed after deactivating the overview.
if( eventsAreBound && isOverview() ) {
event.preventDefault();
var element = event.target;
while( element && !element.nodeName.match( /section/gi ) ) {
element = element.parentNode;
}
if( element && !element.classList.contains( 'disabled' ) ) {
deactivateOverview();
if( element.nodeName.match( /section/gi ) ) {
var h = parseInt( element.getAttribute( 'data-index-h' ), 10 ),
v = parseInt( element.getAttribute( 'data-index-v' ), 10 );
slide( h, v );
}
}
}
}
/**
* Handles clicks on links that are set to preview in the
* iframe overlay.
*/
function onPreviewLinkClicked( event ) {
if( event.currentTarget && event.currentTarget.hasAttribute( 'href' ) ) {
var url = event.currentTarget.getAttribute( 'href' );
if( url ) {
showPreview( url );
event.preventDefault();
}
}
}
/**
* Handles click on the auto-sliding controls element.
*/
function onAutoSlidePlayerClick( event ) {
// Replay
if( Reveal.isLastSlide() && config.loop === false ) {
slide( 0, 0 );
resumeAutoSlide();
}
// Resume
else if( autoSlidePaused ) {
resumeAutoSlide();
}
// Pause
else {
pauseAutoSlide();
}
}
// --------------------------------------------------------------------//
// ------------------------ PLAYBACK COMPONENT ------------------------//
// --------------------------------------------------------------------//
/**
* Constructor for the playback component, which displays
* play/pause/progress controls.
*
* @param {HTMLElement} container The component will append
* itself to this
* @param {Function} progressCheck A method which will be
* called frequently to get the current progress on a range
* of 0-1
*/
function Playback( container, progressCheck ) {
// Cosmetics
this.diameter = 100;
this.diameter2 = this.diameter/2;
this.thickness = 6;
// Flags if we are currently playing
this.playing = false;
// Current progress on a 0-1 range
this.progress = 0;
// Used to loop the animation smoothly
this.progressOffset = 1;
this.container = container;
this.progressCheck = progressCheck;
this.canvas = document.createElement( 'canvas' );
this.canvas.className = 'playback';
this.canvas.width = this.diameter;
this.canvas.height = this.diameter;
this.canvas.style.width = this.diameter2 + 'px';
this.canvas.style.height = this.diameter2 + 'px';
this.context = this.canvas.getContext( '2d' );
this.container.appendChild( this.canvas );
this.render();
}
Playback.prototype.setPlaying = function( value ) {
var wasPlaying = this.playing;
this.playing = value;
// Start repainting if we weren't already
if( !wasPlaying && this.playing ) {
this.animate();
}
else {
this.render();
}
};
Playback.prototype.animate = function() {
var progressBefore = this.progress;
this.progress = this.progressCheck();
// When we loop, offset the progress so that it eases
// smoothly rather than immediately resetting
if( progressBefore > 0.8 && this.progress < 0.2 ) {
this.progressOffset = this.progress;
}
this.render();
if( this.playing ) {
features.requestAnimationFrameMethod.call( window, this.animate.bind( this ) );
}
};
/**
* Renders the current progress and playback state.
*/
Playback.prototype.render = function() {
var progress = this.playing ? this.progress : 0,
radius = ( this.diameter2 ) - this.thickness,
x = this.diameter2,
y = this.diameter2,
iconSize = 28;
// Ease towards 1
this.progressOffset += ( 1 - this.progressOffset ) * 0.1;
var endAngle = ( - Math.PI / 2 ) + ( progress * ( Math.PI * 2 ) );
var startAngle = ( - Math.PI / 2 ) + ( this.progressOffset * ( Math.PI * 2 ) );
this.context.save();
this.context.clearRect( 0, 0, this.diameter, this.diameter );
// Solid background color
this.context.beginPath();
this.context.arc( x, y, radius + 4, 0, Math.PI * 2, false );
this.context.fillStyle = 'rgba( 0, 0, 0, 0.4 )';
this.context.fill();
// Draw progress track
this.context.beginPath();
this.context.arc( x, y, radius, 0, Math.PI * 2, false );
this.context.lineWidth = this.thickness;
this.context.strokeStyle = '#666';
this.context.stroke();
if( this.playing ) {
// Draw progress on top of track
this.context.beginPath();
this.context.arc( x, y, radius, startAngle, endAngle, false );
this.context.lineWidth = this.thickness;
this.context.strokeStyle = '#fff';
this.context.stroke();
}
this.context.translate( x - ( iconSize / 2 ), y - ( iconSize / 2 ) );
// Draw play/pause icons
if( this.playing ) {
this.context.fillStyle = '#fff';
this.context.fillRect( 0, 0, iconSize / 2 - 4, iconSize );
this.context.fillRect( iconSize / 2 + 4, 0, iconSize / 2 - 4, iconSize );
}
else {
this.context.beginPath();
this.context.translate( 4, 0 );
this.context.moveTo( 0, 0 );
this.context.lineTo( iconSize - 4, iconSize / 2 );
this.context.lineTo( 0, iconSize );
this.context.fillStyle = '#fff';
this.context.fill();
}
this.context.restore();
};
Playback.prototype.on = function( type, listener ) {
this.canvas.addEventListener( type, listener, false );
};
Playback.prototype.off = function( type, listener ) {
this.canvas.removeEventListener( type, listener, false );
};
Playback.prototype.destroy = function() {
this.playing = false;
if( this.canvas.parentNode ) {
this.container.removeChild( this.canvas );
}
};
// --------------------------------------------------------------------//
// ------------------------------- API --------------------------------//
// --------------------------------------------------------------------//
Reveal = {
VERSION: VERSION,
initialize: initialize,
configure: configure,
sync: sync,
// Navigation methods
slide: slide,
left: navigateLeft,
right: navigateRight,
up: navigateUp,
down: navigateDown,
prev: navigatePrev,
next: navigateNext,
// Fragment methods
navigateFragment: navigateFragment,
prevFragment: previousFragment,
nextFragment: nextFragment,
// Deprecated aliases
navigateTo: slide,
navigateLeft: navigateLeft,
navigateRight: navigateRight,
navigateUp: navigateUp,
navigateDown: navigateDown,
navigatePrev: navigatePrev,
navigateNext: navigateNext,
// Forces an update in slide layout
layout: layout,
// Randomizes the order of slides
shuffle: shuffle,
// Returns an object with the available routes as booleans (left/right/top/bottom)
availableRoutes: availableRoutes,
// Returns an object with the available fragments as booleans (prev/next)
availableFragments: availableFragments,
// Toggles the overview mode on/off
toggleOverview: toggleOverview,
// Toggles the "black screen" mode on/off
togglePause: togglePause,
// Toggles the auto slide mode on/off
toggleAutoSlide: toggleAutoSlide,
// State checks
isOverview: isOverview,
isPaused: isPaused,
isAutoSliding: isAutoSliding,
// Adds or removes all internal event listeners (such as keyboard)
addEventListeners: addEventListeners,
removeEventListeners: removeEventListeners,
// Facility for persisting and restoring the presentation state
getState: getState,
setState: setState,
// Presentation progress on range of 0-1
getProgress: getProgress,
// Returns the indices of the current, or specified, slide
getIndices: getIndices,
getTotalSlides: getTotalSlides,
// Returns the slide element at the specified index
getSlide: getSlide,
// Returns the slide background element at the specified index
getSlideBackground: getSlideBackground,
// Returns the speaker notes string for a slide, or null
getSlideNotes: getSlideNotes,
// Returns the previous slide element, may be null
getPreviousSlide: function() {
return previousSlide;
},
// Returns the current slide element
getCurrentSlide: function() {
return currentSlide;
},
// Returns the current scale of the presentation content
getScale: function() {
return scale;
},
// Returns the current configuration object
getConfig: function() {
return config;
},
// Helper method, retrieves query string as a key/value hash
getQueryHash: function() {
var query = {};
location.search.replace( /[A-Z0-9]+?=([\w\.%-]*)/gi, function(a) {
query[ a.split( '=' ).shift() ] = a.split( '=' ).pop();
} );
// Basic deserialization
for( var i in query ) {
var value = query[ i ];
query[ i ] = deserialize( unescape( value ) );
}
return query;
},
// Returns true if we're currently on the first slide
isFirstSlide: function() {
return ( indexh === 0 && indexv === 0 );
},
// Returns true if we're currently on the last slide
isLastSlide: function() {
if( currentSlide ) {
// Does this slide has next a sibling?
if( currentSlide.nextElementSibling ) return false;
// If it's vertical, does its parent have a next sibling?
if( isVerticalSlide( currentSlide ) && currentSlide.parentNode.nextElementSibling ) return false;
return true;
}
return false;
},
// Checks if reveal.js has been loaded and is ready for use
isReady: function() {
return loaded;
},
// Forward event binding to the reveal DOM element
addEventListener: function( type, listener, useCapture ) {
if( 'addEventListener' in window ) {
( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );
}
},
removeEventListener: function( type, listener, useCapture ) {
if( 'addEventListener' in window ) {
( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture );
}
},
// Programatically triggers a keyboard event
triggerKey: function( keyCode ) {
onDocumentKeyDown( { keyCode: keyCode } );
},
// Registers a new shortcut to include in the help overlay
registerKeyboardShortcut: function( key, value ) {
keyboardShortcuts[key] = value;
}
};
return Reveal;
}));
|
version https://git-lfs.github.com/spec/v1
oid sha256:003c3749900eed542c4a51a783613447038d150af5104611b86512c09624b166
size 81666
|
// Generates Markdown-formatted API documentation from module/command help functions.
import { compileHelp } from '../src/cli.js';
import * as utils from '../src/utils.js';
import * as log from '../src/log.js';
import { setConfigDirs } from '../src/store.js';
import allCommands from '../src/commands/index.js';
setConfigDirs('/path/to/.overcast');
utils.eachObject(allCommands, ({ commands }, name) => {
utils.eachObject(commands, (subcommand) => {
if (subcommand.alias === true) {
return;
}
var subcommandName = subcommand.name && name !== subcommand.name ?
' ' + subcommand.name : '';
console.log('### overcast ' + name + subcommandName);
log.br();
console.log('```');
compileHelp(subcommand, true);
console.log('```');
log.br();
});
});
|
import React from 'react';
import { shallow } from 'enzyme';
import { expect } from 'chai';
import TaskForm from '../index';
describe('<TaskForm />', () => {
it('should render task form', () => {
const wrapper = shallow(<TaskForm handleSubmit={() => {}} />);
const formInput = wrapper.find('input');
expect(formInput).to.have.length(1);
expect(wrapper.state('title')).to.eql('');
});
it('should update state on input\'s onChange event', () => {
const wrapper = shallow(<TaskForm handleSubmit={() => {}} />);
wrapper.find('input').simulate('change', {
target: {
value: 'some title'
}
});
expect(wrapper.state('title')).to.eql('some title');
});
it('should update state on pressing Esc key', () => {
const wrapper = shallow(<TaskForm handleSubmit={() => {}} />);
wrapper.setState({title: 'some title'});
expect(wrapper.state('title')).to.eql('some title');
wrapper.find('input').simulate('keyUp', {
keyCode: 27
});
expect(wrapper.state('title')).to.eql('');
});
it('should submit the form and update the state', () => {
const wrapper = shallow(<TaskForm handleSubmit={() => {}} />);
wrapper.setState({title: 'some title'});
expect(wrapper.state('title')).to.eql('some title');
wrapper.find('form').simulate('submit', {
preventDefault: () => {}
});
expect(wrapper.state('title')).to.eql('');
});
});
|
class IssueList {
/**
* @param {Element} element
*/
constructor (element) {
this.element = element;
this.issues = this.element.querySelectorAll('.issue');
}
/**
* @returns {number}
*/
count () {
return this.element.querySelectorAll('.issue').length;
}
/**
* @returns {Element}
*/
getFirst () {
return this.element.querySelector('.issue');
};
}
module.exports = IssueList;
|
'use strict';
var siofu = require("socketio-file-upload");
module.exports = siofu;
|
{
return unsafeUnwrap(this).id;
}
|
// shared setup code
var Backbone = require('backbone');
var Marionette = require('backbone.marionette');
var _ = require('underscore');
// Sidestep jquery being required on the server
Marionette.$ = function() {};
_.extend(Marionette.$, require('underscore.deferred'));
var App = new Marionette.Application();
App.module('Models', function() {
this.Account = Backbone.Model.extend({});
});
App.module('Models', function(models) {
models.Accounts = Backbone.Collection.extend({
model: models.Account
});
});
App.module('State', function(state) {
this.startsWithParent = false;
this.addInitializer(function(opts) {
this.account = new App.Models.Account({id: opts.userId});
});
});
module.exports = App;
|
version https://git-lfs.github.com/spec/v1
oid sha256:988c41ad22eadaac6727eefc9f5d47cbbab46512694f1cc026fe8fe2b22aca04
size 43912
|
'use strict';
// Dependencies
const fs = require('fs-extra')
const path = require('path')
const readdir = require('recursive-readdir')
function readSourceDir(dir) {
return new Promise(function resolver(resolve, reject) {
readdir(dir, function callback(err, contents) {
if (err) return reject(err)
resolve(contents.map(function(file) {
// TODO: Read source files asynchronously
return {
path: path.relative(dir, file),
source: fs.readFileSync(path.resolve(dir, file))
}
}))
})
})
}
function writeOutput(destDir, output) {
return new Promise(function resolver(resolve, reject) {
fs.remove(destDir, function removeCb(err) {
if (err) return reject(err)
output.forEach(function(file) {
let dest = path.join(destDir, file.path)
// TODO: Use asynchronous file I/O
try {
fs.mkdirpSync(path.dirname(dest))
} catch (err) {
return reject(err)
}
try {
fs.writeFileSync(dest, file.source)
} catch (err) {
return reject(err)
}
resolve()
})
})
})
}
module.exports = {
readSourceDir: readSourceDir,
writeOutput: writeOutput
}
|
// Override TXHRTransport.flush
//
// The 0.9.2 transport flush() method implementation only calls the callback on
// status 200 and never invokes the client callback on HTTP status errors. This
// replaces the implementation with one that always calls the callback,
// including on errors and exceptions.
Thrift.TXHRTransport.prototype.flush = function(async, callback) {
var self = this;
if ((async && !callback) || this.url === undefined || this.url === '') {
return this.send_buf;
}
var xreq = this.getXmlHttpRequestObject();
if (xreq.overrideMimeType) {
xreq.overrideMimeType('application/json');
}
if (callback) {
//Ignore XHR callbacks until the data arrives, then call the
// client's callback
//========
// BEGIN CODE PATCH
//========
/*
xreq.onreadystatechange =
(function() {
var clientCallback = callback;
return function() {
if (this.readyState == 4 && this.status == 200) {
self.setRecvBuffer(this.responseText);
clientCallback();
}
};
}());
*/
//========
// MODIFIED CODE
//========
xreq.onreadystatechange = function() {
if (this.readyState == 4) {
//
// The incoming callback doesn't actually take an error object
// (another limitation of the thrift code) so there's no way
// to properly move the status code error back to client callback.
//
// To workaround this, short of making signficant patches to the
// Thrift library, we *rely on the fact that we're using a JSON
// protocol* and set the buffer to invalid JSON. The true error
// gets lost, but at least the client is informed of *a* failure
// rather than radio silence.
//
var err = (this.status == 200) ? false : true;
self.setRecvBuffer(err ? "http_status_not_200" : this.responseText);
callback();
}
};
//========
// END CODE PATCH
//========
}
xreq.open('POST', this.url, !!async);
xreq.send(this.send_buf);
if (async && callback) {
return;
}
if (xreq.readyState != 4) {
throw 'encountered an unknown ajax ready state: ' + xreq.readyState;
}
if (xreq.status != 200) {
throw 'encountered a unknown request status: ' + xreq.status;
}
this.recv_buf = xreq.responseText;
this.recv_buf_sz = this.recv_buf.length;
this.wpos = this.recv_buf.length;
this.rpos = 0;
};
|
import React, { Component } from 'react';
class todoItem extends Component {
constructor(props) {
super(props);
this.state = {};
}
getColor(priority, completed) {
const itemDesc = this.props.desc;
console.log(`[Debug]getting color for ${itemDesc}`);
if (completed) {
return '#757575';
} else {
switch (priority) {
case 0:
return '#ff1744';
case 1:
return '#ffea00';
case 2:
return '#00e676';
default:
console.log('[Debug]invalid priority');
}
}
console.log('[Debug]invalid priority and completed');
return 0;
}
render() {
const p = this.props;
const color = this.getColor(p.priority, p.completed);
const css = {
borderRadius: '50%',
width: '4.5rem',
backgroundColor: `${color}`,
};
return (
<tr>
<td className="td-empty" />
<td className="td-indicator" style={css} />
{
p.completed ?
<td className="td-checkbox" onClick={() => p.onCompleteCheck(p.id)}><i className="fa fa-check-square-o" aria-hidden="true" /></td> :
<td className="td-checkbox" onClick={() => p.onCompleteCheck(p.id)}><i className="fa fa-square-o" aria-hidden="true" /></td>
}
<td className="td-center" onClick={() => p.onTodoItemSelect(p.id)}>{p.desc}</td>
<td className="td-primary" onClick={() => p.onTodoItemEdit(p.id)}>
<i className="fa fa-pencil" aria-hidden="true" />
</td>
<td className="td-danger" onClick={() => p.onTodoItemRemove(p.id)}>
<i className="fa fa-times" aria-hidden="true" />
</td>
</tr>
);
}
}
export default todoItem;
|
/**
* Created by dsmiley on 7/11/17.
*/
describe('Lavender.Point', function(){
it('Testing Lavender.Point', function() {
var point = new Lavender.Point();
expect(point.x).toBe(0);
expect(point.y).toBe(0);
point.x = 5;
point.y = 15;
expect(point.x).toBe(5);
expect(point.y).toBe(15);
var point2 = new Lavender.Point(20,25);
expect(point2.x).toBe(20);
expect(point2.y).toBe(25);
expect(Lavender.Point.distance(point, point2)).toBe(18.027756377319946);
expect(Lavender.Point.direction(point, point2)).toBe(0.5880026035475675);
point2 = point2.add(point)
expect(point2.x).toBe(25);
expect(point2.y).toBe(40);
point2 = point2.subtract(point)
expect(point2.x).toBe(20);
expect(point2.y).toBe(25);
point2 = point2.scale(10)
expect(point2.x).toBe(200);
expect(point2.y).toBe(250);
expect(point2.magnitude()).toBe(320.1562118716424);
});
});
|
import React from 'react';
import app from './app';
const dehydratedState = window.App.Context; // Sent from the server
window.React = React; // For chrome dev tool support
app.rehydrate(dehydratedState, function( err, context ) {
if ( err ) {
throw err;
}
window.context = context;
const mountNode = document.getElementById('app');
React.render(context.createElement(), mountNode);
});
|
"use strict";
const root = require('./helpers.js').root;
const ip = require('ip');
exports.HOST = ip.address();
exports.DEV_PORT = 3000;
exports.E2E_PORT = 4201;
exports.PROD_PORT = process.env.PORT || 8088;
/**
* These constants set whether or not you will use proxy for Webpack DevServer
* For advanced configuration details, go to:
* https://webpack.github.io/docs/webpack-dev-server.html#proxy
*/
exports.USE_DEV_SERVER_PROXY = false;
exports.DEV_SERVER_PROXY_CONFIG = {
'**': 'http://localhost:8089'
};
/**
* These constants set the source maps that will be used on build.
* For info on source map options, go to:
* https://webpack.github.io/docs/configuration.html#devtool
*/
exports.DEV_SOURCE_MAPS = 'inline-source-map';
exports.PROD_SOURCE_MAPS = 'source-map';
/**
* Set watch options for Dev Server. For better HMR performance, you can
* try setting poll to 1000 or as low as 300 and set aggregateTimeout to as low as 0.
* These settings will effect CPU usage, so optimal setting will depend on your dev environment.
* https://github.com/webpack/docs/wiki/webpack-dev-middleware#watchoptionsaggregatetimeout
*/
exports.DEV_SERVER_WATCH_OPTIONS = {
poll: undefined,
aggregateTimeout: 300,
ignored: /node_modules/
};
/**
* specifies which @ngrx dev tools will be available when you build and load
* your app in dev mode. Options are: monitor | logger | both | none
*/
exports.STORE_DEV_TOOLS = 'monitor';
exports.EXCLUDE_SOURCE_MAPS = [
// these packages have problems with their sourcemaps
root('node_modules/@angular'),
root('node_modules/rxjs')
];
exports.MY_COPY_FOLDERS = [
// use this for folders you want to be copied in to Client dist
// src/assets and index.html are already copied by default.
// format is { from: 'folder_name', to: 'folder_name' }
];
exports.MY_VENDOR_DLLS = [
// list vendors that you want to be included in your dlls files
// this will speed up initial dev server build and incremental builds.
// Be sure to run `npm run build:dll` if you make changes to this array.
];
exports.MY_CLIENT_PLUGINS = [
// use this to import your own webpack config Client plugins.
];
exports.MY_CLIENT_PRODUCTION_PLUGINS = [
// use this to import your own webpack config plugins for production use.
];
exports.MY_CLIENT_RULES = [
// use this to import your own rules for Client webpack config.
];
exports.MY_TEST_RULES = [
// use this to import your own rules for Test webpack config.
];
exports.MY_TEST_PLUGINS = [
// use this to import your own Test webpack config plugins.
];
|
'use strict';
var gulp = require('gulp');
var minifyJs = require('gulp-minify');
var cleanCSS = require('gulp-clean-css');
var gulpCssDataUri = require('gulp-css-base64');
var rename = require('gulp-rename');
var del = require('del');
var runSequence = require('run-sequence');
var replace = require('gulp-string-replace');
var sizereport = require('gulp-sizereport');
var pjson = require('./package.json');
gulp.task('clean', function () {
return del(['dist']);
});
gulp.task('build-js', function () {
return gulp.src('./src/pure-form.js')
.pipe(minifyJs({
noSource: true,
ext: {
min: '.min.js'
},
preserveComments: 'some',
exclude: ['tasks']
}))
.pipe(replace(new RegExp('@version@', 'g'), pjson.version))
.pipe(gulp.dest('dist'));
});
gulp.task('build-css', function () {
return gulp.src('./src/pure-form.css')
.pipe(cleanCSS({
inline: 'local',
compatibility: 'ie9',
specialComments: true
}))
.pipe(gulpCssDataUri({
//baseDir: "src/img",
extensionsAllowed: ['.gif', '.png', '.svg']
}))
.pipe(replace(new RegExp('@version@', 'g'), pjson.version))
.pipe(rename({ suffix: '.min' }))
.pipe(gulp.dest('dist'));
});
gulp.task('sizereport', function () {
return gulp.src('./dist/*')
.pipe(sizereport({
gzip: true
}));
});
gulp.task('build', function (callback) {
runSequence(
'clean',
'build-js',
'build-css',
'sizereport',
callback
);
});
|
require('../css/style.css');
var petstore = require('./petstore');
var input = petstore.input;
document.querySelector('body').appendChild(input);
|
import React from 'react'
import { Route, Link, Switch, BrowserRouter as Router, Redirect} from 'react-router-dom'
import IndexPage from '../container/IndexPage/IndexPage'
import EditorPage from '../container/EditorPage/EditorPage'
import { Blog } from '../container/BlogPage'
import NavPage from '../container/NavPage/NavPage.js'
import BlogDetailPage from '../container/BlogDetailPage/BlogDetailPage'
const Routes = (store, history) => (
<Switch>
<Route exact path='/' component={ IndexPage}/>
<NavPage>
<Route path='/blog' component={Blog}/>
<Route path='/editor' component={EditorPage}/>
<Route path='/detail/:id' component={BlogDetailPage}/>
</NavPage>
</Switch>
)
export default Routes
|
// daiaAvailability.js
// -------------------
// Version: 1.0
// Author: Owen Stephens
// Last Edit: 15/03/2011
// Displays availability from DAIA compliant information
/*
* Constructor arguments:
* arg: ju - instance of juice
* arg: insert - JuiceInsert to use
* arg: targetDiv - id of element to place image in
* arg: availIDs - Juice Meta element containing array of IDs for DAIA requests
* arg: availServer - url of availability server
* arg: availType - set to 'online' to treat all availability as online, otherwise will treat DAIA response generically
* arg: format - format to return DAIA results [json only format currently supported]
* arg: noLines - number of availability lines to display unhidden.
* Remaining lines will be hidden and 'show' button added.
* Any 'open access' availability will be shown whatever this value
* Ignored when availType == 'online'
* arg: toggleExpand - URL of image to be used for the toggleAvailability 'expand' function where some results are hidden. Not used when availType == 'online'
* arg: toggleCollapse - URL of image to be used for the toggleAvailability 'collapse' function where some results are hidden. Not used when availType == 'online'
*/
//***************************
//******** Notes ************
//***************************
// 1. Links to online versions
// Includes a special case for 'online' availability. This is triggered by specifying 'online' in availType
// This is to cope with an issue with DAIA where the 'loan' and 'presentation' services can have a URL whether print or electronic
// (e.g. URL may be link to reservation service for print, or to full-text online for electronic)
// In the original implementation of this juice extension (Oxford University) a separate DAIA service was defined that only returned electronic availability
// The special case handling enables clearer information to be passed to the UX in this case
// However, the extension will handle all DAIA responses without this special case, it simply won't be as clear what the URL links to
function daiaAvailability(ju,insert, targetDiv, availIDs, availServer, availType, format, noLines, toggleExpand, toggleCollapse){
// Initialise extension
id = "daiaAvailability";
this.targetDiv = targetDiv;
this.availIDs = availIDs; // Which IDs from the MetaValues to pass to the DAIA availability service
this.availServer = availServer; // URL of the DAIA compliant availability service
this.format = format; // Currently only supports JSONP
this.availType = availType; // Whether this query is specifically for online availability
this.noLines = noLines; // For general availability, how many lines to show by default (the rest will be hidden with a toggle)
this.expandIcon = toggleExpand; // For general availability allows for a local image to be specified for the toggleAvailability 'expand' function
this.collapseIcon = toggleCollapse; // For general availability allows for a local image to be specified for the toggleAvailability 'collapse' function
initFunc = this.start;
if(arguments.length){
daiaAvailability.superclass.init.call(this,id,initFunc,null,insert,ju);
daiaAvailability.superclass.startup.call(this);
}
}
daiaAvailability.prototype = new JuiceProcess();
daiaAvailability.prototype.constructor = daiaAvailability;
daiaAvailability.superclass = JuiceProcess.prototype;
daiaAvailability.prototype.start = function(){
if(juice.hasMeta(this.availIDs)){
var ids = juice.getMetaValues(this.availIDs);
for(var i=0; i < ids.length; i++){
this.div_id = i;
// check there is a valid id to use
if (ids[i] != "undefined" && ids[i].length >0) {
this.avail_url = this.availServer + "?id=" + encodeURIComponent(ids[i]) + "&format=" + this.format;
this.getDaia();
}
else {
// Do nothing
}
}
}
}
daiaAvailability.prototype.getDaia = function(){
var This = this;
var url = this.avail_url;
var id = this.div_id;
var daia_div = null;
var holdings_html = '';
try {
$jq.getJSON(url + '&callback=?', function(data) {
if(data){
$jq.each(data.document, function(index, daia_doc) {
if (daia_doc.error) {
juice.debugOutln(daia_doc.error);
// To display feedback in the UI, assign an appropriate message to daia_div here
}
else {
holdings_html = This.holdings_summary(daia_doc);
daia_div = '';
if (This.availType == 'online') {
daia_div += '<div class="docdetails"></div>';
} else if (This.href(daia_doc).length > 0){
daia_div += '<div class="docdetails"><a href="' +
This.href(daia_doc) +
'">' +
'Click for more information on this item' +
'</a></div>';
} else {
daia_div += '<div class="docdetails"></div>';
}
daia_div += '<div class="docholdings">' +
holdings_html +
'</div>';
}
});
}
else {
juice.debugOutln('Unable to get any availability information using the DAIA response: ' + dump(data) + '<br />');
// To display feedback in the UI, assign an appropriate message to daia_div here
}
This.displayDaia(daia_div, id);
});
}
catch (err) {
juice.debugOutln(err);
}
}
daiaAvailability.prototype.daia_err = function(daia_doc){
var This = this;
var ret = '';
var error = '';
error = daia_doc.error.content + ": " + daia_doc.error.errno;
ret = error;
return ret;
}
daiaAvailability.prototype.href = function(daia_doc){
var ret = '';
if (daia_doc.href) {
ret = daia_doc.href;
}
return ret;
}
daiaAvailability.prototype.id = function(daia_doc){
var ret = '';
ret = daia_doc.id;
return ret;
}
daiaAvailability.prototype.item_count = function(daia_doc) {
var ret = '';
ret = daia_doc.item;
return ret;
}
daiaAvailability.prototype.holdings_summary = function(daia_doc){
var This = this;
if (This.availType == 'online') {
// Specific approach to DAIA which assumes all items are online and so URLs go to full text
var e_html = '';
if (typeof(This.item_count(daia_doc)) == 'undefined') {
juice.debugOutln('No items in DAIA document: ' + dump(daia_doc) + '<br />');
// To display feedback on the lack of online availability in the UI, assign an appropriate message to e_html here
}
else {
var e_html = '<div class="online_links"><strong>Available online via:</strong><ul>';
$jq.each(daia_doc.item, function(index, daia_item) {
if (daia_item) {
e_html += '<li style="display: block;"><a href="' + This.item_href(daia_item) + '">' + This.item_label(daia_item) + '</a></li>';
}
});
e_html += '</ul></div>';
}
ret = e_html;
}
else {
// More generic routine, mainly (not exclusively) aimed at DAIA describing print materials
// To allow show/hide toggle on the results need to create a doc_id which is a valid html 'id' attributefor a tbody element.
// Creating hash might be best strategy, but there may be licensing issues
// Therefore here simply preserve legal characters and remove rest. This brings some risk of duplication
var doc_id = daia_doc.id.replace(/[^A-Za-z0-9\-\_]/g,"");
var ret = '';
var all_depts = new Object();
var holding_html = '';
var holding_html_open = '';
var holding_html_content = '';
var holding_html_close = '';
var expandText = 'Show availability in all libraries';
var expandHint = '(click arrow for more availability)';
var oa_html = '';
var summary_count = 0;
if (typeof(This.item_count(daia_doc)) == 'undefined') {
juice.debugOutln('No items in DAIA document: ' + dump(daia_doc) + '<br />');
// No mechanism currently supported to display feedback on the lack of general availability in the UI
return ret;
}
$jq.each(daia_doc.item, function(index, daia_item) {
all_depts[(This.department_id(daia_item))] = index;
});
var unique_depts = new Array();
for (j in all_depts) {
unique_depts.push(j);
}
for ( i=0; i < unique_depts.length; i++) {
var holding_summary = new Object();
holding_summary.avail_loans = 0;
holding_summary.avail_pres = 0;
holding_summary.avail_oa = [];
holding_summary.dept_id = unique_depts[i];
$jq.each(daia_doc.item, function(index, daia_item) {
if (daia_item.available) {
if (This.department_id(daia_item) == unique_depts[i]) {
holding_summary.dept_name = unique_depts[i];
if(This.department_name(daia_item)){
holding_summary.dept_name = This.department_name(daia_item);
}
holding_summary.avail_loans += This.count_avail_loans(daia_item); // returns an integer number of available loan elements
holding_summary.avail_pres += This.count_avail_pres(daia_item); // returns an integer number of available pres elements
holding_summary.avail_oa = holding_summary.avail_oa.concat(This.oa_urls(daia_item)); // returns an array of OA URLs
}
}
});
if (typeof(holding_summary.dept_name) == undefined || holding_summary.dept_name == null) {
holding_summary.dept_name == unique_depts[i];
}
if (holding_summary.avail_loans > 0 || holding_summary.avail_pres > 0) {
if (This.noLines == summary_count) {
holding_html_content += '</tbody><tbody class="' + doc_id + ' collapsed" style="display:none;">';
}
holding_html_content += '<tr>' +
'<td>' + holding_summary.dept_name + '</td>' +
'<td>' + holding_summary.avail_loans + '</td>' +
'<td>' + holding_summary.avail_pres + '</td>' +
'<td>';
holding_html_content += '</td></tr>';
summary_count++;
}
else
{
juice.debugOutln('No DAIA loan or presentation services available from DAIA document: ' + dump(daia_doc) + '<br />');
// No mechanism currently supported to display feedback on the lack of loan/presentation services in the UI
}
if(holding_summary.avail_oa.length > 0) {
for (k=0; k < holding_summary.avail_oa.length; k++) {
oa_html += '<li><a href="'+ holding_summary.avail_oa[k] + '">' + holding_summary.avail_oa[k] + '</a></li>';
}
}
else
{
juice.debugOutln('No DAIA openaccess services available from DAIA document: ' + dump(daia_doc) + '<br />');
// No mechanism currently supported to display feedback on the lack of openaccess services in the UI
}
}
holding_html_close += '</tbody></table>';
if (summary_count > This.noLines) {
holding_html_open = '<table class="daia_summary"><thead><tr><th>Library' +
'<img onclick="toggleAvailability(\'' + doc_id + '\',\'' + This.expandIcon + '\',\'' + This.collapseIcon +'\');" ' +
'src="' + This.expandIcon +'"' +
'alt="'+ expandText +'">' +
'<span id="toggleAvailability">' + expandHint + '</span>' +
'</th><th>Copies for loan</th><th>Reference only copies</th>' +
'</tr></thead><tbody>';
}
else {
holding_html_open = '<table class="daia_summary"><thead><tr><th>Library' +
'</th><th>Copies for loan</th><th>Reference only copies</th>' +
'</tr></thead><tbody>';
}
holding_html = holding_html_open + holding_html_content + holding_html_close;
if (oa_html.length > 0) {
oa_html = '<div class="oa_links"><strong>Freely available copies online:</strong><ul>' + oa_html + '</ul></div>';
}
if (summary_count > 0) {
if (oa_html.length > 0) {
holding_html = oa_html + holding_html;
}
ret = holding_html;
}
else if (oa_html.length > 0) {
ret = oa_html;
}
}
return ret;
}
daiaAvailability.prototype.department_name = function(daia_item){
var ret = '';
if (daia_item.department) {
if (daia_item.department.content) {
ret = daia_item.department.content;
}
}
else {
ret = 'Unknown'
}
return ret;
}
daiaAvailability.prototype.department_id = function(daia_item){
var ret = '';
if (daia_item.department) {
if (daia_item.department.id) {
ret = daia_item.department.id;
}
}
else {
ret = 'unknown'
}
return ret;
}
daiaAvailability.prototype.storage = function(daia_item){
var ret = '';
ret = daia_item.storage.content;
return ret;
}
daiaAvailability.prototype.count_avail_loans = function(daia_item){
var This = this;
var ret = '';
var no_loans = 0;
$jq.each(daia_item.available, function(index, daia_available) {
if (This.daia_service(daia_available) == 'loan') {
no_loans++;
}
});
ret = no_loans;
return ret;
}
daiaAvailability.prototype.count_avail_pres = function(daia_item){
var This = this;
var ret = '';
var no_pres = 0;
$jq.each(daia_item.available, function(index, daia_available) {
if (This.daia_service(daia_available) == 'presentation') {
no_pres++;
}
});
ret = no_pres;
return ret;
}
daiaAvailability.prototype.oa_urls = function(daia_item){
var This = this;
var ret = '';
var urls = new Array();
$jq.each(daia_item.available, function(index, daia_available) {
if (This.daia_service(daia_available) == 'openaccess') {
urls.push(This.daia_service_url(daia_available));
}
});
ret = urls;
return ret;
}
daiaAvailability.prototype.availability = function(daia_item){
var This = this;
var ret = '';
var dept = daia_item.department.content;
var dept_id = daia_item.department.id;
var available_list = dept + '<ul>';
if (daia_item.available) {
$jq.each(daia_item.available, function(index, daia_available) {
available_list += '<li>' +
This.daia_service(daia_available) +
'</li>';
});
}
available_list += '</ul>';
ret = available_list;
return ret;
}
daiaAvailability.prototype.item_href = function(daia_item){
var ret = '';
ret = daia_item.href;
return ret;
}
daiaAvailability.prototype.item_label = function(daia_item){
var ret = '';
ret = daia_item.label;
return ret;
}
daiaAvailability.prototype.daia_service = function(daia_available){
var ret = '';
ret = daia_available.service;
return ret;
}
daiaAvailability.prototype.daia_service_url = function(daia_available){
var ret = '';
ret = daia_available.href;
return ret;
}
daiaAvailability.prototype.displayDaia = function(daia_div, id) {
if(daia_div) {
this.showInsert(id);
this.insert = this.getInsertObject(id);
this.insert.append(daia_div);
}
}
function toggleAvailability(id, expandIcon, collapseIcon) {
var collapseIcon = collapseIcon;
var collapseText = 'Show fewer libraries';
var collapseHint = '(click arrow to show less availability)';
var expandIcon = expandIcon;
var expandText = 'Show more libraries';
var expandHint = '(click arrow to show more availability)';
$jq('.' + id).each(function() {
var $section = $jq(this);
if ($section.is('.collapsed')) {
$section.removeClass('collapsed').fadeIn('fast');
$section.closest('.daia_summary').find('img').attr('src',collapseIcon);
$section.closest('.daia_summary').find('img').attr('alt',collapseText);
$section.closest('.daia_summary').find('span[id="toggleAvailability"]').text(collapseHint);
}
else {
$section.addClass('collapsed').fadeOut('fast');
$section.closest('.daia_summary').find('img').attr('src',expandIcon);
$section.closest('.daia_summary').find('img').attr('alt',expandText);
$section.closest('.daia_summary').find('span[id="toggleAvailability"]').text(expandHint);
}
});
}
/**
* Function : dump()
* Arguments: The data - array,hash(associative array),object
* The level - OPTIONAL
* Returns : The textual representation of the array.
* This function was inspired by the print_r function of PHP.
* This will accept some data as the argument and return a
* text that will be a more readable version of the
* array/hash/object that is given.
* Docs: http://www.openjs.com/scripts/others/dump_function_php_print_r.php
*/
// Included only for purposes of debugging
function dump(arr,level) {
var dumped_text = "";
if(!level) level = 0;
//The padding given at the beginning of the line.
var level_padding = "";
for(var j=0;j<level+1;j++) level_padding += " ";
if(typeof(arr) == 'object') { //Array/Hashes/Objects
for(var item in arr) {
var value = arr[item];
if(typeof(value) == 'object') { //If it is an array,
dumped_text += level_padding + "'" + item + "' ...\n";
dumped_text += dump(value,level+1);
} else {
dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n";
}
}
} else { //Stings/Chars/Numbers etc.
dumped_text = "===>"+arr+"<===("+typeof(arr)+")";
}
return dumped_text;
}
|
"use strict";
var gcloud = require("gcloud");
export default class DataStore {
constructor(config){
this._config = config;
this._ds = gcloud(config).datastore;
}
get config(){
return this._config;
}
get store(){
return this._ds;
}
get dataset(){
return this.store.dataset();
}
createQuery(kind){
return this.dataset.createQuery(null, kind);
}
getKey(id, kind){
return this.store.key([kind, parseInt(id, 10)]);
}
runQuery(query, cb){
this.dataset.runQuery(query, function(err, entities){
if(err){
console.error(err);
cb(err);
}else{
//console.log(util.format("Entities: %j", entities));
cb(null, entities);
}
});
}
getEntity(key, cb){
this.dataset.get(key, function(err, entity){
if(err){
console.error(err);
cb(err);
}else{
//console.log(entity);
cb(null, entity);
}
});
}
saveEntity(payload, cb){
this.dataset.save(payload, function(err, status){
if(err){
console.error(err);
cb(err);
}else{
//console.log(status);
cb(null, status);
}
});
}
deleteEntity(key, cb){
this.store.delete(key, function(err, status){
if(err){
console.error(err);
cb(err);
}else{
//console.log(status);
cb(null, status);
}
});
}
}
|
/* globals $ */
/*
Create a function that takes a selector and:
* Finds all elements with class `button` or `content` within the provided element
* Change the content of all `.button` elements with "hide"
* When a `.button` is clicked:
* Find the topmost `.content` element, that is before another `.button` and:
* If the `.content` is visible:
* Hide the `.content`
* Change the content of the `.button` to "show"
* If the `.content` is hidden:
* Show the `.content`
* Change the content of the `.button` to "hide"
* If there isn't a `.content` element **after the clicked `.button`** and **before other `.button`**, do nothing
* Throws if:
* The provided ID is not a **jQuery object** or a `string`
*/
function solve() {
return function (selector) {
//debugger;
if (typeof selector === 'undefined') {
throw new Error('Selector cannot be undefined');
}
if (typeof selector === 'string') {
selector = $(selector);
}
//if (!(selector instanceof jQuery)) {
if (typeof selector.selector === 'undefined') {
throw new Error('Selector must be DOM element');
}
if (selector.length === 0) {
throw new Error('Selector does not select DOM element');
}
var $buttons = selector.children('.button'),
$contents = selector.children('.content');
if ($buttons.length === 0 || $contents.length === 0) {
return;
}
$buttons.each(function (i, button) {
button = $(button);
button.text('hide');
});
selector.on('click', '.button', function () {
var $this = $(this),
currentSiblingElement = $this.next(),
foundElement;
while (currentSiblingElement.length) {
if (currentSiblingElement.hasClass('button')) {
break;
}
if (currentSiblingElement.hasClass('content')) {
var next = currentSiblingElement.next();
while (next.length) {
if (next.hasClass('button')) {
foundElement = currentSiblingElement;
break;
}
next = next.next();
}
}
if (foundElement) {
break;
}
currentSiblingElement = currentSiblingElement.next();
}
if (foundElement) {
if ($this.text().indexOf('hide') >= 0) {
$this.text('show');
foundElement.hide();
} else {
$this.text('hide');
foundElement.css('display', '');
}
}
});
};
};
module.exports = solve;
//debugger;
//var s = solve();
//s('bls');
|
// Custom VietNam Moment.js Locales
// Based on: https://github.com/moment/moment/blob/develop/locale/vi.js
moment.locale('vi', {
months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
monthsParseExact : true,
weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
weekdaysParseExact : true,
meridiemParse: /sa|ch/i,
isPM : function (input) {
return /^ch$/i.test(input);
},
meridiem : function (hours, minutes, isLower) {
if (hours < 12) {
return isLower ? 'sa' : 'SA';
} else {
return isLower ? 'ch' : 'CH';
}
},
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM [năm] YYYY',
LLL : 'D MMMM [năm] YYYY HH:mm',
LLLL : 'dddd, D MMMM [năm] YYYY HH:mm',
l : 'DD/M/YYYY',
ll : 'D MMM YYYY',
lll : 'D MMM YYYY HH:mm',
llll : 'ddd, D MMM YYYY HH:mm'
},
calendar : {
sameDay: '[Hôm nay lúc] LT',
nextDay: '[Ngày mai lúc] LT',
nextWeek: 'dddd [tuần tới lúc] LT',
lastDay: '[Hôm qua lúc] LT',
lastWeek: 'dddd [tuần rồi lúc] LT',
sameElse: 'L'
},
relativeTime : {
future : '%s tới',
past : '%s trước',
s : 'vài giây',
m : 'một phút',
mm : '%d phút',
h : 'một giờ',
hh : '%d giờ',
d : 'một ngày',
dd : '%d ngày',
M : 'một tháng',
MM : '%d tháng',
y : 'một năm',
yy : '%d năm'
},
ordinalParse: /\d{1,2}/,
ordinal : function (number) {
return number;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
|
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
coffee: {
compile: {
options: {
bare: true,
sourceMap: true
},
files: {
'static/js/<%= pkg.name %>.js': [
'coffee/*.coffee',
'coffee/*/*.coffee',
]
}
}
},
codo: {
options: {
title: "Tassel. Simple bookmarks server",
output: 'docs',
inputs: [
'coffee'
]
}
},
handlebars: {
compile: {
options: {
namespace: 'JST'
},
files: {
'static/jst/<%= pkg.name %>.js': [
'handlebars/bookmark.hbs',
'handlebars/form.hbs',
]
}
}
},
stylus: {
compile: {
files: {
'static/css/<%= pkg.name %>.css': 'stylus/<%= pkg.name %>.styl',
}
}
},
uglify: {
options: {
sourceMap: true,
wrap: false
},
tassel: {
files: {
'static/js/<%= pkg.name %>.min.js': [
'static/js/<%= pkg.name %>.js',
]
}
},
libs: {
files: {
'static/js/<%= pkg.name %>-libs.min.js': [
'static/lib/bundle.js',
'static/lib/qwest.js',
]
}
},
templates: {
files: {
'static/jst/<%= pkg.name %>.js': 'static/jst/<%= pkg.name %>.js',
}
}
},
watch: {
css: {
files: 'stylus/*.styl',
tasks: 'stylus'
},
libs: {
files: ['static/libs/*.js'],
tasks: ['uglify:libs']
},
coffee: {
files: ['coffee/*.coffee', 'coffee/*/*.coffee'],
tasks: ['coffee', 'uglify:tassel']
}
}
});
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-handlebars');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-codo');
grunt.registerTask('default', ['coffee', 'handlebars', 'codo', 'stylus', 'uglify', 'watch']);
};
|
'use strict';
/* global $, window, plugin, grecaptcha, utils, app, document */
$(function () {
var pluginName = 'spam-be-gone';
function ensureRecaptchaThenCreate() {
if (!$('script[src*="www.recaptcha.net/recaptcha/api.js"]').length) {
injectScript('//www.recaptcha.net/recaptcha/api.js?onload=__nodebbSpamBeGoneCreateCaptcha__&render=explicit&hl=' +
(ajaxify.data.recaptchaArgs.options.hl || 'en')
);
} else if (grecaptcha) {
window.__nodebbSpamBeGoneCreateCaptcha__();
}
}
function onRegisterPage() {
if (ajaxify.data.recaptchaArgs) {
ensureRecaptchaThenCreate();
}
}
function onLoginPage() {
if (ajaxify.data.recaptchaArgs && ajaxify.data.recaptchaArgs.addLoginRecaptcha) {
ensureRecaptchaThenCreate();
}
}
function onAccountProfilePage(data) {
var $btn = $('#spamBeGoneReportUserBtn');
$btn.off('click');
$btn.on('click', function (e) {
e.preventDefault();
reportUser('/api/user/' + ajaxify.data.userslug + '/' + pluginName + '/report');
var $parentBtn = $btn.parents('.account-fab').find('[data-toggle="dropdown"]');
if ($parentBtn.dropdown) {
$parentBtn.dropdown('toggle');
}
return false;
});
}
function onManageRegistrationPage() {
var $btn = $('button.report-spam-user');
$btn.on('click', function (e) {
e.preventDefault();
var username = $btn.parents('[data-username]').attr('data-username');
reportUser('/api/user/' + username + '/' + pluginName + '/report/queue');
return false;
});
}
function reportUser(url) {
require(['alerts'], function (alerts) {
return $.post(url)
.then(function () {
alerts.success('User reported!');
})
.catch(function (e) {
alerts.error(e.responseJSON.message || '[spam-be-gone:something-went-wrong]');
});
});
}
function injectTag(tagName, attrs, options) {
options = options || {};
var tag = document.createElement(tagName);
tag.onload = options.onload || null; // @ie8; img.onload cannot be undefined
var setAttr = tag.setAttribute ?
function (tag, key, value) { tag.setAttribute(key, value); return tag; } :
function (tag, key, value) { tag[key] = value; return tag; };
Object.keys(attrs).forEach(function (key) {
tag = setAttr(tag, key, attrs[key]);
});
if (options.insertBefore) {
options.insertBefore.parentNode.insertBefore(tag, options.insertBefore);
} else if (options.appendChild) {
options.appendChild.appendChild(tag);
} else {
var scripts = document.getElementsByTagName('script');
scripts[scripts.length - 1].parentNode.appendChild(tag);
}
}
function injectScript(src, options) {
options = options || {};
injectTag('script', { src: src, type: 'text/javascript', async: '', defer: '' }, options);
}
$(window).on('action:ajaxify.end', function (evt, data) {
switch (data.tpl_url) {
case 'register':
onRegisterPage(data);
break;
case 'login':
onLoginPage(data);
break;
case 'account/profile':
onAccountProfilePage(data);
break;
case 'admin/manage/registration':
onManageRegistrationPage(data);
break;
}
});
});
window.__nodebbSpamBeGoneCreateCaptcha__ = function () {
var args = ajaxify.data.recaptchaArgs;
if (!args) {
return;
}
grecaptcha.render(
args.targetId,
{
theme: args.options.theme,
sitekey: args.publicKey,
callback: function () {
var error = utils.param('error');
if (error) {
require(['alerts'], function (alerts) {
alerts.error(error);
});
}
},
}
);
};
$(window).on('action:script.load', function (evt, data) {
// Inject register.tpl client-side script
if (data.tpl_url === 'register') {
data.scripts.push('spam-be-gone/register');
}
});
|
/*!
Wheelzoom 3.0.0
license: MIT
http://www.jacklmoore.com/wheelzoom
*/
window.wheelzoom = (function(){
var defaults = {
zoom: 0.10
};
var canvas = document.createElement('canvas');
function setSrcToBackground(img) {
img.style.backgroundImage = "url('"+img.src+"')";
img.style.backgroundRepeat = 'no-repeat';
canvas.width = img.naturalWidth;
canvas.height = img.naturalHeight;
img.src = canvas.toDataURL();
img.style.cursor = 'pointer';
}
main = function(img, options){
if (!img || !img.nodeName || img.nodeName !== 'IMG') { return; }
var settings = {};
var width;
var height;
var bgWidth;
var bgHeight;
var bgPosX;
var bgPosY;
var previousEvent;
function updateBgStyle() {
if (bgPosX > 0) {
bgPosX = 0;
} else if (bgPosX < width - bgWidth) {
bgPosX = width - bgWidth;
}
if (bgPosY > 0) {
bgPosY = 0;
} else if (bgPosY < height - bgHeight) {
bgPosY = height - bgHeight;
}
img.style.backgroundSize = bgWidth+'px '+bgHeight+'px';
img.style.backgroundPosition = bgPosX+'px '+bgPosY+'px';
}
function reset() {
bgWidth = width;
bgHeight = height;
bgPosX = bgPosY = 0;
img.style.cursor = 'pointer';
updateBgStyle();
}
function onwheel(e) {
var deltaY = 0;
e.preventDefault();
if (e.deltaY) { // FireFox 17+ (IE9+, Chrome 31+?)
deltaY = e.deltaY;
} else if (e.wheelDelta) {
deltaY = -e.wheelDelta;
}
// As far as I know, there is no good cross-browser way to get the cursor position relative to the event target.
// We have to calculate the target element's position relative to the document, and subtrack that from the
// cursor's position relative to the document.
var rect = img.getBoundingClientRect();
var offsetX = e.pageX - rect.left - document.body.scrollLeft;
var offsetY = e.pageY - rect.top - document.body.scrollTop;
// Record the offset between the bg edge and cursor:
var bgCursorX = offsetX - bgPosX;
var bgCursorY = offsetY - bgPosY;
// Use the previous offset to get the percent offset between the bg edge and cursor:
var bgRatioX = bgCursorX/bgWidth;
var bgRatioY = bgCursorY/bgHeight;
// Update the bg size:
if (deltaY < 0) {
bgWidth += bgWidth*settings.zoom;
bgHeight += bgHeight*settings.zoom;
img.style.cursor = "zoom-in"
} else {
bgWidth -= bgWidth*settings.zoom;
bgHeight -= bgHeight*settings.zoom;
img.style.cursor = "zoom-out"
}
// Take the percent offset and apply it to the new size:
bgPosX = offsetX - (bgWidth * bgRatioX);
bgPosY = offsetY - (bgHeight * bgRatioY);
// Prevent zooming out beyond the starting size
if (bgWidth <= width || bgHeight <= height) {
reset();
} else {
updateBgStyle();
}
}
function drag(e) {
e.preventDefault();
bgPosX += (e.pageX - previousEvent.pageX);
bgPosY += (e.pageY - previousEvent.pageY);
previousEvent = e;
img.style.cursor = 'pointer';
updateBgStyle();
}
function removeDrag() {
document.removeEventListener('mouseup', removeDrag);
document.removeEventListener('mousemove', drag);
}
// Make the background draggable
function draggable(e) {
e.preventDefault();
previousEvent = e;
document.addEventListener('mousemove', drag);
document.addEventListener('mouseup', removeDrag);
}
function loaded() {
var computedStyle = window.getComputedStyle(img, null);
width = parseInt(computedStyle.width, 10);
height = parseInt(computedStyle.height, 10);
bgWidth = width;
bgHeight = height;
bgPosX = 0;
bgPosY = 0;
setSrcToBackground(img);
img.style.backgroundSize = width+'px '+height+'px';
img.style.backgroundPosition = '0 0';
img.addEventListener('wheelzoom.reset', reset);
img.addEventListener('wheel', onwheel);
img.addEventListener('mousedown', draggable);
}
img.addEventListener('wheelzoom.destroy', function (originalProperties) {
console.log(originalProperties);
img.removeEventListener('wheelzoom.destroy');
img.removeEventListener('wheelzoom.reset', reset);
img.removeEventListener('load', onload);
img.removeEventListener('mouseup', removeDrag);
img.removeEventListener('mousemove', drag);
img.removeEventListener('mousedown', draggable);
img.removeEventListener('wheel', onwheel);
img.style.cursor = 'pointer';
img.style.backgroundImage = originalProperties.backgroundImage;
img.style.backgroundRepeat = originalProperties.backgroundRepeat;
img.src = originalProperties.src;
}.bind(null, {
backgroundImage: img.style.backgroundImage,
backgroundRepeat: img.style.backgroundRepeat,
src: img.src
}));
options = options || {};
Object.keys(defaults).forEach(function(key){
settings[key] = options[key] !== undefined ? options[key] : defaults[key];
});
if (img.complete) {
loaded();
} else {
function onload() {
img.removeEventListener('load', onload);
loaded();
}
img.addEventListener('load', onload);
}
};
// Do nothing in IE8
if (typeof window.getComputedStyle !== 'function') {
return function(elements) {
return elements;
}
} else {
return function(elements, options) {
if (elements && elements.length) {
Array.prototype.forEach.call(elements, main, options);
} else if (elements && elements.nodeName) {
main(elements, options);
}
return elements;
}
}
}());
|
/*
* jQuery File Upload Audio Preview Plugin
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2013, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/* jshint nomen:false */
/* global define, require, window, document */
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'load-image',
'./jquery.fileupload-process'
], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS:
factory(
require('jquery'),
require('load-image')
);
} else {
// Browser globals:
factory(
window.jQuery,
window.loadImage
);
}
}(function ($, loadImage) {
'use strict';
// Prepend to the default processQueue:
$.blueimp.fileupload.prototype.options.processQueue.unshift(
{
action: 'loadAudio',
// Use the action as prefix for the "@" options:
prefix: true,
fileTypes: '@',
maxFileSize: '@',
disabled: '@disableAudioPreview'
},
{
action: 'setAudio',
name: '@audioPreviewName',
disabled: '@disableAudioPreview'
}
);
// The File Upload Audio Preview plugin extends the fileupload widget
// with audio preview functionality:
$.widget('blueimp.fileupload', $.blueimp.fileupload, {
options: {
// The regular expression for the types of audio files to load,
// matched against the file type:
loadAudioFileTypes: /^audio\/.*$/
},
_audioElement: document.createElement('audio'),
processActions: {
// Loads the audio file given via data.files and data.index
// as audio element if the browser supports playing it.
// Accepts the options fileTypes (regular expression)
// and maxFileSize (integer) to limit the files to load:
loadAudio: function (data, options) {
if (options.disabled) {
return data;
}
var file = data.files[data.index],
url,
audio;
if (this._audioElement.canPlayType &&
this._audioElement.canPlayType(file.type) &&
($.type(options.maxFileSize) !== 'number' ||
file.size <= options.maxFileSize) &&
(!options.fileTypes ||
options.fileTypes.test(file.type))) {
url = loadImage.createObjectURL(file);
if (url) {
audio = this._audioElement.cloneNode(false);
audio.src = url;
audio.controls = true;
data.audio = audio;
return data;
}
}
return data;
},
// Sets the audio element as a property of the file object:
setAudio: function (data, options) {
if (data.audio && !options.disabled) {
data.files[data.index][options.name || 'preview'] = data.audio;
}
return data;
}
}
});
}));
|
/* global tavJS, undefied, Object */
/**
* String validate test
* @author Matheus Fidelis <msfidelis01@gmail.com>
* @version 1.0.0
*
* @param {object} data Element that will test
* @returns {object} Results of validate
*/
tavJS.validate.string = function (data) {
var result = null;
/**
* Construct Regexp of validate
*
* @param {object} data Parameter of validate
* @returns {RegExp} Return RegExp
*/
this.input = function (data) {
var pattern = new RegExp(/^(.*)$/);
if ((undefined !== data.behavior) && ('' !== data.behavior) && (null !== data.behavior)) {
if ((undefined !== data.behavior.input) && ('' !== data.behavior.input) && (null !== data.behavior.input)) {
switch (data.behavior.input) {
case 'alphanum':
pattern = new RegExp(/^[a-z0-9 ]+$/i);
break;
case 'none':
pattern = new RegExp(/^(.*)$/);
break;
}
}
}
return pattern;
};
try {
var pattern = this.input(data);
if ((data instanceof Object) && (undefined !== data.name) && (undefined !== data.value)) {
result = new Object();
result[data.name] = new Object({
'id': ((undefined !== data.id)) ? data.id : '',
'name': data.name,
'status': (('' !== data.value)) ? pattern.test(data.value) : true
});
}
} catch (ex) {
console.log(ex);
}
return result;
};
|
var webpack = require('webpack');
var { version } = require('./package.json');
var PROD = process.argv.indexOf('-p') >= 0;
console.log(`*** building package version ${version} ***\n`)
module.exports = {
entry: {
'amap': __dirname + '/src/amap.js',
},
output: {
libraryTarget: 'umd',
library: ['echarts', '[name]'],
path: __dirname + '/dist',
filename: PROD ? 'echarts-[name].min.js' : 'echarts-[name].js'
},
externals: {
'echarts': 'echarts'
},
devtool: PROD ? '#source-map' : '#eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env.VERSION': JSON.stringify(version)
})
]
};
|
module.exports = {
// parser: 'sugarss',
plugins: {
// 'postcss-import': {},
// 'postcss-cssnext': {},
'autoprefixer': {}
// 'cssnano': {}
},
sourceMap: true
};
|
const debug = require("debug")("decoder:test:downgrade-test");
const assert = require("chai").assert;
const Big = require("big.js");
const clonedeep = require("lodash.clonedeep");
const Ganache = require("ganache-core");
const path = require("path");
const Web3 = require("web3");
const Decoder = require("../../..");
const Codec = require("@truffle/codec");
const { prepareContracts } = require("../../helpers");
let web3; //sorry!
let abstractions; //sorry!
describe("Graceful degradation when information is missing", function() {
let provider;
let rawCompilations;
let accounts;
let Contracts;
let compilations;
before("Create Provider", async function () {
provider = Ganache.provider({seed: "decoder", gasLimit: 7000000});
web3 = new Web3(provider);
accounts = await web3.eth.getAccounts();
});
before("Prepare contracts and artifacts", async function () {
this.timeout(30000);
const prepared = await prepareContracts(provider, path.resolve(__dirname, ".."));
abstractions = prepared.abstractions;
rawCompilations = prepared.compilations;
Contracts = [
abstractions.DowngradeTest,
abstractions.DowngradeTestParent,
abstractions.DecoyLibrary
];
compilations = Codec.Compilations.Utils.shimArtifacts(Contracts);
});
it("Correctly degrades on allocation when no node", async function() {
let mangledCompilations = clonedeep(compilations);
let source = mangledCompilations[0].sources.find(x => x); //find defined source
source.ast = undefined;
await runTestBody(mangledCompilations);
});
it("Correctly degrades on allocation when error", async function() {
let mangledCompilations = clonedeep(compilations);
let source = mangledCompilations[0].sources.find(x => x); //find defined source
let contractNode = source.ast.nodes.find(
node =>
node.nodeType === "ContractDefinition" && node.name === "DowngradeTest"
);
let structNode = contractNode.nodes.find(
node => node.nodeType === "StructDefinition" && node.name === "Pair"
);
structNode.nodeType = "Ninja"; //fake node type which will prevent
//the decoder from recognizing it as a struct definition
await runTestBody(mangledCompilations, true);
});
it("Correctly degrades on decoding when error", async function() {
let mangledCompilations = clonedeep(compilations);
let source = mangledCompilations[0].sources.find(x => x); //find defined source
let contractNode = source.ast.nodes.find(
node =>
node.nodeType === "ContractDefinition" && node.name === "DowngradeTest"
);
let enumNode = contractNode.nodes.find(
node => node.nodeType === "EnumDefinition" && node.name === "Ternary"
);
enumNode.nodeType = "Ninja"; //fake node type which will prevent
//the decoder from recognizing it as a enum definition
await runTestBody(mangledCompilations, true);
});
it("Correctly abifies after finishing", async function() {
await runTestBody(compilations, false, true); //for once, we're not modifying it!
});
it("Correctly decodes decimals", async function() {
let mangledCompilations = clonedeep(compilations);
let downgradeTest = mangledCompilations[0].contracts.find(
contract => contract.contractName === "DowngradeTest"
);
//HACK
//Let's tweak that ABI a little before setting up the decoder...
downgradeTest.abi.find(
abiEntry => abiEntry.name === "shhImADecimal"
).inputs[0].type = "fixed168x10";
//...and now let's set up a decoder for our hacked-up contract artifact.
let decoder = await Decoder.forProject(web3.currentProvider, {
compilations: mangledCompilations
});
//the ethers encoder can't yet handle fixed-point
//(and the hack I tried earlier didn't work because it messed up the signatures)
//so I'm going to use a *different* hack and send this transaction manually!
const tau = new Big("6.2831853072");
const wrappedTau = {
type: {
typeClass: "fixed",
bits: 168,
places: 10
},
kind: "value",
value: {
asBig: tau
}
};
const encodedTau = Codec.AbiData.Encode.encodeTupleAbi([wrappedTau]);
const hexTau = Codec.Conversion.toHexString(encodedTau);
const selector = web3.eth.abi.encodeFunctionSignature(
"shhImADecimal(fixed168x10)"
);
const data = selector + hexTau.slice(2); //(cut off initial 0x)
let deployedContract = await abstractions.DowngradeTest.new();
let address = deployedContract.address;
let decimalResult = await web3.eth.sendTransaction({
from: accounts[0],
to: address,
data
});
debug("decimalResult: %O", decimalResult);
let decimalHash = decimalResult.transactionHash;
let decimalTx = await web3.eth.getTransaction(decimalHash);
//now, let's do the decoding
let txDecoding = await decoder.decodeTransaction(decimalTx);
//now let's check the results!
debug("txDecoding: %O", txDecoding);
assert.strictEqual(txDecoding.decodingMode, "abi");
assert.strictEqual(txDecoding.kind, "function");
assert.strictEqual(txDecoding.abi.name, "shhImADecimal");
assert.lengthOf(txDecoding.arguments, 1);
assert.strictEqual(txDecoding.arguments[0].name, "secretlyADecimal");
assert.strictEqual(txDecoding.arguments[0].value.type.typeClass, "fixed");
assert.strictEqual(txDecoding.arguments[0].value.type.bits, 168);
assert.strictEqual(txDecoding.arguments[0].value.type.places, 10);
assert.strictEqual(txDecoding.arguments[0].value.type.places, 10);
assert.strictEqual(txDecoding.arguments[0].value.kind, "value");
assert(txDecoding.arguments[0].value.value.asBig.eq(tau));
});
it("Correctly decodes inherited events when no node", async function() {
let mangledCompilations = clonedeep(compilations);
let source = mangledCompilations[0].sources.find(x => x); //find defined source
source.ast = undefined;
//...and now let's set up a decoder for our hacked-up contract artifact.
let decoder = await Decoder.forProject(web3.currentProvider, {
compilations: mangledCompilations
});
let deployedContract = await abstractions.DowngradeTest.new();
let result = await deployedContract.emitParent();
let resultLog = result.receipt.rawLogs[0];
let logDecodings = await decoder.decodeLog(resultLog);
//now let's check the results!
assert.lengthOf(logDecodings, 1);
assert.strictEqual(logDecodings[0].kind, "event");
assert.strictEqual(logDecodings[0].decodingMode, "abi");
assert.strictEqual(logDecodings[0].abi.name, "Inherited");
assert.strictEqual(logDecodings[0].class.typeName, "DowngradeTest");
assert.isUndefined(logDecodings[0].definedIn);
assert.isEmpty(logDecodings[0].arguments);
});
describe("Out-of-range enums", function() {
it("Doesn't include out-of-range enums in full mode", async function() {
let decoder = await Decoder.forProject(
web3.currentProvider,
{ compilations } //not modifying for once!
);
let deployedContract = await abstractions.DowngradeTest.new();
let txArguments = [9, 9, 1, 1]; //note: 1 is in range; 9 is not
let result = await deployedContract.enumSilliness(...txArguments);
let nonIndexedLog = result.receipt.rawLogs[0];
let indexedLog = result.receipt.rawLogs[1];
//(these are the order they went in)
let nonIndexedLogDecodings = await decoder.decodeLog(nonIndexedLog);
let indexedLogDecodings = await decoder.decodeLog(indexedLog);
assert.lengthOf(nonIndexedLogDecodings, 1); //because we're in full mode, the decoy decoding should be filtered out
assert.strictEqual(nonIndexedLogDecodings[0].decodingMode, "full");
assert.lengthOf(indexedLogDecodings, 1); //because we're in full mode, the decoy decoding should be filtered out
assert.strictEqual(indexedLogDecodings[0].decodingMode, "full");
});
it("Abifies correctly when failure occurs in first enum", async function() {
let mangledCompilations = clonedeep(compilations);
let source = mangledCompilations[0].sources.find(x => x); //find defined source
let contractNode = source.ast.nodes.find(
node =>
node.nodeType === "ContractDefinition" &&
node.name === "DowngradeTest"
);
let enumNode = contractNode.nodes.find(
node => node.nodeType === "EnumDefinition" && node.name === "Ternary"
);
enumNode.nodeType = "Ninja"; //fake node type which will prevent
//the decoder from recognizing it as a enum definition
await runEnumTestBody(mangledCompilations);
});
it("Abifies correctly when failure occurs in second enum", async function() {
let mangledCompilations = clonedeep(compilations);
let source = mangledCompilations[0].sources.find(x => x); //find defined source
let contractNode = source.ast.nodes.find(
node =>
node.nodeType === "ContractDefinition" &&
node.name === "DowngradeTest"
);
let enumNode = contractNode.nodes.find(
node =>
node.nodeType === "EnumDefinition" && node.name === "PositionOnHill"
);
enumNode.nodeType = "Ninja"; //fake node type which will prevent
//the decoder from recognizing it as a enum definition
await runEnumTestBody(mangledCompilations);
});
});
it("Decodes external functions via additionalContexts", async function() {
let mangledCompilations = clonedeep(compilations);
let downgradeTest = mangledCompilations[0].contracts.find(
contract => contract.contractName === "DowngradeTest"
);
downgradeTest.deployedBytecode = undefined;
let deployedContract = await abstractions.DowngradeTest.new();
let address = deployedContract.address;
let decoder = await Decoder.forContractInstance(deployedContract, {
compilations: mangledCompilations
});
let decodedFunction = await decoder.variable("doYouSeeMe");
assert.strictEqual(decodedFunction.type.typeClass, "function");
assert.strictEqual(decodedFunction.type.visibility, "external");
assert.strictEqual(decodedFunction.type.kind, "specific");
assert.strictEqual(decodedFunction.type.mutability, "nonpayable");
assert.isEmpty(decodedFunction.type.inputParameterTypes);
assert.isEmpty(decodedFunction.type.outputParameterTypes);
assert.strictEqual(decodedFunction.kind, "value");
assert.strictEqual(decodedFunction.value.kind, "known");
assert.strictEqual(decodedFunction.value.contract.kind, "known");
assert.strictEqual(
decodedFunction.value.contract.class.typeName,
"DowngradeTest"
);
assert.strictEqual(decodedFunction.value.contract.address, address);
let selector = web3.eth.abi.encodeFunctionSignature("causeTrouble()");
assert.strictEqual(decodedFunction.value.selector, selector);
});
it("Partially decodes internal functions when unreliable order", async function() {
let mangledCompilations = clonedeep(compilations);
mangledCompilations[0].unreliableSourceOrder = true;
let deployedContract = await abstractions.DowngradeTest.new();
let decoder = await Decoder.forContractInstance(deployedContract, {
compilations: mangledCompilations
});
let decodedFunction = await decoder.variable("canYouReadMe");
assert.strictEqual(decodedFunction.type.typeClass, "function");
assert.strictEqual(decodedFunction.type.visibility, "internal");
assert.strictEqual(decodedFunction.type.mutability, "nonpayable");
assert.isEmpty(decodedFunction.type.inputParameterTypes);
assert.isEmpty(decodedFunction.type.outputParameterTypes);
assert.strictEqual(decodedFunction.kind, "value");
assert.strictEqual(decodedFunction.value.kind, "unknown");
assert.strictEqual(decodedFunction.value.context.typeName, "DowngradeTest");
//we won't bother testing the PC values
});
it("Decodes return values even with no deployedBytecode", async function() {
let mangledCompilations = clonedeep(compilations);
const { DowngradeTest } = abstractions;
let downgradeTest = mangledCompilations[0].contracts.find(
contract => contract.contractName === "DowngradeTest"
);
downgradeTest.deployedBytecode = undefined;
let deployedContract = await DowngradeTest.new();
let decoder = await Decoder.forContract(DowngradeTest, {
compilations: mangledCompilations
});
let abiEntry = DowngradeTest.abi.find(
({ type, name }) => type === "function" && name === "returnsStuff"
);
let selector = web3.eth.abi.encodeFunctionSignature(abiEntry);
//we need the raw return data, and contract.call() does not exist yet,
//so we're going to have to use web3.eth.call()
let data = await web3.eth.call({
to: deployedContract.address,
data: selector
});
let decodings = await decoder.decodeReturnValue(abiEntry, data);
assert.lengthOf(decodings, 1);
let decoding = decodings[0];
assert.strictEqual(decoding.kind, "return");
assert.strictEqual(decoding.decodingMode, "full");
assert.lengthOf(decoding.arguments, 2);
assert.deepEqual(
Codec.Format.Utils.Inspect.nativize(decoding.arguments[0].value),
{
x: 107,
y: 683
}
);
assert.strictEqual(
Codec.Format.Utils.Inspect.nativize(decoding.arguments[1].value),
"DowngradeTest.Ternary.No"
);
});
});
//verify the decoding for run
function verifyAbiDecoding(decoding, address) {
assert.strictEqual(decoding.decodingMode, "abi");
//we'll skip verifying the kind and name for once
assert.lengthOf(decoding.arguments, 4);
//we'll skip verifying the names as well
//first argument: {{x: 7, y: 5}, z: 3}
assert.strictEqual(decoding.arguments[0].value.type.typeClass, "tuple");
assert.deepEqual(
Codec.Format.Utils.Inspect.nativize(decoding.arguments[0].value),
[[7, 5], 3]
);
//second argument: No (i.e. 1)
assert.strictEqual(decoding.arguments[1].value.type.typeClass, "uint");
assert.strictEqual(decoding.arguments[1].value.type.bits, 8);
assert.deepEqual(
Codec.Format.Utils.Inspect.nativize(decoding.arguments[1].value),
1
);
//third argument: the contract (i.e. its address)
assert.strictEqual(decoding.arguments[2].value.type.typeClass, "address");
assert.strictEqual(decoding.arguments[2].value.type.kind, "general");
assert.deepEqual(
Codec.Format.Utils.Inspect.nativize(decoding.arguments[2].value),
address
);
//fourth argument: the same thing
assert.strictEqual(decoding.arguments[3].value.type.typeClass, "address");
assert.strictEqual(decoding.arguments[3].value.type.kind, "general");
assert.deepEqual(
Codec.Format.Utils.Inspect.nativize(decoding.arguments[3].value),
address
);
}
function verifyAbiFunctionDecoding(decoding, address) {
assert.strictEqual(decoding.decodingMode, "abi");
assert.strictEqual(decoding.kind, "event");
assert.strictEqual(decoding.abi.name, "CauseTrouble");
assert.lengthOf(decoding.arguments, 1);
assert.isUndefined(decoding.arguments[0].name);
assert.strictEqual(decoding.arguments[0].value.type.typeClass, "function");
assert.strictEqual(decoding.arguments[0].value.type.visibility, "external");
assert.strictEqual(decoding.arguments[0].value.type.kind, "general");
assert.strictEqual(decoding.arguments[0].value.kind, "value");
//NOTE: we only messed with the node, not the bytecode, so, even abified,
//external function decoding should still work properly!
assert.strictEqual(decoding.arguments[0].value.value.kind, "known");
assert.strictEqual(decoding.arguments[0].value.value.contract.kind, "known");
assert.strictEqual(
decoding.arguments[0].value.value.contract.class.typeName,
"DowngradeTest"
);
assert.strictEqual(
decoding.arguments[0].value.value.contract.address,
address
);
let selector = web3.eth.abi.encodeFunctionSignature("causeTrouble()");
assert.strictEqual(decoding.arguments[0].value.value.selector, selector);
}
async function runTestBody(
mangledCompilations,
skipFunctionTests = false,
fullMode = false
) {
let decoder = await Decoder.forProject(web3.currentProvider, {
compilations: mangledCompilations
});
let deployedContract = await abstractions.DowngradeTest.new();
let address = deployedContract.address;
let result = await deployedContract.run([[7, 5], 3], 1, address, address);
let resultHash = result.tx;
let resultTx = await web3.eth.getTransaction(resultHash);
let resultLog = result.receipt.rawLogs[0];
let txDecoding = await decoder.decodeTransaction(resultTx);
let logDecodings = await decoder.decodeLog(resultLog);
if (fullMode) {
assert.strictEqual(txDecoding.decodingMode, "full");
txDecoding = decoder.abifyCalldataDecoding(txDecoding);
}
verifyAbiDecoding(txDecoding, address);
assert.lengthOf(logDecodings, 1);
let logDecoding = logDecodings[0];
if (fullMode) {
assert.strictEqual(logDecoding.decodingMode, "full");
logDecoding = decoder.abifyLogDecoding(logDecoding);
}
verifyAbiDecoding(logDecoding, address);
if (!skipFunctionTests) {
//huh -- I thought I'd eliminated that exception, but I'm
//still getting it. weird. well, whatever...
try {
await deployedContract.causeTrouble();
} catch (_) {
//do nothing, get the result a different way
}
//HACK
let fnEvents = await decoder.events();
assert.lengthOf(fnEvents, 1);
let fnDecodings = fnEvents[0].decodings;
assert.lengthOf(fnDecodings, 1);
let fnDecoding = fnDecodings[0];
if (fullMode) {
assert.strictEqual(fnDecoding.decodingMode, "full");
fnDecoding = decoder.abifyLogDecoding(fnDecoding);
}
verifyAbiFunctionDecoding(fnDecoding, address);
}
}
async function runEnumTestBody(mangledCompilations) {
let decoder = await Decoder.forProject(web3.currentProvider, {
compilations: mangledCompilations
});
let deployedContract = await abstractions.DowngradeTest.new();
let txArguments = [9, 9, 1, 1]; //note: 1 is in range; 9 is not
//the decoy reading swaps the first two arguments with the second two
let swappedTxArguments = [
txArguments[2],
txArguments[3],
txArguments[0],
txArguments[1]
];
let result = await deployedContract.enumSilliness(...txArguments);
let nonIndexedLog = result.receipt.rawLogs[0];
let indexedLog = result.receipt.rawLogs[1];
//(these are the order they went in)
let nonIndexedLogDecodings = await decoder.decodeLog(nonIndexedLog);
let indexedLogDecodings = await decoder.decodeLog(indexedLog);
assert.lengthOf(nonIndexedLogDecodings, 2); //we're in ABI mode, so should have correct decoding and decoy decoding
let decoyDecoding1 = nonIndexedLogDecodings[1]; //decoy decoding should be second (library)
assert.strictEqual(decoyDecoding1.class.typeName, "DecoyLibrary"); //...but let's confirm that.
assert.strictEqual(decoyDecoding1.abi.name, "EnumSilliness1"); //also let's verify this is the right event
assert.strictEqual(decoyDecoding1.decodingMode, "abi");
let nativizedArguments1 = decoyDecoding1.arguments.map(({ value }) =>
Codec.Format.Utils.Inspect.nativize(value)
);
assert.deepStrictEqual(nativizedArguments1, swappedTxArguments);
assert.lengthOf(indexedLogDecodings, 2); //we're in ABI mode, so should have correct decoding and decoy decoding
let decoyDecoding2 = indexedLogDecodings[1]; //decoy decoding should be second (library)
assert.strictEqual(decoyDecoding2.class.typeName, "DecoyLibrary"); //...but let's confirm that.
assert.strictEqual(decoyDecoding2.abi.name, "EnumSilliness2"); //also let's verify this is the right event
assert.strictEqual(decoyDecoding2.decodingMode, "abi");
let nativizedArguments2 = decoyDecoding2.arguments.map(({ value }) =>
Codec.Format.Utils.Inspect.nativize(value)
);
assert.deepStrictEqual(nativizedArguments2, swappedTxArguments);
}
|
$(function() {
$("#book-fields").hide();
$("#show").click(function(){
$("#book-fields").show();
});
});
|
'use strict';
var assert = require('chai').assert
, SLIP = require('../src/slip.js')
, fs = require('fs')
, conf = JSON.parse(fs.readFileSync('test/test-config.json', {encoding: 'utf8'}))
describe('SLIP class', function () {
it('exists', function(){
assert.isFunction(SLIP)
})
it('inherits SerialPort class', function(){
assert.isFunction(SLIP.prototype.write)
})
describe('SLIP instance', function () {
var slip = null
before(function () {
slip = new SLIP(conf.serailPort.path, conf.serailPort.options, conf.protocol)
})
it('has same methods as SerialPort instances via inheritance', function(){
assert.isFunction(slip.write)
})
it('has protocol_ defined', function(){
var slip = new SLIP(conf.serailPort.path, conf.serailPort.options, {endByte: 0xc1})
assert.deepEqual(slip.protocol_, {
endByte: 193,
messageMaxLength: 256,
escapeByte: 219,
escapeRules: [{ initialFragment: 192, replacement: 220 },
{ initialFragment: 219, replacement: 221 } ]
})
})
it('has sendMessage method that send message to seriaport', function(done){
assert.isFunction(slip.sendMessage)
slip.sendMessage(new Buffer([0]), function (err) {
assert.isTrue(err.message == 'Serialport not open.')
done()
})
})
it('has collectDataAndFireMessageEvent_ method', function(done){
slip.collectDataAndFireMessageEvent_(new Buffer([0x22]))
slip.on('message', function (buf) {
assert.isTrue(buf.equals(new Buffer([0x22, 0x20, 0x24])))
done()
})
slip.collectDataAndFireMessageEvent_(new Buffer([0x20, 0x24, 0xc0, 0x22, 0x21]))
})
})
})
|
import perceptron from '../perceptron/perceptron';
/**
* Hálózat modellje
* @param numInputNeurons: a hálózat bemenetinek száma
* @param numHiddenNeurons: a rejtett réteg neuronjainak száma
* @param learningFactor: tanulási paraméter
* @param initalWeightClamp: súly paraméter (generált súlyok esetén számít)
* @param hiddenLayer: rejtett réteg neuronjai
* @param outputLayer: kiemeneti réteg neuronja
*/
const net = ({
numInputNeurons,
numHiddenNeurons,
numOutputNeurons = 1,
learningFactor = 0.3,
initalWeightClamp = 0.5,
hiddenLayer = [],
outputLayer = [perceptron(numHiddenNeurons, initalWeightClamp)]
}) => {
/**
* Ha a rejtett réteget nem kaptuk meg paraméterként,
* akkor létrehozzuk a perceptronokat véletlen súlyokkal
*/
if ( hiddenLayer.length === 0) {
for (let i = 0; i < numHiddenNeurons; i++) {
hiddenLayer[i] = perceptron(numInputNeurons, initalWeightClamp);
}
}
/// PUBLIC ///
/**
* Kiszámoljuk a hálózat kimenetét a megadott bemenet függvényében
* @param inputs: bemenetek
*/
const computeOutput = inputs => {
hiddenLayer.forEach(neuron => neuron.computeOutput(inputs));
outputLayer.forEach(neuron => neuron.computeOutput(hiddenLayer.map(neuron => neuron.getOutput())));
}
const backPropError = expectedOutput => {
const outputErrors = outputLayer.map((neuron, index) => {
const error = expectedOutput[index] - neuron.getOutput();
neuron.setDelta(error);
return error;
});
const hiddenErrors = hiddenLayer.map((hiddenNeuron, index) => {
const error = outputLayer
.map(outputNeuron => outputNeuron.getWeight[index] * outputNeuron.getDelta())
.reduce((a, b) => a + b, 0);
hiddenNeuron.setDelta(error);
return error;
});
}
const updateWeights = row => {}
/**
* Visszaadjuk a hálózat kimenetét
*/
const getOutput = index => index ? outputLayer[index].getOutput() : outputLayer[0].getOutput();
/**
* A modell visszatér a publikusan elérhető függvényekkel,
* kívülről ezeket lehet elérni
*/
const publicAttrs = {
computeOutput: computeOutput,
getOutput: getOutput
};
return publicAttrs;
}
export default net;
|
// Karma configuration
module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '../../',
background: true,
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-resource/angular-resource.js',
'bower_components/angular-bootstrap/ui-bootstrap.js',
'bower_components/angular-mocks/angular-mocks.js',
'public/src/js/**/*.js',
'test/unit/**/*.spec.js'
],
// list of files / patterns to exclude
exclude: [],
// web server port
port: 8080,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_DEBUG,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
reporters: ['spec', 'coverage'],
colors: true,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['Chrome'],
preprocessors: {
'**/src/js/**/*.js': ['coverage']
},
coverageReporter: {
reporters: [
{
type: 'html',
dir: 'coverage/'
},
{
type: 'text'
}
]
},
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false
});
};
|
// All code points in the `Hatran` script as per Unicode v9.0.0:
[
0x108E0,
0x108E1,
0x108E2,
0x108E3,
0x108E4,
0x108E5,
0x108E6,
0x108E7,
0x108E8,
0x108E9,
0x108EA,
0x108EB,
0x108EC,
0x108ED,
0x108EE,
0x108EF,
0x108F0,
0x108F1,
0x108F2,
0x108F4,
0x108F5,
0x108FB,
0x108FC,
0x108FD,
0x108FE,
0x108FF
];
|
// Each of these is duplicated to the the same indexed player
GridGame.data.key_maps = {
green: {
87: 'north', // w
65: 'west', // a
83: 'south', // s
68: 'east' // d
},
red: {
38: 'north', // up
37: 'west', // left
40: 'south', // down
39: 'east' // right
},
yellow: {
72: 'north', // h
74: 'north', // j
66: 'west', // b
78: 'south', // n
77: 'east' // m
},
blue: {
104: 'north', // 8
100: 'west', // 4
101: 'south', // 5
102: 'east' // 6
}
};
|
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/contributors.tmpl.html',
'<div ng-controller="GuideCtrl" class="doc-content">\n' +
' <md-content>\n' +
' <p>\n' +
' We are thankful for the amazing community and <em>contributors</em> to AngularJS Material.<br/>\n' +
' Shown below is a list of all our contributors: developers who submitted fixes and improvements to AngularJS Material.\n' +
' </p>\n' +
' <md-divider></md-divider>\n' +
'\n' +
' <h2>Contributors</h2>\n' +
'\n' +
' <p style="margin-top:-10px;"> (sorted by number of commits)</p>\n' +
' <br/>\n' +
'\n' +
' <div class="contributor_tables">\n' +
'\n' +
' <!-- Use the \'contributors.json\' generated by \'gulp build-contributors\' -->\n' +
'\n' +
' <table ng-repeat="row in github.contributors"> \n' +
' <thead>\n' +
' <tr>\n' +
' <th style="text-align:center" ng-repeat="user in row">\n' +
' <a href="{{user.html_url}}" >\n' +
' <img alt="{{user.login}}"\n' +
' ng-src="{{user.avatar_url}}"\n' +
' width="{{github.imageSize}}" class="md-avatar">\n' +
' </a>\n' +
' </th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tbody>\n' +
' <tr>\n' +
' <td style="text-align:center" ng-repeat="user in row">\n' +
' <a href="{{user.html_url}}" class="md-primary">{{user.login}}</a>\n' +
' </td>\n' +
' <td></td>\n' +
' </tr>\n' +
' </tbody>\n' +
' </table>\n' +
'\n' +
' </div>\n' +
' </md-content>\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/demo.tmpl.html',
'<docs-demo\n' +
' ng-repeat="demo in demos"\n' +
' demo-id="{{demo.id}}"\n' +
' demo-title="{{demo.label}}"\n' +
' demo-module="{{demo.ngModule.module}}">\n' +
' <demo-file\n' +
' ng-repeat="file in demo.$files"\n' +
' name="{{file.name}}"\n' +
' contents="file.httpPromise"></demo-file>\n' +
'</docs-demo>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/docs-demo.tmpl.html',
'<div class="doc-demo-content doc-content">\n' +
' <div flex layout="column" style="z-index:1">\n' +
'\n' +
' <div class="doc-description" ng-bind-html="demoCtrl.demoDescription.contents | toHtml"></div>\n' +
'\n' +
' <div ng-transclude></div>\n' +
'\n' +
' <section class="demo-container md-whiteframe-z1"\n' +
' ng-class="{\'show-source\': demoCtrl.$showSource}" >\n' +
'\n' +
' <md-toolbar class="demo-toolbar md-primary">\n' +
' <div class="md-toolbar-tools">\n' +
' <h3>{{demoCtrl.demoTitle}}</h3>\n' +
' <span flex></span>\n' +
' <md-button\n' +
' class="md-icon-button"\n' +
' aria-label="View Source"\n' +
' ng-class="{ active: demoCtrl.$showSource }"\n' +
' ng-click="demoCtrl.$showSource = !demoCtrl.$showSource">\n' +
' <md-tooltip md-autohide>View Source</md-tooltip>\n' +
' <md-icon md-svg-src="img/icons/ic_code_24px.svg"></md-icon>\n' +
' </md-button>\n' +
' <md-button\n' +
' ng-hide="{{exampleNotEditable}}"\n' +
' hide-sm\n' +
' ng-click="demoCtrl.editOnCodepen()"\n' +
' aria-label="Edit on CodePen"\n' +
' class="md-icon-button">\n' +
' <md-tooltip md-autohide>Edit on CodePen</md-tooltip>\n' +
' <md-icon md-svg-src="img/icons/codepen-logo.svg"></md-icon>\n' +
' </md-button>\n' +
' </div>\n' +
' </md-toolbar>\n' +
'\n' +
' <!-- Source views -->\n' +
' <md-tabs class="demo-source-tabs md-primary" ng-show="demoCtrl.$showSource" style="min-height: 0;">\n' +
' <md-tab ng-repeat="file in demoCtrl.orderedFiles" label="{{file.name}}">\n' +
' <md-content md-scroll-y class="demo-source-container">\n' +
' <hljs class="no-header" code="file.contentsPromise" lang="{{file.fileType}}" should-interpolate="demoCtrl.interpolateCode">\n' +
' </hljs>\n' +
' </md-content>\n' +
' </md-tab>\n' +
' </md-tabs>\n' +
'\n' +
' <!-- Live Demos -->\n' +
' <demo-include files="demoCtrl.files" module="demoCtrl.demoModule" class="{{demoCtrl.demoId}}">\n' +
' </demo-include>\n' +
' </section>\n' +
'\n' +
' </div>\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/getting-started.tmpl.html',
'<div ng-controller="GuideCtrl" class="doc-content">\n' +
' <md-content>\n' +
' <p>\n' +
' <h2><em>New to AngularJS?</em> Before getting into AngularJS Material, it might be helpful to:</h2>\n' +
' </p>\n' +
' <p>\n' +
' <ul>\n' +
' <li>\n' +
' Watch videos about <a\n' +
' href="https://egghead.io/courses/angularjs-fundamentals" target="_blank"\n' +
' title="AngularJS Framework">AngularJS Fundamentals</a>\n' +
' </li>\n' +
' <li>\n' +
' Read the\n' +
' <a href="https://material.io/archive/guidelines/" target="_blank"\n' +
' title="Material Design">Material Design </a> specifications for components,\n' +
' animations, styles, and layouts.\n' +
' </li>\n' +
' </ul>\n' +
' </p>\n' +
' <h2>How do I start with AngularJS Material?</h2>\n' +
' <ul style="margin-bottom: 2em;">\n' +
' <li>\n' +
' Get jump started with a free 30 minute video course: <a\n' +
' href="https://egghead.io/courses/introduction-to-angular-material" target="_blank"\n' +
' title="AngularJS Framework">Introduction to AngularJS Material</a>\n' +
' </li>\n' +
' <li>\n' +
' <a href="https://stackblitz.com/edit/angularjs-material-blank?file=app%2Fapp.template.html"\n' +
' target="_blank" title="Blank AngularJS Material StackBlitz Demo">\n' +
' Start with a blank application on StackBlitz</a>\n' +
' </li>\n' +
' <li>\n' +
' Test drive AngularJS Material examples on\n' +
' <a href="https://codepen.io/team/AngularMaterial/"\n' +
' target="_blank" title="AngularJS Material CodePen Examples">\n' +
' CodePen</a>\n' +
' </li>\n' +
' <li>\n' +
' Checkout our\n' +
' <a href="https://github.com/Splaktar/angularjs-angular-material-hybrid-demo" target="_blank"\n' +
' title="AngularJS Material, Angular Material, TypeScript, Angular CLI repository">\n' +
' AngularJS Material + Angular Material + TypeScript + Angular CLI</a> repository\n' +
' </li>\n' +
' <li style="margin-bottom: 30px;">\n' +
' Checkout the <a href="https://github.com/angular/material-start/tree/typescript" target="_blank"\n' +
' title="Material Start - Typescript and SystemJS">AngularJS Material TypeScript + SystemJS</a>\n' +
' repository\n' +
' </li>\n' +
' <li>Use the "Edit on CodePen" button on any of our Demos<br/>\n' +
' <img\n' +
' src="https://cloud.githubusercontent.com/assets/210413/11568997/ed86795a-99b4-11e5-898e-1da172be80da.png"\n' +
' style="width:75%; margin: 10px 30px 0 0" alt="Image with arrow to Edit on CodePen button">\n' +
' </li>\n' +
' </ul>\n' +
' <h3>Our CodePen Community</h3>\n' +
' <p>\n' +
' You can also visit our\n' +
' <a href="https://codepen.io/team/AngularMaterial/" target="_blank"\n' +
' title="Codepen Community">CodePen Community</a> to explore more\n' +
' <a href="https://codepen.io/team/AngularMaterial/pens/public/" target="_blank">samples</a>,\n' +
' <a href="https://codepen.io/team/AngularMaterial/collections/public/" target="_blank">Collections</a>, and ideas.\n' +
' </p>\n' +
' <div layout-align="center" style="width: 100%">\n' +
' <iframe height=\'777\' scrolling=\'no\' title="Our CodePen Community"\n' +
' src=\'https://codepen.io/collection/XExqGz/\'\n' +
' frameborder=\'no\' allowtransparency=\'true\' allowfullscreen=\'true\' style=\'width: 100%;\'>\n' +
' </iframe>\n' +
' </div>\n' +
'\n' +
'\n' +
' <br/><br/>\n' +
'\n' +
' <h3>Installing the AngularJS Material Libraries</h3>\n' +
'\n' +
' <p>\n' +
' You can\n' +
' <a href="https://github.com/angular/bower-material/#installing-angularjs-material"\n' +
' target="_blank">install the AngularJS Material library</a>\n' +
' (and its dependent libraries) in your local project using\n' +
' <a href="https://www.npmjs.com/" target="_blank">NPM</a>.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' AngularJS Material also integrates with some additional, optional libraries which you may elect\n' +
' to include:\n' +
' </p>\n' +
'\n' +
' <ul style="margin-bottom: 2em;">\n' +
' <li>\n' +
' <a href="https://docs.angularjs.org/api/ngMessages">ngMessages</a>\n' +
' - Provides a consistent mechanism for displaying form errors and other messages.\n' +
' <b>Required</b> for some AngularJS Material components like <code>md-input</code>.\n' +
' </li>\n' +
' <li>\n' +
' <a href="https://docs.angularjs.org/api/ngSanitize">ngSanitize</a>\n' +
' - The ngSanitize module provides functionality to sanitize HTML content in Material\n' +
' components.\n' +
' </li>\n' +
'\n' +
' <li>\n' +
' <a href="https://docs.angularjs.org/api/ngRoute">ngRoute</a>\n' +
' - Provides a clean routing system for your application.\n' +
' </li>\n' +
' </ul>\n' +
'\n' +
' <br/>\n' +
'\n' +
' <h3>Unsupported Integrations</h3>\n' +
' <p>\n' +
' AngularJS Material has known integration issues with the following libraries:\n' +
' </p>\n' +
' <ul style="margin-bottom: 2em;">\n' +
' <li>\n' +
' <a href="https://docs.angularjs.org/api/ngTouch">ngTouch</a>\n' +
' - AngularJS Material conflicts with ngTouch for click, tap, and swipe support on touch-enabled\n' +
' devices.\n' +
' </li>\n' +
'\n' +
' <li>\n' +
' <a href="http://legacy.docs.ionic.io/v1.0">Ionic v1</a>\n' +
' - Has built-in touch support that interferes with AngularJS Material\'s mobile gesture features.\n' +
' Ionic v1 is no longer officially supported by the Ionic team.\n' +
' </li>\n' +
' </ul>\n' +
'\n' +
' <br/>\n' +
' <h2>Contributing to AngularJS Material</h2>\n' +
' <ul style="margin-bottom: 2em;">\n' +
' <li>\n' +
' Start by reading our <a href="https://github.com/angular/material#contributing">Contributor\n' +
' Guidelines</a>.\n' +
' </li>\n' +
' <li>\n' +
' For bug reports, search our\n' +
' <a href="https://github.com/angular/material/issues?q=is%3Aissue+is%3Aopen"\n' +
' target="_blank" title="AngularJS Material GitHub Issues">GitHub Issues</a>\n' +
' for existing issues that match your bug.\n' +
' </li>\n' +
' <li style="margin-left: 40px">If none are found, please open a new issue.</li>\n' +
' <li>For questions and troubleshooting, search the\n' +
' <a href="https://groups.google.com/forum/#!forum/ngmaterial"\n' +
' target="_blank" title="AngularJS Material Forums">AngularJS Material Forums</a>\n' +
' for related discussions.\n' +
' </li>\n' +
' <li style="margin-left: 40px">If none are found, please post a new question.</li>\n' +
' <li>StackOverflow\'s\n' +
' <a href="https://stackoverflow.com/questions/tagged/angularjs-material" target="_blank"\n' +
' title="AngularJS Material tag on StackOverflow">\n' +
' [angularjs-material] tag</a> is another good resources for solving problems.\n' +
' </li>\n' +
' <li>\n' +
' You can also ask questions in our\n' +
' <a href="https://gitter.im/angular/material" target="_blank" title="Gitter Chat">\n' +
' Gitter Chat</a>.\n' +
' </li>\n' +
' </ul>\n' +
' </md-content>\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/home.tmpl.html',
'<div ng-controller="HomeCtrl" class="doc-content">\n' +
' <md-content>\n' +
' <h2 class="md-headline" style="margin-top: 0;">What is AngularJS Material?</h2>\n' +
' <p>\n' +
' AngularJS Material is an implementation of Google\'s\n' +
' <a href="https://material.io/archive/guidelines/" target="_blank" rel="noopener">\n' +
' Material Design Specification (2014-2017)</a>.\n' +
' This project provides a set of reusable, well-tested, and accessible UI components for\n' +
' <a href="https://angularjs.org" target="_blank" rel="noopener">AngularJS</a> developers.\n' +
' </p>\n' +
' <ul class="buckets" layout layout-align="center center" layout-wrap>\n' +
' <li flex="50" flex-gt-md="25" ng-repeat="(index, link) in [\n' +
' { href: \'./getting-started\', icon: \'school\', text: \'Getting Started\' },\n' +
' { href: \'./contributors\', icon: \'school\', text: \'Contributors\' },\n' +
' { href: \'./demo\', icon: \'play_circle_fill\', text: \'Demos\' },\n' +
' { href: \'./CSS/typography\', icon: \'build\', text: \'Customization\' },\n' +
' { href: \'./api\', icon: \'code\', text: \'API Reference\' }\n' +
' ]">\n' +
' <md-button\n' +
' class="md-primary md-raised"\n' +
' ng-href="{{link.href}}"\n' +
' aria-label="{{link.text}}">\n' +
' <md-icon class="block" md-svg-src="img/icons/ic_{{link.icon}}_24px.svg"></md-icon>\n' +
' {{link.text}}\n' +
' </md-button>\n' +
' </li>\n' +
' </ul>\n' +
'\n' +
' <h2 class="md-headline">AngularJS versus Angular?</h2>\n' +
' <p>\n' +
' The AngularJS Material library is a mature and stable product that is ready for production use.\n' +
' Developers should note that AngularJS Material works only with\n' +
' <a href="https://angularjs.org/" target="_blank" rel="noopener">AngularJS 1.x</a>.\n' +
' </p>\n' +
' <ul>\n' +
' <li>\n' +
' Current development efforts are focused on bug fixes, accessibility, performance, and minor\n' +
' enhancements.\n' +
' </li>\n' +
' </ul>\n' +
' <br/>\n' +
' <i>\n' +
' The Angular Material and Component Dev Kit (CDK) libraries (for Angular v2+) can be found in the\n' +
' <a href="https://github.com/angular/components" target="_blank" rel="noopener">angular/components</a>\n' +
' GitHub repository.\n' +
' </i>\n' +
' <br/>\n' +
' <br/>\n' +
' <h2 class="md-headline">The Latest Material Design</h2>\n' +
' <p>\n' +
' The latest update to Material Design\n' +
' (<a href="https://www.youtube.com/playlist?list=PLJ21zHI2TNh-rX-Xr_xi9KIEcbdee_1Ah" target="_blank" rel="noopener">video playlist</a>)\n' +
' was announced at Google I/O in May, 2018\n' +
' (<a href="https://design.google/library/io-2018-our-definitive-guide-design/" target="_blank" rel="noopener">recap blog post</a>).\n' +
' For an implementation of this new\n' +
' <a href="https://material.io/design" target="_blank" rel="noopener">Material Design Specification</a>,\n' +
' please see the <a href="https://github.com/angular/components" target="_blank" rel="noopener">Angular Material</a>\n' +
' project which is built for <a href="https://angular.io" target="_blank" rel="noopener">Angular</a>\n' +
' developers.\n' +
' </p>\n' +
'\n' +
' <h2 class="md-headline">Change Log</h2>\n' +
' <p>\n' +
' Please refer to our changelog for up-to-date listings of all v1.x improvements and breaking changes.\n' +
' </p>\n' +
' <ul class="buckets" layout layout-align="center center" layout-wrap>\n' +
' <li flex="100" flex-gt-xs="50" ng-repeat="(index, link) in [\n' +
' {\n' +
' href: \'https://github.com/angular/material/blob/master/CHANGELOG.md\',\n' +
' icon: \'access_time\',\n' +
' text: \'Changelog\'\n' +
' }\n' +
' ]">\n' +
' <md-button\n' +
' class="md-primary md-raised"\n' +
' ng-href="{{link.href}}"\n' +
' aria-label="{{link.text}}">\n' +
' <md-icon class="block" md-svg-src="img/icons/ic_{{link.icon}}_24px.svg"></md-icon>\n' +
' {{link.text}}<br/>\n' +
' <div style="text-transform: none;margin-top:-15px;font-size:1.0em;">AngularJS Material v1.x </div>\n' +
' </md-button>\n' +
' </li>\n' +
' </ul>\n' +
'\n' +
' <h2 class="md-headline">Browser Support</h2>\n' +
' <p>\n' +
' AngularJS Material generally supports browsers that fall into these categories\n' +
' </p>\n' +
' <ul>\n' +
' <li>Greater than 0.5% global usage</li>\n' +
' <li>Last two versions of Evergreen browsers</li>\n' +
' <li>Firefox ESR</li>\n' +
' <li>Not considered "dead" browsers</li>\n' +
' </ul>\n' +
' <br/>\n' +
' <h3>The following table provides a more detailed view:</h3>\n' +
' <table class="custom-table">\n' +
' <tbody>\n' +
' <tr>\n' +
' <th>\n' +
' Browser\n' +
' </th>\n' +
' <th>\n' +
' Supported Versions\n' +
' </th>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' Chrome<br/>Chrome for Android<br/>Edge<br/>Opera\n' +
' </td>\n' +
' <td>\n' +
' last 2 versions\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' Firefox\n' +
' </td>\n' +
' <td>\n' +
' last 2 versions<br/>ESR\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' IE<br/>IE Mobile\n' +
' </td>\n' +
' <td>\n' +
' 11\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' Safari\n' +
' </td>\n' +
' <td>\n' +
' 12.x<br>13.x\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' iOS\n' +
' </td>\n' +
' <td>\n' +
' 12.x<br>13.x\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' Firefox for Android<br/>UC\n' +
' </td>\n' +
' <td>\n' +
' latest version\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' Samsung Internet\n' +
' </td>\n' +
' <td>\n' +
' 10.x\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>\n' +
' Opera for Android\n' +
' </td>\n' +
' <td>\n' +
' Mini all\n' +
' </td>\n' +
' </tr>\n' +
' </tbody>\n' +
' </table>\n' +
'\n' +
' <md-divider></md-divider>\n' +
'\n' +
' <br/>\n' +
' <h2 class="md-headline">Training Videos:</h2>\n' +
' <p>\n' +
' Here are some video courses that will help jump start your development with AngularJS Material.\n' +
' </p>\n' +
' <ul class="buckets" layout layout-align="center center" layout-wrap>\n' +
' <li flex="100" flex-gt-xs="50" ng-repeat="(index, link) in [\n' +
' { href: \'https://egghead.io/series/angular-material-introduction\', icon: \'ondemand_video\', text: \'Introduction to AngularJS Material\', site : \'EggHead\', access : \'free\'},\n' +
' { href: \'https://app.pluralsight.com/player?author=ajden-towfeek&name=angular-material-fundamentals-m0&mode=live&clip=0&course=angular-material-fundamentals\', icon: \'ondemand_video\', text: \'AngularJS Material Fundamentals\', site : \'Pluralsight\', access: \'member\'}\n' +
' ]">\n' +
' <md-button\n' +
' class="md-primary md-raised"\n' +
' target="_blank"\n' +
' aria-label="{{link.text}}"\n' +
' ng-href="{{link.href}}">\n' +
' <md-icon class="block" md-svg-src="img/icons/ic_{{link.icon}}_24px.svg"></md-icon>\n' +
' {{link.site}} | <span class="training_link">{{link.text}}</span> | <span class="training_info">{{link.access}}</span>\n' +
' </md-button>\n' +
' </li>\n' +
' </ul>\n' +
'\n' +
' <br/>\n' +
' <h2 class="md-headline">Conference Presentations:</h2>\n' +
' <p>\n' +
' Here are some conference presentations that will provide overviews for your development with\n' +
' AngularJS Material.\n' +
' </p>\n' +
' <ul class="buckets" layout layout-align="center center" layout-wrap>\n' +
' <li flex="100" flex-gt-xs="50" ng-repeat="(index, link) in [\n' +
' { href: \'https://www.youtube.com/watch?v=rRiV_b3WsoY\', icon: \'ondemand_video\', text: \'AngularJS Material v1.1.0 Updates\', site : \'ng-conf\', date: \'2016\'},\n' +
' { href: \'https://www.youtube.com/watch?v=6PMe_wc0SjI\', icon: \'ondemand_video\', text: \'Adaptive UI with AngularJS Material\', site : \'DevFest NC\', date: \'2015\'},\n' +
' { href: \'https://www.youtube.com/watch?v=Qi31oO5u33U\', icon: \'ondemand_video\', text: \'Building with AngularJS Material\', site : \'ng-conf\', date: \'2015\'},\n' +
' { href: \'https://www.youtube.com/watch?v=363o4i0rdvU\', icon: \'ondemand_video\', text: \'AngularJS Material in Practice\', site : \'AngularConnect\', date:\'2015\'}\n' +
' ]">\n' +
' <md-button\n' +
' class="md-primary md-raised"\n' +
' target="_blank"\n' +
' aria-label="{{link.text}}"\n' +
' ng-href="{{link.href}}">\n' +
' <md-icon class="block" md-svg-src="img/icons/ic_{{link.icon}}_24px.svg"></md-icon>\n' +
' <span class="training_site">{{link.site}}</span> | <span class="training_link">{{link.text}}</span> | <span class="training_info">{{link.date}}</span>\n' +
' </md-button>\n' +
' </li>\n' +
' </ul>\n' +
'\n' +
' <br/>\n' +
' <p class="md-caption" style="text-align: center; margin-bottom: 0;">\n' +
' These docs were generated from\n' +
' (<a ng-href="{{BUILDCONFIG.repository}}/{{menu.version.current.github}}" target="_blank"\n' +
' rel="noopener">v{{BUILDCONFIG.version}} - SHA {{BUILDCONFIG.commit.substring(0,7)}}</a>)\n' +
' on (<strong>{{BUILDCONFIG.date}}</strong>) GMT.\n' +
' </p>\n' +
' </md-content>\n' +
'</div>\n' +
'\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/layout-alignment.tmpl.html',
'<div ng-controller="LayoutCtrl" class="layout-content" ng-cloak>\n' +
'\n' +
' <p>\n' +
' The <code>layout-align</code> directive takes two words.\n' +
' The first word says how the children will be aligned in the layout\'s direction, and the second word says how the children will be aligned perpendicular to the layout\'s direction.</p>\n' +
'\n' +
' <p>Only one value is required for this directive.\n' +
' For example, <code>layout="row" layout-align="center"</code> would make the elements\n' +
' center horizontally and use the default behavior vertically.</p>\n' +
'\n' +
' <p><code>layout="column" layout-align="center end"</code> would make\n' +
' children align along the center vertically and along the end (right) horizontally. </p>\n' +
'\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>API</th>\n' +
' <th>Sets child alignments within the layout container</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tr>\n' +
' <td>layout-align</td>\n' +
' <td>Sets default alignment unless overridden by another breakpoint.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-xs</td>\n' +
' <td>width < <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-gt-xs</td>\n' +
' <td>width >= <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-sm</td>\n' +
' <td><b>600</b>px <= width < <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-gt-sm</td>\n' +
' <td>width >= <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-md</td>\n' +
' <td><b>960</b>px <= width < <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-gt-md</td>\n' +
' <td>width >= <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-lg</td>\n' +
' <td><b>1280</b>px <= width < <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-gt-lg</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align-xl</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' </table>\n' +
'\n' +
' <br/>\n' +
'\n' +
' <p>\n' +
' Below is an interactive demo that lets you explore the visual results of the different settings:\n' +
' </p>\n' +
'\n' +
' <div>\n' +
' <docs-demo demo-title=\'layout="{{layoutDemo.direction}}" layout-align="{{layoutAlign()}}"\'\n' +
' class="small-demo colorNested" interpolate-code="true">\n' +
' <demo-file name="index.html">\n' +
' <div layout="{{layoutDemo.direction}}" layout-align="{{layoutAlign()}}">\n' +
' <div>one</div>\n' +
' <div>two</div>\n' +
' <div>three</div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
' </div>\n' +
'\n' +
' <div layout="column" layout-gt-sm="row" layout-align="space-around">\n' +
'\n' +
' <div>\n' +
' <md-subheader>Layout Direction</md-subheader>\n' +
' <md-radio-group ng-model="layoutDemo.direction">\n' +
' <md-radio-button value="row">row</md-radio-button>\n' +
' <md-radio-button value="column">column</md-radio-button>\n' +
' </md-radio-group>\n' +
' </div>\n' +
' <div>\n' +
' <md-subheader>Alignment in Layout Direction ({{layoutDemo.direction == \'row\' ? \'horizontal\' : \'vertical\'}})</md-subheader>\n' +
' <md-radio-group ng-model="layoutDemo.mainAxis">\n' +
' <md-radio-button value="">none</md-radio-button>\n' +
' <md-radio-button value="start">start (default)</md-radio-button>\n' +
' <md-radio-button value="center">center</md-radio-button>\n' +
' <md-radio-button value="end">end</md-radio-button>\n' +
' <md-radio-button value="space-around">space-around</md-radio-button>\n' +
' <md-radio-button value="space-between">space-between</md-radio-button>\n' +
' </md-radio-group>\n' +
' </div>\n' +
' <div>\n' +
' <md-subheader>Alignment in Perpendicular Direction ({{layoutDemo.direction == \'column\' ? \'horizontal\' : \'vertical\'}})</md-subheader>\n' +
' <md-radio-group ng-model="layoutDemo.crossAxis">\n' +
' <md-radio-button value="none"><em>none</em></md-radio-button>\n' +
' <md-radio-button value="start">start</md-radio-button>\n' +
' <md-radio-button value="center">center</md-radio-button>\n' +
' <md-radio-button value="end">end</md-radio-button>\n' +
' <md-radio-button value="stretch">stretch (default)</md-radio-button>\n' +
' </md-radio-group>\n' +
' </div>\n' +
'\n' +
' </div>\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/layout-children.tmpl.html',
'<div ng-controller="LayoutCtrl" class="layout-content" ng-cloak>\n' +
'\n' +
' <h3>Children within a Layout Container</h3>\n' +
'\n' +
' <p>\n' +
' To customize the size and position of elements in a layout <b>container</b>, use the\n' +
' <code>flex</code>, <code>flex-order</code>, and <code>flex-offset</code> attributes on the\n' +
' container\'s <b>child</b> elements:\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Flex Directive" class="small-demo colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row">\n' +
' <div flex="20">\n' +
' [flex="20"]\n' +
' </div>\n' +
' <div flex="70">\n' +
' [flex="70"]\n' +
' </div>\n' +
' <div flex hide-sm hide-xs>\n' +
' [flex]\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' Add the <code>flex</code> directive to a layout\'s child element and the element will flex\n' +
' (grow or shrink) to fit the area unused by other elements. <code>flex</code> defines how the\n' +
' element will adjust its size with respect to its <b>parent</b> container and the other elements\n' +
' within the container.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Flex Percent Values" class="small-demo colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row" layout-wrap>\n' +
' <div flex="30">\n' +
' [flex="30"]\n' +
' </div>\n' +
' <div flex="45">\n' +
' [flex="45"]\n' +
' </div>\n' +
' <div flex="25">\n' +
' [flex="25"]\n' +
' </div>\n' +
' <div flex="33">\n' +
' [flex="33"]\n' +
' </div>\n' +
' <div flex="66">\n' +
' [flex="66"]\n' +
' </div>\n' +
' <div flex="50">\n' +
' [flex="50"]\n' +
' </div>\n' +
' <div flex>\n' +
' [flex]\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
'\n' +
' <p>\n' +
' A layout child\'s <code>flex</code> directive can be given an integer value from 0-100.\n' +
' The element will stretch to the percentage of available space matching the value. Currently, the <code>flex</code>\n' +
' directive value is restricted to multiples of five, 33 or 66.\n' +
' </p>\n' +
'\n' +
' <p> For example: <code>flex="5", flex="20", flex="33", flex="50", flex="66", flex="75", ... flex="100"</code>.</p>\n' +
'\n' +
' <docs-demo demo-title="Responsive Flex Directives" class="small-demo colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row">\n' +
' <div flex-gt-sm="66" flex="33">\n' +
' flex 33% on mobile, <br/>and 66% on gt-sm devices.\n' +
' </div>\n' +
' <div flex-gt-sm="33" flex="66">\n' +
' flex 66% on mobile, <br/>and 33% on gt-sm devices.\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' You can specify multiple <code>flex</code> directives on the same element in order to create\n' +
' flexible responsive behaviors across device sizes.\n' +
' </p>\n' +
' <p>\n' +
' Please take care not to overlap these directives, for example:\n' +
' <code>flex="100" flex-md="50" flex-gt-sm="25"</code>. In this example, there are two directives\n' +
' that apply to "medium" devices (<code>50</code> and <code>25</code>).\n' +
' </p>\n' +
' <p>\n' +
' The below example demonstrates how to use multiple <code>flex</code> directives overrides to\n' +
' achieve a desirable outcome:\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Overriding Responsive Flex Directives" class="colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row" layout-wrap>\n' +
' <div flex="100" flex-gt-sm="33">\n' +
' flex 100% on mobile, <br/>and 33% on gt-sm devices.\n' +
' </div>\n' +
' <div flex="100" flex-gt-sm="66">\n' +
' flex 100% on mobile, <br/>and 66% on gt-sm devices.\n' +
' </div>\n' +
' <div flex="100" flex-md="50" flex-gt-md="25">\n' +
' flex 100% on mobile, 50% on md, and 25% on gt-md devices.\n' +
' </div>\n' +
' <div flex="100" flex-md="50" flex-gt-md="25">\n' +
' flex 100% on mobile, 50% on md, and 25% on gt-md devices.\n' +
' </div>\n' +
' <div flex="100" flex-md="50" flex-gt-md="25">\n' +
' flex 100% on mobile, 50% on md, and 25% on gt-md devices.\n' +
' </div>\n' +
' <div flex="100" flex-md="50" flex-gt-md="25">\n' +
' flex 100% on mobile, 50% on md, and 25% on gt-md devices.\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' When a responsive layout directive like <code>layout-gt-sm</code> is active, any flex directives\n' +
' within that layout, that you want applied, should be active at the same time. This means that\n' +
' the flex directives that match up with <code>layout-gt-sm</code> would be\n' +
' <code>flex-gt-sm</code> and not just <code>flex</code>.\n' +
' </p>\n' +
' <p>\n' +
' This example demonstrates what happens when the proper flex suffix is omitted. In this case, the\n' +
' <code>flex="66"</code> directive is interpreted in context of the <code>layout="column"</code>\n' +
' layout. This is most likely not desirable.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Incorrect use of Flex Directives within Responsive Layouts"\n' +
' class="small-demo colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="column" layout-gt-sm="row">\n' +
' <!-- In order to work within a layout-gt-sm, the flex directive needs to match.\n' +
' flex-gt-sm="33" will work when layout-gt-sm="row" is active, but flex="33" would\n' +
' only apply when layout="column" is active. -->\n' +
' <div flex-gt-sm="33">\n' +
' column layout on mobile, <br/>flex 33% on gt-sm devices.\n' +
' </div>\n' +
' <!-- In this case, we failed to use the gt-sm suffix with the flex directive,\n' +
' resulting in undesirable behavior. -->\n' +
' <div flex="66">\n' +
' [flex 66%]\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' Here\'s the same example as above with the correct <code>flex-gt-sm="66"</code> directive:\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Use of Responsive Flex Directives within Responsive Layouts"\n' +
' class="small-demo colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="column" layout-gt-sm="row">\n' +
' <div flex-gt-sm="33">\n' +
' column layout on mobile, <br/>flex 33% on gt-sm devices.\n' +
' </div>\n' +
' <div flex-gt-sm="66">\n' +
' column layout on mobile, <br/>flex 66% on gt-sm devices.\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' See the <a href="layout/options">layout options page</a> for more information on responsive flex\n' +
' directives like <code>hide-sm</code> and <code>layout-wrap</code> used in the above examples.\n' +
' </p>\n' +
'\n' +
' <br/>\n' +
' <hr>\n' +
' <br/>\n' +
'\n' +
' <h3>Additional Flex Values</h3>\n' +
'\n' +
' <p>\n' +
' There are additional flex values provided by AngularJS Material to improve flexibility and to make the API\n' +
' easier to understand.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Other Flex Values" class="small-demo colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row" layout-wrap>\n' +
' <div flex="none">\n' +
' [flex="none"]\n' +
' </div>\n' +
' <div flex>\n' +
' [flex]\n' +
' </div>\n' +
' <div flex="nogrow">\n' +
' [flex="nogrow"]\n' +
' </div>\n' +
' <div flex="grow">\n' +
' [flex="grow"]\n' +
' </div>\n' +
' <div flex="initial">\n' +
' [flex="initial"]\n' +
' </div>\n' +
' <div flex="auto">\n' +
' [flex="auto"]\n' +
' </div>\n' +
' <div flex="noshrink">\n' +
' [flex="noshrink"]\n' +
' </div>\n' +
' <div flex="0">\n' +
' [flex="0"]\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
'\n' +
' <table class="md-api-table">\n' +
' <tr>\n' +
' <td>flex</td>\n' +
' <td>\n' +
' Will grow and shrink as needed. Starts with a size of 0%. Same as <code>flex="0"</code>.\n' +
' <br />\n' +
' <br />\n' +
' <b>Note:</b> There is a known bug with this attribute in IE11 when the parent container has\n' +
' no explicit height set. See our\n' +
' <a ng-href="layout/tips#layout-column-0px-ie11">Troubleshooting</a> page for more info.\n' +
' </td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex="none"</td>\n' +
' <td>Will not grow or shrink. Sized based on its <code>width</code> and <code>height</code> values.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex="initial"</td>\n' +
' <td>Will shrink as needed. Starts with a size based on its <code>width</code> and <code>height</code> values.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex="auto"</td>\n' +
' <td>Will grow and shrink as needed. Starts with a size based on its <code>width</code> and <code>height</code> values.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex="grow"</td>\n' +
' <td>Will grow and shrink as needed. Starts with a size of 100%. Same as <code>flex="100"</code>.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex="nogrow"</td>\n' +
' <td>Will shrink as needed, but won\'t grow. Starts with a size based on its <code>width</code> and <code>height</code> values.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex="noshrink"</td>\n' +
' <td>Will grow as needed, but won\'t shrink. Starts with a size based on its <code>width</code> and <code>height</code> values.</td>\n' +
' </tr>\n' +
' </table>\n' +
'\n' +
'\n' +
' <br/>\n' +
' <hr>\n' +
' <br/>\n' +
'\n' +
' <h3>Ordering HTML Elements</h3>\n' +
'\n' +
' <p>\n' +
' Add the <code>flex-order</code> directive to a layout child to set its\n' +
' order position within the layout container. Any integer value from -20 to 20 is accepted.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Flex-Order Directive" class="small-demo colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row">\n' +
' <div flex flex-order="-1">\n' +
' <p>[flex-order="-1"]</p>\n' +
' </div>\n' +
' <div flex flex-order="1" flex-order-gt-md="3">\n' +
' <p hide-gt-md>[flex-order="1"]</p>\n' +
' <p hide show-gt-md>[flex-order-gt-md="3"]</p>\n' +
' </div>\n' +
' <div flex flex-order="2">\n' +
' <p>[flex-order="2"]</p>\n' +
' </div>\n' +
' <div flex flex-order="3" flex-order-gt-md="1">\n' +
' <p hide-gt-md>[flex-order="3"]</p>\n' +
' <p hide show-gt-md>[flex-order-gt-md="1"]</p>\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>API</th>\n' +
' <th>Device <b>width</b> when breakpoint overrides default</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tr>\n' +
' <td>flex-order</td>\n' +
' <td>Sets default layout order unless overridden by another breakpoint.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-xs</td>\n' +
' <td>width < <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-gt-xs</td>\n' +
' <td>width >= <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-sm</td>\n' +
' <td><b>600</b>px <= width < <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-gt-sm</td>\n' +
' <td>width >= <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-md</td>\n' +
' <td><b>960</b>px <= width < <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-gt-md</td>\n' +
' <td>width >= <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-lg</td>\n' +
' <td><b>1280</b>px <= width < <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-gt-lg</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order-xl</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' </table>\n' +
'\n' +
'\n' +
' <p>\n' +
' See the <a href="layout/options">layout options page</a> for more information on directives like\n' +
' <code>hide</code>, <code>hide-gt-md</code>, and <code>show-gt-md</code> used in the above examples.\n' +
' </p>\n' +
'\n' +
' <br/>\n' +
' <hr>\n' +
' <br/>\n' +
'\n' +
' <h3>Add Offsets to the Preceding HTML Elements</h3>\n' +
'\n' +
' <p>\n' +
' Add the <code>flex-offset</code> directive to a layout child to set its\n' +
' offset percentage within the layout container. Values must be multiples\n' +
' of <code>5</code> or <code>33</code> / <code>66</code>. These offsets establish a <code>margin-left</code>\n' +
' with respect to the preceding element or the containers left boundary.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' When using <code>flex-offset</code> the margin-left offset is applied... regardless of your choice of <code>flex-order</code>.\n' +
' or if you use a <code>flex-direction: reverse</code>.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Flex-Offset Directive" class="small-demo colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row">\n' +
' <div flex="66" flex-offset="15">\n' +
' [flex-offset="15"]\n' +
' [flex="66"]\n' +
' </div>\n' +
' <div flex>\n' +
' [flex]\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>API</th>\n' +
' <th>Device width when breakpoint overrides default</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tr>\n' +
' <td>flex-offset</td>\n' +
' <td>Sets default margin-left offset (<b>%-based</b>) unless overridden by another breakpoint.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-xs</td>\n' +
' <td>width < <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-gt-xs</td>\n' +
' <td>width >= <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-sm</td>\n' +
' <td><b>600</b>px <= width < <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-gt-sm</td>\n' +
' <td>width >= <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-md</td>\n' +
' <td><b>960</b>px <= width < <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-gt-md</td>\n' +
' <td>width >= <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-lg</td>\n' +
' <td><b>1280</b>px <= width < <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-gt-lg</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset-xl</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' </table>\n' +
'\n' +
'\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/layout-container.tmpl.html',
'<div ng-controller="LayoutCtrl" class="layout-content" ng-cloak>\n' +
'\n' +
' <h3>Layout and Containers</h3>\n' +
'\n' +
' <p>\n' +
' Use the <code>layout</code> directive on a container element to specify the layout direction for its children:\n' +
' horizontally in a row (<code>layout="row"</code>) or vertically in a column (<code>layout="column"</code>).\n' +
' Note that <code>row</code> is the default layout direction if you specify the <code>layout</code> directive without a value.\n' +
' </p>\n' +
'\n' +
' <table>\n' +
' <tr>\n' +
' <td style="font-weight: bold; background-color: #DBEEF5">row</td>\n' +
' <td style="padding-left: 10px;">Items arranged horizontally. <code>max-height = 100%</code> and <code>max-width</code> is the width of the items in the container.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-weight: bold; background-color: #DBEEF5 ">column</td>\n' +
' <td style="padding-left: 10px;">Items arranged vertically. <code>max-width = 100%</code> and <code>max-height</code> is the height of the items in the container.</td>\n' +
' </tr>\n' +
' </table>\n' +
'\n' +
' <br/>\n' +
'\n' +
' <docs-demo demo-title="Layout Directive" class="small-demo colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row">\n' +
' <div flex>First item in row</div>\n' +
' <div flex>Second item in row</div>\n' +
' </div>\n' +
' <div layout="column">\n' +
' <div flex>First item in column</div>\n' +
' <div flex>Second item in column</div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' Note that <code>layout</code> only affects the flow direction for that container\'s <b>immediate</b> children.\n' +
' </p>\n' +
'\n' +
' <hr>\n' +
'\n' +
' <br/>\n' +
' <h3>Layouts and Responsive Breakpoints</h3>\n' +
'\n' +
' <p>\n' +
' As discussed in the <a href="layout/introduction">Layout Introduction page</a> you can\n' +
' make your layout change depending upon the device view size by using <b>breakpoint alias</b> suffixes.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' To make your layout automatically change depending upon the device screen size, use one to the following <code>layout</code>\n' +
' APIs to set the layout direction for devices with view widths:\n' +
' </p>\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>API</th>\n' +
' <th>Device width when breakpoint overrides default</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tr>\n' +
' <td>layout</td>\n' +
' <td>Sets default layout direction unless overridden by another breakpoint.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-xs</td>\n' +
' <td>width < <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-xs</td>\n' +
' <td>width >= <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-sm</td>\n' +
' <td><b>600</b>px <= width < <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-sm</td>\n' +
' <td>width >= <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-md</td>\n' +
' <td><b>960</b>px <= width < <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-md</td>\n' +
' <td>width >= <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-lg</td>\n' +
' <td><b>1280</b>px <= width < <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-lg</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-xl</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' </table>\n' +
' <br/>\n' +
'\n' +
' <p><a\n' +
' href="https://camo.githubusercontent.com/ad81ae92f8b4285747ce4e48007bf3f104dd5630/687474703a2f2f6d6174657269616c2d64657369676e2e73746f726167652e676f6f676c65617069732e636f6d2f7075626c6973682f6d6174657269616c5f765f342f6d6174657269616c5f6578745f7075626c6973682f3042386f6c5631354a3761625053474678656d46695156527462316b2f6c61796f75745f61646170746976655f627265616b706f696e74735f30312e706e67"\n' +
' target="_blank" style="text-decoration: none;border: 0 none;">\n' +
' <img\n' +
' src="https://camo.githubusercontent.com/ad81ae92f8b4285747ce4e48007bf3f104dd5630/687474703a2f2f6d6174657269616c2d64657369676e2e73746f726167652e676f6f676c65617069732e636f6d2f7075626c6973682f6d6174657269616c5f765f342f6d6174657269616c5f6578745f7075626c6973682f3042386f6c5631354a3761625053474678656d46695156527462316b2f6c61796f75745f61646170746976655f627265616b706f696e74735f30312e706e67"\n' +
' alt=""\n' +
' style="max-width:100%;text-decoration: none;border: 0 none;"></a>\n' +
' </p>\n' +
'\n' +
'\n' +
' <p>\n' +
' For the demo below, as you shrink your browser window width notice the flow direction changes to <code>column</code>\n' +
' for mobile devices (<code>xs</code>). And as you expand it will reset to <code>row</code>\n' +
' for <code>gt-sm</code> view sizes.\n' +
'\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Responsive Layouts" class="small-demo colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row" layout-xs="column">\n' +
' <div flex>\n' +
' I\'m above on mobile, and to the left on larger devices.\n' +
' </div>\n' +
' <div flex>\n' +
' I\'m below on mobile, and to the right on larger devices.\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
'\n' +
'\n' +
' <p>\n' +
' See the <a href="layout/options">Layout Options page</a> for more options such as padding, alignments, etc.\n' +
' </p>\n' +
'\n' +
'\n' +
'\n' +
' </div>\n' +
'\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/layout-introduction.tmpl.html',
'<div ng-controller="LayoutCtrl" class="layout-content" ng-cloak>\n' +
'\n' +
' <h3>Overview</h3>\n' +
' <p>\n' +
' AngularJS Material\'s Layout features provide sugar to enable developers to more easily create modern,\n' +
' responsive layouts on top of CSS3 <a href="http://www.w3.org/TR/css3-flexbox/">flexbox</a>.\n' +
' The layout API consists of a set of AngularJS directives that can\n' +
' be applied to any of your application\'s HTML content.\n' +
' </p>\n' +
'\n' +
'\n' +
' <p>\n' +
' Using <b> HTML Directives</b> as the API provides an easy way to set a value (eg. <code>layout="row"</code>) and\n' +
' helps with separation of concerns: Attributes define layout while CSS classes assign styling.\n' +
' </p>\n' +
'\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>HTML Markup API</th>\n' +
' <th>Allowed values (raw or interpolated)</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tbody>\n' +
' <tr>\n' +
' <td>layout</td>\n' +
' <td><code>row | column</code></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex</td>\n' +
' <td> integer (increments of 5 for 0%->100%, 100%/3, 200%/3)</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-order</td>\n' +
' <td>integer values from -20 to 20</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>flex-offset</td>\n' +
' <td>integer (increments of 5 for 0%->95%, 100%/3, 200%/3)</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-align</td>\n' +
' <td><code>start|center|end|space-around|space-between</code> <code>start|center|end|stretch</code></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-fill</td>\n' +
' <td></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-wrap</td>\n' +
' <td></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-nowrap</td>\n' +
' <td></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-margin</td>\n' +
' <td></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-padding</td>\n' +
' <td></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>show</td>\n' +
' <td></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide</td>\n' +
' <td></td>\n' +
' </tr>\n' +
' </tbody>\n' +
' </table>\n' +
'\n' +
'\n' +
' <p>And if we use Breakpoints as specified in Material Design:</p>\n' +
' <p><a\n' +
' href="https://camo.githubusercontent.com/ad81ae92f8b4285747ce4e48007bf3f104dd5630/687474703a2f2f6d6174657269616c2d64657369676e2e73746f726167652e676f6f676c65617069732e636f6d2f7075626c6973682f6d6174657269616c5f765f342f6d6174657269616c5f6578745f7075626c6973682f3042386f6c5631354a3761625053474678656d46695156527462316b2f6c61796f75745f61646170746976655f627265616b706f696e74735f30312e706e67"\n' +
' target="_blank"><img\n' +
' src="https://camo.githubusercontent.com/ad81ae92f8b4285747ce4e48007bf3f104dd5630/687474703a2f2f6d6174657269616c2d64657369676e2e73746f726167652e676f6f676c65617069732e636f6d2f7075626c6973682f6d6174657269616c5f765f342f6d6174657269616c5f6578745f7075626c6973682f3042386f6c5631354a3761625053474678656d46695156527462316b2f6c61796f75745f61646170746976655f627265616b706f696e74735f30312e706e67"\n' +
' alt="Breakpoints as specified in the Material Design Spec"\n' +
' style="max-width:100%;"></a>\n' +
' </p>\n' +
'\n' +
'\n' +
' <p>We can associate breakpoints with mediaQuery definitions using breakpoint <strong>alias(es)</strong>:</p>\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>Breakpoint</th>\n' +
' <th>MediaQuery (pixel range)</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tbody>\n' +
' <tr>\n' +
' <td>xs</td>\n' +
' <td>\'(max-width: <b>599</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>gt-xs</td>\n' +
' <td>\'(min-width: <b>600</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>sm</td>\n' +
' <td>\'(min-width: <b>600</b>px) and (max-width: <b>959</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>gt-sm</td>\n' +
' <td>\'(min-width: <b>960</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>md</td>\n' +
' <td>\'(min-width: <b>960</b>px) and (max-width: <b>1279</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>gt-md</td>\n' +
' <td>\'(min-width: <b>1280</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>lg</td>\n' +
' <td>\'(min-width: <b>1280</b>px) and (max-width: <b>1919</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>gt-lg</td>\n' +
' <td>\'(min-width: <b>1920</b>px)\'</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>xl</td>\n' +
' <td>\'(min-width: <b>1920</b>px)\'</td>\n' +
' </tr>\n' +
' </tbody>\n' +
' </table>\n' +
'\n' +
' <br/>\n' +
' <hr>\n' +
' <h3>\n' +
' API with Responsive Breakpoints\n' +
' </h3>\n' +
'\n' +
' <p>Now we can combine the breakpoint <code>alias</code> with the Layout API to easily support Responsive breakpoints\n' +
' with our simple Layout markup convention. The <code>alias</code> is simply used as <b>suffix</b> extensions to the Layout\n' +
' API keyword.\n' +
' <br/>e.g.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' This notation results in, for example, the following table for the <code>layout</code> and <code>flex</code> APIs:\n' +
' </p>\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>layout API</th>\n' +
' <th>flex API</th>\n' +
' <th>Activates when device</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tr>\n' +
' <td>layout</td>\n' +
' <td>flex</td>\n' +
' <td>Sets default layout direction & flex unless overridden by another breakpoint.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-xs</td>\n' +
' <td>flex-xs</td>\n' +
' <td>width < <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-xs</td>\n' +
' <td>flex-gt-xs</td>\n' +
' <td>width >= <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-sm</td>\n' +
' <td>flex-sm</td>\n' +
' <td><b>600</b>px <= width < <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-sm</td>\n' +
' <td>flex-gt-sm</td>\n' +
' <td>width >= <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-md</td>\n' +
' <td>flex-md</td>\n' +
' <td><b>960</b>px <= width < <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-md</td>\n' +
' <td>flex-gt-md</td>\n' +
' <td>width >= <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-lg</td>\n' +
' <td>flex-lg</td>\n' +
' <td><b>1280</b>px <= width < <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-lg</td>\n' +
' <td>flex-gt-lg</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-xl</td>\n' +
' <td>flex-xl</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' </table>\n' +
'\n' +
' <p>Below is an example usage of the Responsive Layout API:</p>\n' +
'\n' +
' <hljs lang="html">\n' +
' <div layout=\'column\' class="zero">\n' +
'\n' +
' <div flex="33" flex-md="{{ vm.box1Width }}" class="one"></div>\n' +
' <div flex="33" layout="{{ vm.direction }}" layout-md="row" class="two">\n' +
'\n' +
' <div flex="20" flex-md="10" hide-lg class="two_one"></div>\n' +
' <div flex="30px" show hide-md="{{ vm.hideBox }}" flex-md="25" class="two_two"></div>\n' +
' <div flex="20" flex-md="65" class="two_three"></div>\n' +
'\n' +
' </div>\n' +
' <div flex class="three"></div>\n' +
'\n' +
' </div>\n' +
' </hljs>\n' +
'\n' +
' <br/>\n' +
'\n' +
' <p>\n' +
' This Layout API means it is much easier to set up and maintain flexbox layouts vs. defining everything via CSS.\n' +
' The developer uses the Layout HTML API to specify <b><i>intention</i></b> and the Layout engine handles all the issues of CSS flexbox styling.\n' +
' </p>\n' +
'\n' +
' <p class="layout_note">\n' +
' The Layout engine will log console warnings when it encounters conflicts or known issues.\n' +
' </p>\n' +
'\n' +
'\n' +
' <br/><br/>\n' +
' <hr>\n' +
' <br/>\n' +
'\n' +
' <h3>Under-the-Hood</h3>\n' +
'\n' +
' <p>\n' +
' Due to performance problems when using Attribute Selectors with <b>Internet Explorer</b> browsers; see the following for more details:\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' Layout directives dynamically generate class selectors at runtime. And the Layout CSS classNames and styles have each been\n' +
' predefined in the <code>angular-material.css</code> stylesheet.\n' +
' </p>\n' +
'\n' +
' <p class="layout_note">\n' +
' Developers should continue to use Layout directives in the HTML\n' +
' markup as the classes may change between releases.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' Let\'s see how this directive-to-className transformation works. Consider the simple use of the <code>layout</code> and <code>flex</code> directives (API):\n' +
' </p>\n' +
'\n' +
' <hljs lang="html">\n' +
' <div>\n' +
'\n' +
' <div layout="row">\n' +
'\n' +
' <div flex>First item in row</div>\n' +
' <div flex="20">Second item in row</div>\n' +
'\n' +
' </div>\n' +
' <div layout="column">\n' +
'\n' +
' <div flex="66">First item in column</div>\n' +
' <div flex="33">Second item in column</div>\n' +
'\n' +
' </div>\n' +
'\n' +
' </div>\n' +
' </hljs>\n' +
'\n' +
'\n' +
' <p>\n' +
' At runtime, these attributes are transformed to CSS classes.\n' +
' </p>\n' +
'\n' +
' <hljs lang="html">\n' +
' <div>\n' +
'\n' +
' <div class="ng-scope layout-row">\n' +
'\n' +
' <div class="flex">First item in row</div>\n' +
' <div class="flex-20">Second item in row</div>\n' +
'\n' +
' </div>\n' +
' <div class="ng-scope layout-column">\n' +
'\n' +
' <div class="flex-33">First item in column</div>\n' +
' <div class="flex-66">Second item in column</div>\n' +
'\n' +
' </div>\n' +
'\n' +
' </div>\n' +
' </hljs>\n' +
'\n' +
' <p>\n' +
' Using the style classes above defined in <code>angular-material.css</code>\n' +
' </p>\n' +
'\n' +
' <hljs lang="css">\n' +
'\n' +
' .flex {\n' +
' -webkit-flex: 1 1 0%;\n' +
' -ms-flex: 1 1 0%;\n' +
' flex: 1 1 0%;\n' +
' box-sizing: border-box;\n' +
' }\n' +
' .flex-20 {\n' +
' -webkit-flex: 1 1 20%;\n' +
' -ms-flex: 1 1 20%;\n' +
' flex: 1 1 20%;\n' +
' max-width: 20%;\n' +
' max-height: 100%;\n' +
' box-sizing: border-box;\n' +
' }\n' +
'\n' +
' .layout-row .flex-33 {\n' +
' -webkit-flex: 1 1 calc(100% / 3);\n' +
' -ms-flex: 1 1 calc(100% / 3);\n' +
' flex: 1 1 calc(100% / 3);\n' +
' box-sizing: border-box;\n' +
' }\n' +
'\n' +
' .layout-row .flex-66 {\n' +
' -webkit-flex: 1 1 calc(200% / 3);\n' +
' -ms-flex: 1 1 calc(200% / 3);\n' +
' flex: 1 1 calc(200% / 3);\n' +
' box-sizing: border-box;\n' +
' }\n' +
'\n' +
'\n' +
' .layout-row .flex-33 {\n' +
' max-width: calc(100% / 3);\n' +
' max-height: 100%;\n' +
' }\n' +
'\n' +
' .layout-row .flex-66 {\n' +
' max-width: calc(200% / 3);\n' +
' max-height: 100%;\n' +
' }\n' +
'\n' +
' .layout-column .flex-33 {\n' +
' max-width: 100%;\n' +
' max-height: calc(100% / 3);\n' +
' }\n' +
'\n' +
' .layout-column .flex-66 {\n' +
' max-width: 100%;\n' +
' max-height: calc(200% / 3);\n' +
' }\n' +
' </hljs>\n' +
'\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/layout-options.tmpl.html',
'<div ng-controller="LayoutCtrl" class="layout-content layout-options" ng-cloak>\n' +
'\n' +
' <docs-demo demo-title="Responsive Layout" class="small-demo colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row" layout-sm="column">\n' +
' <div flex>\n' +
' I\'m above on mobile, and to the left on larger devices.\n' +
' </div>\n' +
' <div flex>\n' +
' I\'m below on mobile, and to the right on larger devices.\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' See the <a href="layout/container">Container Elements</a> page for a basic explanation\n' +
' of layout directives.\n' +
' <br/>\n' +
' To make your layout change depending upon the device screen size, there are\n' +
' other <code>layout</code> directives available:\n' +
' </p>\n' +
'\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>API</th>\n' +
' <th>Activates when device</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tr>\n' +
' <td>layout</td>\n' +
' <td>Sets default layout direction unless overridden by another breakpoint.</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-xs</td>\n' +
' <td>width < <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-xs</td>\n' +
' <td>width >= <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-sm</td>\n' +
' <td><b>600</b>px <= width < <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-sm</td>\n' +
' <td>width >= <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-md</td>\n' +
' <td><b>960</b>px <= width < <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-md</td>\n' +
' <td>width >= <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-lg</td>\n' +
' <td><b>1280</b>px <= width < <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-gt-lg</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>layout-xl</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' </table>\n' +
' <br/>\n' +
'\n' +
' <br/>\n' +
' <hr>\n' +
' <br/>\n' +
'\n' +
' <h3>Layout Margin, Padding, Wrap and Fill</h3>\n' +
' <br/>\n' +
'\n' +
'\n' +
' <docs-demo demo-title="Layout Margin, Padding, and Fill" class="small-demo colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row" layout-margin>\n' +
' <div flex>Parent layout and this element have margins.</div>\n' +
' </div>\n' +
' <div layout="row" layout-padding>\n' +
' <div flex>Parent layout and this element have padding.</div>\n' +
' </div>\n' +
' <div layout="row" layout-fill style="min-height: 224px;">\n' +
' <div flex>Parent layout is set to fill available space.</div>\n' +
' </div>\n' +
' <div layout="row" layout-padding layout-margin layout-fill style="min-height: 224px;">\n' +
' <div flex>I am using all three at once.</div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' <code>layout-margin</code> adds margin around each <code>flex</code> child. It also adds a margin to the layout\n' +
' container itself.\n' +
' <br/>\n' +
' <code>layout-padding</code> adds padding inside each <code>flex</code> child. It also adds padding to the layout\n' +
' container itself.\n' +
' <br/>\n' +
' <code>layout-fill</code> forces the layout element to fill its parent container.\n' +
' </p>\n' +
'\n' +
'\n' +
' <p>Here is a non-trivial group of <code>flex</code> elements using <code>layout-wrap</code></p>\n' +
'\n' +
' <docs-demo demo-title="Wrap" class="small-demo colorNested-noPad">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row" layout-wrap>\n' +
' <div flex="33">[flex=33]</div>\n' +
' <div flex="66">[flex=66]</div>\n' +
' <div flex="66">[flex=66]</div>\n' +
' <div flex="33">[flex=33]</div>\n' +
' <div flex="33">[flex=33]</div>\n' +
' <div flex="33">[flex=33]</div>\n' +
' <div flex="33">[flex=33]</div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' <code>layout-wrap</code> allows <code>flex</code> children to wrap within the container if the elements use more\n' +
' than 100%.\n' +
' <br/>\n' +
' </p>\n' +
'\n' +
' <br/>\n' +
'\n' +
' <br/>\n' +
' <hr>\n' +
' <br/>\n' +
'\n' +
' <h3>Show & Hide </h3>\n' +
'\n' +
' <p>Use the <code>show</code> <code>hide</code> APIs to responsively show or hide elements. While these work similar\n' +
' to <code>ng-show</code> and <code>ng-hide</code>, these AngularJS Material Layout directives are mediaQuery-aware.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="Hide and Show Directives" class="small-demo colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div layout="row">\n' +
' <div hide show-gt-sm flex>\n' +
' Only show on gt-sm devices.\n' +
' </div>\n' +
' <div hide-gt-sm flex>\n' +
' Shown on small and medium.<br/>\n' +
' Hidden on gt-sm devices.\n' +
' </div>\n' +
' <div show hide-gt-md flex>\n' +
' Shown on small and medium size devices.<br/>\n' +
' Hidden on gt-md devices.\n' +
' </div>\n' +
' <div hide show-md flex>\n' +
' Shown on medium size devices only.\n' +
' </div>\n' +
' <div hide show-gt-lg flex>\n' +
' Shown on devices larger than 1200px wide only.\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
' <br/>\n' +
' <table class="md-api-table">\n' +
' <thead>\n' +
' <tr>\n' +
' <th>hide (display: none)</th>\n' +
' <th>show (negates hide)</th>\n' +
' <th>Activates when:</th>\n' +
' </tr>\n' +
' </thead>\n' +
' <tr>\n' +
' <td>hide-xs</td>\n' +
' <td>show-xs</td>\n' +
' <td>width < <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-gt-xs</td>\n' +
' <td>show-gt-xs</td>\n' +
' <td>width >= <b>600</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-sm</td>\n' +
' <td>show-sm</td>\n' +
' <td><b>600</b>px <= width < <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-gt-sm</td>\n' +
' <td>show-gt-sm</td>\n' +
' <td>width >= <b>960</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-md</td>\n' +
' <td>show-md</td>\n' +
' <td><b>960</b>px <= width < <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-gt-md</td>\n' +
' <td>show-gt-md</td>\n' +
' <td>width >= <b>1280</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-lg</td>\n' +
' <td>show-lg</td>\n' +
' <td><b>1280</b>px <= width < <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-gt-lg</td>\n' +
' <td>show-gt-lg</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td>hide-xl</td>\n' +
' <td>show-xl</td>\n' +
' <td>width >= <b>1920</b>px</td>\n' +
' </tr>\n' +
' </table>\n' +
'\n' +
'\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/layout-tips.tmpl.html',
'<style>\n' +
' ul.spaced li {\n' +
' margin-bottom: 15px;\n' +
' }\n' +
'</style>\n' +
'<div ng-controller="LayoutTipsCtrl as tips" class="layout-content">\n' +
' <h3>Overview</h3>\n' +
'\n' +
' <p>\n' +
' The AngularJS Material Layout system uses the current\n' +
' <a href="http://www.w3.org/TR/css3-flexbox/">Flexbox</a> feature set. More importantly, it also\n' +
' adds syntactic sugar to allow developers to easily and quickly add Responsive features to HTML\n' +
' containers and elements.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' As you use the Layout features, you may encounter scenarios where the layouts do not render as\n' +
' expected; especially with IE 10 and 11 browsers. There may also be cases where you need to add\n' +
' custom HTML, CSS and Javascript to achieve your desired results.\n' +
' </p>\n' +
'\n' +
'\n' +
' <br/>\n' +
' <hr/>\n' +
'\n' +
' <h3>Resources</h3>\n' +
'\n' +
' <p>\n' +
' If you are experiencing an issue in a particular browser, we highly recommend using the\n' +
' following resources for known issues and workarounds.\n' +
' </p>\n' +
'\n' +
' <ul>\n' +
' <li><a href="https://github.com/philipwalton/flexbugs#flexbugs" target="_blank">FlexBugs</a></li>\n' +
' <li><a href="https://philipwalton.github.io/solved-by-flexbox/" target="_blank">Solved by FlexBugs</a></li>\n' +
' <li><a href="http://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/" target="_blank">Normalizing Cross-browser Flexbox Bugs</a></li>\n' +
' <li style="margin-bottom: 20px;"><a href="http://caniuse.com/#search=flex" target="_blank">Can I use flexbox...? ( see the <code>Known Issues</code> tab)</a></li>\n' +
' <li><a href="https://groups.google.com/forum/#!forum/ngmaterial">AngularJS Material Forum</a></li>\n' +
' <li style="margin-top: 20px;"><a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="_blank">A Complete Guide to Flexbox</a></li>\n' +
' <li style="margin-bottom: 20px;"><a href="https://scotch.io/tutorials/a-visual-guide-to-css3-flexbox-properties" target="_blank">A Visual Guide to CSS3 Flexbox Properties</a></li>\n' +
' </ul>\n' +
'\n' +
'\n' +
' <br/>\n' +
' <hr/>\n' +
'\n' +
' <h3>General Tips</h3>\n' +
'\n' +
' <p>\n' +
' Below, you will find solutions to some of the more common scenarios and problems that may arise\n' +
' when using Material\'s Layout system. The following sections offer general guidelines and tips when using the <code>flex</code> and\n' +
' <code>layout</code> directives within your own applications.\n' +
' </p>\n' +
'\n' +
' <ul class="spaced">\n' +
' <li>\n' +
' When building your application\'s Layout, it is usually best to start with a mobile version\n' +
' that looks and works correctly, and then apply styling for larger devices using the\n' +
' <code>flex-gt-*</code> or <code>hide-gt-*</code> attributes. This approach typically leads\n' +
' to less frustration than starting big and attempting to fix issues on smaller devices.\n' +
' </li>\n' +
'\n' +
' <li>\n' +
' Some elements like <code><fieldset></code> and <code><button></code> do not always\n' +
' work correctly with flex. Additionally, some of the AngularJS Material components provide their\n' +
' own styles. If you are having difficulty with a specific element/component, but not\n' +
' others, try applying the flex attributes to a parent or child <code><div></code> of the\n' +
' element instead.\n' +
' </li>\n' +
'\n' +
' <li>\n' +
' Some Flexbox properties such as <code>flex-direction</code> <u>cannot</u> be animated.\n' +
' </li>\n' +
'\n' +
' <li>\n' +
' Flexbox can behave differently on different browsers. You should test as many as possible on\n' +
' a regular basis so that you can catch and fix layout issues more quickly.\n' +
' </li>\n' +
' </ul>\n' +
'\n' +
' <br/>\n' +
' <hr/>\n' +
'\n' +
' <h3>Layout Column</h3>\n' +
'\n' +
' <p>\n' +
' In some scenarios <code>layout="column"</code> and breakpoints (xs, gt-xs, xs, gt-sm, etc.) may not work\n' +
' as expected due to CSS specificity rules.\n' +
' </p>\n' +
'\n' +
' <div class="md-whiteframe-3dp" style="height: 700px">\n' +
' <iframe height=\'700\' scrolling=\'no\'\n' +
' src=\'//codepen.io/team/AngularMaterial/embed/obgapg/?height=700&theme-id=21180&default-tab=result\'\n' +
' frameborder=\'no\' allowtransparency=\'true\' allowfullscreen=\'true\' style=\'width: 100%;\'>See the Pen <a\n' +
' href=\'http://codepen.io/team/AngularMaterial/pen/obgapg/\'>Card Layouts (corrected)</a> by AngularJS Material (<a\n' +
' href=\'http://codepen.io/AngularMaterial\'>@AngularMaterial</a>) on <a href=\'http://codepen.io\'>CodePen</a>.\n' +
' </iframe>\n' +
' </div>\n' +
'\n' +
' <p>\n' +
' This is easily fixed simply by inverting the layout logic so that the default is <code>layout=\'row\'</code>.\n' +
' To see how the layout changes, shrink the browser window its width is <600px;\n' +
' </p>\n' +
'\n' +
'\n' +
' <br/>\n' +
' <hr/>\n' +
'\n' +
' <h3 id="layout-column-0px-ie11">IE11 - Layout Column, 0px Height</h3>\n' +
'\n' +
' <p>\n' +
' In Internet Explorer 11, when you have a column layout with unspecified height and flex items\n' +
' inside, the browser can get confused and incorrectly calculate the height of each item (and thus\n' +
' the container) as <code>0px</code>, making the items overlap and not take up the proper amount\n' +
' of space.\n' +
' </p>\n' +
'\n' +
' <p class="layout_note">\n' +
' <b>Note:</b> The flex items below actually do have some height. This is because our doc-specific\n' +
' CSS provides a small bit of padding (<code>8px</code>). We felt that the extra padding made for\n' +
' a better demo of the actual issue.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="IE11 - Layout Column, 0px Height" class="colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div flex layout="column">\n' +
' <div flex>\n' +
' 11111<br />11111<br />11111\n' +
' </div>\n' +
'\n' +
' <div flex>\n' +
' 22222<br />22222<br />22222\n' +
' </div>\n' +
'\n' +
' <div flex>\n' +
' 33333<br />33333<br />33333\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <p>\n' +
' Unfortunately, there is no IE11 specific fix available, and the suggested workaround is to set\n' +
' the <code>flex-basis</code> property to <code>auto</code> instead of <code>0px</code> (which is\n' +
' the default setting).\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' You can easily achieve this using the <code>flex="auto"</code> attribute that the Layout system\n' +
' provides.\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="IE11 - Layout Column, 0px Height (Fix 1)" class="colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div flex layout="column">\n' +
' <div flex="auto">\n' +
' 11111<br />11111<br />11111\n' +
' </div>\n' +
'\n' +
' <div flex="auto">\n' +
' 22222<br />22222<br />22222\n' +
' </div>\n' +
'\n' +
' <div flex="auto">\n' +
' 33333<br />33333<br />33333\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
'\n' +
' <p>\n' +
' Alternatively, you can manually set the height of the layout container (<code>400px</code>\n' +
' in the demo below).\n' +
' </p>\n' +
'\n' +
' <docs-demo demo-title="IE11 - Layout Column, 0px Height (Fix 2)" class="colorNested">\n' +
' <demo-file name="index.html">\n' +
' <div flex layout="column" style="height: 400px;">\n' +
' <div flex>\n' +
' 11111<br />11111<br />11111\n' +
' </div>\n' +
'\n' +
' <div flex>\n' +
' 22222<br />22222<br />22222\n' +
' </div>\n' +
'\n' +
' <div flex>\n' +
' 33333<br />33333<br />33333\n' +
' </div>\n' +
' </div>\n' +
' </demo-file>\n' +
' </docs-demo>\n' +
'\n' +
' <br/>\n' +
' <hr/>\n' +
'\n' +
' <h3>Flex Element Heights</h3>\n' +
'\n' +
' <p>\n' +
' Firefox currently has an issue calculating the proper height of flex containers whose children\n' +
' are flex, but have more content than can properly fit within the container.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' This is particularly problematic if the <code>flex</code> children are <code>md-content</code> components as\n' +
' it will prevent the content from scrolling correctly, instead scrolling the entire body.\n' +
' </p>\n' +
'\n' +
' <div class="md-whiteframe-3dp" style="height: 376px">\n' +
' <iframe height=\'376\' scrolling=\'no\'\n' +
' src=\'//codepen.io/team/AngularMaterial/embed/NxKBwW/?height=376&theme-id=0&default-tab=result\'\n' +
' frameborder=\'no\' allowtransparency=\'true\' allowfullscreen=\'true\' style=\'width: 100%;\'>\n' +
' See the Pen <a href=\'http://codepen.io/team/AngularMaterial/pen/NxKBwW/\'>AngularJS Material Basic App</a>\n' +
' by AngularJS Material (<a href=\'http://codepen.io/AngularMaterial\'>@AngularJSMaterial</a>)\n' +
' on <a href=\'http://codepen.io\'>CodePen</a>.\n' +
' </iframe>\n' +
' </div>\n' +
'\n' +
' <p>\n' +
' Notice in the above Codepen how we must set <code>overflow: auto</code> on the div with the\n' +
' <code>change-my-css</code> class in order for Firefox to properly calculate the height and\n' +
' shrink to the available space.\n' +
' </p>\n' +
'\n' +
'</div>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/license.tmpl.html',
'<div ng-controller="GuideCtrl" class="doc-content">\n' +
' <md-content>\n' +
' <p>The MIT License</p>\n' +
'\n' +
' <p>\n' +
' Copyright (c) 2014-2018 Google LLC\n' +
' <a href="http://angularjs.org">https://angularjs.org</a>\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' Permission is hereby granted, free of charge, to any person obtaining a copy\n' +
' of this software and associated documentation files (the "Software"), to deal\n' +
' in the Software without restriction, including without limitation the rights\n' +
' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n' +
' copies of the Software, and to permit persons to whom the Software is\n' +
' furnished to do so, subject to the following conditions:\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' The above copyright notice and this permission notice shall be included in\n' +
' all copies or substantial portions of the Software.\n' +
' </p>\n' +
'\n' +
' <p>\n' +
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n' +
' IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n' +
' FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n' +
' AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n' +
' LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n' +
' OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n' +
' THE SOFTWARE.\n' +
' </p>\n' +
' </md-content>\n' +
'</div>');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/menu-link.tmpl.html',
'<md-button\n' +
' ng-class="{\'active\' : isSelected()}"\n' +
' ng-href="{{section.url}}"\n' +
' ng-click="focusSection()">\n' +
' {{section | humanizeDoc}}\n' +
' <span class="md-visually-hidden"\n' +
' ng-if="isSelected()">\n' +
' current page\n' +
' </span>\n' +
'</md-button>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/menu-toggle.tmpl.html',
'<md-button class="md-button-toggle"\n' +
' ng-click="toggle()"\n' +
' aria-controls="docs-menu-{{section.name | nospace}}"\n' +
' aria-expanded="{{isOpen()}}">\n' +
' <div flex layout="row">\n' +
' {{section.name}}\n' +
' <span flex></span>\n' +
' <span aria-hidden="true" class="md-toggle-icon"\n' +
' ng-class="{\'toggled\' : isOpen()}">\n' +
' <md-icon md-svg-icon="md-toggle-arrow"></md-icon>\n' +
' </span>\n' +
' </div>\n' +
' <span class="md-visually-hidden">\n' +
' Toggle {{isOpen()? \'expanded\' : \'collapsed\'}}\n' +
' </span>\n' +
'</md-button>\n' +
'\n' +
'<ul id="docs-menu-{{section.name | nospace}}"\n' +
' class="menu-toggle-list"\n' +
' aria-hidden="{{!renderContent}}"\n' +
' ng-style="{ visibility: renderContent ? \'visible\' : \'hidden\' }">\n' +
'\n' +
' <li ng-repeat="page in section.pages">\n' +
' <menu-link section="page"></menu-link>\n' +
' </li>\n' +
'</ul>\n' +
'');
}]);
angular.module('docsApp').run(['$templateCache', function($templateCache) {
$templateCache.put('partials/view-source.tmpl.html',
'<md-dialog class="view-source-dialog">\n' +
'\n' +
' <md-tabs>\n' +
' <md-tab ng-repeat="file in files"\n' +
' active="file === data.selectedFile"\n' +
' ng-click="data.selectedFile = file" >\n' +
' <span class="window_label">{{file.viewType}}</span>\n' +
' </md-tab>\n' +
' </md-tabs>\n' +
'\n' +
' <md-dialog-content md-scroll-y flex>\n' +
' <div ng-repeat="file in files">\n' +
' <hljs code="file.content"\n' +
' lang="{{file.fileType}}"\n' +
' ng-show="file === data.selectedFile" >\n' +
' </hljs>\n' +
' </div>\n' +
' </md-dialog-content>\n' +
'\n' +
' <md-dialog-actions layout="horizontal">\n' +
' <md-button class="md-primary" ng-click="$hideDialog()">\n' +
' Done\n' +
' </md-button>\n' +
' </md-dialog-actions>\n' +
'</md-dialog>\n' +
'');
}]);
|
import Helpers from '../../utils/helpers';
import Headers from './headers';
import Send from './send';
/**
* Gets the AccountMetaDataPair of an account.
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
*
* @return {object} - An [AccountMetaDataPair]{@link http://bob.nem.ninja/docs/#accountMetaDataPair} object
*/
let data = function(endpoint, address) {
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/get',
method: 'GET',
headers: Headers.urlEncoded,
qs: {'address': address}
}
// Send the request
return Send(options);
}
/**
* Gets the AccountMetaDataPair of an account with a public Key.
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} publicKey - An account public key
*
* @return {object} - An [AccountMetaDataPair]{@link http://bob.nem.ninja/docs/#accountMetaDataPair} object
*/
let dataFromPublicKey = function(endpoint, publicKey) {
// Configure the public key request
const options = {
url: Helpers.formatEndpoint(endpoint) + '/account/get/from-public-key',
method: 'GET',
headers: Headers.urlEncoded,
qs: {'publicKey': publicKey}
}
// Send the request
return Send(options);
}
/**
* Gets an array of harvest info objects for an account.
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
*
* @return {array} - An array of [HarvestInfo]{@link http://bob.nem.ninja/docs/#harvestInfo} objects
*/
let harvestedBlocks = function(endpoint, address){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/harvests',
method: 'GET',
headers: Headers.urlEncoded,
qs: {'address': address}
}
// Send the request
return Send(options);
}
/**
* Gets an array of TransactionMetaDataPair objects where the recipient has the address given as parameter to the request.
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
* @param {string} txHash - The 256 bit sha3 hash of the transaction up to which transactions are returned. (optional)
* @param {string} txId - The transaction id up to which transactions are returned. (optional)
*
* @return {array} - An array of [TransactionMetaDataPair]{@link http://bob.nem.ninja/docs/#transactionMetaDataPair} objects
*/
let incomingTransactions = function(endpoint, address, txHash, txId){
// Arrange
let params = {'address': address};
if (txHash) params['hash'] = txHash;
if (txId) params['id'] = txId;
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/transfers/incoming',
method: 'GET',
headers: Headers.urlEncoded,
qs: params
}
// Send the request
return Send(options);
}
/**
* Gets an array of TransactionMetaDataPair objects where the sender has the address given as parameter to the request.
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
* @param {string} txHash - The 256 bit sha3 hash of the transaction up to which transactions are returned. (optional)
* @param {string} txId - The transaction id up to which transactions are returned. (optional)
*
* @return {array} - An array of [TransactionMetaDataPair]{@link http://bob.nem.ninja/docs/#transactionMetaDataPair} objects
*/
let outgoingTransactions = function(endpoint, address, txHash, txId){
// Arrange
let params = {'address': address};
if (txHash) params['hash'] = txHash;
if (txId) params['id'] = txId;
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/transfers/outgoing',
method: 'GET',
headers: Headers.urlEncoded,
qs: params
}
// Send the request
return Send(options);
}
/**
* Gets the array of transactions for which an account is the sender or receiver and which have not yet been included in a block.
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
*
* @return {array} - An array of [UnconfirmedTransactionMetaDataPair]{@link http://bob.nem.ninja/docs/#unconfirmedTransactionMetaDataPair} objects
*/
let unconfirmedTransactions = function(endpoint, address){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/unconfirmedTransactions',
method: 'GET',
headers: Headers.urlEncoded,
qs: {'address': address}
}
// Send the request
return Send(options);
}
/**
* Gets information about the maximum number of allowed harvesters and how many harvesters are already using the node
*
* @param {object} endpoint - An NIS endpoint object
*
* @return {object} - An [UnlockInfo]{@link http://bob.nem.ninja/docs/#retrieving-the-unlock-info} object
*/
let unlockInfo = function(endpoint) {
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/unlocked/info',
method: 'POST',
headers: Headers.urlEncoded
}
// Send the request
return Send(options);
};
/**
* Unlocks an account (starts harvesting).
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} privateKey - A delegated account private key
*
* @return - Nothing
*/
let startHarvesting = function(endpoint, privateKey){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/unlock',
method: 'POST',
json: true,
body: {'value': privateKey}
}
// Send the request
return Send(options);
};
/**
* Locks an account (stops harvesting).
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} privateKey - A delegated account private key
*
* @return - Nothing
*/
let stopHarvesting = function(endpoint, privateKey){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/lock',
method: 'POST',
json: true,
body: {'value': privateKey}
}
// Send the request
return Send(options);
};
/**
* Gets the AccountMetaDataPair of the account for which the given account is the delegate account
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
*
* @return {object} - An [AccountMetaDataPair]{@link http://bob.nem.ninja/docs/#accountMetaDataPair} object
*/
let forwarded = function(endpoint, address) {
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/get/forwarded',
method: 'GET',
headers: Headers.urlEncoded,
qs: {'address': address}
}
// Send the request
return Send(options);
}
/**
* Gets namespaces that an account owns
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
* @param {string} parent - The namespace parent (optional)
*
* @return {object} - An array of [NamespaceMetaDataPair]{@link http://bob.nem.ninja/docs/#namespaceMetaDataPair} objects
*/
let namespacesOwned = function(endpoint, address, parent){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/namespace/page',
method: 'GET',
headers: Headers.urlEncoded,
qs: { 'address': address, 'parent': parent || ""}
}
// Send the request
return Send(options);
}
/**
* Gets mosaic definitions that an account has created
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
* @param {string} parent - The namespace parent (optional)
*
* @return {object} - An array of [MosaicDefinition]{@link http://bob.nem.ninja/docs/#mosaicDefinition} objects
*/
let mosaicDefinitionsCreated = function(endpoint, address, parent){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/mosaic/definition/page',
method: 'GET',
headers: Headers.urlEncoded,
qs: { 'address': address, 'parent': parent || ""}
}
// Send the request
return Send(options);
}
/**
* Gets mosaic definitions that an account owns
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
*
* @return {array} - An array of [MosaicDefinition]{@link http://bob.nem.ninja/docs/#mosaicDefinition} objects
*/
let mosaicDefinitions = function(endpoint, address){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/mosaic/owned/definition',
method: 'GET',
headers: Headers.urlEncoded,
qs: { 'address': address }
}
// Send the request
return Send(options);
}
/**
* Gets mosaics that an account owns
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
*
* @return {array} - An array of [Mosaic]{@link http://bob.nem.ninja/docs/#mosaic} objects
*/
let mosaicsOwned = function(endpoint, address){
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/mosaic/owned',
method: 'GET',
headers: Headers.urlEncoded,
qs: { 'address': address }
}
// Send the request
return Send(options);
}
/**
* Gets all transactions of an account
*
* @param {object} endpoint - An NIS endpoint object
* @param {string} address - An account address
* @param {string} txHash - The 256 bit sha3 hash of the transaction up to which transactions are returned. (optional)
* @param {string} txId - The transaction id up to which transactions are returned. (optional)
*
* @return {array} - An array of [TransactionMetaDataPair]{@link http://bob.nem.ninja/docs/#transactionMetaDataPair} objects
*/
let allTransactions = function(endpoint, address, txHash, txId){
// Arrange
let params = {'address': address};
if (txHash) params['hash'] = txHash;
if (txId) params['id'] = txId;
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/transfers/all',
method: 'GET',
headers: Headers.urlEncoded,
qs: params
}
// Send the request
return Send(options);
}
/**
* Gets the AccountMetaDataPair of an array of accounts.
*
* @param {string} endpoint - An NIS endpoint object
* @param {array} addresses - An array of account addresses
*
* @return {object} - An object that contains an array of [AccountMetaDataPair]{@link http://bob.nem.ninja/docs/#accountMetaDataPair} objects
*/
let getBatchAccountData = function(endpoint, addresses){
let obj = {
'data':[]
};
for(var i = 0; i < addresses.length; i++){
obj.data.push({'account':addresses[i]});
}
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/get/batch',
method: 'POST',
json: true,
body: obj
}
// Send the request
return Send(options);
};
/**
* Gets the AccountMetaDataPair of an array of accounts from an historical height.
*
* @param {string} endpoint - An NIS endpoint object
* @param {array} addresses - An array of account addresses
* @param {integer} block - The block height
*
* @return {object} - Account information for all the accounts on the given block
*/
let getBatchHistoricalAccountData = function(endpoint, addresses, block){
let obj = {
'accounts':[],
'startHeight': block,
'endHeight': block,
'incrementBy': 1
};
for(var i = 0; i < addresses.length; i++){
obj.accounts.push({'account':addresses[i]});
}
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/historical/get/batch',
method: 'POST',
json: true,
body: obj
}
// Send the request
return Send(options);
};
/**
* Gets the AccountMetaDataPair of an account from a certain block.
*
* @param {string} endpoint - An NIS endpoint object
* @param {string} address - An account address
* @param {integer} block - the block height
*
* @return {object} - An [AccountMetaDataPair]{@link http://bob.nem.ninja/docs/#accountMetaDataPair} object
*/
let getHistoricalAccountData = function(endpoint, address, block) {
let obj = {
'params': {
'address': address,
'startHeight': block,
'endHeight': block,
'increment': 1
}
};
// Configure the request
var options = {
url: Helpers.formatEndpoint(endpoint) + '/account/historical/get',
method: 'GET',
headers: Headers.urlEncoded,
qs: obj
}
// Send the request
return Send(options);
}
module.exports = {
data,
dataFromPublicKey,
batchData: getBatchAccountData,
historical: {
data: getHistoricalAccountData,
batchData: getBatchHistoricalAccountData
},
unlockInfo,
forwarded,
mosaics: {
owned: mosaicsOwned,
definitions: mosaicDefinitionsCreated,
allDefinitions: mosaicDefinitions
},
namespaces: {
owned: namespacesOwned
},
harvesting: {
blocks: harvestedBlocks,
start: startHarvesting,
stop: stopHarvesting
},
transactions: {
incoming: incomingTransactions,
outgoing: outgoingTransactions,
unconfirmed: unconfirmedTransactions,
all: allTransactions
}
}
|
var processValue = require('./lib/util/valueProcessor');
var piGlowInterface = require('./lib/interface');
var PiGlowBackend = require('./lib/PiGlowBackend');
var PiGlowBackendMock = require('./lib/PiGlowBackendMock');
var BackendMockPrettyPrint = require('./lib/PiGlowBackendMockPrettyPrint');
/**
* convenience constructor function
*/
function createPiGlow(callback) {
var myPiGlow = new PiGlowBackend();
var myInterface = piGlowInterface(myPiGlow);
myPiGlow
.on('initialize', function() {
callback(null, myInterface);
})
.on('error', function(error) {
callback(error, null);
});
}
createPiGlow.Backend = PiGlowBackend;
createPiGlow.BackendMock = PiGlowBackendMock;
createPiGlow.BackendMockPrettyPrint = BackendMockPrettyPrint;
createPiGlow.piGlowInterface = piGlowInterface;
createPiGlow.processValue = processValue;
module.exports = createPiGlow;
|
export function RoutesConfig ($stateProvider, $urlRouterProvider) {
'ngInject'
var getView = (viewName) => {
return `./views/app/pages/${viewName}/${viewName}.page.html`
}
var getLayout = (layout) => {
return `./views/app/pages/layout/${layout}.page.html`
}
$urlRouterProvider.otherwise('/')
$stateProvider
.state('app', {
abstract: true,
views: {
'layout': {
templateUrl: getLayout('layout')
},
'header@app': {
templateUrl: getView('header')
},
'footer@app': {
templateUrl: getView('footer')
},
main: {}
},
data: {
bodyClass: 'hold-transition skin-blue sidebar-mini'
}
})
.state('app.landing', {
url: '/',
data: {
auth: true
},
views: {
'main@app': {
templateUrl: getView('landing')
}
}
})
.state('app.tablessimple', {
url: '/tables-simple',
data: {
auth: true
},
views: {
'main@app': {
template: '<tables-simple></tables-simple>'
}
}
})
.state('app.uiicons', {
url: '/ui-icons',
data: {
auth: true
},
views: {
'main@app': {
template: '<ui-icons></ui-icons>'
}
}
})
.state('app.uimodal', {
url: '/ui-modal',
data: {
auth: true
},
views: {
'main@app': {
template: '<ui-modal></ui-modal>'
}
}
})
.state('app.uitimeline', {
url: '/ui-timeline',
data: {
auth: true
},
views: {
'main@app': {
template: '<ui-timeline></ui-timeline>'
}
}
})
.state('app.uibuttons', {
url: '/ui-buttons',
data: {
auth: true
},
views: {
'main@app': {
template: '<ui-buttons></ui-buttons>'
}
}
})
.state('app.uigeneral', {
url: '/ui-general',
data: {
auth: true
},
views: {
'main@app': {
template: '<ui-general></ui-general>'
}
}
})
.state('app.formsgeneral', {
url: '/forms-general',
data: {
auth: true
},
views: {
'main@app': {
template: '<forms-general></forms-general>'
}
}
})
.state('app.chartjs', {
url: '/charts-chartjs',
data: {
auth: true
},
views: {
'main@app': {
template: '<charts-chartjs></charts-chartjs>'
}
}
})
.state('app.comingsoon', {
url: '/comingsoon',
data: {
auth: true
},
views: {
'main@app': {
template: '<coming-soon></coming-soon>'
}
}
})
.state('app.profile', {
url: '/profile',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-profile></user-profile>'
}
},
params: {
alerts: null
}
})
.state('app.userlist', {
url: '/user-lists',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-lists></user-lists>'
}
}
})
.state('app.useradd', {
url: '/user-add',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-add></user-add>'
}
},
params: {
alerts: null
}
})
.state('app.useredit', {
url: '/user-edit/:userId',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-edit></user-edit>'
}
},
params: {
alerts: null,
userId: null
}
})
.state('app.userroles', {
url: '/user-roles',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-roles></user-roles>'
}
}
})
.state('app.userpermissions', {
url: '/user-permissions',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-permissions></user-permissions>'
}
}
})
.state('app.userpermissionsadd', {
url: '/user-permissions-add',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-permissions-add></user-permissions-add>'
}
},
params: {
alerts: null
}
})
.state('app.userpermissionsedit', {
url: '/user-permissions-edit/:permissionId',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-permissions-edit></user-permissions-edit>'
}
},
params: {
alerts: null,
permissionId: null
}
})
.state('app.userrolesadd', {
url: '/user-roles-add',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-roles-add></user-roles-add>'
}
},
params: {
alerts: null
}
})
.state('app.userrolesedit', {
url: '/user-roles-edit/:roleId',
data: {
auth: true
},
views: {
'main@app': {
template: '<user-roles-edit></user-roles-edit>'
}
},
params: {
alerts: null,
roleId: null
}
})
.state('app.widgets', {
url: '/widgets',
data: {
auth: true
},
views: {
'main@app': {
template: '<widgets></widgets>'
}
}
})
.state('login', {
url: '/login',
views: {
'layout': {
templateUrl: getView('login')
},
'header@app': {},
'footer@app': {}
},
data: {
bodyClass: 'hold-transition login-page'
},
params: {
registerSuccess: null,
successMsg: null
}
})
.state('loginloader', {
url: '/login-loader',
views: {
'layout': {
templateUrl: getView('login-loader')
},
'header@app': {},
'footer@app': {}
},
data: {
bodyClass: 'hold-transition login-page'
}
})
.state('register', {
url: '/register',
views: {
'layout': {
templateUrl: getView('register')
},
'header@app': {},
'footer@app': {}
},
data: {
bodyClass: 'hold-transition register-page'
}
})
.state('userverification', {
url: '/userverification/:status',
views: {
'layout': {
templateUrl: getView('user-verification')
}
},
data: {
bodyClass: 'hold-transition login-page'
},
params: {
status: null
}
})
.state('forgot_password', {
url: '/forgot-password',
views: {
'layout': {
templateUrl: getView('forgot-password')
},
'header@app': {},
'footer@app': {}
},
data: {
bodyClass: 'hold-transition login-page'
}
})
.state('reset_password', {
url: '/reset-password/:email/:token',
views: {
'layout': {
templateUrl: getView('reset-password')
},
'header@app': {},
'footer@app': {}
},
data: {
bodyClass: 'hold-transition login-page'
}
})
.state('app.logout', {
url: '/logout',
views: {
'main@app': {
controller: function ($rootScope, $scope, $auth, $state, AclService) {
$auth.logout().then(function () {
delete $rootScope.me
AclService.flushRoles()
AclService.setAbilities({})
$state.go('login')
})
}
}
}
})
}
|
define([
'snippets-model'
], function (
snippetsModel
) {
'use strict';
/**
* This plugin adds each mastalk md snippet
*/
return function (type) {
return function (scribe) {
var commandName = 'mastalk_' + type;
var mastalkCommand = new scribe.api.Command('insertHTML');
mastalkCommand.nodeName = 'P';
mastalkCommand.execute = function () {
scribe.insertPlainText(snippetsModel.get(type).trim() + '\n\n');
};
mastalkCommand.queryState = function () {
return true;
};
mastalkCommand.queryEnabled = function () {
return true;
};
scribe.commands[commandName] = mastalkCommand;
};
};
});
|
window.onload = function () {
$('.all-flags .flag-icon-background').click(function(event){
var flag = $(event.currentTarget).attr('title');
var w = 640;
var h = 480;
var left = (screen.width / 2) - (w / 2);
var top = (screen.height / 2) - (h / 2);
if (flag) {
window.open('flags/4x3/' + flag + '.svg', 'flag-4x3', 'width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
}
});
}
|
var _ = require('lodash'),
util = require('util'),
common = require('./common'),
JSONStream = require('JSONStream'),
EventEmitter = require('events').EventEmitter;
module.exports = SocketConnection;
/**
* Creates a new SocketConnection using specified socket.
* @param {object} socket Socket handle.
* @extends EventEmitter
* @constructor
*/
function SocketConnection(socket) {
var self = this;
this._socket = socket;
var jsonStream = this._socket.pipe(JSONStream.parse());
jsonStream.on('data', function(data) {self._onData(data);});
this._socket.on('close', function() {self._onClose();});
this._socket.on('error', function(err) {self._onError(err);});
this.remoteAddress = socket.remoteAddress;
this.remotePort = socket.remotePort;
EventEmitter.call(this);
}
util.inherits(SocketConnection, EventEmitter);
/**
* Sends the specified message and data to the client.
* @param {String} message Message type. See `ServerMessages` of `SocketPlayer`.
* @param {Object} data Data to be sent to the client.
*/
SocketConnection.prototype.sendMessage = function(message, data) {
this._send({msg: message, data: data});
};
/**
* Sends the specified message to the client and destroys the socket.
* @param {String} message Message type. See `ServerMessages` of `SocketPlayer`.
* @param {Object} data Data to be sent to the client.
*/
SocketConnection.prototype.sendAndClose = function(message, data) {
this.sendMessage(message, data);
var socket = this._socket;
this._socket = null;
socket.destroy();
};
/**
* Handles 'socket closed' event.
* @private
*/
SocketConnection.prototype._onClose = function() {
this._terminate();
};
/**
* Handles 'error' event.
* @private
*/
SocketConnection.prototype._onError = function(err) {
this._log("ERROR: " + err);
this._terminate();
};
/**
* Handles raw data sent from the client
* @param {Object} data Object sent to the socket
* @private
*/
SocketConnection.prototype._onData = function(data) {
this._log("RECEIVED: " + JSON.stringify(data));
if(_.isUndefined(data.msg)) {
return this._syntaxError("msg is not defined");
}
if(_.isUndefined(data.data)) {
return this._syntaxError("data is not defined");
}
this.emit("message", data.msg, data.data);
};
/**
* Sends specified data to the client as JSON string.
* @param {Object} data Data to be sent
* @private
*/
SocketConnection.prototype._send = function(data) {
if(this._socket !== null) {
var jsonData = JSON.stringify(data);
this._log("SENT: " + jsonData);
this._socket.write(jsonData);
}
};
/**
* Ends current game. Call this on unrecoverable error situation (e.g. connection lost).
* @private
*/
SocketConnection.prototype._terminate = function() {
if(this._socket !== null) {
var socket = this._socket;
this._socket = null;
socket.destroy();
}
this.emit('close');
};
/**
* Sends specified error to the client with 'SYNTAX ERROR' and destroys the socket.
* @param {String} err Error text
* @private
*/
SocketConnection.prototype._syntaxError = function(err) {
this.sendAndClose("SYNTAX ERROR", err);
};
/**
* Logs text
* @param {String} text Text to be logged.
* @private
*/
SocketConnection.prototype._log = function(text) {
var msg = this.remoteAddress +':'+ this.remotePort;
msg += " | " + text;
common.log(msg);
};
|
(function( $ ) {
var methods = {
init: function(options) {
// Check for the various File API support.
if (window.File && window.FileReader && window.FileList && window.Blob) {
// Great success! All the File APIs are supported.
} else {
alert('The File APIs are not fully supported in this browser.');
}
options = $.extend({}, $.fn.imageUpl.defaults, options);
return this.each(function() {
self = $(this);
self.data("options", options);
self.bind("change", eventsHandlers.change);
if(!self.attr('type') || self.attr('type') != "file") {
throw "A input type file is required.";
}
});
},
upload: function() {
helpers.upload(this);
}
};
// private things
var eventsHandlers = {
change: function(event) {
event.preventDefault();
helpers.loadFiles(event.target);
}
};
var helpers = {
getOptions: function(curObj) {
var options = null;
curObj = $(curObj);
options = curObj.data("options");
return $.extend(
options,
{
dropZone: curObj.data("drop-zone"),
preview: curObj.data("preview")
}
);
},
loadFiles: function(curObj) {
var files = curObj.files,
$curObj = $(curObj),
options = helpers.getOptions(curObj),
url = window.URL || window.webkitURL,
objUrl = url.createObjectURL || false,
count = 0;
for(var i = 0; i < files.length; i++) {
if(this.isValidFile(files[i], options)) {
if(objUrl) {
this.loadFile(url.createObjectURL(files[i]), options, files[i]);
} else {
var reader = new FileReader();
reader.readAsDataURL(files[i]);
reader.addEventListener(
"onload",
function(e) {
this.loadFile(e.target.result, options, files[i]);
}
);
}
count++;
}
}
return count;
},
loadFile: function(file, options, apiFile) {
if(!this.isValidFile(file)) {
return false;
}
var img = new Image(),
self = this;
img.src = file;
img.onload = function(e) {
var canvas = self.imageToCanvas(this, options);
self.addToPreview(canvas.toDataURL(apiFile.type), options.preview, apiFile);
options.fileLoaded(file, apiFile);
};
},
imageToCanvas: function(img, options) {
var dimensions = this.resize(img.width, img.height, options.maxWidth, options.maxHeight),
c = document.createElement("canvas"),
cx = c.getContext("2d");
c.width = options.maxWidth;
c.height = options.maxHeight;
if(options.crop) {
c.width = dimensions.w;
c.height = dimensions.h;
dimensions.x = 0;
dimensions.y = 0;
}
cx.drawImage(img, dimensions.x, dimensions.y, dimensions.w, dimensions.h);
return c;
},
addToPreview: function(url, destiny, apiFile) {
if(!url) {
return false;
}
var tbn = new Image();
tbn.src = url;
$("#" + destiny).children().replaceWith($(tbn).data("file-type", apiFile.type));
},
resize: function(imgW, imgH, tbnW, tbnH) {
var w = 0, h = 0, x = 0, y = 0,
wr = imgW / tbnW,
hr = imgH / tbnH,
maxR = Math.max(wr, hr);
if(maxR > 1) {
w = imgW / maxR;
h = imgH / maxR;
} else {
w = imgW;
h = imgH;
}
x = (tbnW - w ) / 2;
y = (tbnH - h ) / 2;
return { w:w, h:h, x:x, y:y };
},
isValidFile: function(file, options) {
return true;
},
validate: function(validator) {
if(!validator) {
return true;
}
if(validator.validate()) {
return true;
}
return false;
},
upload: function(obj) {
var $obj = $(obj),
options = this.getOptions(obj);
if(!options.url) {
return false;
}
if(!this.validate(options.validator)) {
return false;
}
if(!!window.FormData) {
var formData = null,
theJqImage = $("#" + $obj.data("preview") + " > img"),
form = $obj.parent("form");
options.beforeSend();
if(form.length > 0) {
$obj.val("");
formData = new FormData(form[0]);
} else {
formData = new FormData();
}
formData.append($obj.attr("name"), theJqImage.attr("src"));
formData.append("type", theJqImage.data("file-type"));
var xhr = new XMLHttpRequest();
xhr.open('POST', options.url);
if($obj.data("progress")) {
var progress = $("#" + $obj.data("progress"));
xhr.upload.onprogress = function(event) {
if(event.lengthComputable) {
var complete = (event.loaded / event.total * 100 | 0);
progress.val(complete).html(complete);
}
};
xhr.onload = function(event) {
progress.val(100).html("100");
options.afterUpdate(this.responseText);
};
}
xhr.send(formData);
} else {
throw "FormData is not supported!";
}
}
};
$.fn.imageUpl = function(method) {
if(methods[method]) {
return methods[ method ].apply( this, Array.prototype.slice.call( arguments, 1 ));
} else if(typeof method === 'object' || ! method) {
return methods.init.apply( this, arguments );
}
else {
$.error('Method ' + method + ' does not exists in imageUpl.');
}
};
$.fn.imageUpl.defaults = {
url: null,
maxFileSize: "2000",
maxWidth: 800,
maxHeight: 600,
crop: true,
acceptedTypes: [
"image/jpeg",
"image/png"
],
fileLoaded: function(file, fileAPI) {},
beforeSend: function() {},
afterUpdate: function(data) {}
};
})( jQuery );
|
/*! jQuery UI - v1.12.1 - 2017-08-12
* http://jqueryui.com
* Includes: widget.js, position.js, keycode.js, unique-id.js, widgets/autocomplete.js, widgets/menu.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */
(function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define([ "jquery" ], factory );
} else {
// Browser globals
factory( jQuery );
}
}(function( $ ) {
$.ui = $.ui || {};
var version = $.ui.version = "1.12.1";
/*!
* jQuery UI Widget 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
//>>label: Widget
//>>group: Core
//>>description: Provides a factory for creating stateful widgets with a common API.
//>>docs: http://api.jqueryui.com/jQuery.widget/
//>>demos: http://jqueryui.com/widget/
var widgetUuid = 0;
var widgetSlice = Array.prototype.slice;
$.cleanData = ( function( orig ) {
return function( elems ) {
var events, elem, i;
for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
try {
// Only trigger remove when necessary to save time
events = $._data( elem, "events" );
if ( events && events.remove ) {
$( elem ).triggerHandler( "remove" );
}
// Http://bugs.jquery.com/ticket/8235
} catch ( e ) {}
}
orig( elems );
};
} )( $.cleanData );
$.widget = function( name, base, prototype ) {
var existingConstructor, constructor, basePrototype;
// ProxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
var proxiedPrototype = {};
var namespace = name.split( "." )[ 0 ];
name = name.split( "." )[ 1 ];
var fullName = namespace + "-" + name;
if ( !prototype ) {
prototype = base;
base = $.Widget;
}
if ( $.isArray( prototype ) ) {
prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
}
// Create selector for plugin
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
return !!$.data( elem, fullName );
};
$[ namespace ] = $[ namespace ] || {};
existingConstructor = $[ namespace ][ name ];
constructor = $[ namespace ][ name ] = function( options, element ) {
// Allow instantiation without "new" keyword
if ( !this._createWidget ) {
return new constructor( options, element );
}
// Allow instantiation without initializing for simple inheritance
// must use "new" keyword (the code above always passes args)
if ( arguments.length ) {
this._createWidget( options, element );
}
};
// Extend with the existing constructor to carry over any static properties
$.extend( constructor, existingConstructor, {
version: prototype.version,
// Copy the object used to create the prototype in case we need to
// redefine the widget later
_proto: $.extend( {}, prototype ),
// Track widgets that inherit from this widget in case this widget is
// redefined after a widget inherits from it
_childConstructors: []
} );
basePrototype = new base();
// We need to make the options hash a property directly on the new instance
// otherwise we'll modify the options hash on the prototype that we're
// inheriting from
basePrototype.options = $.widget.extend( {}, basePrototype.options );
$.each( prototype, function( prop, value ) {
if ( !$.isFunction( value ) ) {
proxiedPrototype[ prop ] = value;
return;
}
proxiedPrototype[ prop ] = ( function() {
function _super() {
return base.prototype[ prop ].apply( this, arguments );
}
function _superApply( args ) {
return base.prototype[ prop ].apply( this, args );
}
return function() {
var __super = this._super;
var __superApply = this._superApply;
var returnValue;
this._super = _super;
this._superApply = _superApply;
returnValue = value.apply( this, arguments );
this._super = __super;
this._superApply = __superApply;
return returnValue;
};
} )();
} );
constructor.prototype = $.widget.extend( basePrototype, {
// TODO: remove support for widgetEventPrefix
// always use the name + a colon as the prefix, e.g., draggable:start
// don't prefix for widgets that aren't DOM-based
widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
}, proxiedPrototype, {
constructor: constructor,
namespace: namespace,
widgetName: name,
widgetFullName: fullName
} );
// If this widget is being redefined then we need to find all widgets that
// are inheriting from it and redefine all of them so that they inherit from
// the new version of this widget. We're essentially trying to replace one
// level in the prototype chain.
if ( existingConstructor ) {
$.each( existingConstructor._childConstructors, function( i, child ) {
var childPrototype = child.prototype;
// Redefine the child widget using the same prototype that was
// originally used, but inherit from the new version of the base
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
child._proto );
} );
// Remove the list of existing child constructors from the old constructor
// so the old child constructors can be garbage collected
delete existingConstructor._childConstructors;
} else {
base._childConstructors.push( constructor );
}
$.widget.bridge( name, constructor );
return constructor;
};
$.widget.extend = function( target ) {
var input = widgetSlice.call( arguments, 1 );
var inputIndex = 0;
var inputLength = input.length;
var key;
var value;
for ( ; inputIndex < inputLength; inputIndex++ ) {
for ( key in input[ inputIndex ] ) {
value = input[ inputIndex ][ key ];
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
// Clone objects
if ( $.isPlainObject( value ) ) {
target[ key ] = $.isPlainObject( target[ key ] ) ?
$.widget.extend( {}, target[ key ], value ) :
// Don't extend strings, arrays, etc. with objects
$.widget.extend( {}, value );
// Copy everything else by reference
} else {
target[ key ] = value;
}
}
}
}
return target;
};
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string";
var args = widgetSlice.call( arguments, 1 );
var returnValue = this;
if ( isMethodCall ) {
// If this is an empty collection, we need to have the instance method
// return undefined instead of the jQuery instance
if ( !this.length && options === "instance" ) {
returnValue = undefined;
} else {
this.each( function() {
var methodValue;
var instance = $.data( this, fullName );
if ( options === "instance" ) {
returnValue = instance;
return false;
}
if ( !instance ) {
return $.error( "cannot call methods on " + name +
" prior to initialization; " +
"attempted to call method '" + options + "'" );
}
if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
return $.error( "no such method '" + options + "' for " + name +
" widget instance" );
}
methodValue = instance[ options ].apply( instance, args );
if ( methodValue !== instance && methodValue !== undefined ) {
returnValue = methodValue && methodValue.jquery ?
returnValue.pushStack( methodValue.get() ) :
methodValue;
return false;
}
} );
}
} else {
// Allow multiple hashes to be passed on init
if ( args.length ) {
options = $.widget.extend.apply( null, [ options ].concat( args ) );
}
this.each( function() {
var instance = $.data( this, fullName );
if ( instance ) {
instance.option( options || {} );
if ( instance._init ) {
instance._init();
}
} else {
$.data( this, fullName, new object( options, this ) );
}
} );
}
return returnValue;
};
};
$.Widget = function( /* options, element */ ) {};
$.Widget._childConstructors = [];
$.Widget.prototype = {
widgetName: "widget",
widgetEventPrefix: "",
defaultElement: "<div>",
options: {
classes: {},
disabled: false,
// Callbacks
create: null
},
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = widgetUuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
this.bindings = $();
this.hoverable = $();
this.focusable = $();
this.classesElementLookup = {};
if ( element !== this ) {
$.data( element, this.widgetFullName, this );
this._on( true, this.element, {
remove: function( event ) {
if ( event.target === element ) {
this.destroy();
}
}
} );
this.document = $( element.style ?
// Element within the document
element.ownerDocument :
// Element is window or document
element.document || element );
this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
}
this.options = $.widget.extend( {},
this.options,
this._getCreateOptions(),
options );
this._create();
if ( this.options.disabled ) {
this._setOptionDisabled( this.options.disabled );
}
this._trigger( "create", null, this._getCreateEventData() );
this._init();
},
_getCreateOptions: function() {
return {};
},
_getCreateEventData: $.noop,
_create: $.noop,
_init: $.noop,
destroy: function() {
var that = this;
this._destroy();
$.each( this.classesElementLookup, function( key, value ) {
that._removeClass( value, key );
} );
// We can probably remove the unbind calls in 2.0
// all event bindings should go through this._on()
this.element
.off( this.eventNamespace )
.removeData( this.widgetFullName );
this.widget()
.off( this.eventNamespace )
.removeAttr( "aria-disabled" );
// Clean up events and states
this.bindings.off( this.eventNamespace );
},
_destroy: $.noop,
widget: function() {
return this.element;
},
option: function( key, value ) {
var options = key;
var parts;
var curOption;
var i;
if ( arguments.length === 0 ) {
// Don't return a reference to the internal hash
return $.widget.extend( {}, this.options );
}
if ( typeof key === "string" ) {
// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
options = {};
parts = key.split( "." );
key = parts.shift();
if ( parts.length ) {
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
for ( i = 0; i < parts.length - 1; i++ ) {
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
curOption = curOption[ parts[ i ] ];
}
key = parts.pop();
if ( arguments.length === 1 ) {
return curOption[ key ] === undefined ? null : curOption[ key ];
}
curOption[ key ] = value;
} else {
if ( arguments.length === 1 ) {
return this.options[ key ] === undefined ? null : this.options[ key ];
}
options[ key ] = value;
}
}
this._setOptions( options );
return this;
},
_setOptions: function( options ) {
var key;
for ( key in options ) {
this._setOption( key, options[ key ] );
}
return this;
},
_setOption: function( key, value ) {
if ( key === "classes" ) {
this._setOptionClasses( value );
}
this.options[ key ] = value;
if ( key === "disabled" ) {
this._setOptionDisabled( value );
}
return this;
},
_setOptionClasses: function( value ) {
var classKey, elements, currentElements;
for ( classKey in value ) {
currentElements = this.classesElementLookup[ classKey ];
if ( value[ classKey ] === this.options.classes[ classKey ] ||
!currentElements ||
!currentElements.length ) {
continue;
}
// We are doing this to create a new jQuery object because the _removeClass() call
// on the next line is going to destroy the reference to the current elements being
// tracked. We need to save a copy of this collection so that we can add the new classes
// below.
elements = $( currentElements.get() );
this._removeClass( currentElements, classKey );
// We don't use _addClass() here, because that uses this.options.classes
// for generating the string of classes. We want to use the value passed in from
// _setOption(), this is the new value of the classes option which was passed to
// _setOption(). We pass this value directly to _classes().
elements.addClass( this._classes( {
element: elements,
keys: classKey,
classes: value,
add: true
} ) );
}
},
_setOptionDisabled: function( value ) {
this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
// If the widget is becoming disabled, then nothing is interactive
if ( value ) {
this._removeClass( this.hoverable, null, "ui-state-hover" );
this._removeClass( this.focusable, null, "ui-state-focus" );
}
},
enable: function() {
return this._setOptions( { disabled: false } );
},
disable: function() {
return this._setOptions( { disabled: true } );
},
_classes: function( options ) {
var full = [];
var that = this;
options = $.extend( {
element: this.element,
classes: this.options.classes || {}
}, options );
function processClassString( classes, checkOption ) {
var current, i;
for ( i = 0; i < classes.length; i++ ) {
current = that.classesElementLookup[ classes[ i ] ] || $();
if ( options.add ) {
current = $( $.unique( current.get().concat( options.element.get() ) ) );
} else {
current = $( current.not( options.element ).get() );
}
that.classesElementLookup[ classes[ i ] ] = current;
full.push( classes[ i ] );
if ( checkOption && options.classes[ classes[ i ] ] ) {
full.push( options.classes[ classes[ i ] ] );
}
}
}
this._on( options.element, {
"remove": "_untrackClassesElement"
} );
if ( options.keys ) {
processClassString( options.keys.match( /\S+/g ) || [], true );
}
if ( options.extra ) {
processClassString( options.extra.match( /\S+/g ) || [] );
}
return full.join( " " );
},
_untrackClassesElement: function( event ) {
var that = this;
$.each( that.classesElementLookup, function( key, value ) {
if ( $.inArray( event.target, value ) !== -1 ) {
that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
}
} );
},
_removeClass: function( element, keys, extra ) {
return this._toggleClass( element, keys, extra, false );
},
_addClass: function( element, keys, extra ) {
return this._toggleClass( element, keys, extra, true );
},
_toggleClass: function( element, keys, extra, add ) {
add = ( typeof add === "boolean" ) ? add : extra;
var shift = ( typeof element === "string" || element === null ),
options = {
extra: shift ? keys : extra,
keys: shift ? element : keys,
element: shift ? this.element : element,
add: add
};
options.element.toggleClass( this._classes( options ), add );
return this;
},
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement;
var instance = this;
// No suppressDisabledCheck flag, shuffle arguments
if ( typeof suppressDisabledCheck !== "boolean" ) {
handlers = element;
element = suppressDisabledCheck;
suppressDisabledCheck = false;
}
// No element argument, shuffle and use this.element
if ( !handlers ) {
handlers = element;
element = this.element;
delegateElement = this.widget();
} else {
element = delegateElement = $( element );
this.bindings = this.bindings.add( element );
}
$.each( handlers, function( event, handler ) {
function handlerProxy() {
// Allow widgets to customize the disabled handling
// - disabled as an array instead of boolean
// - disabled class as method for disabling individual parts
if ( !suppressDisabledCheck &&
( instance.options.disabled === true ||
$( this ).hasClass( "ui-state-disabled" ) ) ) {
return;
}
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
// Copy the guid so direct unbinding works
if ( typeof handler !== "string" ) {
handlerProxy.guid = handler.guid =
handler.guid || handlerProxy.guid || $.guid++;
}
var match = event.match( /^([\w:-]*)\s*(.*)$/ );
var eventName = match[ 1 ] + instance.eventNamespace;
var selector = match[ 2 ];
if ( selector ) {
delegateElement.on( eventName, selector, handlerProxy );
} else {
element.on( eventName, handlerProxy );
}
} );
},
_off: function( element, eventName ) {
eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
this.eventNamespace;
element.off( eventName ).off( eventName );
// Clear the stack to avoid memory leaks (#10056)
this.bindings = $( this.bindings.not( element ).get() );
this.focusable = $( this.focusable.not( element ).get() );
this.hoverable = $( this.hoverable.not( element ).get() );
},
_delay: function( handler, delay ) {
function handlerProxy() {
return ( typeof handler === "string" ? instance[ handler ] : handler )
.apply( instance, arguments );
}
var instance = this;
return setTimeout( handlerProxy, delay || 0 );
},
_hoverable: function( element ) {
this.hoverable = this.hoverable.add( element );
this._on( element, {
mouseenter: function( event ) {
this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
},
mouseleave: function( event ) {
this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
}
} );
},
_focusable: function( element ) {
this.focusable = this.focusable.add( element );
this._on( element, {
focusin: function( event ) {
this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
},
focusout: function( event ) {
this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
}
} );
},
_trigger: function( type, event, data ) {
var prop, orig;
var callback = this.options[ type ];
data = data || {};
event = $.Event( event );
event.type = ( type === this.widgetEventPrefix ?
type :
this.widgetEventPrefix + type ).toLowerCase();
// The original event may come from any element
// so we need to reset the target on the new event
event.target = this.element[ 0 ];
// Copy original event properties over to the new event
orig = event.originalEvent;
if ( orig ) {
for ( prop in orig ) {
if ( !( prop in event ) ) {
event[ prop ] = orig[ prop ];
}
}
}
this.element.trigger( event, data );
return !( $.isFunction( callback ) &&
callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
event.isDefaultPrevented() );
}
};
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
if ( typeof options === "string" ) {
options = { effect: options };
}
var hasOptions;
var effectName = !options ?
method :
options === true || typeof options === "number" ?
defaultEffect :
options.effect || defaultEffect;
options = options || {};
if ( typeof options === "number" ) {
options = { duration: options };
}
hasOptions = !$.isEmptyObject( options );
options.complete = callback;
if ( options.delay ) {
element.delay( options.delay );
}
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
element[ method ]( options );
} else if ( effectName !== method && element[ effectName ] ) {
element[ effectName ]( options.duration, options.easing, callback );
} else {
element.queue( function( next ) {
$( this )[ method ]();
if ( callback ) {
callback.call( element[ 0 ] );
}
next();
} );
}
};
} );
var widget = $.widget;
/*!
* jQuery UI Position 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/position/
*/
//>>label: Position
//>>group: Core
//>>description: Positions elements relative to other elements.
//>>docs: http://api.jqueryui.com/position/
//>>demos: http://jqueryui.com/position/
( function() {
var cachedScrollbarWidth,
max = Math.max,
abs = Math.abs,
rhorizontal = /left|center|right/,
rvertical = /top|center|bottom/,
roffset = /[\+\-]\d+(\.[\d]+)?%?/,
rposition = /^\w+/,
rpercent = /%$/,
_position = $.fn.position;
function getOffsets( offsets, width, height ) {
return [
parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
];
}
function parseCss( element, property ) {
return parseInt( $.css( element, property ), 10 ) || 0;
}
function getDimensions( elem ) {
var raw = elem[ 0 ];
if ( raw.nodeType === 9 ) {
return {
width: elem.width(),
height: elem.height(),
offset: { top: 0, left: 0 }
};
}
if ( $.isWindow( raw ) ) {
return {
width: elem.width(),
height: elem.height(),
offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
};
}
if ( raw.preventDefault ) {
return {
width: 0,
height: 0,
offset: { top: raw.pageY, left: raw.pageX }
};
}
return {
width: elem.outerWidth(),
height: elem.outerHeight(),
offset: elem.offset()
};
}
$.position = {
scrollbarWidth: function() {
if ( cachedScrollbarWidth !== undefined ) {
return cachedScrollbarWidth;
}
var w1, w2,
div = $( "<div " +
"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
"<div style='height:100px;width:auto;'></div></div>" ),
innerDiv = div.children()[ 0 ];
$( "body" ).append( div );
w1 = innerDiv.offsetWidth;
div.css( "overflow", "scroll" );
w2 = innerDiv.offsetWidth;
if ( w1 === w2 ) {
w2 = div[ 0 ].clientWidth;
}
div.remove();
return ( cachedScrollbarWidth = w1 - w2 );
},
getScrollInfo: function( within ) {
var overflowX = within.isWindow || within.isDocument ? "" :
within.element.css( "overflow-x" ),
overflowY = within.isWindow || within.isDocument ? "" :
within.element.css( "overflow-y" ),
hasOverflowX = overflowX === "scroll" ||
( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
hasOverflowY = overflowY === "scroll" ||
( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
return {
width: hasOverflowY ? $.position.scrollbarWidth() : 0,
height: hasOverflowX ? $.position.scrollbarWidth() : 0
};
},
getWithinInfo: function( element ) {
var withinElement = $( element || window ),
isWindow = $.isWindow( withinElement[ 0 ] ),
isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
hasOffset = !isWindow && !isDocument;
return {
element: withinElement,
isWindow: isWindow,
isDocument: isDocument,
offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
scrollLeft: withinElement.scrollLeft(),
scrollTop: withinElement.scrollTop(),
width: withinElement.outerWidth(),
height: withinElement.outerHeight()
};
}
};
$.fn.position = function( options ) {
if ( !options || !options.of ) {
return _position.apply( this, arguments );
}
// Make a copy, we don't want to modify arguments
options = $.extend( {}, options );
var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
target = $( options.of ),
within = $.position.getWithinInfo( options.within ),
scrollInfo = $.position.getScrollInfo( within ),
collision = ( options.collision || "flip" ).split( " " ),
offsets = {};
dimensions = getDimensions( target );
if ( target[ 0 ].preventDefault ) {
// Force left top to allow flipping
options.at = "left top";
}
targetWidth = dimensions.width;
targetHeight = dimensions.height;
targetOffset = dimensions.offset;
// Clone to reuse original targetOffset later
basePosition = $.extend( {}, targetOffset );
// Force my and at to have valid horizontal and vertical positions
// if a value is missing or invalid, it will be converted to center
$.each( [ "my", "at" ], function() {
var pos = ( options[ this ] || "" ).split( " " ),
horizontalOffset,
verticalOffset;
if ( pos.length === 1 ) {
pos = rhorizontal.test( pos[ 0 ] ) ?
pos.concat( [ "center" ] ) :
rvertical.test( pos[ 0 ] ) ?
[ "center" ].concat( pos ) :
[ "center", "center" ];
}
pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
// Calculate offsets
horizontalOffset = roffset.exec( pos[ 0 ] );
verticalOffset = roffset.exec( pos[ 1 ] );
offsets[ this ] = [
horizontalOffset ? horizontalOffset[ 0 ] : 0,
verticalOffset ? verticalOffset[ 0 ] : 0
];
// Reduce to just the positions without the offsets
options[ this ] = [
rposition.exec( pos[ 0 ] )[ 0 ],
rposition.exec( pos[ 1 ] )[ 0 ]
];
} );
// Normalize collision option
if ( collision.length === 1 ) {
collision[ 1 ] = collision[ 0 ];
}
if ( options.at[ 0 ] === "right" ) {
basePosition.left += targetWidth;
} else if ( options.at[ 0 ] === "center" ) {
basePosition.left += targetWidth / 2;
}
if ( options.at[ 1 ] === "bottom" ) {
basePosition.top += targetHeight;
} else if ( options.at[ 1 ] === "center" ) {
basePosition.top += targetHeight / 2;
}
atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
basePosition.left += atOffset[ 0 ];
basePosition.top += atOffset[ 1 ];
return this.each( function() {
var collisionPosition, using,
elem = $( this ),
elemWidth = elem.outerWidth(),
elemHeight = elem.outerHeight(),
marginLeft = parseCss( this, "marginLeft" ),
marginTop = parseCss( this, "marginTop" ),
collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
scrollInfo.width,
collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
scrollInfo.height,
position = $.extend( {}, basePosition ),
myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
if ( options.my[ 0 ] === "right" ) {
position.left -= elemWidth;
} else if ( options.my[ 0 ] === "center" ) {
position.left -= elemWidth / 2;
}
if ( options.my[ 1 ] === "bottom" ) {
position.top -= elemHeight;
} else if ( options.my[ 1 ] === "center" ) {
position.top -= elemHeight / 2;
}
position.left += myOffset[ 0 ];
position.top += myOffset[ 1 ];
collisionPosition = {
marginLeft: marginLeft,
marginTop: marginTop
};
$.each( [ "left", "top" ], function( i, dir ) {
if ( $.ui.position[ collision[ i ] ] ) {
$.ui.position[ collision[ i ] ][ dir ]( position, {
targetWidth: targetWidth,
targetHeight: targetHeight,
elemWidth: elemWidth,
elemHeight: elemHeight,
collisionPosition: collisionPosition,
collisionWidth: collisionWidth,
collisionHeight: collisionHeight,
offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
my: options.my,
at: options.at,
within: within,
elem: elem
} );
}
} );
if ( options.using ) {
// Adds feedback as second argument to using callback, if present
using = function( props ) {
var left = targetOffset.left - position.left,
right = left + targetWidth - elemWidth,
top = targetOffset.top - position.top,
bottom = top + targetHeight - elemHeight,
feedback = {
target: {
element: target,
left: targetOffset.left,
top: targetOffset.top,
width: targetWidth,
height: targetHeight
},
element: {
element: elem,
left: position.left,
top: position.top,
width: elemWidth,
height: elemHeight
},
horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
};
if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
feedback.horizontal = "center";
}
if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
feedback.vertical = "middle";
}
if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
feedback.important = "horizontal";
} else {
feedback.important = "vertical";
}
options.using.call( this, props, feedback );
};
}
elem.offset( $.extend( position, { using: using } ) );
} );
};
$.ui.position = {
fit: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
outerWidth = within.width,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = withinOffset - collisionPosLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
newOverRight;
// Element is wider than within
if ( data.collisionWidth > outerWidth ) {
// Element is initially over the left side of within
if ( overLeft > 0 && overRight <= 0 ) {
newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
withinOffset;
position.left += overLeft - newOverRight;
// Element is initially over right side of within
} else if ( overRight > 0 && overLeft <= 0 ) {
position.left = withinOffset;
// Element is initially over both left and right sides of within
} else {
if ( overLeft > overRight ) {
position.left = withinOffset + outerWidth - data.collisionWidth;
} else {
position.left = withinOffset;
}
}
// Too far left -> align with left edge
} else if ( overLeft > 0 ) {
position.left += overLeft;
// Too far right -> align with right edge
} else if ( overRight > 0 ) {
position.left -= overRight;
// Adjust based on position and margin
} else {
position.left = max( position.left - collisionPosLeft, position.left );
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
outerHeight = data.within.height,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = withinOffset - collisionPosTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
newOverBottom;
// Element is taller than within
if ( data.collisionHeight > outerHeight ) {
// Element is initially over the top of within
if ( overTop > 0 && overBottom <= 0 ) {
newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
withinOffset;
position.top += overTop - newOverBottom;
// Element is initially over bottom of within
} else if ( overBottom > 0 && overTop <= 0 ) {
position.top = withinOffset;
// Element is initially over both top and bottom of within
} else {
if ( overTop > overBottom ) {
position.top = withinOffset + outerHeight - data.collisionHeight;
} else {
position.top = withinOffset;
}
}
// Too far up -> align with top
} else if ( overTop > 0 ) {
position.top += overTop;
// Too far down -> align with bottom edge
} else if ( overBottom > 0 ) {
position.top -= overBottom;
// Adjust based on position and margin
} else {
position.top = max( position.top - collisionPosTop, position.top );
}
}
},
flip: {
left: function( position, data ) {
var within = data.within,
withinOffset = within.offset.left + within.scrollLeft,
outerWidth = within.width,
offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
collisionPosLeft = position.left - data.collisionPosition.marginLeft,
overLeft = collisionPosLeft - offsetLeft,
overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
myOffset = data.my[ 0 ] === "left" ?
-data.elemWidth :
data.my[ 0 ] === "right" ?
data.elemWidth :
0,
atOffset = data.at[ 0 ] === "left" ?
data.targetWidth :
data.at[ 0 ] === "right" ?
-data.targetWidth :
0,
offset = -2 * data.offset[ 0 ],
newOverRight,
newOverLeft;
if ( overLeft < 0 ) {
newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
outerWidth - withinOffset;
if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
position.left += myOffset + atOffset + offset;
}
} else if ( overRight > 0 ) {
newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
atOffset + offset - offsetLeft;
if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
position.left += myOffset + atOffset + offset;
}
}
},
top: function( position, data ) {
var within = data.within,
withinOffset = within.offset.top + within.scrollTop,
outerHeight = within.height,
offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
collisionPosTop = position.top - data.collisionPosition.marginTop,
overTop = collisionPosTop - offsetTop,
overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
top = data.my[ 1 ] === "top",
myOffset = top ?
-data.elemHeight :
data.my[ 1 ] === "bottom" ?
data.elemHeight :
0,
atOffset = data.at[ 1 ] === "top" ?
data.targetHeight :
data.at[ 1 ] === "bottom" ?
-data.targetHeight :
0,
offset = -2 * data.offset[ 1 ],
newOverTop,
newOverBottom;
if ( overTop < 0 ) {
newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
outerHeight - withinOffset;
if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
position.top += myOffset + atOffset + offset;
}
} else if ( overBottom > 0 ) {
newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
offset - offsetTop;
if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
position.top += myOffset + atOffset + offset;
}
}
}
},
flipfit: {
left: function() {
$.ui.position.flip.left.apply( this, arguments );
$.ui.position.fit.left.apply( this, arguments );
},
top: function() {
$.ui.position.flip.top.apply( this, arguments );
$.ui.position.fit.top.apply( this, arguments );
}
}
};
} )();
var position = $.ui.position;
/*!
* jQuery UI Keycode 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
//>>label: Keycode
//>>group: Core
//>>description: Provide keycodes as keynames
//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
var keycode = $.ui.keyCode = {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
};
/*!
* jQuery UI Unique ID 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
//>>label: uniqueId
//>>group: Core
//>>description: Functions to generate and remove uniqueId's
//>>docs: http://api.jqueryui.com/uniqueId/
var uniqueId = $.fn.extend( {
uniqueId: ( function() {
var uuid = 0;
return function() {
return this.each( function() {
if ( !this.id ) {
this.id = "ui-id-" + ( ++uuid );
}
} );
};
} )(),
removeUniqueId: function() {
return this.each( function() {
if ( /^ui-id-\d+$/.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
} );
}
} );
var safeActiveElement = $.ui.safeActiveElement = function( document ) {
var activeElement;
// Support: IE 9 only
// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
try {
activeElement = document.activeElement;
} catch ( error ) {
activeElement = document.body;
}
// Support: IE 9 - 11 only
// IE may return null instead of an element
// Interestingly, this only seems to occur when NOT in an iframe
if ( !activeElement ) {
activeElement = document.body;
}
// Support: IE 11 only
// IE11 returns a seemingly empty object in some cases when accessing
// document.activeElement from an <iframe>
if ( !activeElement.nodeName ) {
activeElement = document.body;
}
return activeElement;
};
/*!
* jQuery UI Menu 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
//>>label: Menu
//>>group: Widgets
//>>description: Creates nestable menus.
//>>docs: http://api.jqueryui.com/menu/
//>>demos: http://jqueryui.com/menu/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/menu.css
//>>css.theme: ../../themes/base/theme.css
var widgetsMenu = $.widget( "ui.menu", {
version: "1.12.1",
defaultElement: "<ul>",
delay: 300,
options: {
icons: {
submenu: "ui-icon-caret-1-e"
},
items: "> *",
menus: "ul",
position: {
my: "left top",
at: "right top"
},
role: "menu",
// Callbacks
blur: null,
focus: null,
select: null
},
_create: function() {
this.activeMenu = this.element;
// Flag used to prevent firing of the click handler
// as the event bubbles up through nested menus
this.mouseHandled = false;
this.element
.uniqueId()
.attr( {
role: this.options.role,
tabIndex: 0
} );
this._addClass( "ui-menu", "ui-widget ui-widget-content" );
this._on( {
// Prevent focus from sticking to links inside menu after clicking
// them (focus should always stay on UL during navigation).
"mousedown .ui-menu-item": function( event ) {
event.preventDefault();
},
"click .ui-menu-item": function( event ) {
var target = $( event.target );
var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
this.select( event );
// Only set the mouseHandled flag if the event will bubble, see #9469.
if ( !event.isPropagationStopped() ) {
this.mouseHandled = true;
}
// Open submenu on click
if ( target.has( ".ui-menu" ).length ) {
this.expand( event );
} else if ( !this.element.is( ":focus" ) &&
active.closest( ".ui-menu" ).length ) {
// Redirect focus to the menu
this.element.trigger( "focus", [ true ] );
// If the active item is on the top level, let it stay active.
// Otherwise, blur the active item since it is no longer visible.
if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
clearTimeout( this.timer );
}
}
}
},
"mouseenter .ui-menu-item": function( event ) {
// Ignore mouse events while typeahead is active, see #10458.
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
// is over an item in the menu
if ( this.previousFilter ) {
return;
}
var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
target = $( event.currentTarget );
// Ignore bubbled events on parent items, see #11641
if ( actualTarget[ 0 ] !== target[ 0 ] ) {
return;
}
// Remove ui-state-active class from siblings of the newly focused menu item
// to avoid a jump caused by adjacent elements both having a class with a border
this._removeClass( target.siblings().children( ".ui-state-active" ),
null, "ui-state-active" );
this.focus( event, target );
},
mouseleave: "collapseAll",
"mouseleave .ui-menu": "collapseAll",
focus: function( event, keepActiveItem ) {
// If there's already an active item, keep it active
// If not, activate the first item
var item = this.active || this.element.find( this.options.items ).eq( 0 );
if ( !keepActiveItem ) {
this.focus( event, item );
}
},
blur: function( event ) {
this._delay( function() {
var notContained = !$.contains(
this.element[ 0 ],
$.ui.safeActiveElement( this.document[ 0 ] )
);
if ( notContained ) {
this.collapseAll( event );
}
} );
},
keydown: "_keydown"
} );
this.refresh();
// Clicks outside of a menu collapse any open menus
this._on( this.document, {
click: function( event ) {
if ( this._closeOnDocumentClick( event ) ) {
this.collapseAll( event );
}
// Reset the mouseHandled flag
this.mouseHandled = false;
}
} );
},
_destroy: function() {
var items = this.element.find( ".ui-menu-item" )
.removeAttr( "role aria-disabled" ),
submenus = items.children( ".ui-menu-item-wrapper" )
.removeUniqueId()
.removeAttr( "tabIndex role aria-haspopup" );
// Destroy (sub)menus
this.element
.removeAttr( "aria-activedescendant" )
.find( ".ui-menu" ).addBack()
.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
"tabIndex" )
.removeUniqueId()
.show();
submenus.children().each( function() {
var elem = $( this );
if ( elem.data( "ui-menu-submenu-caret" ) ) {
elem.remove();
}
} );
},
_keydown: function( event ) {
var match, prev, character, skip,
preventDefault = true;
switch ( event.keyCode ) {
case $.ui.keyCode.PAGE_UP:
this.previousPage( event );
break;
case $.ui.keyCode.PAGE_DOWN:
this.nextPage( event );
break;
case $.ui.keyCode.HOME:
this._move( "first", "first", event );
break;
case $.ui.keyCode.END:
this._move( "last", "last", event );
break;
case $.ui.keyCode.UP:
this.previous( event );
break;
case $.ui.keyCode.DOWN:
this.next( event );
break;
case $.ui.keyCode.LEFT:
this.collapse( event );
break;
case $.ui.keyCode.RIGHT:
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
this.expand( event );
}
break;
case $.ui.keyCode.ENTER:
case $.ui.keyCode.SPACE:
this._activate( event );
break;
case $.ui.keyCode.ESCAPE:
this.collapse( event );
break;
default:
preventDefault = false;
prev = this.previousFilter || "";
skip = false;
// Support number pad values
character = event.keyCode >= 96 && event.keyCode <= 105 ?
( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
clearTimeout( this.filterTimer );
if ( character === prev ) {
skip = true;
} else {
character = prev + character;
}
match = this._filterMenuItems( character );
match = skip && match.index( this.active.next() ) !== -1 ?
this.active.nextAll( ".ui-menu-item" ) :
match;
// If no matches on the current filter, reset to the last character pressed
// to move down the menu to the first item that starts with that character
if ( !match.length ) {
character = String.fromCharCode( event.keyCode );
match = this._filterMenuItems( character );
}
if ( match.length ) {
this.focus( event, match );
this.previousFilter = character;
this.filterTimer = this._delay( function() {
delete this.previousFilter;
}, 1000 );
} else {
delete this.previousFilter;
}
}
if ( preventDefault ) {
event.preventDefault();
}
},
_activate: function( event ) {
if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
if ( this.active.children( "[aria-haspopup='true']" ).length ) {
this.expand( event );
} else {
this.select( event );
}
}
},
refresh: function() {
var menus, items, newSubmenus, newItems, newWrappers,
that = this,
icon = this.options.icons.submenu,
submenus = this.element.find( this.options.menus );
this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
// Initialize nested menus
newSubmenus = submenus.filter( ":not(.ui-menu)" )
.hide()
.attr( {
role: this.options.role,
"aria-hidden": "true",
"aria-expanded": "false"
} )
.each( function() {
var menu = $( this ),
item = menu.prev(),
submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
item
.attr( "aria-haspopup", "true" )
.prepend( submenuCaret );
menu.attr( "aria-labelledby", item.attr( "id" ) );
} );
this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
menus = submenus.add( this.element );
items = menus.find( this.options.items );
// Initialize menu-items containing spaces and/or dashes only as dividers
items.not( ".ui-menu-item" ).each( function() {
var item = $( this );
if ( that._isDivider( item ) ) {
that._addClass( item, "ui-menu-divider", "ui-widget-content" );
}
} );
// Don't refresh list items that are already adapted
newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
newWrappers = newItems.children()
.not( ".ui-menu" )
.uniqueId()
.attr( {
tabIndex: -1,
role: this._itemRole()
} );
this._addClass( newItems, "ui-menu-item" )
._addClass( newWrappers, "ui-menu-item-wrapper" );
// Add aria-disabled attribute to any disabled menu item
items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
// If the active item has been removed, blur the menu
if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
this.blur();
}
},
_itemRole: function() {
return {
menu: "menuitem",
listbox: "option"
}[ this.options.role ];
},
_setOption: function( key, value ) {
if ( key === "icons" ) {
var icons = this.element.find( ".ui-menu-icon" );
this._removeClass( icons, null, this.options.icons.submenu )
._addClass( icons, null, value.submenu );
}
this._super( key, value );
},
_setOptionDisabled: function( value ) {
this._super( value );
this.element.attr( "aria-disabled", String( value ) );
this._toggleClass( null, "ui-state-disabled", !!value );
},
focus: function( event, item ) {
var nested, focused, activeParent;
this.blur( event, event && event.type === "focus" );
this._scrollIntoView( item );
this.active = item.first();
focused = this.active.children( ".ui-menu-item-wrapper" );
this._addClass( focused, null, "ui-state-active" );
// Only update aria-activedescendant if there's a role
// otherwise we assume focus is managed elsewhere
if ( this.options.role ) {
this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
}
// Highlight active parent menu item, if any
activeParent = this.active
.parent()
.closest( ".ui-menu-item" )
.children( ".ui-menu-item-wrapper" );
this._addClass( activeParent, null, "ui-state-active" );
if ( event && event.type === "keydown" ) {
this._close();
} else {
this.timer = this._delay( function() {
this._close();
}, this.delay );
}
nested = item.children( ".ui-menu" );
if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
this._startOpening( nested );
}
this.activeMenu = item.parent();
this._trigger( "focus", event, { item: item } );
},
_scrollIntoView: function( item ) {
var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
if ( this._hasScroll() ) {
borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
scroll = this.activeMenu.scrollTop();
elementHeight = this.activeMenu.height();
itemHeight = item.outerHeight();
if ( offset < 0 ) {
this.activeMenu.scrollTop( scroll + offset );
} else if ( offset + itemHeight > elementHeight ) {
this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
}
}
},
blur: function( event, fromFocus ) {
if ( !fromFocus ) {
clearTimeout( this.timer );
}
if ( !this.active ) {
return;
}
this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
null, "ui-state-active" );
this._trigger( "blur", event, { item: this.active } );
this.active = null;
},
_startOpening: function( submenu ) {
clearTimeout( this.timer );
// Don't open if already open fixes a Firefox bug that caused a .5 pixel
// shift in the submenu position when mousing over the caret icon
if ( submenu.attr( "aria-hidden" ) !== "true" ) {
return;
}
this.timer = this._delay( function() {
this._close();
this._open( submenu );
}, this.delay );
},
_open: function( submenu ) {
var position = $.extend( {
of: this.active
}, this.options.position );
clearTimeout( this.timer );
this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
.hide()
.attr( "aria-hidden", "true" );
submenu
.show()
.removeAttr( "aria-hidden" )
.attr( "aria-expanded", "true" )
.position( position );
},
collapseAll: function( event, all ) {
clearTimeout( this.timer );
this.timer = this._delay( function() {
// If we were passed an event, look for the submenu that contains the event
var currentMenu = all ? this.element :
$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
// If we found no valid submenu ancestor, use the main menu to close all
// sub menus anyway
if ( !currentMenu.length ) {
currentMenu = this.element;
}
this._close( currentMenu );
this.blur( event );
// Work around active item staying active after menu is blurred
this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
this.activeMenu = currentMenu;
}, this.delay );
},
// With no arguments, closes the currently active menu - if nothing is active
// it closes all menus. If passed an argument, it will search for menus BELOW
_close: function( startMenu ) {
if ( !startMenu ) {
startMenu = this.active ? this.active.parent() : this.element;
}
startMenu.find( ".ui-menu" )
.hide()
.attr( "aria-hidden", "true" )
.attr( "aria-expanded", "false" );
},
_closeOnDocumentClick: function( event ) {
return !$( event.target ).closest( ".ui-menu" ).length;
},
_isDivider: function( item ) {
// Match hyphen, em dash, en dash
return !/[^\-\u2014\u2013\s]/.test( item.text() );
},
collapse: function( event ) {
var newItem = this.active &&
this.active.parent().closest( ".ui-menu-item", this.element );
if ( newItem && newItem.length ) {
this._close();
this.focus( event, newItem );
}
},
expand: function( event ) {
var newItem = this.active &&
this.active
.children( ".ui-menu " )
.find( this.options.items )
.first();
if ( newItem && newItem.length ) {
this._open( newItem.parent() );
// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
this._delay( function() {
this.focus( event, newItem );
} );
}
},
next: function( event ) {
this._move( "next", "first", event );
},
previous: function( event ) {
this._move( "prev", "last", event );
},
isFirstItem: function() {
return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
},
isLastItem: function() {
return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
},
_move: function( direction, filter, event ) {
var next;
if ( this.active ) {
if ( direction === "first" || direction === "last" ) {
next = this.active
[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
.eq( -1 );
} else {
next = this.active
[ direction + "All" ]( ".ui-menu-item" )
.eq( 0 );
}
}
if ( !next || !next.length || !this.active ) {
next = this.activeMenu.find( this.options.items )[ filter ]();
}
this.focus( event, next );
},
nextPage: function( event ) {
var item, base, height;
if ( !this.active ) {
this.next( event );
return;
}
if ( this.isLastItem() ) {
return;
}
if ( this._hasScroll() ) {
base = this.active.offset().top;
height = this.element.height();
this.active.nextAll( ".ui-menu-item" ).each( function() {
item = $( this );
return item.offset().top - base - height < 0;
} );
this.focus( event, item );
} else {
this.focus( event, this.activeMenu.find( this.options.items )
[ !this.active ? "first" : "last" ]() );
}
},
previousPage: function( event ) {
var item, base, height;
if ( !this.active ) {
this.next( event );
return;
}
if ( this.isFirstItem() ) {
return;
}
if ( this._hasScroll() ) {
base = this.active.offset().top;
height = this.element.height();
this.active.prevAll( ".ui-menu-item" ).each( function() {
item = $( this );
return item.offset().top - base + height > 0;
} );
this.focus( event, item );
} else {
this.focus( event, this.activeMenu.find( this.options.items ).first() );
}
},
_hasScroll: function() {
return this.element.outerHeight() < this.element.prop( "scrollHeight" );
},
select: function( event ) {
// TODO: It should never be possible to not have an active item at this
// point, but the tests don't trigger mouseenter before click.
this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
var ui = { item: this.active };
if ( !this.active.has( ".ui-menu" ).length ) {
this.collapseAll( event, true );
}
this._trigger( "select", event, ui );
},
_filterMenuItems: function( character ) {
var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
regex = new RegExp( "^" + escapedCharacter, "i" );
return this.activeMenu
.find( this.options.items )
// Only match on items, not dividers or other content (#10571)
.filter( ".ui-menu-item" )
.filter( function() {
return regex.test(
$.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) );
} );
}
} );
/*!
* jQuery UI Autocomplete 1.12.1
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
//>>label: Autocomplete
//>>group: Widgets
//>>description: Lists suggested words as the user is typing.
//>>docs: http://api.jqueryui.com/autocomplete/
//>>demos: http://jqueryui.com/autocomplete/
//>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/autocomplete.css
//>>css.theme: ../../themes/base/theme.css
$.widget( "ui.autocomplete", {
version: "1.12.1",
defaultElement: "<input>",
options: {
appendTo: null,
autoFocus: false,
delay: 300,
minLength: 1,
position: {
my: "left top",
at: "left bottom",
collision: "none"
},
source: null,
// Callbacks
change: null,
close: null,
focus: null,
open: null,
response: null,
search: null,
select: null
},
requestIndex: 0,
pending: 0,
_create: function() {
// Some browsers only repeat keydown events, not keypress events,
// so we use the suppressKeyPress flag to determine if we've already
// handled the keydown event. #7269
// Unfortunately the code for & in keypress is the same as the up arrow,
// so we use the suppressKeyPressRepeat flag to avoid handling keypress
// events when we know the keydown event was used to modify the
// search term. #7799
var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
nodeName = this.element[ 0 ].nodeName.toLowerCase(),
isTextarea = nodeName === "textarea",
isInput = nodeName === "input";
// Textareas are always multi-line
// Inputs are always single-line, even if inside a contentEditable element
// IE also treats inputs as contentEditable
// All other element types are determined by whether or not they're contentEditable
this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
this.isNewMenu = true;
this._addClass( "ui-autocomplete-input" );
this.element.attr( "autocomplete", "off" );
this._on( this.element, {
keydown: function( event ) {
if ( this.element.prop( "readOnly" ) ) {
suppressKeyPress = true;
suppressInput = true;
suppressKeyPressRepeat = true;
return;
}
suppressKeyPress = false;
suppressInput = false;
suppressKeyPressRepeat = false;
var keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.PAGE_UP:
suppressKeyPress = true;
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
suppressKeyPress = true;
this._move( "nextPage", event );
break;
case keyCode.UP:
suppressKeyPress = true;
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
suppressKeyPress = true;
this._keyEvent( "next", event );
break;
case keyCode.ENTER:
// when menu is open and has focus
if ( this.menu.active ) {
// #6055 - Opera still allows the keypress to occur
// which causes forms to submit
suppressKeyPress = true;
event.preventDefault();
this.menu.select( event );
}
break;
case keyCode.TAB:
if ( this.menu.active ) {
this.menu.select( event );
}
break;
case keyCode.ESCAPE:
if ( this.menu.element.is( ":visible" ) ) {
if ( !this.isMultiLine ) {
this._value( this.term );
}
this.close( event );
// Different browsers have different default behavior for escape
// Single press can mean undo or clear
// Double press in IE means clear the whole form
event.preventDefault();
}
break;
default:
suppressKeyPressRepeat = true;
// search timeout should be triggered before the input value is changed
this._searchTimeout( event );
break;
}
},
keypress: function( event ) {
if ( suppressKeyPress ) {
suppressKeyPress = false;
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
event.preventDefault();
}
return;
}
if ( suppressKeyPressRepeat ) {
return;
}
// Replicate some key handlers to allow them to repeat in Firefox and Opera
var keyCode = $.ui.keyCode;
switch ( event.keyCode ) {
case keyCode.PAGE_UP:
this._move( "previousPage", event );
break;
case keyCode.PAGE_DOWN:
this._move( "nextPage", event );
break;
case keyCode.UP:
this._keyEvent( "previous", event );
break;
case keyCode.DOWN:
this._keyEvent( "next", event );
break;
}
},
input: function( event ) {
if ( suppressInput ) {
suppressInput = false;
event.preventDefault();
return;
}
this._searchTimeout( event );
},
focus: function() {
this.selectedItem = null;
this.previous = this._value();
},
blur: function( event ) {
if ( this.cancelBlur ) {
delete this.cancelBlur;
return;
}
clearTimeout( this.searching );
this.close( event );
this._change( event );
}
} );
this._initSource();
this.menu = $( "<ul>" )
.appendTo( this._appendTo() )
.menu( {
// disable ARIA support, the live region takes care of that
role: null
} )
.hide()
.menu( "instance" );
this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
this._on( this.menu.element, {
mousedown: function( event ) {
// prevent moving focus out of the text field
event.preventDefault();
// IE doesn't prevent moving focus even with event.preventDefault()
// so we set a flag to know when we should ignore the blur event
this.cancelBlur = true;
this._delay( function() {
delete this.cancelBlur;
// Support: IE 8 only
// Right clicking a menu item or selecting text from the menu items will
// result in focus moving out of the input. However, we've already received
// and ignored the blur event because of the cancelBlur flag set above. So
// we restore focus to ensure that the menu closes properly based on the user's
// next actions.
if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
this.element.trigger( "focus" );
}
} );
},
menufocus: function( event, ui ) {
var label, item;
// support: Firefox
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
if ( this.isNewMenu ) {
this.isNewMenu = false;
if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
this.menu.blur();
this.document.one( "mousemove", function() {
$( event.target ).trigger( event.originalEvent );
} );
return;
}
}
item = ui.item.data( "ui-autocomplete-item" );
if ( false !== this._trigger( "focus", event, { item: item } ) ) {
// use value to match what will end up in the input, if it was a key event
if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
this._value( item.value );
}
}
// Announce the value in the liveRegion
label = ui.item.attr( "aria-label" ) || item.value;
if ( label && $.trim( label ).length ) {
this.liveRegion.children().hide();
$( "<div>" ).text( label ).appendTo( this.liveRegion );
}
},
menuselect: function( event, ui ) {
var item = ui.item.data( "ui-autocomplete-item" ),
previous = this.previous;
// Only trigger when focus was lost (click on menu)
if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
this.element.trigger( "focus" );
this.previous = previous;
// #6109 - IE triggers two focus events and the second
// is asynchronous, so we need to reset the previous
// term synchronously and asynchronously :-(
this._delay( function() {
this.previous = previous;
this.selectedItem = item;
} );
}
if ( false !== this._trigger( "select", event, { item: item } ) ) {
this._value( item.value );
}
// reset the term after the select event
// this allows custom select handling to work properly
this.term = this._value();
this.close( event );
this.selectedItem = item;
}
} );
this.liveRegion = $( "<div>", {
role: "status",
"aria-live": "assertive",
"aria-relevant": "additions"
} )
.appendTo( this.document[ 0 ].body );
this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
// Turning off autocomplete prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete
// if the page is unloaded before the widget is destroyed. #7790
this._on( this.window, {
beforeunload: function() {
this.element.removeAttr( "autocomplete" );
}
} );
},
_destroy: function() {
clearTimeout( this.searching );
this.element.removeAttr( "autocomplete" );
this.menu.element.remove();
this.liveRegion.remove();
},
_setOption: function( key, value ) {
this._super( key, value );
if ( key === "source" ) {
this._initSource();
}
if ( key === "appendTo" ) {
this.menu.element.appendTo( this._appendTo() );
}
if ( key === "disabled" && value && this.xhr ) {
this.xhr.abort();
}
},
_isEventTargetInWidget: function( event ) {
var menuElement = this.menu.element[ 0 ];
return event.target === this.element[ 0 ] ||
event.target === menuElement ||
$.contains( menuElement, event.target );
},
_closeOnClickOutside: function( event ) {
if ( !this._isEventTargetInWidget( event ) ) {
this.close();
}
},
_appendTo: function() {
var element = this.options.appendTo;
if ( element ) {
element = element.jquery || element.nodeType ?
$( element ) :
this.document.find( element ).eq( 0 );
}
if ( !element || !element[ 0 ] ) {
element = this.element.closest( ".ui-front, dialog" );
}
if ( !element.length ) {
element = this.document[ 0 ].body;
}
return element;
},
_initSource: function() {
var array, url,
that = this;
if ( $.isArray( this.options.source ) ) {
array = this.options.source;
this.source = function( request, response ) {
response( $.ui.autocomplete.filter( array, request.term ) );
};
} else if ( typeof this.options.source === "string" ) {
url = this.options.source;
this.source = function( request, response ) {
if ( that.xhr ) {
that.xhr.abort();
}
that.xhr = $.ajax( {
url: url,
data: request,
dataType: "json",
success: function( data ) {
response( data );
},
error: function() {
response( [] );
}
} );
};
} else {
this.source = this.options.source;
}
},
_searchTimeout: function( event ) {
clearTimeout( this.searching );
this.searching = this._delay( function() {
// Search if the value has changed, or if the user retypes the same value (see #7434)
var equalValues = this.term === this._value(),
menuVisible = this.menu.element.is( ":visible" ),
modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
this.selectedItem = null;
this.search( null, event );
}
}, this.options.delay );
},
search: function( value, event ) {
value = value != null ? value : this._value();
// Always save the actual value, not the one passed as an argument
this.term = this._value();
if ( value.length < this.options.minLength ) {
return this.close( event );
}
if ( this._trigger( "search", event ) === false ) {
return;
}
return this._search( value );
},
_search: function( value ) {
this.pending++;
this._addClass( "ui-autocomplete-loading" );
this.cancelSearch = false;
this.source( { term: value }, this._response() );
},
_response: function() {
var index = ++this.requestIndex;
return $.proxy( function( content ) {
if ( index === this.requestIndex ) {
this.__response( content );
}
this.pending--;
if ( !this.pending ) {
this._removeClass( "ui-autocomplete-loading" );
}
}, this );
},
__response: function( content ) {
if ( content ) {
content = this._normalize( content );
}
this._trigger( "response", null, { content: content } );
if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
this._suggest( content );
this._trigger( "open" );
} else {
// use ._close() instead of .close() so we don't cancel future searches
this._close();
}
},
close: function( event ) {
this.cancelSearch = true;
this._close( event );
},
_close: function( event ) {
// Remove the handler that closes the menu on outside clicks
this._off( this.document, "mousedown" );
if ( this.menu.element.is( ":visible" ) ) {
this.menu.element.hide();
this.menu.blur();
this.isNewMenu = true;
this._trigger( "close", event );
}
},
_change: function( event ) {
if ( this.previous !== this._value() ) {
this._trigger( "change", event, { item: this.selectedItem } );
}
},
_normalize: function( items ) {
// assume all items have the right format when the first item is complete
if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
return items;
}
return $.map( items, function( item ) {
if ( typeof item === "string" ) {
return {
label: item,
value: item
};
}
return $.extend( {}, item, {
label: item.label || item.value,
value: item.value || item.label
} );
} );
},
_suggest: function( items ) {
var ul = this.menu.element.empty();
this._renderMenu( ul, items );
this.isNewMenu = true;
this.menu.refresh();
// Size and position menu
ul.show();
this._resizeMenu();
ul.position( $.extend( {
of: this.element
}, this.options.position ) );
if ( this.options.autoFocus ) {
this.menu.next();
}
// Listen for interactions outside of the widget (#6642)
this._on( this.document, {
mousedown: "_closeOnClickOutside"
} );
},
_resizeMenu: function() {
var ul = this.menu.element;
ul.outerWidth( Math.max(
// Firefox wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping (#7513)
ul.width( "" ).outerWidth() + 1,
this.element.outerWidth()
) );
},
_renderMenu: function( ul, items ) {
var that = this;
$.each( items, function( index, item ) {
that._renderItemData( ul, item );
} );
},
_renderItemData: function( ul, item ) {
return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
},
_renderItem: function( ul, item ) {
return $( "<li>" )
.append( $( "<div>" ).text( item.label ) )
.appendTo( ul );
},
_move: function( direction, event ) {
if ( !this.menu.element.is( ":visible" ) ) {
this.search( null, event );
return;
}
if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
this.menu.isLastItem() && /^next/.test( direction ) ) {
if ( !this.isMultiLine ) {
this._value( this.term );
}
this.menu.blur();
return;
}
this.menu[ direction ]( event );
},
widget: function() {
return this.menu.element;
},
_value: function() {
return this.valueMethod.apply( this.element, arguments );
},
_keyEvent: function( keyEvent, event ) {
if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
this._move( keyEvent, event );
// Prevents moving cursor to beginning/end of the text field in some browsers
event.preventDefault();
}
},
// Support: Chrome <=50
// We should be able to just use this.element.prop( "isContentEditable" )
// but hidden elements always report false in Chrome.
// https://code.google.com/p/chromium/issues/detail?id=313082
_isContentEditable: function( element ) {
if ( !element.length ) {
return false;
}
var editable = element.prop( "contentEditable" );
if ( editable === "inherit" ) {
return this._isContentEditable( element.parent() );
}
return editable === "true";
}
} );
$.extend( $.ui.autocomplete, {
escapeRegex: function( value ) {
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
},
filter: function( array, term ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
return $.grep( array, function( value ) {
return matcher.test( value.label || value.value || value );
} );
}
} );
// Live region extension, adding a `messages` option
// NOTE: This is an experimental API. We are still investigating
// a full solution for string manipulation and internationalization.
$.widget( "ui.autocomplete", $.ui.autocomplete, {
options: {
messages: {
noResults: "No search results.",
results: function( amount ) {
return amount + ( amount > 1 ? " results are" : " result is" ) +
" available, use up and down arrow keys to navigate.";
}
}
},
__response: function( content ) {
var message;
this._superApply( arguments );
if ( this.options.disabled || this.cancelSearch ) {
return;
}
if ( content && content.length ) {
message = this.options.messages.results( content.length );
} else {
message = this.options.messages.noResults;
}
this.liveRegion.children().hide();
$( "<div>" ).text( message ).appendTo( this.liveRegion );
}
} );
var widgetsAutocomplete = $.ui.autocomplete;
}));
|
// Get the lists available in RTM.
// Note that this only returns active, non-smart, non-deleted lists
//
// Prereqs:
// None
// Results:
// Sets a local tasker variable called lists, that contains an array of list_id|list_name strings
function rtmGetLists(){
lists = getLists();
$.each(lists, function(index, list){
lists[index] = list['id'] + '|' + list['name'];
});
}
// Make sure jQuery is loaded
if( typeof jQuery == 'undefined' ){
tk.flashLong( 'Please make sure that the jQuery library is included.');
exit;
}
// Make sure rtmTasker is loaded
if( RTM_URL == 'undefined'){
tk.flashLong( 'Please make sure the rtmTakser library is included.');
exit;
}
// Make sure we have gotten our FROB
if( tk.global('RTM_FROB') == 'undefined'){
tk.flashLong( 'Please run the rtmAuth_step_1 script first.');
exit;
}
// Make sure we have gotten our TOKEN
if( tk.global('RTM_TOKEN') == 'undefined'){
tk.flashLong( 'Please run the rtmAuth_step_2 script first.');
exit;
}
// create our variable so it is passed back to tasker
var lists = [];
// run our stuff
rtmGetLists();
|
/**
* Created by xiehuimin on 2018/3/13.
* 网上自助通用表单 借支单,借款信息子表单组件-适用单币种和多币种
* Dependence:
* jquery.js, 基于jquery组件封装开发
* select2.js,
* autoNumric.js,
*/
;(function ($) {
// Definition TG loanInfo plugin, for piece of form
$.fn.loanInfo = function (method) {
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1))
} else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments)
} else {
$.error('Method ' + method + ' does not exist on tg.loanInfo')
}
};
// Default options
$.fn.loanInfo.defaults = {
// 组件版本号
version: '1.0.0',
// 组件名称
name: 'loanInfo',
// 初始化数据
data: {
loanUsage: {
id: '',
name: ''
},
totalAmount: '',
remarks: ''
},
// 视图状态,查看-view 隐藏-hide 编辑-edit
viewState: 'view',
// 经办人id
handleId: '',
// 报销公司id
companyId: '',
rootURL: 'http://localhost:3000/expense',
loanUsageURL: '/expenseType/loanReason/lov',
loanUsageOpts: [],
validFields: [],
saveValidFields:[],
//更新合计金额事件
onAmountChange:function(){
},
//币种信息
currency:null
}
// Private function, prepending an underscore to the function name.
var _initView = function ($el, opts) {
var loanUsageName = ''
if (opts.data.loanUsage && opts.data.loanUsage.name) {
loanUsageName = opts.data.loanUsage.name
}
var body = []
body.push('<div class="panel panel-default">',
'<div class="panel-heading">',
'<h3 class="panel-title">借款信息</h3>',
'</div>',
'<div class="panel-body">',
'<div class="row">',
'<div class="col-md-6">',
'<div class="form-group">',
'<label class="control-label">事由</label>',
'<p class="form-control-static">' + loanUsageName + '</p>',
'</div>',
'</div>',
'<div class="col-md-6">',
'<div class="form-group">',
'<label class="control-label">金额</label>',
'<p class="form-control-static" title="' + opts.currency.name + '">' + opts.currency.symbol + ' ' + $.myFormatter.currency(opts.data.totalAmount) + '</p>',
'</div>',
'</div>',
'</div>',
'<div class="row no-bottom">',
'<div class="col-md-12">',
'<div class="form-group">',
'<label class="control-label">备注</label>',
'<p class="form-control-static">' + opts.data.remarks + '</p>',
'</div>',
'</div>',
'</div>',
'</div>',
'</div>'
)
$el.html(body.join(''))
}
var _initEdit = function ($el, opts) {
var body = []
body.push('<div class="panel panel-default">',
'<div class="panel-heading">',
'<h3 class="panel-title">借款信息</h3>',
'</div>',
'<div class="panel-body">',
'<div class="row">',
'<div class="col-md-6">',
'<div class="form-group">',
'<label class="control-label" for="loanUsage">事由</label>',
'<select class="form-control" id="loanUsage" name="loanUsage"></select>',
'</div>',
'</div>',
'<div class="col-md-6">',
'<div class="form-group">',
'<label class="control-label" for="totalAmount">金额</label>',
'<div id="totalAmount"></div>',
'</div>',
'</div>',
'</div>',
'<div class="row no-bottom">',
'<div class="col-md-12">',
'<div class="form-group">',
'<label class="control-label" for="remarks">备注</label>',
'<textarea class="form-control" id="remarks" rows="3" name="remarks" ' +
'placeholder="请填写备注,不超过125个字"></textarea>',
'</div>',
'</div>',
'</div>',
'</div>',
'</div>'
)
$el.html(body.join(''))
// init loanUsage
$('#loanUsage').select2({
placeholder: '加载中...'
})
var loanUsageId = ''
if (opts.data.loanUsage && opts.data.loanUsage.id) {
loanUsageId = opts.data.loanUsage.id
}
var prop = {
handleId: opts.handleId,
companyId: opts.companyId,
id: loanUsageId
}
$.myAPI({
url: opts.rootURL + opts.loanUsageURL,
type: 'get',
data: $.param(prop)
})
.done(function (data, textStatus, jqXHR) {
var loanUsageId = ''
if (opts.data.loanUsage && opts.data.loanUsage.id) {
loanUsageId = opts.data.loanUsage.id
}
opts.loanUsageOpts = data
var $loanUsage = $('#loanUsage')
$loanUsage
.select2({
data: opts.loanUsageOpts,
placeholder: '请选择借款事由'
})
.val(loanUsageId)
.trigger('change')
})
.fail(function (jqXHR, textStatus, errorThrown) {
toastr.error('借款事由值列表加载失败。')
if (window.console && console.log)
console.log('The request failed, url is ' + this.url + ' . errorThrown: ' + errorThrown)
})
// init totalAmount
//只支持本位币
var currencies = [],$totalAmount = $('#totalAmount')
currencies.push(opts.currency)
$totalAmount.inputMultiCurrency({
horizontal: true,
currencies: currencies
})
$totalAmount.inputMultiCurrency('setVal', {
"currency": {
"id": opts.currency.id,
"code": opts.currency.code,
"symbol": opts.currency.symbol,
"name": opts.currency.name
},
"money": opts.data.totalAmount
})
// bind element event
$totalAmount.on('imc:change', function () {
_calAmount($el, opts)
})
// init remarks
var $remarks = $('#remarks')
$remarks.val(opts.data.remarks)
}
// 初始化校验字段
var _initValidateFields = function ($el, opts) {
var validFields = [],validFieldsLength = []
/**
* 事由字段校验
* rules:
* Req_val 必填校验
* Len_max_val 长度不能超过125个字
*/
var loanUsage = new Field({
fieldId: 'loanUsage',
dataType: 'select2',
validators: [
new Req_val()
]
})
validFields.push(loanUsage)
/**
* 金额字段校验
* rules:
* Req_val 必填校验
* Len_max_val 长度不能超过125个字
*/
var totalAmount = new Field({
fieldId: 'totalAmount',
dataType: 'imc',
validators: [
new Req_val()
]
})
validFields.push(totalAmount)
/**
* 备注字段校验
* rules:
* Req_val 必填校验
*/
var remarks = new Field({
fieldId: 'remarks',
dataType: 'textarea',
validators: [
new Req_val()
]
})
validFields.push(remarks)
/**
* 备注字段校验
* rules:
* Len_max_val 长度不能超过125个字
*/
var remarksLength = new Field({
fieldId: 'remarks',
dataType: 'textarea',
validators: [
new Len_max_val(125)
]
})
validFields.push(remarksLength)
validFieldsLength.push(remarksLength)
opts.validFields = validFields
opts.saveValidFields = validFieldsLength
}
// 编辑费用明细时更新计算合计金额
var _calAmount = function ($el, opts) {
var $totalAmount = $('.total-amount .info-number')
// 初始化时total未空,为空时不执行
if ($totalAmount.length && $totalAmount.text() != '') {
opts.onAmountChange()
}
}
// 获取本位币代码
function _getStandardCurrency(currencies) {
var standard = currencies.filter(function (item) {
if (item.isStandard === 'Y')
return true
})
return standard[0]
}
// hide
var _hide = function ($el) {
$el.removeData('tg.loanInfo')
$el.remove()
}
// Public function
var methods = {
/**
* Init 初始化组件
* @param {Object} options 组件初始化时设定的参数
* @returns {Object} Returns the current plugin dom
*/
init: function (options) {
return this.each(function () {
var $this = $(this);
var opts = $this.data('tg.loanInfo');
if (typeof(opts) == 'undefined') {
opts = $.extend({}, $.fn.loanInfo.defaults, options);
$this.data('tg.loanInfo', opts);
} else {
opts = $.extend({}, opts, options);
}
// 代码在这里运行
var viewState = opts.viewState
if (viewState == 'view') {
_initView($this, opts)
} else if (viewState == 'edit') {
_initEdit($this, opts)
_initValidateFields($this, opts)
} else if (viewState == 'hide') {
_hide($this)
} else {
_hide($this)
}
})
},
/**
* Destroy 销毁组件
* @returns {Object} Returns the current plugin dom
* todo: 需要处理DOM的销毁
*/
destroy: function () {
return $(this).each(function () {
var $this = $(this)
$this.removeData('tg.loanInfo')
// $this.empty('')
$this.children().remove()
})
},
/**
* getData 获取业务数据
* @returns {Object} Returns the current plugin business data
*/
getData: function () {
var $el = $(this)
var opts = $(this).data('tg.loanInfo')
try {
// 借款事由
var loanUsage = opts.data.loanUsage
var $loanUsage = $('#loanUsage')
if ($loanUsage.length) {
loanUsage = {
id: $loanUsage.val(),
name: $loanUsage.find(':selected').text()
}
}
// 借款金额
var totalAmount = opts.data.totalAmount
var $totalAmount = $('#totalAmount')
if ($totalAmount.length) {
var value = $totalAmount.inputMultiCurrency('getVal')
totalAmount=value.money
}
// 备注
var remarks = opts.data.remarks
var $remarks = $('#remarks')
if ($remarks.length) {
remarks = $remarks.val()
}
return {
loanUsage: loanUsage,
totalAmount: totalAmount,
remarks: remarks,
currency:opts.currency,
exchangeRate:opts.exchangeRate
}
} catch (error) {
toastr.error('系统出现未知异常,请刷新页面重试.')
setTimeout("window.location.reload()", 2000)
}
},
/**
* getValidFields 获取校验字段数组
* @returns {Object} Returns the current plugin validate fields
*/
getValidFields: function () {
var opts = $(this).data('tg.loanInfo')
return opts.validFields
},
getSaveValidFields: function () {
var opts = $(this).data('tg.loanInfo')
return opts.saveValidFields
}
}
})(jQuery);
|
angular.module('starter.services', [])
.factory('Chats', function() {
// Might use a resource here that returns a JSON array
// Some fake testing data
var chats = [{
id: 0,
name: 'Steve Paul Jobs was an entrepreneur ... ',
lastText: "April 13, 2016",
face: 'http://a5.files.biography.com/image/upload/c_fill,cs_srgb,dpr_1.0,g_face,h_300,q_80,w_300/MTE5NDg0MDU0NTIzODQwMDE1.jpg'
}, {
id: 1,
name: 'Bill Gates is a cool cat',
lastText: 'April 12, 2016',
face: 'http://1-ps.googleusercontent.com/hk/RxsTNFPkbRF_P8bVrLt5ErlRoc/www.dutiee.com/wp-content/uploads/800x423xbillgatescat.png.pagespeed.ic.puPNS0jYt_fqDY2lOIKS.jpg'
},{
id: 2,
name: 'Jonny Appleseed ate apples',
lastText: 'April 11, 2016',
face: 'http://lymanorchards.com/files/7013/6725/1487/apples.jpg'
}, {
id: 3,
name: 'MIT was founded in the year 42 by jesus',
lastText: 'April 8, 2016',
face: 'http://ngdi.ubc.ca/files/2011/03/MIT.jpg'
}, {
id: 4,
name: 'Quill is the best app ever made',
lastText: 'April 7, 2016',
face: 'http://upload.wikimedia.org/wikipedia/commons/thumb/0/0c/MIT_logo.svg/1000px-MIT_logo.svg.png'
}];
return {
all: function() {
return chats;
},
remove: function(chat) {
chats.splice(chats.indexOf(chat), 1);
},
get: function(chatId) {
for (var i = 0; i < chats.length; i++) {
if (chats[i].id === parseInt(chatId)) {
return chats[i];
}
}
return null;
}
};
});
|
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import registerServiceWorker from "./registerServiceWorker";
import "./css/index.css";
ReactDOM.render(<App />, document.getElementById("root"));
registerServiceWorker();
|
/* */
"format cjs";
(function(process) {
(function(f) {
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = f();
} else if (typeof define === "function" && define.amd) {
define([], f);
} else {
var g;
if (typeof window !== "undefined") {
g = window;
} else if (typeof global !== "undefined") {
g = global;
} else if (typeof self !== "undefined") {
g = self;
} else {
g = this;
}
g.pako = f();
}
})(function() {
var define,
module,
exports;
return (function e(t, n, r) {
function s(o, u) {
if (!n[o]) {
if (!t[o]) {
var a = typeof require == "function" && require;
if (!u && a)
return a(o, !0);
if (i)
return i(o, !0);
var f = new Error("Cannot find module '" + o + "'");
throw f.code = "MODULE_NOT_FOUND", f;
}
var l = n[o] = {exports: {}};
t[o][0].call(l.exports, function(e) {
var n = t[o][1][e];
return s(n ? n : e);
}, l, l.exports, e, t, n, r);
}
return n[o].exports;
}
var i = typeof require == "function" && require;
for (var o = 0; o < r.length; o++)
s(r[o]);
return s;
})({
1: [function(require, module, exports) {
'use strict';
var TYPED_OK = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Int32Array !== 'undefined');
exports.assign = function(obj) {
var sources = Array.prototype.slice.call(arguments, 1);
while (sources.length) {
var source = sources.shift();
if (!source) {
continue;
}
if (typeof(source) !== 'object') {
throw new TypeError(source + 'must be non-object');
}
for (var p in source) {
if (source.hasOwnProperty(p)) {
obj[p] = source[p];
}
}
}
return obj;
};
exports.shrinkBuf = function(buf, size) {
if (buf.length === size) {
return buf;
}
if (buf.subarray) {
return buf.subarray(0, size);
}
buf.length = size;
return buf;
};
var fnTyped = {
arraySet: function(dest, src, src_offs, len, dest_offs) {
if (src.subarray && dest.subarray) {
dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
return ;
}
for (var i = 0; i < len; i++) {
dest[dest_offs + i] = src[src_offs + i];
}
},
flattenChunks: function(chunks) {
var i,
l,
len,
pos,
chunk,
result;
len = 0;
for (i = 0, l = chunks.length; i < l; i++) {
len += chunks[i].length;
}
result = new Uint8Array(len);
pos = 0;
for (i = 0, l = chunks.length; i < l; i++) {
chunk = chunks[i];
result.set(chunk, pos);
pos += chunk.length;
}
return result;
}
};
var fnUntyped = {
arraySet: function(dest, src, src_offs, len, dest_offs) {
for (var i = 0; i < len; i++) {
dest[dest_offs + i] = src[src_offs + i];
}
},
flattenChunks: function(chunks) {
return [].concat.apply([], chunks);
}
};
exports.setTyped = function(on) {
if (on) {
exports.Buf8 = Uint8Array;
exports.Buf16 = Uint16Array;
exports.Buf32 = Int32Array;
exports.assign(exports, fnTyped);
} else {
exports.Buf8 = Array;
exports.Buf16 = Array;
exports.Buf32 = Array;
exports.assign(exports, fnUntyped);
}
};
exports.setTyped(TYPED_OK);
}, {}],
2: [function(require, module, exports) {
'use strict';
var utils = require("./common");
var STR_APPLY_OK = true;
var STR_APPLY_UIA_OK = true;
try {
String.fromCharCode.apply(null, [0]);
} catch (__) {
STR_APPLY_OK = false;
}
try {
String.fromCharCode.apply(null, new Uint8Array(1));
} catch (__) {
STR_APPLY_UIA_OK = false;
}
var _utf8len = new utils.Buf8(256);
for (var i = 0; i < 256; i++) {
_utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
}
_utf8len[254] = _utf8len[254] = 1;
exports.string2buf = function(str) {
var buf,
c,
c2,
m_pos,
i,
str_len = str.length,
buf_len = 0;
for (m_pos = 0; m_pos < str_len; m_pos++) {
c = str.charCodeAt(m_pos);
if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
c2 = str.charCodeAt(m_pos + 1);
if ((c2 & 0xfc00) === 0xdc00) {
c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
m_pos++;
}
}
buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
}
buf = new utils.Buf8(buf_len);
for (i = 0, m_pos = 0; i < buf_len; m_pos++) {
c = str.charCodeAt(m_pos);
if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {
c2 = str.charCodeAt(m_pos + 1);
if ((c2 & 0xfc00) === 0xdc00) {
c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
m_pos++;
}
}
if (c < 0x80) {
buf[i++] = c;
} else if (c < 0x800) {
buf[i++] = 0xC0 | (c >>> 6);
buf[i++] = 0x80 | (c & 0x3f);
} else if (c < 0x10000) {
buf[i++] = 0xE0 | (c >>> 12);
buf[i++] = 0x80 | (c >>> 6 & 0x3f);
buf[i++] = 0x80 | (c & 0x3f);
} else {
buf[i++] = 0xf0 | (c >>> 18);
buf[i++] = 0x80 | (c >>> 12 & 0x3f);
buf[i++] = 0x80 | (c >>> 6 & 0x3f);
buf[i++] = 0x80 | (c & 0x3f);
}
}
return buf;
};
function buf2binstring(buf, len) {
if (len < 65537) {
if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
}
}
var result = '';
for (var i = 0; i < len; i++) {
result += String.fromCharCode(buf[i]);
}
return result;
}
exports.buf2binstring = function(buf) {
return buf2binstring(buf, buf.length);
};
exports.binstring2buf = function(str) {
var buf = new utils.Buf8(str.length);
for (var i = 0,
len = buf.length; i < len; i++) {
buf[i] = str.charCodeAt(i);
}
return buf;
};
exports.buf2string = function(buf, max) {
var i,
out,
c,
c_len;
var len = max || buf.length;
var utf16buf = new Array(len * 2);
for (out = 0, i = 0; i < len; ) {
c = buf[i++];
if (c < 0x80) {
utf16buf[out++] = c;
continue;
}
c_len = _utf8len[c];
if (c_len > 4) {
utf16buf[out++] = 0xfffd;
i += c_len - 1;
continue;
}
c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
while (c_len > 1 && i < len) {
c = (c << 6) | (buf[i++] & 0x3f);
c_len--;
}
if (c_len > 1) {
utf16buf[out++] = 0xfffd;
continue;
}
if (c < 0x10000) {
utf16buf[out++] = c;
} else {
c -= 0x10000;
utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
utf16buf[out++] = 0xdc00 | (c & 0x3ff);
}
}
return buf2binstring(utf16buf, out);
};
exports.utf8border = function(buf, max) {
var pos;
max = max || buf.length;
if (max > buf.length) {
max = buf.length;
}
pos = max - 1;
while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) {
pos--;
}
if (pos < 0) {
return max;
}
if (pos === 0) {
return max;
}
return (pos + _utf8len[buf[pos]] > max) ? pos : max;
};
}, {"./common": 1}],
3: [function(require, module, exports) {
'use strict';
function adler32(adler, buf, len, pos) {
var s1 = (adler & 0xffff) | 0,
s2 = ((adler >>> 16) & 0xffff) | 0,
n = 0;
while (len !== 0) {
n = len > 2000 ? 2000 : len;
len -= n;
do {
s1 = (s1 + buf[pos++]) | 0;
s2 = (s2 + s1) | 0;
} while (--n);
s1 %= 65521;
s2 %= 65521;
}
return (s1 | (s2 << 16)) | 0;
}
module.exports = adler32;
}, {}],
4: [function(require, module, exports) {
module.exports = {
Z_NO_FLUSH: 0,
Z_PARTIAL_FLUSH: 1,
Z_SYNC_FLUSH: 2,
Z_FULL_FLUSH: 3,
Z_FINISH: 4,
Z_BLOCK: 5,
Z_TREES: 6,
Z_OK: 0,
Z_STREAM_END: 1,
Z_NEED_DICT: 2,
Z_ERRNO: -1,
Z_STREAM_ERROR: -2,
Z_DATA_ERROR: -3,
Z_BUF_ERROR: -5,
Z_NO_COMPRESSION: 0,
Z_BEST_SPEED: 1,
Z_BEST_COMPRESSION: 9,
Z_DEFAULT_COMPRESSION: -1,
Z_FILTERED: 1,
Z_HUFFMAN_ONLY: 2,
Z_RLE: 3,
Z_FIXED: 4,
Z_DEFAULT_STRATEGY: 0,
Z_BINARY: 0,
Z_TEXT: 1,
Z_UNKNOWN: 2,
Z_DEFLATED: 8
};
}, {}],
5: [function(require, module, exports) {
'use strict';
function makeTable() {
var c,
table = [];
for (var n = 0; n < 256; n++) {
c = n;
for (var k = 0; k < 8; k++) {
c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
}
table[n] = c;
}
return table;
}
var crcTable = makeTable();
function crc32(crc, buf, len, pos) {
var t = crcTable,
end = pos + len;
crc = crc ^ (-1);
for (var i = pos; i < end; i++) {
crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
}
return (crc ^ (-1));
}
module.exports = crc32;
}, {}],
6: [function(require, module, exports) {
'use strict';
function GZheader() {
this.text = 0;
this.time = 0;
this.xflags = 0;
this.os = 0;
this.extra = null;
this.extra_len = 0;
this.name = '';
this.comment = '';
this.hcrc = 0;
this.done = false;
}
module.exports = GZheader;
}, {}],
7: [function(require, module, exports) {
'use strict';
var BAD = 30;
var TYPE = 12;
module.exports = function inflate_fast(strm, start) {
var state;
var _in;
var last;
var _out;
var beg;
var end;
var dmax;
var wsize;
var whave;
var wnext;
var window;
var hold;
var bits;
var lcode;
var dcode;
var lmask;
var dmask;
var here;
var op;
var len;
var dist;
var from;
var from_source;
var input,
output;
state = strm.state;
_in = strm.next_in;
input = strm.input;
last = _in + (strm.avail_in - 5);
_out = strm.next_out;
output = strm.output;
beg = _out - (start - strm.avail_out);
end = _out + (strm.avail_out - 257);
dmax = state.dmax;
wsize = state.wsize;
whave = state.whave;
wnext = state.wnext;
window = state.window;
hold = state.hold;
bits = state.bits;
lcode = state.lencode;
dcode = state.distcode;
lmask = (1 << state.lenbits) - 1;
dmask = (1 << state.distbits) - 1;
top: do {
if (bits < 15) {
hold += input[_in++] << bits;
bits += 8;
hold += input[_in++] << bits;
bits += 8;
}
here = lcode[hold & lmask];
dolen: for (; ; ) {
op = here >>> 24;
hold >>>= op;
bits -= op;
op = (here >>> 16) & 0xff;
if (op === 0) {
output[_out++] = here & 0xffff;
} else if (op & 16) {
len = here & 0xffff;
op &= 15;
if (op) {
if (bits < op) {
hold += input[_in++] << bits;
bits += 8;
}
len += hold & ((1 << op) - 1);
hold >>>= op;
bits -= op;
}
if (bits < 15) {
hold += input[_in++] << bits;
bits += 8;
hold += input[_in++] << bits;
bits += 8;
}
here = dcode[hold & dmask];
dodist: for (; ; ) {
op = here >>> 24;
hold >>>= op;
bits -= op;
op = (here >>> 16) & 0xff;
if (op & 16) {
dist = here & 0xffff;
op &= 15;
if (bits < op) {
hold += input[_in++] << bits;
bits += 8;
if (bits < op) {
hold += input[_in++] << bits;
bits += 8;
}
}
dist += hold & ((1 << op) - 1);
if (dist > dmax) {
strm.msg = 'invalid distance too far back';
state.mode = BAD;
break top;
}
hold >>>= op;
bits -= op;
op = _out - beg;
if (dist > op) {
op = dist - op;
if (op > whave) {
if (state.sane) {
strm.msg = 'invalid distance too far back';
state.mode = BAD;
break top;
}
}
from = 0;
from_source = window;
if (wnext === 0) {
from += wsize - op;
if (op < len) {
len -= op;
do {
output[_out++] = window[from++];
} while (--op);
from = _out - dist;
from_source = output;
}
} else if (wnext < op) {
from += wsize + wnext - op;
op -= wnext;
if (op < len) {
len -= op;
do {
output[_out++] = window[from++];
} while (--op);
from = 0;
if (wnext < len) {
op = wnext;
len -= op;
do {
output[_out++] = window[from++];
} while (--op);
from = _out - dist;
from_source = output;
}
}
} else {
from += wnext - op;
if (op < len) {
len -= op;
do {
output[_out++] = window[from++];
} while (--op);
from = _out - dist;
from_source = output;
}
}
while (len > 2) {
output[_out++] = from_source[from++];
output[_out++] = from_source[from++];
output[_out++] = from_source[from++];
len -= 3;
}
if (len) {
output[_out++] = from_source[from++];
if (len > 1) {
output[_out++] = from_source[from++];
}
}
} else {
from = _out - dist;
do {
output[_out++] = output[from++];
output[_out++] = output[from++];
output[_out++] = output[from++];
len -= 3;
} while (len > 2);
if (len) {
output[_out++] = output[from++];
if (len > 1) {
output[_out++] = output[from++];
}
}
}
} else if ((op & 64) === 0) {
here = dcode[(here & 0xffff) + (hold & ((1 << op) - 1))];
continue dodist;
} else {
strm.msg = 'invalid distance code';
state.mode = BAD;
break top;
}
break;
}
} else if ((op & 64) === 0) {
here = lcode[(here & 0xffff) + (hold & ((1 << op) - 1))];
continue dolen;
} else if (op & 32) {
state.mode = TYPE;
break top;
} else {
strm.msg = 'invalid literal/length code';
state.mode = BAD;
break top;
}
break;
}
} while (_in < last && _out < end);
len = bits >> 3;
_in -= len;
bits -= len << 3;
hold &= (1 << bits) - 1;
strm.next_in = _in;
strm.next_out = _out;
strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
state.hold = hold;
state.bits = bits;
return ;
};
}, {}],
8: [function(require, module, exports) {
'use strict';
var utils = require("../utils/common");
var adler32 = require("./adler32");
var crc32 = require("./crc32");
var inflate_fast = require("./inffast");
var inflate_table = require("./inftrees");
var CODES = 0;
var LENS = 1;
var DISTS = 2;
var Z_FINISH = 4;
var Z_BLOCK = 5;
var Z_TREES = 6;
var Z_OK = 0;
var Z_STREAM_END = 1;
var Z_NEED_DICT = 2;
var Z_STREAM_ERROR = -2;
var Z_DATA_ERROR = -3;
var Z_MEM_ERROR = -4;
var Z_BUF_ERROR = -5;
var Z_DEFLATED = 8;
var HEAD = 1;
var FLAGS = 2;
var TIME = 3;
var OS = 4;
var EXLEN = 5;
var EXTRA = 6;
var NAME = 7;
var COMMENT = 8;
var HCRC = 9;
var DICTID = 10;
var DICT = 11;
var TYPE = 12;
var TYPEDO = 13;
var STORED = 14;
var COPY_ = 15;
var COPY = 16;
var TABLE = 17;
var LENLENS = 18;
var CODELENS = 19;
var LEN_ = 20;
var LEN = 21;
var LENEXT = 22;
var DIST = 23;
var DISTEXT = 24;
var MATCH = 25;
var LIT = 26;
var CHECK = 27;
var LENGTH = 28;
var DONE = 29;
var BAD = 30;
var MEM = 31;
var SYNC = 32;
var ENOUGH_LENS = 852;
var ENOUGH_DISTS = 592;
var MAX_WBITS = 15;
var DEF_WBITS = MAX_WBITS;
function ZSWAP32(q) {
return (((q >>> 24) & 0xff) + ((q >>> 8) & 0xff00) + ((q & 0xff00) << 8) + ((q & 0xff) << 24));
}
function InflateState() {
this.mode = 0;
this.last = false;
this.wrap = 0;
this.havedict = false;
this.flags = 0;
this.dmax = 0;
this.check = 0;
this.total = 0;
this.head = null;
this.wbits = 0;
this.wsize = 0;
this.whave = 0;
this.wnext = 0;
this.window = null;
this.hold = 0;
this.bits = 0;
this.length = 0;
this.offset = 0;
this.extra = 0;
this.lencode = null;
this.distcode = null;
this.lenbits = 0;
this.distbits = 0;
this.ncode = 0;
this.nlen = 0;
this.ndist = 0;
this.have = 0;
this.next = null;
this.lens = new utils.Buf16(320);
this.work = new utils.Buf16(288);
this.lendyn = null;
this.distdyn = null;
this.sane = 0;
this.back = 0;
this.was = 0;
}
function inflateResetKeep(strm) {
var state;
if (!strm || !strm.state) {
return Z_STREAM_ERROR;
}
state = strm.state;
strm.total_in = strm.total_out = state.total = 0;
strm.msg = '';
if (state.wrap) {
strm.adler = state.wrap & 1;
}
state.mode = HEAD;
state.last = 0;
state.havedict = 0;
state.dmax = 32768;
state.head = null;
state.hold = 0;
state.bits = 0;
state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);
state.sane = 1;
state.back = -1;
return Z_OK;
}
function inflateReset(strm) {
var state;
if (!strm || !strm.state) {
return Z_STREAM_ERROR;
}
state = strm.state;
state.wsize = 0;
state.whave = 0;
state.wnext = 0;
return inflateResetKeep(strm);
}
function inflateReset2(strm, windowBits) {
var wrap;
var state;
if (!strm || !strm.state) {
return Z_STREAM_ERROR;
}
state = strm.state;
if (windowBits < 0) {
wrap = 0;
windowBits = -windowBits;
} else {
wrap = (windowBits >> 4) + 1;
if (windowBits < 48) {
windowBits &= 15;
}
}
if (windowBits && (windowBits < 8 || windowBits > 15)) {
return Z_STREAM_ERROR;
}
if (state.window !== null && state.wbits !== windowBits) {
state.window = null;
}
state.wrap = wrap;
state.wbits = windowBits;
return inflateReset(strm);
}
function inflateInit2(strm, windowBits) {
var ret;
var state;
if (!strm) {
return Z_STREAM_ERROR;
}
state = new InflateState();
strm.state = state;
state.window = null;
ret = inflateReset2(strm, windowBits);
if (ret !== Z_OK) {
strm.state = null;
}
return ret;
}
function inflateInit(strm) {
return inflateInit2(strm, DEF_WBITS);
}
var virgin = true;
var lenfix,
distfix;
function fixedtables(state) {
if (virgin) {
var sym;
lenfix = new utils.Buf32(512);
distfix = new utils.Buf32(32);
sym = 0;
while (sym < 144) {
state.lens[sym++] = 8;
}
while (sym < 256) {
state.lens[sym++] = 9;
}
while (sym < 280) {
state.lens[sym++] = 7;
}
while (sym < 288) {
state.lens[sym++] = 8;
}
inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, {bits: 9});
sym = 0;
while (sym < 32) {
state.lens[sym++] = 5;
}
inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, {bits: 5});
virgin = false;
}
state.lencode = lenfix;
state.lenbits = 9;
state.distcode = distfix;
state.distbits = 5;
}
function updatewindow(strm, src, end, copy) {
var dist;
var state = strm.state;
if (state.window === null) {
state.wsize = 1 << state.wbits;
state.wnext = 0;
state.whave = 0;
state.window = new utils.Buf8(state.wsize);
}
if (copy >= state.wsize) {
utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
state.wnext = 0;
state.whave = state.wsize;
} else {
dist = state.wsize - state.wnext;
if (dist > copy) {
dist = copy;
}
utils.arraySet(state.window, src, end - copy, dist, state.wnext);
copy -= dist;
if (copy) {
utils.arraySet(state.window, src, end - copy, copy, 0);
state.wnext = copy;
state.whave = state.wsize;
} else {
state.wnext += dist;
if (state.wnext === state.wsize) {
state.wnext = 0;
}
if (state.whave < state.wsize) {
state.whave += dist;
}
}
}
return 0;
}
function inflate(strm, flush) {
var state;
var input,
output;
var next;
var put;
var have,
left;
var hold;
var bits;
var _in,
_out;
var copy;
var from;
var from_source;
var here = 0;
var here_bits,
here_op,
here_val;
var last_bits,
last_op,
last_val;
var len;
var ret;
var hbuf = new utils.Buf8(4);
var opts;
var n;
var order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
if (!strm || !strm.state || !strm.output || (!strm.input && strm.avail_in !== 0)) {
return Z_STREAM_ERROR;
}
state = strm.state;
if (state.mode === TYPE) {
state.mode = TYPEDO;
}
put = strm.next_out;
output = strm.output;
left = strm.avail_out;
next = strm.next_in;
input = strm.input;
have = strm.avail_in;
hold = state.hold;
bits = state.bits;
_in = have;
_out = left;
ret = Z_OK;
inf_leave: for (; ; ) {
switch (state.mode) {
case HEAD:
if (state.wrap === 0) {
state.mode = TYPEDO;
break;
}
while (bits < 16) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if ((state.wrap & 2) && hold === 0x8b1f) {
state.check = 0;
hbuf[0] = hold & 0xff;
hbuf[1] = (hold >>> 8) & 0xff;
state.check = crc32(state.check, hbuf, 2, 0);
hold = 0;
bits = 0;
state.mode = FLAGS;
break;
}
state.flags = 0;
if (state.head) {
state.head.done = false;
}
if (!(state.wrap & 1) || (((hold & 0xff) << 8) + (hold >> 8)) % 31) {
strm.msg = 'incorrect header check';
state.mode = BAD;
break;
}
if ((hold & 0x0f) !== Z_DEFLATED) {
strm.msg = 'unknown compression method';
state.mode = BAD;
break;
}
hold >>>= 4;
bits -= 4;
len = (hold & 0x0f) + 8;
if (state.wbits === 0) {
state.wbits = len;
} else if (len > state.wbits) {
strm.msg = 'invalid window size';
state.mode = BAD;
break;
}
state.dmax = 1 << len;
strm.adler = state.check = 1;
state.mode = hold & 0x200 ? DICTID : TYPE;
hold = 0;
bits = 0;
break;
case FLAGS:
while (bits < 16) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
state.flags = hold;
if ((state.flags & 0xff) !== Z_DEFLATED) {
strm.msg = 'unknown compression method';
state.mode = BAD;
break;
}
if (state.flags & 0xe000) {
strm.msg = 'unknown header flags set';
state.mode = BAD;
break;
}
if (state.head) {
state.head.text = ((hold >> 8) & 1);
}
if (state.flags & 0x0200) {
hbuf[0] = hold & 0xff;
hbuf[1] = (hold >>> 8) & 0xff;
state.check = crc32(state.check, hbuf, 2, 0);
}
hold = 0;
bits = 0;
state.mode = TIME;
case TIME:
while (bits < 32) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if (state.head) {
state.head.time = hold;
}
if (state.flags & 0x0200) {
hbuf[0] = hold & 0xff;
hbuf[1] = (hold >>> 8) & 0xff;
hbuf[2] = (hold >>> 16) & 0xff;
hbuf[3] = (hold >>> 24) & 0xff;
state.check = crc32(state.check, hbuf, 4, 0);
}
hold = 0;
bits = 0;
state.mode = OS;
case OS:
while (bits < 16) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if (state.head) {
state.head.xflags = (hold & 0xff);
state.head.os = (hold >> 8);
}
if (state.flags & 0x0200) {
hbuf[0] = hold & 0xff;
hbuf[1] = (hold >>> 8) & 0xff;
state.check = crc32(state.check, hbuf, 2, 0);
}
hold = 0;
bits = 0;
state.mode = EXLEN;
case EXLEN:
if (state.flags & 0x0400) {
while (bits < 16) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
state.length = hold;
if (state.head) {
state.head.extra_len = hold;
}
if (state.flags & 0x0200) {
hbuf[0] = hold & 0xff;
hbuf[1] = (hold >>> 8) & 0xff;
state.check = crc32(state.check, hbuf, 2, 0);
}
hold = 0;
bits = 0;
} else if (state.head) {
state.head.extra = null;
}
state.mode = EXTRA;
case EXTRA:
if (state.flags & 0x0400) {
copy = state.length;
if (copy > have) {
copy = have;
}
if (copy) {
if (state.head) {
len = state.head.extra_len - state.length;
if (!state.head.extra) {
state.head.extra = new Array(state.head.extra_len);
}
utils.arraySet(state.head.extra, input, next, copy, len);
}
if (state.flags & 0x0200) {
state.check = crc32(state.check, input, copy, next);
}
have -= copy;
next += copy;
state.length -= copy;
}
if (state.length) {
break inf_leave;
}
}
state.length = 0;
state.mode = NAME;
case NAME:
if (state.flags & 0x0800) {
if (have === 0) {
break inf_leave;
}
copy = 0;
do {
len = input[next + copy++];
if (state.head && len && (state.length < 65536)) {
state.head.name += String.fromCharCode(len);
}
} while (len && copy < have);
if (state.flags & 0x0200) {
state.check = crc32(state.check, input, copy, next);
}
have -= copy;
next += copy;
if (len) {
break inf_leave;
}
} else if (state.head) {
state.head.name = null;
}
state.length = 0;
state.mode = COMMENT;
case COMMENT:
if (state.flags & 0x1000) {
if (have === 0) {
break inf_leave;
}
copy = 0;
do {
len = input[next + copy++];
if (state.head && len && (state.length < 65536)) {
state.head.comment += String.fromCharCode(len);
}
} while (len && copy < have);
if (state.flags & 0x0200) {
state.check = crc32(state.check, input, copy, next);
}
have -= copy;
next += copy;
if (len) {
break inf_leave;
}
} else if (state.head) {
state.head.comment = null;
}
state.mode = HCRC;
case HCRC:
if (state.flags & 0x0200) {
while (bits < 16) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if (hold !== (state.check & 0xffff)) {
strm.msg = 'header crc mismatch';
state.mode = BAD;
break;
}
hold = 0;
bits = 0;
}
if (state.head) {
state.head.hcrc = ((state.flags >> 9) & 1);
state.head.done = true;
}
strm.adler = state.check = 0;
state.mode = TYPE;
break;
case DICTID:
while (bits < 32) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
strm.adler = state.check = ZSWAP32(hold);
hold = 0;
bits = 0;
state.mode = DICT;
case DICT:
if (state.havedict === 0) {
strm.next_out = put;
strm.avail_out = left;
strm.next_in = next;
strm.avail_in = have;
state.hold = hold;
state.bits = bits;
return Z_NEED_DICT;
}
strm.adler = state.check = 1;
state.mode = TYPE;
case TYPE:
if (flush === Z_BLOCK || flush === Z_TREES) {
break inf_leave;
}
case TYPEDO:
if (state.last) {
hold >>>= bits & 7;
bits -= bits & 7;
state.mode = CHECK;
break;
}
while (bits < 3) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
state.last = (hold & 0x01);
hold >>>= 1;
bits -= 1;
switch ((hold & 0x03)) {
case 0:
state.mode = STORED;
break;
case 1:
fixedtables(state);
state.mode = LEN_;
if (flush === Z_TREES) {
hold >>>= 2;
bits -= 2;
break inf_leave;
}
break;
case 2:
state.mode = TABLE;
break;
case 3:
strm.msg = 'invalid block type';
state.mode = BAD;
}
hold >>>= 2;
bits -= 2;
break;
case STORED:
hold >>>= bits & 7;
bits -= bits & 7;
while (bits < 32) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
strm.msg = 'invalid stored block lengths';
state.mode = BAD;
break;
}
state.length = hold & 0xffff;
hold = 0;
bits = 0;
state.mode = COPY_;
if (flush === Z_TREES) {
break inf_leave;
}
case COPY_:
state.mode = COPY;
case COPY:
copy = state.length;
if (copy) {
if (copy > have) {
copy = have;
}
if (copy > left) {
copy = left;
}
if (copy === 0) {
break inf_leave;
}
utils.arraySet(output, input, next, copy, put);
have -= copy;
next += copy;
left -= copy;
put += copy;
state.length -= copy;
break;
}
state.mode = TYPE;
break;
case TABLE:
while (bits < 14) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
state.nlen = (hold & 0x1f) + 257;
hold >>>= 5;
bits -= 5;
state.ndist = (hold & 0x1f) + 1;
hold >>>= 5;
bits -= 5;
state.ncode = (hold & 0x0f) + 4;
hold >>>= 4;
bits -= 4;
if (state.nlen > 286 || state.ndist > 30) {
strm.msg = 'too many length or distance symbols';
state.mode = BAD;
break;
}
state.have = 0;
state.mode = LENLENS;
case LENLENS:
while (state.have < state.ncode) {
while (bits < 3) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
state.lens[order[state.have++]] = (hold & 0x07);
hold >>>= 3;
bits -= 3;
}
while (state.have < 19) {
state.lens[order[state.have++]] = 0;
}
state.lencode = state.lendyn;
state.lenbits = 7;
opts = {bits: state.lenbits};
ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
state.lenbits = opts.bits;
if (ret) {
strm.msg = 'invalid code lengths set';
state.mode = BAD;
break;
}
state.have = 0;
state.mode = CODELENS;
case CODELENS:
while (state.have < state.nlen + state.ndist) {
for (; ; ) {
here = state.lencode[hold & ((1 << state.lenbits) - 1)];
here_bits = here >>> 24;
here_op = (here >>> 16) & 0xff;
here_val = here & 0xffff;
if ((here_bits) <= bits) {
break;
}
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if (here_val < 16) {
hold >>>= here_bits;
bits -= here_bits;
state.lens[state.have++] = here_val;
} else {
if (here_val === 16) {
n = here_bits + 2;
while (bits < n) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
hold >>>= here_bits;
bits -= here_bits;
if (state.have === 0) {
strm.msg = 'invalid bit length repeat';
state.mode = BAD;
break;
}
len = state.lens[state.have - 1];
copy = 3 + (hold & 0x03);
hold >>>= 2;
bits -= 2;
} else if (here_val === 17) {
n = here_bits + 3;
while (bits < n) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
hold >>>= here_bits;
bits -= here_bits;
len = 0;
copy = 3 + (hold & 0x07);
hold >>>= 3;
bits -= 3;
} else {
n = here_bits + 7;
while (bits < n) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
hold >>>= here_bits;
bits -= here_bits;
len = 0;
copy = 11 + (hold & 0x7f);
hold >>>= 7;
bits -= 7;
}
if (state.have + copy > state.nlen + state.ndist) {
strm.msg = 'invalid bit length repeat';
state.mode = BAD;
break;
}
while (copy--) {
state.lens[state.have++] = len;
}
}
}
if (state.mode === BAD) {
break;
}
if (state.lens[256] === 0) {
strm.msg = 'invalid code -- missing end-of-block';
state.mode = BAD;
break;
}
state.lenbits = 9;
opts = {bits: state.lenbits};
ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
state.lenbits = opts.bits;
if (ret) {
strm.msg = 'invalid literal/lengths set';
state.mode = BAD;
break;
}
state.distbits = 6;
state.distcode = state.distdyn;
opts = {bits: state.distbits};
ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
state.distbits = opts.bits;
if (ret) {
strm.msg = 'invalid distances set';
state.mode = BAD;
break;
}
state.mode = LEN_;
if (flush === Z_TREES) {
break inf_leave;
}
case LEN_:
state.mode = LEN;
case LEN:
if (have >= 6 && left >= 258) {
strm.next_out = put;
strm.avail_out = left;
strm.next_in = next;
strm.avail_in = have;
state.hold = hold;
state.bits = bits;
inflate_fast(strm, _out);
put = strm.next_out;
output = strm.output;
left = strm.avail_out;
next = strm.next_in;
input = strm.input;
have = strm.avail_in;
hold = state.hold;
bits = state.bits;
if (state.mode === TYPE) {
state.back = -1;
}
break;
}
state.back = 0;
for (; ; ) {
here = state.lencode[hold & ((1 << state.lenbits) - 1)];
here_bits = here >>> 24;
here_op = (here >>> 16) & 0xff;
here_val = here & 0xffff;
if (here_bits <= bits) {
break;
}
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if (here_op && (here_op & 0xf0) === 0) {
last_bits = here_bits;
last_op = here_op;
last_val = here_val;
for (; ; ) {
here = state.lencode[last_val + ((hold & ((1 << (last_bits + last_op)) - 1)) >> last_bits)];
here_bits = here >>> 24;
here_op = (here >>> 16) & 0xff;
here_val = here & 0xffff;
if ((last_bits + here_bits) <= bits) {
break;
}
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
hold >>>= last_bits;
bits -= last_bits;
state.back += last_bits;
}
hold >>>= here_bits;
bits -= here_bits;
state.back += here_bits;
state.length = here_val;
if (here_op === 0) {
state.mode = LIT;
break;
}
if (here_op & 32) {
state.back = -1;
state.mode = TYPE;
break;
}
if (here_op & 64) {
strm.msg = 'invalid literal/length code';
state.mode = BAD;
break;
}
state.extra = here_op & 15;
state.mode = LENEXT;
case LENEXT:
if (state.extra) {
n = state.extra;
while (bits < n) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
state.length += hold & ((1 << state.extra) - 1);
hold >>>= state.extra;
bits -= state.extra;
state.back += state.extra;
}
state.was = state.length;
state.mode = DIST;
case DIST:
for (; ; ) {
here = state.distcode[hold & ((1 << state.distbits) - 1)];
here_bits = here >>> 24;
here_op = (here >>> 16) & 0xff;
here_val = here & 0xffff;
if ((here_bits) <= bits) {
break;
}
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if ((here_op & 0xf0) === 0) {
last_bits = here_bits;
last_op = here_op;
last_val = here_val;
for (; ; ) {
here = state.distcode[last_val + ((hold & ((1 << (last_bits + last_op)) - 1)) >> last_bits)];
here_bits = here >>> 24;
here_op = (here >>> 16) & 0xff;
here_val = here & 0xffff;
if ((last_bits + here_bits) <= bits) {
break;
}
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
hold >>>= last_bits;
bits -= last_bits;
state.back += last_bits;
}
hold >>>= here_bits;
bits -= here_bits;
state.back += here_bits;
if (here_op & 64) {
strm.msg = 'invalid distance code';
state.mode = BAD;
break;
}
state.offset = here_val;
state.extra = (here_op) & 15;
state.mode = DISTEXT;
case DISTEXT:
if (state.extra) {
n = state.extra;
while (bits < n) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
state.offset += hold & ((1 << state.extra) - 1);
hold >>>= state.extra;
bits -= state.extra;
state.back += state.extra;
}
if (state.offset > state.dmax) {
strm.msg = 'invalid distance too far back';
state.mode = BAD;
break;
}
state.mode = MATCH;
case MATCH:
if (left === 0) {
break inf_leave;
}
copy = _out - left;
if (state.offset > copy) {
copy = state.offset - copy;
if (copy > state.whave) {
if (state.sane) {
strm.msg = 'invalid distance too far back';
state.mode = BAD;
break;
}
}
if (copy > state.wnext) {
copy -= state.wnext;
from = state.wsize - copy;
} else {
from = state.wnext - copy;
}
if (copy > state.length) {
copy = state.length;
}
from_source = state.window;
} else {
from_source = output;
from = put - state.offset;
copy = state.length;
}
if (copy > left) {
copy = left;
}
left -= copy;
state.length -= copy;
do {
output[put++] = from_source[from++];
} while (--copy);
if (state.length === 0) {
state.mode = LEN;
}
break;
case LIT:
if (left === 0) {
break inf_leave;
}
output[put++] = state.length;
left--;
state.mode = LEN;
break;
case CHECK:
if (state.wrap) {
while (bits < 32) {
if (have === 0) {
break inf_leave;
}
have--;
hold |= input[next++] << bits;
bits += 8;
}
_out -= left;
strm.total_out += _out;
state.total += _out;
if (_out) {
strm.adler = state.check = (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
}
_out = left;
if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {
strm.msg = 'incorrect data check';
state.mode = BAD;
break;
}
hold = 0;
bits = 0;
}
state.mode = LENGTH;
case LENGTH:
if (state.wrap && state.flags) {
while (bits < 32) {
if (have === 0) {
break inf_leave;
}
have--;
hold += input[next++] << bits;
bits += 8;
}
if (hold !== (state.total & 0xffffffff)) {
strm.msg = 'incorrect length check';
state.mode = BAD;
break;
}
hold = 0;
bits = 0;
}
state.mode = DONE;
case DONE:
ret = Z_STREAM_END;
break inf_leave;
case BAD:
ret = Z_DATA_ERROR;
break inf_leave;
case MEM:
return Z_MEM_ERROR;
case SYNC:
default:
return Z_STREAM_ERROR;
}
}
strm.next_out = put;
strm.avail_out = left;
strm.next_in = next;
strm.avail_in = have;
state.hold = hold;
state.bits = bits;
if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH))) {
if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
state.mode = MEM;
return Z_MEM_ERROR;
}
}
_in -= strm.avail_in;
_out -= strm.avail_out;
strm.total_in += _in;
strm.total_out += _out;
state.total += _out;
if (state.wrap && _out) {
strm.adler = state.check = (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
}
strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
ret = Z_BUF_ERROR;
}
return ret;
}
function inflateEnd(strm) {
if (!strm || !strm.state) {
return Z_STREAM_ERROR;
}
var state = strm.state;
if (state.window) {
state.window = null;
}
strm.state = null;
return Z_OK;
}
function inflateGetHeader(strm, head) {
var state;
if (!strm || !strm.state) {
return Z_STREAM_ERROR;
}
state = strm.state;
if ((state.wrap & 2) === 0) {
return Z_STREAM_ERROR;
}
state.head = head;
head.done = false;
return Z_OK;
}
exports.inflateReset = inflateReset;
exports.inflateReset2 = inflateReset2;
exports.inflateResetKeep = inflateResetKeep;
exports.inflateInit = inflateInit;
exports.inflateInit2 = inflateInit2;
exports.inflate = inflate;
exports.inflateEnd = inflateEnd;
exports.inflateGetHeader = inflateGetHeader;
exports.inflateInfo = 'pako inflate (from Nodeca project)';
}, {
"../utils/common": 1,
"./adler32": 3,
"./crc32": 5,
"./inffast": 7,
"./inftrees": 9
}],
9: [function(require, module, exports) {
'use strict';
var utils = require("../utils/common");
var MAXBITS = 15;
var ENOUGH_LENS = 852;
var ENOUGH_DISTS = 592;
var CODES = 0;
var LENS = 1;
var DISTS = 2;
var lbase = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0];
var lext = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78];
var dbase = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0];
var dext = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) {
var bits = opts.bits;
var len = 0;
var sym = 0;
var min = 0,
max = 0;
var root = 0;
var curr = 0;
var drop = 0;
var left = 0;
var used = 0;
var huff = 0;
var incr;
var fill;
var low;
var mask;
var next;
var base = null;
var base_index = 0;
var end;
var count = new utils.Buf16(MAXBITS + 1);
var offs = new utils.Buf16(MAXBITS + 1);
var extra = null;
var extra_index = 0;
var here_bits,
here_op,
here_val;
for (len = 0; len <= MAXBITS; len++) {
count[len] = 0;
}
for (sym = 0; sym < codes; sym++) {
count[lens[lens_index + sym]]++;
}
root = bits;
for (max = MAXBITS; max >= 1; max--) {
if (count[max] !== 0) {
break;
}
}
if (root > max) {
root = max;
}
if (max === 0) {
table[table_index++] = (1 << 24) | (64 << 16) | 0;
table[table_index++] = (1 << 24) | (64 << 16) | 0;
opts.bits = 1;
return 0;
}
for (min = 1; min < max; min++) {
if (count[min] !== 0) {
break;
}
}
if (root < min) {
root = min;
}
left = 1;
for (len = 1; len <= MAXBITS; len++) {
left <<= 1;
left -= count[len];
if (left < 0) {
return -1;
}
}
if (left > 0 && (type === CODES || max !== 1)) {
return -1;
}
offs[1] = 0;
for (len = 1; len < MAXBITS; len++) {
offs[len + 1] = offs[len] + count[len];
}
for (sym = 0; sym < codes; sym++) {
if (lens[lens_index + sym] !== 0) {
work[offs[lens[lens_index + sym]]++] = sym;
}
}
if (type === CODES) {
base = extra = work;
end = 19;
} else if (type === LENS) {
base = lbase;
base_index -= 257;
extra = lext;
extra_index -= 257;
end = 256;
} else {
base = dbase;
extra = dext;
end = -1;
}
huff = 0;
sym = 0;
len = min;
next = table_index;
curr = root;
drop = 0;
low = -1;
used = 1 << root;
mask = used - 1;
if ((type === LENS && used > ENOUGH_LENS) || (type === DISTS && used > ENOUGH_DISTS)) {
return 1;
}
var i = 0;
for (; ; ) {
i++;
here_bits = len - drop;
if (work[sym] < end) {
here_op = 0;
here_val = work[sym];
} else if (work[sym] > end) {
here_op = extra[extra_index + work[sym]];
here_val = base[base_index + work[sym]];
} else {
here_op = 32 + 64;
here_val = 0;
}
incr = 1 << (len - drop);
fill = 1 << curr;
min = fill;
do {
fill -= incr;
table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val | 0;
} while (fill !== 0);
incr = 1 << (len - 1);
while (huff & incr) {
incr >>= 1;
}
if (incr !== 0) {
huff &= incr - 1;
huff += incr;
} else {
huff = 0;
}
sym++;
if (--count[len] === 0) {
if (len === max) {
break;
}
len = lens[lens_index + work[sym]];
}
if (len > root && (huff & mask) !== low) {
if (drop === 0) {
drop = root;
}
next += min;
curr = len - drop;
left = 1 << curr;
while (curr + drop < max) {
left -= count[curr + drop];
if (left <= 0) {
break;
}
curr++;
left <<= 1;
}
used += 1 << curr;
if ((type === LENS && used > ENOUGH_LENS) || (type === DISTS && used > ENOUGH_DISTS)) {
return 1;
}
low = huff & mask;
table[low] = (root << 24) | (curr << 16) | (next - table_index) | 0;
}
}
if (huff !== 0) {
table[next + huff] = ((len - drop) << 24) | (64 << 16) | 0;
}
opts.bits = root;
return 0;
};
}, {"../utils/common": 1}],
10: [function(require, module, exports) {
'use strict';
module.exports = {
'2': 'need dictionary',
'1': 'stream end',
'0': '',
'-1': 'file error',
'-2': 'stream error',
'-3': 'data error',
'-4': 'insufficient memory',
'-5': 'buffer error',
'-6': 'incompatible version'
};
}, {}],
11: [function(require, module, exports) {
'use strict';
function ZStream() {
this.input = null;
this.next_in = 0;
this.avail_in = 0;
this.total_in = 0;
this.output = null;
this.next_out = 0;
this.avail_out = 0;
this.total_out = 0;
this.msg = '';
this.state = null;
this.data_type = 2;
this.adler = 0;
}
module.exports = ZStream;
}, {}],
"/lib/inflate.js": [function(require, module, exports) {
'use strict';
var zlib_inflate = require("./zlib/inflate");
var utils = require("./utils/common");
var strings = require("./utils/strings");
var c = require("./zlib/constants");
var msg = require("./zlib/messages");
var zstream = require("./zlib/zstream");
var gzheader = require("./zlib/gzheader");
var toString = Object.prototype.toString;
var Inflate = function(options) {
this.options = utils.assign({
chunkSize: 16384,
windowBits: 0,
to: ''
}, options || {});
var opt = this.options;
if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
opt.windowBits = -opt.windowBits;
if (opt.windowBits === 0) {
opt.windowBits = -15;
}
}
if ((opt.windowBits >= 0) && (opt.windowBits < 16) && !(options && options.windowBits)) {
opt.windowBits += 32;
}
if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
if ((opt.windowBits & 15) === 0) {
opt.windowBits |= 15;
}
}
this.err = 0;
this.msg = '';
this.ended = false;
this.chunks = [];
this.strm = new zstream();
this.strm.avail_out = 0;
var status = zlib_inflate.inflateInit2(this.strm, opt.windowBits);
if (status !== c.Z_OK) {
throw new Error(msg[status]);
}
this.header = new gzheader();
zlib_inflate.inflateGetHeader(this.strm, this.header);
};
Inflate.prototype.push = function(data, mode) {
var strm = this.strm;
var chunkSize = this.options.chunkSize;
var status,
_mode;
var next_out_utf8,
tail,
utf8str;
if (this.ended) {
return false;
}
_mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);
if (typeof data === 'string') {
strm.input = strings.binstring2buf(data);
} else if (toString.call(data) === '[object ArrayBuffer]') {
strm.input = new Uint8Array(data);
} else {
strm.input = data;
}
strm.next_in = 0;
strm.avail_in = strm.input.length;
do {
if (strm.avail_out === 0) {
strm.output = new utils.Buf8(chunkSize);
strm.next_out = 0;
strm.avail_out = chunkSize;
}
status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);
if (status !== c.Z_STREAM_END && status !== c.Z_OK) {
this.onEnd(status);
this.ended = true;
return false;
}
if (strm.next_out) {
if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && _mode === c.Z_FINISH)) {
if (this.options.to === 'string') {
next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
tail = strm.next_out - next_out_utf8;
utf8str = strings.buf2string(strm.output, next_out_utf8);
strm.next_out = tail;
strm.avail_out = chunkSize - tail;
if (tail) {
utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0);
}
this.onData(utf8str);
} else {
this.onData(utils.shrinkBuf(strm.output, strm.next_out));
}
}
}
} while ((strm.avail_in > 0) && status !== c.Z_STREAM_END);
if (status === c.Z_STREAM_END) {
_mode = c.Z_FINISH;
}
if (_mode === c.Z_FINISH) {
status = zlib_inflate.inflateEnd(this.strm);
this.onEnd(status);
this.ended = true;
return status === c.Z_OK;
}
return true;
};
Inflate.prototype.onData = function(chunk) {
this.chunks.push(chunk);
};
Inflate.prototype.onEnd = function(status) {
if (status === c.Z_OK) {
if (this.options.to === 'string') {
this.result = this.chunks.join('');
} else {
this.result = utils.flattenChunks(this.chunks);
}
}
this.chunks = [];
this.err = status;
this.msg = this.strm.msg;
};
function inflate(input, options) {
var inflator = new Inflate(options);
inflator.push(input, true);
if (inflator.err) {
throw inflator.msg;
}
return inflator.result;
}
function inflateRaw(input, options) {
options = options || {};
options.raw = true;
return inflate(input, options);
}
exports.Inflate = Inflate;
exports.inflate = inflate;
exports.inflateRaw = inflateRaw;
exports.ungzip = inflate;
}, {
"./utils/common": 1,
"./utils/strings": 2,
"./zlib/constants": 4,
"./zlib/gzheader": 6,
"./zlib/inflate.js": 8,
"./zlib/messages": 10,
"./zlib/zstream": 11
}]
}, {}, [])("/lib/inflate.js");
});
})(require("process"));
|
/** @constructor */
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = (function() {
ScalaJS.c.scala_runtime_AbstractFunction1.call(this);
this.$$outer$2 = null;
this.x2$1$f = null
});
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype = new ScalaJS.inheritable.scala_runtime_AbstractFunction1();
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype.constructor = ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2;
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype.apply__O__Lscala_Function1 = (function(x3) {
return new ScalaJS.c.scala_scalajs_runtime_AnonFunction1().init___Lscala_scalajs_js_Function1((function(arg$outer, x3$1) {
return (function(x4) {
return arg$outer.scala$Function4$$anonfun$$anonfun$$anonfun$$$outer__Lscala_Function4$$anonfun$curried$1$$anonfun$apply$1().scala$Function4$$anonfun$$anonfun$$$outer__Lscala_Function4$$anonfun$curried$1().scala$Function4$$anonfun$$$outer__Lscala_Function4().apply__O__O__O__O__O(arg$outer.scala$Function4$$anonfun$$anonfun$$anonfun$$$outer__Lscala_Function4$$anonfun$curried$1$$anonfun$apply$1().x1$1$f, arg$outer.x2$1$f, x3$1, x4)
})
})(this, x3))
});
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype.scala$Function4$$anonfun$$anonfun$$anonfun$$$outer__Lscala_Function4$$anonfun$curried$1$$anonfun$apply$1 = (function() {
return this.$$outer$2
});
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype.apply__O__O = (function(v1) {
return this.apply__O__Lscala_Function1(v1)
});
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype.init___Lscala_Function4$$anonfun$curried$1$$anonfun$apply$1__O = (function($$outer, x2$1) {
if (($$outer === null)) {
throw new ScalaJS.c.java_lang_NullPointerException().init___()
} else {
this.$$outer$2 = $$outer
};
this.x2$1$f = x2$1;
ScalaJS.c.scala_runtime_AbstractFunction1.prototype.init___.call(this);
return this
});
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype.scala$Function4$$anonfun$$anonfun$$anonfun$$$outer__ = (function() {
return this.scala$Function4$$anonfun$$anonfun$$anonfun$$$outer__Lscala_Function4$$anonfun$curried$1$$anonfun$apply$1()
});
/** @constructor */
ScalaJS.inheritable.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = (function() {
/*<skip>*/
});
ScalaJS.inheritable.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype = ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype;
ScalaJS.is.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = (function(obj) {
return (!(!((obj && obj.$classData) && obj.$classData.ancestors.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2)))
});
ScalaJS.as.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = (function(obj) {
if ((ScalaJS.is.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2(obj) || (obj === null))) {
return obj
} else {
ScalaJS.throwClassCastException(obj, "scala.Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2")
}
});
ScalaJS.isArrayOf.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = (function(obj, depth) {
return (!(!(((obj && obj.$classData) && (obj.$classData.arrayDepth === depth)) && obj.$classData.arrayBase.ancestors.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2)))
});
ScalaJS.asArrayOf.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = (function(obj, depth) {
if ((ScalaJS.isArrayOf.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2(obj, depth) || (obj === null))) {
return obj
} else {
ScalaJS.throwArrayCastException(obj, "Lscala.Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2;", depth)
}
});
ScalaJS.data.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2 = new ScalaJS.ClassTypeData({
scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2: 0
}, false, "scala.Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2", ScalaJS.data.scala_runtime_AbstractFunction1, {
scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2: 1,
scala_Serializable: 1,
java_io_Serializable: 1,
scala_runtime_AbstractFunction1: 1,
scala_Function1: 1,
java_lang_Object: 1
});
ScalaJS.c.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.prototype.$classData = ScalaJS.data.scala_Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2;
//@ sourceMappingURL=Function4$$anonfun$curried$1$$anonfun$apply$1$$anonfun$apply$2.js.map
|
JAPR = {} || JAPR;
JAPR.addPreferencesBox = function() {
var tab = JA.menu.appendChild( document.createElement( 'div' ) );
tab.title = 'Change the ways things are viewed';
tab.innerHTML =
'<a href=# id=tabPreferences ><p class=button >' +
'<i class="fa fa-wrench"></i> Preferences...' +
'</p></a>';
tabPreferences.onclick = function() {JA.toggleTab( JAPR.PreferencesBox ); };
var segments = 126;
JAPR.PreferencesBox = tab.appendChild( document.createElement( 'div' ) );
JAPR.PreferencesBox.style.cssText = 'cursor: auto; display: none; ' ;
JAPR.PreferencesBox.innerHTML =
'<h3 >Helpers</h3>' +
'<p>' +
'<input type=checkbox id=chkWires /> Wireframe<br>' +
'Vertical scale<br><input type=range id=rngVerticalScale min=1 max=100 step=1 value=50 >' +
'</p>' +
'<p>' +
'<input type=checkbox id=chkMarker /> Marker<br>' +
'X <input type=range id=rngXCoordinate min=1 max=126 step=1 value=63 /><br>' +
'Y <input type=range id=rngYCoordinate min=1 max=126 step=1 value=63 />' +
'</p>' +
'<h3 >Background</h3>' +
'<p>' +
'<input type=radio name=background id=randomGradient /> Random gradient<br>' +
'<input type=radio name=background id=randomColor /> Random color<br>' +
'<input type=radio name=background id=selectColor /> Select color ' +
'<input type=color id=selColor value=#aaaaaa />' +
'<output id=outBackColor >#aaaaaa</output>' +
'</p>' +
'';
randomGradient.checked = true;
randomGradient.onchange = function() { JAPR.updateBackground( this.id ); };
randomColor.onchange = function() { JAPR.updateBackground( this.id ); };
selectColor.onchange = function() { JAPR.updateBackground( this.id ); };
selColor.onchange = function() { outBackColor.value = this.value; };
chkWires.checked = true;
chkWires.onchange = function() {
if ( chkWires.checked === true ) {
JAPR.setWireframe();
} else {
scene.remove( wires );
}
}
rngVerticalScale.onchange = function() {
JATH.selectedObject.scale.y = rngVerticalScale.value * 0.02 * JATH.selectedObject.scale.y;
if ( wires ) { wires.scale.y = JATH.selectedObject.scale.y ; }
};
// chkMarker.checked = true;
rngXCoordinate.onchange = JAPR.updateMarker;
rngYCoordinate.onchange = JAPR.updateMarker;
chkMarker.onchange = function() {
if ( chkMarker.checked === true ) {
JAPR.setMarker();
} else {
scene.remove( marker );
}
}
};
JAPR.updateMarker = function () {
if ( !marker ) return;
var vertices = mesh.geometry.vertices;
var i = 126 * parseInt(rngYCoordinate.value, 10) + parseInt( rngXCoordinate.value, 10 );
marker.position.set( vertices[i].x , JATH.selectedObject.position.y , vertices[i].z );
}
JAPR.setMarker = function() {
scene.remove( marker );
geometry = new THREE.SphereGeometry( 2 );
material = new THREE.MeshPhongMaterial( { color: 0xffff00, emissive: 0x333333 } );
marker = new THREE.Mesh( geometry, material );
marker.castShadow = true;
marker.receiveShadow = true;
marker.position.set( 0, JATH.selectedObject.position.y , 0 );
JATH.scene.add( marker );
}
JAPR.setWireframe = function() {
JATH.scene.remove( wires );
wires = mesh.clone();
wires.material = new THREE.MeshBasicMaterial( { wireframe: true } );
JATH.scene.add( wires );
}
JAPR.updateBackground = function( id ) {
if ( JAPR.cssBackround ) { document.body.removeChild( JAPR.cssBackround ); }
if ( id === 'randomGradient' ) {
JAPR.setRandomGradient();
} else if ( id === 'randomColor' ) {
JAPR.randomColor();
} else {
JAPR.selectColor();;
}
};
JAPR.setRandomGradient = function() {
JAPR.cssBackround = document.body.appendChild( document.createElement('style') );
var col1 = "#" + Math.random().toString(16).slice(2, 8);
var col2 = "#" + Math.random().toString(16).slice(2, 8);
var col3 = "#" + Math.random().toString(16).slice(2, 8);
var X = ( Math.random() * window.innerWidth ).toFixed(0);
var Y = ( Math.random() * window.innerHeight ).toFixed(0);
var center = 20 + ( Math.random() * 60 ).toFixed(0);
JAPR.cssBackround.innerHTML += 'body { ' +
'background: -webkit-radial-gradient(' + X + 'px ' + Y + 'px, farthest-corner, ' + col1 + ' 0%, ' + col2 + ' 50%, ' + col3 + ' 100%); ' +
'background: -moz-radial-gradient(' + X + 'px ' + Y + 'px, farthest-corner, ' + col1 + ' 0%, ' + col2 + ' 50%, ' + col3 + ' 100%); ' +
'background: radial-gradient(' + X + 'px ' + Y + 'px, farthest-corner, ' + col1 + ' 0%, ' + col2 + ' 50%, ' + col3 + ' 100%); }' +
'';
};
JAPR.randomColor = function() {
JAPR.cssBackround = document.body.appendChild( document.createElement('style') );
JAPR.cssBackround.innerHTML += 'body { background-color: #' + Math.random().toString(16).slice(2, 8) + '; }';
};
JAPR.selectColor = function() {
JAPR.cssBackround = document.body.appendChild( document.createElement('style') );
JAPR.cssBackround.innerHTML += 'body { background-color: ' + selColor.value + '; }';
}
|
var temps = {};
// Define historic climate data
temps = {
'Bangor' :
{
thiswinter_low: -20, thiswinter_lowdate: 'Jan. 4',
record_low: -32, record_lowdate: 'Feb. 2, 1948', record_lowsince: 1925
},
'Caribou' :
{
thiswinter_low: -28, thiswinter_lowdate: 'Jan. 2',
record_low: -41, record_lowdate: 'Feb. 1, 1955', record_lowsince: 1939
},
'Presque Isle':
{
thiswinter_low: -29, thiswinter_lowdate: 'Jan. 2, Jan. 4',
record_low: -41, record_lowdate: 'Jan. 19, 1925', record_lowsince: 1893
},
'Houlton' :
{
thiswinter_low: -24, thiswinter_lowdate: 'Jan. 2',
record_low: -41, record_lowdate: 'Jan. 4, 1981', record_lowsince: 1948
},
'Millinocket' :
{
thiswinter_low: -16, thiswinter_lowdate: 'Jan. 1, Jan. 2',
record_low: -40, record_lowdate: 'Feb. 2, 1962', record_lowsince: 1944
},
'Waterville' :
{
thiswinter_low: -18, thiswinter_lowdate: 'Jan. 4', record_low: -39, record_lowdate: 'Dec. 30, 1933', record_lowsince: 1896
},
'Bar Harbor' :
{
thiswinter_low: -9, thiswinter_lowdate: 'Jan. 4'
} ,
'Sanford' :
{
thiswinter_low: -22, thiswinter_lowdate: 'Jan. 4'
} ,
'Portland' :
{
thiswinter_low: -14, thiswinter_lowdate: 'Jan. 4',
record_low: -39, record_lowdate: 'Feb. 16, 1943', record_lowsince: 1874
},
'Augusta' :
{
thiswinter_low: -13, thiswinter_lowdate: 'Jan. 4', record_low: -23, record_lowdate: 'Feb. 2, 1962', record_lowsince: 1948
},
'Auburn' :
{
thiswinter_low: -18, thiswinter_lowdate: 'Jan. 4'
}
};
// Definte current temperature data (can be pulled via a php script from weather.gov)
temps['Sanford'].currenttemp = 11 ;
temps['Portland'].currenttemp = 10 ;
temps['Augusta'].currenttemp = -2 ;
temps['Bar Harbor'].currenttemp = 12 ;
temps['Auburn'].currenttemp = 1 ;
temps['Waterville'].currenttemp = -15 ;
temps['Millinocket'].currenttemp = -10 ;
temps['Houlton'].currenttemp = -3 ;
temps['Caribou'].currenttemp = -20 ;
temps['Presque Isle'].currenttemp = -9 ;
temps['Bangor'].currenttemp = -19 ;
$(document).ready(function() {
// Build the map
var width = 680,
height = 800;
var projection = d3.geo.conicConformal()
.parallels([38 + 02 / 60, 39 + 12 / 60])
.rotate([70, 0])
.scale(8600)
.translate([0.4*width, 9.5*height]);
var path = d3.geo.path()
.projection(projection)
.pointRadius(30);
var svg = d3.select("#mainmap").append("svg")
.attr("width", width)
.attr("height", height);
var g = svg.append("g");
var colorrange = d3.scale.linear()
.domain([-30, 50])
.range(["rgb(0,191,255)", "rgb(255,0,0)"]);
d3.json("mainecitiesandcounties_topo.json", function(error, topo) {
// Append temperature data to data object
for (city in temps) {
for (var i=0,len=topo.objects.cities.geometries.length; i<len; i++) {
if (topo.objects.cities.geometries[i]['properties']['name'] === city) {
topo.objects.cities.geometries[i]['properties']['temps'] = temps[city]
}
}
}
var counties = g.append("g")
.attr("class", "counties")
.selectAll("path")
.data(topojson.feature(topo, topo.objects.counties).features)
.enter().append("path")
.attr("d", path);
var cities =
g.append("g")
.selectAll("path")
.data(topojson.feature(topo, topo.objects.cities).features)
.enter().append("path")
.attr("class", "place")
.attr("d", path)
.attr("centroid-x", function(d) {
var centroid = path.centroid(d);
return centroid[0];
} )
.attr("centroid-y", function(d) {
var centroid = path.centroid(d);
return centroid[1];
});
var citylabels =
g.append("g").selectAll(".currenttemperature-label")
.data(topojson.feature(topo, topo.objects.cities).features)
.enter().append("text")
.attr("class", "currenttemperature-label")
.attr("transform", function(d) { return "translate(" + projection(d.geometry.coordinates) + ")"; })
.attr("dy", ".35em")
.attr("dx", "-.5em")
.text(function(d) {
if (d.properties.temps) return d.properties.temps.currenttemp;
})
.style("fill", function(d) {
if (d.properties.temps) return colorrange(d.properties.temps.currenttemp);
})
.on("mouseover", function(d) {
$('.currenttemperature-label').not(this).animate({opacity:0.1},200);
var s = d.properties.name;
var id = "#" + s.split(' ');
console.log(id);
$(id).fadeIn(500);
})
.on("mouseout", function(d) {
$('.currenttemperature-label').animate({opacity:1},100);
var s = d.properties.name;
var id = "#" + s.split(' ');
$(id).fadeOut(500);
});
var annotations =
g.append("g").selectAll(".more")
.data(topojson.feature(topo, topo.objects.cities).features)
.enter().append("text")
.text(function(d) {
return d.properties.name;
})
.attr("class", "more")
.attr("id", function(d) {
var s = d.properties.name;
return s.split(" ")[0];
})
.attr("transform", function(d) { return "translate(" + projection(d.geometry.coordinates) + ")"; })
.attr("dy", "2em")
.attr("dx", "-.5em");
annotations.append('tspan')
.text(function(d) {
if (d.properties.temps && d.properties.temps.thiswinter_low) {
return ("This winter's record low: ");
}
})
.attr("x","-.5em").attr("dy","1em")
.append('tspan').text(function(d) {
if (d.properties.temps && d.properties.temps.thiswinter_low) {
return d.properties.temps.thiswinter_low;
}
})
.attr('class','number')
.style("fill", function(d) {
if (d.properties.temps.thiswinter_low) { return colorrange(d.properties.temps.thiswinter_low); }
});
annotations.append("tspan").text(function(d) {
if (d.properties.temps && d.properties.temps.thiswinter_low) {
return "on " + d.properties.temps.thiswinter_lowdate;
}
}).attr("x","-.5em").attr("dy","1em");
annotations.append("tspan").text(function(d) {
if (d.properties.temps && d.properties.temps.record_low) {
return "Record low (since " + d.properties.temps.record_lowsince + "): ";
}
}).attr("x","-.5em").attr("dy","1.1em")
.append('tspan').text(function(d) {
if (d.properties.temps && d.properties.temps.record_low) {
return d.properties.temps.record_low;
}
})
.attr('class','number')
.style("fill", function(d) {
if (d.properties.temps && d.properties.temps.record_low) { return colorrange(d.properties.temps.record_low); }
});
annotations.append("tspan").text(function(d) {
if (d.properties.temps) {
if (d.properties.temps.record_low) {
return "on " + d.properties.temps.record_lowdate;
}
}
})
.attr("x","-.5em").attr("dy","1em")
});
});
|
Oskari.registerLocalization(
{
"lang": "da",
"key": "LayerSelection",
"value": {
"title": "Valgte lag",
"desc": "",
"layer": {
"style": "Stil",
"show": "Vis",
"hide": "Skjul",
"hidden": "Kortet er blevet skjult midlertidigt",
"out-of-scale": "Data i dette kortlag kan ikke vises i det valgte zoomniveau",
"move-to-scale": "Gå til et passende zoomniveau",
"out-of-content-area": "Kortlaget indeholder ingen data på denne lokation",
"move-to-content-area": "Flyt til centret i området med indhold",
"description": "Beskrivelse",
"object-data": "Objektdata",
"rights": {
"notavailable": "Publicéring ikke tilladt",
"guest": "Log ind for at publicére dette kortlag",
"loggedin": "Publicéring tilladt",
"official": "Publicéring tilladt til myndighedsbrug",
"need-login": "Du skal logge ind",
"can_be_published_by_provider": {
"label": "Publicéring tilladt for dataansvarlige",
"tooltip": "Du skal være dataansvarlig for at publicére dette kortlag. Hvis du er dataansvarlig, kontakt venligst support og bed om rettigheder til at publicére"
},
"can_be_published": {
"label": "Publicéring tilladt",
"tooltip": "Kortlaget kan publicéres i et indlejret kortvindue uden at begrænse antallet af brugere"
},
"can_be_published_map_user": {
"label": "Publicéring tilladt",
"tooltip": "Kortlaget kan publicéres i et indlejret kortvindue og antal brugere per uge kan begrænses"
},
"no_publication_permission": {
"label": "Publicéring ikke tilladt",
"tooltip": "Den dataansvarlige har ikke givet tilladelse til at publicére dette kortlag i et indlejret kortvindue"
},
"can_be_published_by_authority": {
"label": "Publicéring tilladt",
"tooltip": "Kortlaget kan publicéres i et indlejret kortvindue uden begrænsninger på brug"
}
},
"tooltip": {
"type-base": "Baggrundskort",
"type-wms": "Kortlag",
"type-wfs": "Dataprodukt"
}
}
}
}
);
|
import React, {Component} from 'react';
class SearchBar extends Component{
constructor(props){
super(props);
this.state ={
term: ''
};
}
render() {
return (
<div className="search-bar">
<input
value={this.state.term}
onChange={(event)=> this.onInputChange(event.target.value)} />
</div>
)
}
onInputChange(term) {
this.setState({term});
this.props.onSearchTermChange(term);
}
}
export default SearchBar;
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.BootstrapConfig = exports.TypeaheadHighlightValueConverter = exports.AubsTypeaheadCustomElement = exports.AubsTooltipCustomAttribute = exports.AubsTabsetCustomElement = exports.AubsTabCustomElement = exports.AubsPopoverCustomAttribute = exports.AubsPaginationCustomElement = exports.AubsDropdownToggleCustomAttribute = exports.AubsDropdownCustomAttribute = exports.AubsCollapseCustomAttribute = exports.AubsBtnRadioCustomAttribute = exports.AubsBtnLoadingCustomAttribute = exports.AubsBtnCheckboxCustomAttribute = exports.AubsAccordionGroupCustomElement = exports.AubsAccordionCustomElement = undefined;
exports.configure = configure;
var _aureliaPal = require("aurelia-pal");
var _aubsAccordion = require("./accordion/aubs-accordion");
var _aubsAccordionGroup = require("./accordion/aubs-accordion-group");
var _aubsBtnCheckbox = require("./buttons/aubs-btn-checkbox");
var _aubsBtnLoading = require("./buttons/aubs-btn-loading");
var _aubsBtnRadio = require("./buttons/aubs-btn-radio");
var _aubsCollapse = require("./collapse/aubs-collapse");
var _aubsDropdown = require("./dropdown/aubs-dropdown");
var _aubsDropdownToggle = require("./dropdown/aubs-dropdown-toggle");
var _aubsPagination = require("./pagination/aubs-pagination");
var _aubsPopover = require("./popover/aubs-popover");
var _aubsTab = require("./tabs/aubs-tab");
var _aubsTabset = require("./tabs/aubs-tabset");
var _aubsTooltip = require("./tooltip/aubs-tooltip");
var _aubsTypeahead = require("./typeahead/aubs-typeahead");
var _typeaheadHighlight = require("./typeahead/typeahead-highlight");
var _bootstrapConfig = require("./utils/bootstrap-config");
function configure(aurelia, callback) {
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./accordion/aubs-accordion'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./accordion/aubs-accordion-group'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./buttons/aubs-btn-checkbox'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./buttons/aubs-btn-loading'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./buttons/aubs-btn-radio'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./collapse/aubs-collapse'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./dropdown/aubs-dropdown'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./dropdown/aubs-dropdown-toggle'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./pagination/aubs-pagination'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./popover/aubs-popover'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./tabs/aubs-tab'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./tabs/aubs-tabset'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./tooltip/aubs-tooltip'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./typeahead/aubs-typeahead'));
aurelia.globalResources(_aureliaPal.PLATFORM.moduleName('./typeahead/typeahead-highlight'));
var config = new _bootstrapConfig.BootstrapConfig();
if (typeof callback === 'function') {
callback(config);
}
}
exports.AubsAccordionCustomElement = _aubsAccordion.AubsAccordionCustomElement;
exports.AubsAccordionGroupCustomElement = _aubsAccordionGroup.AubsAccordionGroupCustomElement;
exports.AubsBtnCheckboxCustomAttribute = _aubsBtnCheckbox.AubsBtnCheckboxCustomAttribute;
exports.AubsBtnLoadingCustomAttribute = _aubsBtnLoading.AubsBtnLoadingCustomAttribute;
exports.AubsBtnRadioCustomAttribute = _aubsBtnRadio.AubsBtnRadioCustomAttribute;
exports.AubsCollapseCustomAttribute = _aubsCollapse.AubsCollapseCustomAttribute;
exports.AubsDropdownCustomAttribute = _aubsDropdown.AubsDropdownCustomAttribute;
exports.AubsDropdownToggleCustomAttribute = _aubsDropdownToggle.AubsDropdownToggleCustomAttribute;
exports.AubsPaginationCustomElement = _aubsPagination.AubsPaginationCustomElement;
exports.AubsPopoverCustomAttribute = _aubsPopover.AubsPopoverCustomAttribute;
exports.AubsTabCustomElement = _aubsTab.AubsTabCustomElement;
exports.AubsTabsetCustomElement = _aubsTabset.AubsTabsetCustomElement;
exports.AubsTooltipCustomAttribute = _aubsTooltip.AubsTooltipCustomAttribute;
exports.AubsTypeaheadCustomElement = _aubsTypeahead.AubsTypeaheadCustomElement;
exports.TypeaheadHighlightValueConverter = _typeaheadHighlight.TypeaheadHighlightValueConverter;
exports.BootstrapConfig = _bootstrapConfig.BootstrapConfig;
|
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Filme Schema
*/
var FilmeSchema = new Schema({
// Filme model fields
// ...
titulo:{
type:String,
required:'titulo necessario'
},
sinopse:{
type:String
},
categoria:{
type:Schema.ObjectId,
ref:'Category'
},
actorPrincipal:{
type:Schema.ObjectId,
ref:'User'
},
autor:{
type:Schema.ObjectId,
ref:'User'
}
});
mongoose.model('Filme', FilmeSchema);
|
import React from 'react';
import App from './App';
require("./main.scss");
React.render(<App />, document.getElementById('root'));
|
var gulp = require('gulp');
var rev = require('gulp-date-rev');
var buffer = require('gulp-buffer');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
const distJS = 'dist';
gulp.task('default', function () {
var b = browserify('index.js');
return b.bundle()
.pipe(source('index.js'))
.pipe(buffer())
.pipe(rev(distJS))
.pipe(gulp.dest(distJS));
});
|
/* */
'use strict';
var expand = require('./lib/expand');
var utils = require('./lib/utils');
function micromatch(files, patterns, opts) {
if (!files || !patterns)
return [];
opts = opts || {};
if (typeof opts.cache === 'undefined') {
opts.cache = true;
}
if (!Array.isArray(patterns)) {
return match(files, patterns, opts);
}
var len = patterns.length,
i = 0;
var omit = [],
keep = [];
while (len--) {
var glob = patterns[i++];
if (typeof glob === 'string' && glob.charCodeAt(0) === 33) {
omit.push.apply(omit, match(files, glob.slice(1), opts));
} else {
keep.push.apply(keep, match(files, glob, opts));
}
}
return utils.diff(keep, omit);
}
function match(files, pattern, opts) {
if (utils.typeOf(files) !== 'string' && !Array.isArray(files)) {
throw new Error(msg('match', 'files', 'a string or array'));
}
files = utils.arrayify(files);
opts = opts || {};
var negate = opts.negate || false;
var orig = pattern;
if (typeof pattern === 'string') {
negate = pattern.charAt(0) === '!';
if (negate) {
pattern = pattern.slice(1);
}
if (opts.nonegate === true) {
negate = false;
}
}
var _isMatch = matcher(pattern, opts);
var len = files.length,
i = 0;
var res = [];
while (i < len) {
var file = files[i++];
var fp = utils.unixify(file, opts);
if (!_isMatch(fp)) {
continue;
}
res.push(fp);
}
if (res.length === 0) {
if (opts.failglob === true) {
throw new Error('micromatch.match() found no matches for: "' + orig + '".');
}
if (opts.nonull || opts.nullglob) {
res.push(utils.unescapeGlob(orig));
}
}
if (negate) {
res = utils.diff(files, res);
}
if (opts.ignore && opts.ignore.length) {
pattern = opts.ignore;
opts = utils.omit(opts, ['ignore']);
res = utils.diff(res, micromatch(res, pattern, opts));
}
if (opts.nodupes) {
return utils.unique(res);
}
return res;
}
function filter(patterns, opts) {
if (!Array.isArray(patterns) && typeof patterns !== 'string') {
throw new TypeError(msg('filter', 'patterns', 'a string or array'));
}
patterns = utils.arrayify(patterns);
var len = patterns.length,
i = 0;
var patternMatchers = Array(len);
while (i < len) {
patternMatchers[i] = matcher(patterns[i++], opts);
}
return function(fp) {
if (fp == null)
return [];
var len = patternMatchers.length,
i = 0;
var res = true;
fp = utils.unixify(fp, opts);
while (i < len) {
var fn = patternMatchers[i++];
if (!fn(fp)) {
res = false;
break;
}
}
return res;
};
}
function isMatch(fp, pattern, opts) {
if (typeof fp !== 'string') {
throw new TypeError(msg('isMatch', 'filepath', 'a string'));
}
fp = utils.unixify(fp, opts);
if (utils.typeOf(pattern) === 'object') {
return matcher(fp, pattern);
}
return matcher(pattern, opts)(fp);
}
function contains(fp, pattern, opts) {
if (typeof fp !== 'string') {
throw new TypeError(msg('contains', 'pattern', 'a string'));
}
opts = opts || {};
opts.contains = (pattern !== '');
fp = utils.unixify(fp, opts);
if (opts.contains && !utils.isGlob(pattern)) {
return fp.indexOf(pattern) !== -1;
}
return matcher(pattern, opts)(fp);
}
function any(fp, patterns, opts) {
if (!Array.isArray(patterns) && typeof patterns !== 'string') {
throw new TypeError(msg('any', 'patterns', 'a string or array'));
}
patterns = utils.arrayify(patterns);
var len = patterns.length;
fp = utils.unixify(fp, opts);
while (len--) {
var isMatch = matcher(patterns[len], opts);
if (isMatch(fp)) {
return true;
}
}
return false;
}
function matchKeys(obj, glob, options) {
if (utils.typeOf(obj) !== 'object') {
throw new TypeError(msg('matchKeys', 'first argument', 'an object'));
}
var fn = matcher(glob, options);
var res = {};
for (var key in obj) {
if (obj.hasOwnProperty(key) && fn(key)) {
res[key] = obj[key];
}
}
return res;
}
function matcher(pattern, opts) {
if (typeof pattern === 'function') {
return pattern;
}
if (pattern instanceof RegExp) {
return function(fp) {
return pattern.test(fp);
};
}
if (typeof pattern !== 'string') {
throw new TypeError(msg('matcher', 'pattern', 'a string, regex, or function'));
}
pattern = utils.unixify(pattern, opts);
if (!utils.isGlob(pattern)) {
return utils.matchPath(pattern, opts);
}
var re = makeRe(pattern, opts);
if (opts && opts.matchBase) {
return utils.hasFilename(re, opts);
}
return function(fp) {
fp = utils.unixify(fp, opts);
return re.test(fp);
};
}
function toRegex(glob, options) {
var opts = Object.create(options || {});
var flags = opts.flags || '';
if (opts.nocase && flags.indexOf('i') === -1) {
flags += 'i';
}
var parsed = expand(glob, opts);
opts.negated = opts.negated || parsed.negated;
opts.negate = opts.negated;
glob = wrapGlob(parsed.pattern, opts);
var re;
try {
re = new RegExp(glob, flags);
return re;
} catch (err) {
err.reason = 'micromatch invalid regex: (' + re + ')';
if (opts.strict)
throw new SyntaxError(err);
}
return /$^/;
}
function wrapGlob(glob, opts) {
var prefix = (opts && !opts.contains) ? '^' : '';
var after = (opts && !opts.contains) ? '$' : '';
glob = ('(?:' + glob + ')' + after);
if (opts && opts.negate) {
return prefix + ('(?!^' + glob + ').*$');
}
return prefix + glob;
}
function makeRe(glob, opts) {
if (utils.typeOf(glob) !== 'string') {
throw new Error(msg('makeRe', 'glob', 'a string'));
}
return utils.cache(toRegex, glob, opts);
}
function msg(method, what, type) {
return 'micromatch.' + method + '(): ' + what + ' should be ' + type + '.';
}
micromatch.any = any;
micromatch.braces = micromatch.braceExpand = utils.braces;
micromatch.contains = contains;
micromatch.expand = expand;
micromatch.filter = filter;
micromatch.isMatch = isMatch;
micromatch.makeRe = makeRe;
micromatch.match = match;
micromatch.matcher = matcher;
micromatch.matchKeys = matchKeys;
module.exports = micromatch;
|
import React from 'react';
import { shallow } from 'enzyme';
import AutoComplete from '../../../components/autoComplete/autoComplete';
import AutoCompleteItem from '../../../components/autoComplete/autoCompleteItem';
describe('Input: ref', () => {
it('should determine ref for item', () => {
const element = {};
const component = shallow(
<AutoComplete
name="autocomplete"
>
<AutoCompleteItem
value="value"
>
item
</AutoCompleteItem>
</AutoComplete>
);
component.instance().initItemRef(0)(element);
expect(component.instance().items[0]).toEqual(element);
});
});
|
// The server port - the port to run Pokemon Showdown under
exports.port = 8000;
// The server id - the id specified in the server registration.
// This should be set properly especially when there are more than one
// pokemon showdown server running from the same IP
exports.serverId = 'universal';
// proxyIps - proxy IPs with trusted X-Forwarded-For headers
// This can be either false (meaning not to trust any proxies) or an array
// of strings. Each string should be either an IP address or a subnet given
// in CIDR notation. You should usually leave this as `false` unless you
// know what you are doing.
exports.proxyIps = false;
// Pokemon of the Day - put a pokemon's name here to make it Pokemon of the Day
// The PotD will always be in the #2 slot (not #1 so it won't be a lead)
// in every Random Battle team.
exports.potd = '';
// login server data - don't change these unless you know what you're doing
exports.loginServer = {
uri: 'http://play.pokemonshowdown.com/',
keyAlgorithm: 'RSA-SHA1',
publicKeyId: 2,
publicKey: '-----BEGIN RSA PUBLIC KEY-----\n' +
'MIICCgKCAgEAtFldA2rTCsPgqsp1odoH9vwhf5+QGIlOJO7STyY73W2+io33cV7t\n' +
'ReNuzs75YBkZ3pWoDn2be0eb2UqO8dM3xN419FdHNORQ897K9ogoeSbLNQwyA7XB\n' +
'N/wpAg9NpNu00wce2zi3/+4M/2H+9vlv2/POOj1epi6cD5hjVnAuKsuoGaDcByg2\n' +
'EOullPh/00TkEkcyYtaBknZpED0lt/4ekw16mjHKcbo9uFiw+tu5vv7DXOkfciW+\n' +
'9ApyYbNksC/TbDIvJ2RjzR9G33CPE+8J+XbS7U1jPvdFragCenz+B3AiGcPZwT66\n' +
'dvHAOYRus/w5ELswOVX/HvHUb/GRrh4blXWUDn4KpjqtlwqY4H2oa+h9tEENCk8T\n' +
'BWmv3gzGBM5QcehNsyEi9+1RUAmknqJW0QOC+kifbjbo/qtlzzlSvtbr4MwghCFe\n' +
'1EfezeNAtqwvICznq8ebsGETyPSqI7fSbpmVULkKbebSDw6kqDnQso3iLjSX9K9C\n' +
'0rwxwalCs/YzgX9Eq4jdx6yAHd7FNGEx4iu8qM78c7GKCisygZxF8kd0B7V7a5UO\n' +
'wdlWIlTxJ2dfCnnJBFEt/wDsL54q8KmGbzOTvRq5uz/tMvs6ycgLVgA9r1xmVU+1\n' +
'6lMr2wdSzyG7l3X3q1XyQ/CT5IP4unFs5HKpG31skxlfXv5a7KW5AfsCAwEAAQ==\n' +
'-----END RSA PUBLIC KEY-----\n'
};
// crashGuardEmail - if the server has been running for more than an hour
// and crashes, send an email using these settings, rather than locking down
// the server. Uncomment this definition if you wan to use this feature;
// otherwise, all crashes will lock down the server.
/**exports.crashGuardEmail = {
transport: 'SMTP',
options: {
host: 'mail.example.com',
port: 465,
secureConnection: true,
maxConnections: 1,
auth: {
user: 'example@domain.com',
pass: 'password'
}
},
from: 'crashlogger@example.com',
to: 'admin@example.com',
subject: "Pokemon Showdown has crashed!"
};**/
// report joins and leaves - shows messages like "<USERNAME> joined"
// Join and leave messages are small and consolidated, so there will never
// be more than one line of messages.
// This feature can lag larger servers - turn this off if your server is
// getting more than 80 or so users.
exports.reportJoins = true;
// report battles - shows messages like "OU battle started" in the lobby
// This feature can lag larger servers - turn this off if your server is
// getting more than 160 or so users.
exports.reportBattles = true;
// moderated chat - prevent unvoiced users from speaking
// This should only be enabled in special situations, such as temporarily
// when you're dealing with huge influxes of spammy users.
exports.modchat = {
chat: false,
battle: false,
pm: false
};
// backdoor - allows Pokemon Showdown system operators to provide technical
// support for your server
// This backdoor gives system operators (such as Zarel) console admin
// access to your server, which allow them to provide tech support. This
// can be useful in a variety of situations: if an attacker attacks your
// server and you are not online, if you need help setting up your server,
// etc. If you do not trust Pokemon Showdown with admin access, you should
// disable this feature.
exports.backdoor = true;
// List of IPs from which the dev console (>> and >>>) can be used.
// The console is incredibly powerful because it allows the execution of
// arbitrary commands on the local computer (as the user running the
// server). If an account with the console permission were compromised,
// it could possibly be used to take over the server computer. As such,
// you should only specify a small range of trusted IPs here, or none
// at all. By default, only localhost can use the dev console.
// In addition to connecting from a valid IP, a user must *also* have
// the `console` permission in order to use the dev console.
// Setting this to an empty array ([]) will disable the dev console.
exports.consoleIps = ['127.0.0.1'];
// Whether to watch the config file for changes. If this is enabled,
// then the config.js file will be reloaded when it is changed.
// This can be used to change some settings using a text editor on
// the server.
exports.watchConfig = true;
// logChat - whether to log chat rooms.
exports.logChat = false;
// logUserStats - how often (in milliseconds) to write user stats to the
// lobby log. This has no effect if `logchat` is disabled.
exports.logUserStats = 1000*60*10; // 10 minutes
// validatorProcesses - the number of processes to use for validating teams
// simulatorProcesses - the number of processes to use for handling battles
// You should leave both of these at 1 unless your server has a very large
// amount of traffic (i.e. hundreds of concurrent battles).
exports.validatorProcesses = 1;
exports.simulatorProcesses = 1;
// inactiveUserThreshold - how long a user must be inactive before being pruned
// from the `users` array. The default is 1 hour.
exports.inactiveUserThreshold = 1000*60*60;
// Set this to true if you are using Pokemon Showdown on Heroku.
exports.herokuHack = false;
// Custom avatars.
// This allows you to specify custom avatar images for users on your server.
// Place custom avatar files under the /config/avatars/ directory.
// Users must be specified as userids -- that is, you must make the name all
// lowercase and remove non-alphanumeric characters.
//
// Your server *must* be registered in order for your custom avatars to be
// displayed in the client.
exports.customAvatars = {
//'userid': 'customavatar.png'
};
// appealUri - specify a URI containing information on how users can appeal
// disciplinary actions on your section. You can also leave this blank, in
// which case users won't be given any information on how to appeal.
exports.appealUri = '';
// Symbols, Groups and Permissions
// mutedSymbol - The symbol representing a muted user.
// lockedSymbol - The symbol representing a locked user.
// groups - {
// global - All the possible global groups.
// chatRoom - All the possible chat room groups.
// battleRoom - All the possible battle room groups.
// default - {
// global - The default global group.
// chatRoom - The default chat room group.
// battleRoom - The default battle room group.
// }
// byRank - All the possible groups arranged in ascending order of rank.
// bySymbol - The main defining area for the groups and permissions, which will be outlined below.
// }
// Each entry in `groups.bySymbol` is a separate group. Some of the members are "special"
// while the rest are just normal permissions.
// The special members are as follows:
// - id: Specifies an id for the group.
// - name: Specifies the human-readable name for the group.
// - description: Specifies a description for the group.
// - root: If this is true, the group can do anything.
// - inherit: The group uses the group specified's permissions if it cannot
// find the permission in the current group. Never make the graph
// produced using this member have any cycles, or the server won't run.
// - jurisdiction: The default jurisdiction for targeted permissions where one isn't
// explictly specified. "Targeted permissions" are permissions
// that might affect another user, such as `ban' or `promote'.
// 's' is a special group where it means the user itself only
// and 'u' is another special group where it means all groups
// lower in rank than the current group.
// All the possible permissions are as follows:
// - alts: Ability to check alts.
// - announce: /announce command.
// - ban: Banning and unbanning.
// - banword: Banning and unbanning words to be used in usernames.
// - broadcast: Broadcast informational commands.
// - bypassblocks: Bypass blocks such as your challenge being blocked.
// - console: Developer console (also requires IP or userid in the `consoleIps` array).
// - declare: /declare command.
// - disableladder: /disableladder and /enable ladder commands.
// - forcepromote: Ability to promote a user even if they're offline and unauthed.
// - forcerename: /forcerename command.
// - forcewin: /forcewin command.
// - gdeclare: /gdeclare and /cdeclare commands.
// - hotpatch: /hotpatch, /updateserver and /crashfixed commands. Also used to identify an admin.
// - ignorelimits: Ignore limits such as chat message length.
// - ip: Ability to check IPs.
// - joinbattle: Ability to join an existing battle as a player.
// - kick: /kickbattle command.
// - lock: Locking and unlocking.
// - lockdown: /lockdown, /endlockdown and /kill commands.
// - makeroom: Permission required to create, delete and administer chat rooms.
// - modchat: Set modchat to the second lowest ranked group.
// - modchatall: Set modchat to all available groups.
// - mute: Muting and unmuting.
// - potd: Set the Pokemon of the Day.
// - privateroom: /privateroom and /modjoin commands.
// - promote: Global promoting and demoting. Will only work if both to and from groups are in jurisdiction.
// - rangeban: /ipban command.
// - rawpacket: Ability to add a raw packet into the room's packet log.
// - redirect: /redir command.
// - refreshpage: /refreshpage command.
// - roomdesc: Ability to change the room description.
// - roompromote: Room counterpart to the global `promote` permission.
// - staff: Indicates a staff member.
// - timer: Ability to forcibly start and stop the inactive timer in battle rooms with the /timer command.
// - warn: /warn command.
exports.mutedSymbol = '!';
exports.lockedSymbol = '\u203d';
exports.groups = {
global: {' ': 1, '+': 1,'✯': 1, '✡': 1, '☭': 1, '%': 1, '@': 1, '&': 1, '~': 1},
chatRoom: {' ': 1, '+': 1, '%': 1, '@': 1, '#': 1},
battleRoom: {' ': 1, '+': 1, '\u2605': 1},
default: {
global: ' ',
chatRoom: ' ',
battleRoom: ' '
},
byRank: [' ', '+','✯', '✡', '☭', '%', '@', '\u2605', '#', '&', '~'],
bySymbol: {
'~': {
id: 'admin',
name: "Administrator",
description: "They can do anything, like change what this message says",
root: true
},
'&': {
id: 'leader',
name: "Leader",
description: "They can promote to moderator and force ties",
inherit: '@',
jurisdiction: '@u',
banword: true,
declare: true,
disableladder: true,
forcewin: true,
modchatall: true,
potd: true,
promote: 'u',
rangeban: true
},
'#': {
id: 'owner',
name: "Owner",
description: "They are administrators of the room and can almost totally control it",
inherit: '@',
jurisdiction: 'u',
declare: true,
modchatall: true,
privateroom: true,
roomdesc: true,
roompromote: 'u'
},
'\u2605': {
id: 'player',
name: "Player",
description: "Only in battles, they are the players that are battling",
inherit: '+',
modchat: true,
privateroom: true,
roompromote: 'u'
},
'@': {
id: 'mod',
name: "Moderator",
description: "They can ban users and set modchat",
inherit: '%',
jurisdiction: 'u',
alts: '@u',
ban: true,
forcerename: true,
ip: true,
modchat: true,
roompromote: '+ ',
scavengers: true
},
'%': {
id: 'driver',
name: "Driver",
description: "They can mute. Global % can also lock and check users for alts",
inherit: '+',
jurisdiction: 'u',
alts: '%u',
announce: true,
bypassblocks: 'u%@&~',
forcerename: true,
kick: true,
lock: true,
mute: true,
redirect: true,
staff: true,
timer: true,
warn: true
},
'☭': {
id: 'donor',
name: "Donor",
description: "They have bought this rank using real money ($3)",
inherit: '✡',
},
'✡': {
id: 'trainer',
name: "Trainer",
description: "They have bought this rank using real money ($2)",
inherit: '✯',
},
'✯': {
id: 'rookie',
name: "Rookie",
description: "They have bought this rank using real money ($1)",
inherit: '+',
},
'+': {
id: 'voice',
name: "Voice",
description: "They can use ! commands like !groups, and talk during moderated chat",
inherit: ' ',
broadcast: true,
joinbattle: true,
tournaments: true
},
' ': {
alts: 's',
ip: 's'
}
}
};
exports.groups.globalByRank = exports.groups.byRank.filter(function (a) { return exports.groups.global[a]; });
exports.groups.chatRoomByRank = exports.groups.byRank.filter(function (a) { return exports.groups.chatRoom[a]; });
exports.groups.battleRoomByRank = exports.groups.byRank.filter(function (a) { return exports.groups.battleRoom[a]; });
exports.groups.byId = {};
exports.groups.byRank.forEach(function (group, rank) {
var groupData = exports.groups.bySymbol[group];
if (groupData.id) exports.groups.byId[groupData.id] = group;
groupData.rank = rank;
});
exports.groups.globalByRank.forEach(function (group, rank) { exports.groups.bySymbol[group].globalRank = rank; });
exports.groups.chatRoomByRank.forEach(function (group, rank) { exports.groups.bySymbol[group].chatRoomRank = rank; });
exports.groups.battleRoomByRank.forEach(function (group, rank) { exports.groups.bySymbol[group].battleRoomRank = rank; });
|
GNATdoc.EntitiesCategory = {
"label": "Simple Types",
"entities": [
{
"label": "Notify_Urgency",
"docHref": "docs/notify.notification.html#L50C9",
"declared": "Notify.Notification",
"srcHref": "srcs/notify-notification.ads.html#L50"
}
]
};
|
"use babel";
import ActionComponent from '../../lib/views/action-component';
import PullRequest, {State} from '../../lib/models/pull-request';
import Repository from '../../lib/models/repository';
import demoTransport from '../../lib/transport/demo';
describe("ActionComponent", () => {
let r, component, root;
beforeEach(() => {
r = new Repository(".", demoTransport);
});
let withPRState = (state) => {
let pr = new PullRequest(r);
pr.state = state;
component = new ActionComponent({pullRequest: pr});
root = component.element;
}
describe("button visibility", () => {
it("shows a spinner while busy", () => {
withPRState(State.BUSY);
expect(root.querySelector(".loading")).not.toBe(null);
});
it("shows a create button in DRAFT", () => {
withPRState(State.DRAFT);
expect(component.refs.createButton).not.toBe(null);
let button = root.querySelector(".btn");
expect(button.innerHTML).toBe("Create");
});
it("shows close and merge buttons in OPEN", () => {
withPRState(State.OPEN);
expect(component.refs.closeButton).not.toBe(null);
let buttons = Array.prototype.slice.call(root.querySelectorAll(".btn"));
let buttonsText = buttons.map((e) => e.innerHTML);
expect(buttonsText.indexOf("Close")).not.toBe(-1);
expect(buttonsText.indexOf("Merge")).not.toBe(-1);
});
it("shows a reopen button in CLOSED", () => {
withPRState(State.CLOSED);
expect(component.refs.reopenButton).not.toBe(null);
let button = root.querySelector(".btn");
expect(button.innerHTML).toBe("Reopen");
});
});
});
|
/**
* Created by out_xu on 17/4/8.
*/
import React, { Component } from 'react'
import { Button, Col, Form, Icon, Input, InputNumber, Modal, Radio, Row, Spin, Switch, Tag } from 'antd'
import { Link } from 'react-router'
import QueueAnim from 'rc-queue-anim'
import { goto } from 'utils'
import './index.less'
const FormItem = Form.Item
const RadioGroup = Radio.Group
const confirm = Modal.confirm
// TODO 描述输出修改无效
let uuid = 0
@Form.create()
class ProblemEdit extends Component {
constructor (props) {
super(props)
this.state = {
password: ''
}
this.handleChange = this.handleChange.bind(this)
this.handleAdd = this.handleAdd.bind(this)
}
componentDidMount () {
this.props.params.id ? this.props.getProblemInfo(this.props.params) : this.props.clearProblem()
}
handleChange (e) {
e.preventDefault()
this.props.form.validateFieldsAndScroll(async (err, value) => {
if (!err) {
let input = []
let output = []
Object.keys(value).forEach(key => {
if (key.match(/^test_output?/)) {
output.push(value[key])
}
if (key.match(/^test_input?/)) {
input.push(value[key])
}
})
let test_data = []
for (let i = 0; i < input.length; i++) {
let item = {
input: input[i],
output: output[i]
}
test_data.push(item)
}
const {title, description, sample_input, sample_output, difficulty, source, time_limit, memory_limit, spj, is_public, hint} = value
const body = {
title: title,
input: value.input,
output: value.output,
description: description,
sample_input: sample_input,
sample_output: sample_output,
difficulty: difficulty,
source: source,
time_limit: time_limit,
memory_limit: memory_limit,
spj: spj,
is_public: is_public,
hint: hint,
test_data: test_data
}
console.log(JSON.stringify(body))
const id = this.props.params.id
await this.props.changeProblem(id, body)
await this.props.getProblemInfo(this.props.params)
}
})
}
handleAdd (e) {
e.preventDefault()
this.props.form.validateFieldsAndScroll((err, value) => {
if (!err) {
confirm({
title: '确认提交?',
content: '请认真审核信息,确认无错误时再提交!',
onOk: async () => {
let input = []
let output = []
Object.keys(value).forEach(key => {
if (key.match(/^test_output?/)) {
output.push(value[key])
}
if (key.match(/^test_input?/)) {
input.push(value[key])
}
})
let test_data = []
for (let i = 0; i < input.length; i++) {
let item = {
input: input[i],
output: output[i]
}
test_data.push(item)
}
const {title, description, sample_input, sample_output, difficulty, source, time_limit, memory_limit, spj, is_public, hint} = value
const body = {
title: title,
input: value.input,
output: value.output,
description: description,
sample_input: sample_input,
sample_output: sample_output,
difficulty: difficulty,
source: source,
time_limit: time_limit,
memory_limit: memory_limit,
spj: spj,
is_public: is_public,
hint: hint,
test_data: test_data
}
console.log(body)
await this.props.createProblems(body)
}
})
}
})
}
onConfirmDel = (e) => {
e.preventDefault()
confirm({
title: '是否决定要删除?删除后无法恢复!',
content: (
<Input
type='password'
onChange={(e) => this.setState({password: e.target.value})}
placeholder='请输入您的登录密码'
/>
),
onOk: async () => {
await this.props.deleteProblem(this.props.params.id, {password: this.state.password})
goto('/admin/problem-list')
}
})
}
add = () => {
uuid++
const {form} = this.props
// can use data-binding to get
const keys = form.getFieldValue('keys')
const nextKeys = keys.concat(uuid)
// can use data-binding to set
// important! notify form to detect changes
form.setFieldsValue({
keys: nextKeys,
})
}
remove = (k) => {
const {form} = this.props
// can use data-binding to get
const keys = form.getFieldValue('keys')
// We need at least one passenger
if (keys.length === 0) {
return
}
// can use data-binding to set
form.setFieldsValue({
keys: keys.filter(key => key !== k),
})
}
render () {
const {problems: {problemDetail: data}, params: {id}, loading} = this.props
const {getFieldDecorator} = this.props.form
const formItemLayout = {}
const {getFieldValue} = this.props.form
getFieldDecorator('keys', {initialValue: []})
const keys = getFieldValue('keys')
const formItems = keys.map((k, index) => {
console.log(k)
return (
<div key={k}>
<hr style={{border: '1px solid #E0E0E0'}} />
<br />
<FormItem
{...formItemLayout}
label={'测试输入 ' + (index + 2)}
key={'test-input' + (k + 2)}
>
{getFieldDecorator('test_input#' + (k + 2), {
rules: [{required: false, message: '请输入测试输入'}],
initialValue: data['title'] ? data.test_input : ''
})(
<Input placeholder='用于判题的样例输入' type='textarea'
autosize={{minRows: 2}} />
)}
</FormItem>
<FormItem
{...formItemLayout}
label={'测试输出 ' + (index + 2)}
key={'test-output' + (k + 2)}
>
{getFieldDecorator('test_output#' + (k + 2), {
rules: [{required: true, message: '请输入测试输出'}],
initialValue: data['title'] ? data.test_output : ''
})(
<Input placeholder='用于判题的样例输出' type='textarea'
autosize={{minRows: 2}} />
)}
</FormItem>
{keys.length > 0 ? (
<Icon
className="dynamic-delete-button"
type="minus-circle-o"
disabled={keys.length === 1}
onClick={() => this.remove(k)}
/>
) : null}
</div>
)
})
return (
<Spin tip='loading' spinning={loading} key={id}>
<QueueAnim className='problem-edit'>
<div className='h-1' key='problem-edit-header'>
{id ? <span><Link to='admin/contest-list'>修改题目</Link> #{id}</span> : '添加题目'}
{id && <Link to={`/admin/problem-run-data?id=` + id} style={{marginLeft: 10}}><Tag color='blue'>管理测试数据</Tag></Link>}
</div>
<div className='problem-edit-content' key='problem-edit-content'>
<Form
onSubmit={this.handleSubmit}
layout='vertical'
key={'problem-edit-content-' + id}
>
<FormItem
{...formItemLayout}
label='标题'
>
{getFieldDecorator('title', {
rules: [{required: true, message: '请输入标题'}],
initialValue: data['title'] ? data.title : ''
})(
<Input placeholder='请输入标题' type='textarea' autosize={{minRows: 1, maxRows: 6}} />
)}
</FormItem>
<FormItem
{...formItemLayout}
label='描述'
>
{getFieldDecorator('description', {
rules: [{required: true, message: '请输入描述'}],
initialValue: data['title'] ? data.description : ''
})(
<Input
placeholder='请输入描述,支持 Markdown 语法,请在 Markdown 编辑器中编辑后粘贴' type='textarea'
autosize={{minRows: 2}}
/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label='描述输入'
>
{getFieldDecorator('input', {
rules: [{required: true, message: '请描述输入'}],
initialValue: data['title'] ? data.input : ''
})(
<Input
placeholder='描述所需的输入格式和内容' type='textarea'
autosize={{minRows: 2}}
/>
)}
</FormItem>
<FormItem
{...formItemLayout}
label='描述输出'
>
{getFieldDecorator('output', {
rules: [{required: true, message: '请描述输出'}],
initialValue: data['title'] ? data.output : ''
})(
<Input
placeholder='描述所需的输出格式和内容' type='textarea'
autosize={{minRows: 2}}
/>
)}
</FormItem>
<FormItem>
<span className='ant-form-item-required span-label'>难度</span>
{getFieldDecorator('difficulty', {
rules: [{required: true, message: '请设置题目难度'}],
initialValue: !!data['title'] && data.difficulty + ''
})(
<RadioGroup>
<Radio value='1'>简单</Radio>
<Radio value='2'>一般</Radio>
<Radio value='3'>困难</Radio>
</RadioGroup>
)}
</FormItem>
<Row>
<Col xs={{span: 24}} sm={{span: 12}} style={{textAlign: 'left'}}>
<FormItem>
<span className='ant-form-item-required span-label'>是否公开 </span>
{getFieldDecorator('is_public', {
rules: [{required: true, message: '请选择是否公开题目'}],
initialValue: true
})(
<Switch defaultChecked={true} />
)}
</FormItem>
</Col>
<Col xs={{span: 24}} sm={{span: 12}} style={{textAlign: 'left'}}>
<FormItem>
<span className='ant-form-item-required span-label'>是否特判 </span>
{getFieldDecorator('spj', {
rules: [{required: true, message: '请选择是否特判'}],
initialValue: false
})(
<Switch defaultChecked={false} />
)}
</FormItem>
</Col>
</Row>
<Row>
<Col xs={{span: 24}} sm={{span: 12}} style={{textAlign: 'left'}}>
<FormItem>
<span className='ant-form-item-required span-label'>时间限制 </span>
{getFieldDecorator('time_limit', {
rules: [{required: true, message: '请设置题目时间限制'}],
initialValue: data['title'] ? data.time_limit : null
})(
<InputNumber max={512} />
)}
<span className='ant-form-text'> S</span>
</FormItem>
</Col>
<Col xs={{span: 24}} sm={{span: 12}} style={{textAlign: 'left'}}>
<FormItem>
<span className='ant-form-item-required span-label'>内存限制 </span>
{getFieldDecorator('memory_limit', {
rules: [{required: true, message: '请设置题目时间限制'}],
initialValue: data['title'] ? data.memory_limit : null
})(
<InputNumber max={512} />
)}
<span className='ant-form-text'> MByte</span>
</FormItem>
</Col>
</Row>
<FormItem
{...formItemLayout}
label='样例输入'
>
{getFieldDecorator('sample_input', {
rules: [{required: false, message: '请输入样例输入'}],
initialValue: data['title'] ? data.sample_input : ''
})(
<Input placeholder='用于前台展示的样例输入' type='textarea'
autosize={{minRows: 2}} />
)}
</FormItem>
<FormItem
{...formItemLayout}
label='样例输出'
>
{getFieldDecorator('sample_output', {
rules: [{required: true, message: '请输入样例输出'}],
initialValue: data['title'] ? data.sample_output : ''
})(
<Input placeholder='用于前台展示的样例输出' type='textarea'
autosize={{minRows: 2}} />
)}
</FormItem>
{!id && <FormItem
{...formItemLayout}
label='测试输入 1'
key={'test-input1'}
>
{getFieldDecorator('test_input#1', {
rules: [{required: false, message: '请输入测试输入'}],
initialValue: data['title'] ? data.test_input : ''
})(
<Input placeholder='用于判题的样例输入' type='textarea'
autosize={{minRows: 2}} />
)}
</FormItem>
}
{!id && <FormItem
{...formItemLayout}
label='测试输出 1'
key={'test-output1'}
>
{getFieldDecorator('test_output#1', {
rules: [{required: true, message: '请输入测试输出'}],
initialValue: data['title'] ? data.test_output : ''
})(
<Input placeholder='用于判题的样例输出' type='textarea'
autosize={{minRows: 2}} />
)}
</FormItem>}
{!id && formItems}
<br />
{!id && <FormItem {...formItemLayout}>
<Button type="dashed" onClick={this.add} style={{width: '60%'}}>
<Icon type="plus" /> 增加测试数据
</Button>
</FormItem>}
<FormItem
{...formItemLayout}
label='来源'
>
{getFieldDecorator('source', {
rules: [{required: false, message: '可输入来源'}],
initialValue: data['title'] ? data.source : ''
})(
<Input placeholder='可输入来源' type='textarea'
autosize={{minRows: 1}} />
)}
</FormItem>
<FormItem
{...formItemLayout}
label='提示'
>
{getFieldDecorator('hint', {
rules: [{required: false, message: '请输入提示'}],
initialValue: data['title'] ? data.hint : ''
})(
<Input placeholder='可输入提示' type='textarea'
autosize={{minRows: 1}} />
)}
</FormItem>
<FormItem>
<Button className='contest-edit-submit' size='large' type='primary'
onClick={id ? this.handleChange : this.handleAdd}>
{id ? '修改题目' : '添加题目'}
</Button>
{
id &&
<Button type='danger' size='large' style={{marginLeft: 10}}
onClick={this.onConfirmDel}>删除题目</Button>
}
</FormItem>
</Form>
</div>
</QueueAnim>
</Spin>
)
}
}
export default ProblemEdit
|
Posts = new Meteor.Collection('posts');
Posts.allow({
update: ownsDocument,
remove: ownsDocument
});
Posts.deny({
update: function(userId, post, fieldNames) {
// may only edit the following two fields:
return (_.without(fieldNames, 'url', 'title').length > 0);
}
});
Meteor.methods({
post: function(postAttributes) {
//console.log('In the post function');
var user = Meteor.user(),
postWithSameLink = Posts.findOne({url: postAttributes.url});
// ensure the user is logged in
if (!user)
throw new Meteor.Error(401, "You need to login to post new stories");
// ensure the post has a title
if (!postAttributes.title)
throw new Meteor.Error(422, 'Please fill in a headline');
// check that there are no previous posts with the same link
if (postAttributes.url && postWithSameLink) {
throw new Meteor.Error(302,
'This link has already been posted',
postWithSameLink._id);
}
// pick out the whitelisted keys
var post = _.extend(_.pick(postAttributes, 'url', 'title', 'message'), {
userId: user._id,
author: user.username,
content: '',
imgUrl: '',
submitted: new Date().getTime(),
commentsCount: 0,
upvoters: [],
votes: 0
});
var postId = Posts.insert(post);
return postId;
},
upvote: function(postId) {
var user = Meteor.user();
// ensure the user is logged in
if (!user)
{
throw new Meteor.Error(401, "You need to login to upvote");
}
try
{
Posts.update({
_id: postId,
upvoters: {$ne: user._id}
}, {
$addToSet: {upvoters: user._id},
$inc: {votes: 1}
});
}
catch (err)
{
throw new Meteor.Error('505', "You cannot upvote your own post");
}
}
});
|
export { default } from 'ember-drop-zone/utils/get-files';
|
module.exports = require('./lib/create-app');
module.exports.createServer = require('./lib/create-server');
|
{
("use strict");
return {
setters: [function(_) {}, function(_2) {}],
execute: function() {}
};
}
|
/**
* Widget
* 只是提出一种开放平台widget组件开发和使用设想
* 具体需要根据具体业务进行修改添加代码
* $.Widget.define('invite',{
* js:[],//依赖js
* css:[],//依赖css样式表
* loginRequired: true,//是否需要登录后操作
* main: function(){}//主体函数,接收opt对象,this为promise的widget,包括了onSuccess、onCallback等事件
* //可以执行fireCallback,fireCallbackWith,fireSuccess,fireFail方法
* })
*
* $.Widget('invite', {appkey:'',appid:''}).onSuccess().onError().onCallback();
*/
MixJS.define('Widget', 'Deferred', function($) {
var widgets = {}; //widgets集合
var _loadWidgetFiles = {}; //加载过的widget文件
/**
* 注册widget
* @return {[type]} [description]
*/
function define(name, opt) {
if(typeof name === 'object') {
opt = name;
name = name.name
}
if($.isString(name) && name !== '') {
if($.isUndefined(opt) && widget[name]) {
//如果只有name参数,则认为是获取
return widgets[name];
} else if(widgets[name]) {
throw new Error('Widget.define: widget named ' + name + ' is already exist!');
}
widgets[name] = opt;
} else {
throw new Error('Widget.define: name must a string');
}
return $;
}
/**
* widget主体函数
* @param {String} name 名称
* @param {Object} opt 初始化对象
* @return {[type]} [description]
*/
function widget(name, opt) {
if(!$.isString(name)) {
//名称必须为string类型
throw new Error('Widget name must a string');
}
var config = opt || {};
var callbacks = $.getQueue(); //oncallback回调函数集合
var defer = $.Deferred();
var loadPromise;
if(!widgets[name]) {
//检测是否存在
//不存在就加载下
loadPromise = $.Deferred();
$.loadJS($.path + '/widget/' + name + '.js', function() {
loadPromise.resolve(name + ' loaded');
}, function() {
var errorMsg = 'widget ' + name + ' load error';
loadPromise.reject(errorMsg);
fail(errorMsg);
throw new Error(errorMsg);
})
}
var self = defer.promise({
//销毁函数
destroy: function() {
callbacks.disable();
callbacks = null;
for(var i in this) {
if(this.hasOwnProperty(i)) {
delete this[i];
}
}
},
//提供给main函数调用callback的hook
fireCallback: callbacks.fire,
fireCallbackWith: callbacks.fireWith,
//oncallback回调函数接口
onCallback: function() {
callbacks.add.apply(self, arguments);
return self;
},
show: function() {
if(loadPromise && loadPromise['@THEO'] === 'promise') {
loadPromise.then(load);
} else {
load();
}
return self;
}
});
self.onSuccess = defer.success
self.onFail = self.onError = defer.fail
self.fireSuccess = defer.resolve
self.fireFail = defer.reject;
//初始化
function init() {
var mainFn = widgets[name].main;
widgets[name]._status = 'loaded'
if($.isFunction(mainFn)) {
mainFn.call(self, opt);
}
}
function load() {
var wgConfig = widgets[name];
if(wgConfig.loginRequired) {
//判断是否登录,此处未完成!
}
//加载依赖的js和css文件
var len;
var js = $.isArray(wgConfig.js) ? wgConfig.js : [];
var css = $.isArray(wgConfig.css) ? wgConfig.css : [];
len = js.length + css.length;
if(len > 0 && wgConfig._status!=='loaded') {
var cb = function() {
if(--len === 0) {
init();
}
}
wgConfig._status = 'pending';
$.each(js, function(v) {
if(_loadWidgetFiles[v] === 1) {
cb();
} else {
$.loadJS(v, function() {
_loadWidgetFiles[v] = 1;
cb();
}, function() {
fail(v + ' is loaded fail!');
});
}
})
$.each(css, function(v) {
if(_loadWidgetFiles[v] === 1) {
cb();
} else {
$.loadCSS(v, function() {
_loadWidgetFiles[v] = 1;
cb();
}, function() {
fail(v + ' is loaded fail!');
});
}
}, $);
} else {
init();
}
}
function fail(msg) {
defer.reject(msg);
}
return self;
}
widget.all = function() {
var back = [];
for(var i in widgets) {
if(widgets.hasOwnProperty(i)) {
back.push(i);
}
}
return back.join(',');
}
widget.define = define
return widget;
});
|
'lang sweet.js';
import { implements, protocol } from 'sweet-interfaces';
protocol Semigroup {
// concat :: Semigroup a => a ~> a -> a
concat(b) {
return this.concat(b);
}
}
Reflect.implement(String, Semigroup);
Reflect.implement(Array, Semigroup);
Object.prototype[Semigroup.concat] = function concat(b) {
const result = {};
let k;
for (k in this) result[k] = this[k];
for (k in b) result[k] = b[k];
return result;
};
Reflect.implement(Object, Semigroup);
const concat = (a, b) => a[Semigroup.concat](b);
export { Semigroup, concat };
|
const elasticsearch = require('elasticsearch');
module.exports = class Configuration {
constructor(config) {
this.config = config;
}
async getClient() {
if (this.config.getClient) {
return this.config.getClient();
}
let args = {
hosts: this.config.connection.hosts,
apiVersion: this.config.connection.version
};
return new elasticsearch.Client(args);
}
getIndexes() {
return this.config.indexes;
}
getIndex(alias) {
return this.getIndexes().find(index => {
return index.alias === alias;
})
}
};
|
/* global app:true */
(function() {
'use strict';
app = app || {};
app.AdminGroup = Backbone.Model.extend({
idAttribute: '_id',
url: function() {
return '/admin/admin-groups/'+ this.id +'/';
}
});
app.Delete = Backbone.Model.extend({
idAttribute: '_id',
defaults: {
success: false,
errors: [],
errfor: {}
},
url: function() {
return '/admin/admin-groups/'+ app.mainView.model.id +'/';
}
});
app.Details = Backbone.Model.extend({
idAttribute: '_id',
defaults: {
success: false,
errors: [],
errfor: {},
name: ''
},
url: function() {
return '/admin/admin-groups/'+ app.mainView.model.id +'/';
},
parse: function(response) {
if (response.adminGroup) {
app.mainView.model.set(response.adminGroup);
delete response.adminGroup;
}
return response;
}
});
app.Permissions = Backbone.Model.extend({
idAttribute: '_id',
defaults: {
success: false,
errors: [],
errfor: {},
permissions: [],
newPermission: ''
},
url: function() {
return '/admin/admin-groups/'+ app.mainView.model.id +'/permissions/';
},
parse: function(response) {
if (response.adminGroup) {
app.mainView.model.set(response.adminGroup);
delete response.adminGroup;
}
return response;
}
});
app.HeaderView = Backbone.View.extend({
el: '#header',
template: _.template( $('#tmpl-header').html() ),
initialize: function() {
this.model = app.mainView.model;
this.listenTo(this.model, 'sync', this.render);
this.render();
},
render: function() {
this.$el.html(this.template( this.model.attributes ));
}
});
app.DetailsView = Backbone.View.extend({
el: '#details',
template: _.template( $('#tmpl-details').html() ),
events: {
'click .btn-update': 'update'
},
initialize: function() {
this.model = new app.Details();
this.syncUp();
this.listenTo(app.mainView.model, 'change', this.syncUp);
this.listenTo(this.model, 'sync', this.render);
this.render();
},
syncUp: function() {
this.model.set({
_id: app.mainView.model.id,
name: app.mainView.model.get('name')
});
},
render: function() {
this.$el.html(this.template( this.model.attributes ));
for (var key in this.model.attributes) {
if (this.model.attributes.hasOwnProperty(key)) {
this.$el.find('[name="'+ key +'"]').val(this.model.attributes[key]);
}
}
},
update: function() {
this.model.save({
name: this.$el.find('[name="name"]').val()
});
}
});
app.DeleteView = Backbone.View.extend({
el: '#delete',
template: _.template( $('#tmpl-delete').html() ),
events: {
'click .btn-delete': 'delete',
},
initialize: function() {
this.model = new app.Delete({ _id: app.mainView.model.id });
this.listenTo(this.model, 'sync', this.render);
this.render();
},
render: function() {
this.$el.html(this.template( this.model.attributes ));
},
delete: function() {
if (confirm('Are you sure?')) {
this.model.destroy({
success: function(model, response) {
if (response.success) {
location.href = '/admin/admin-groups/';
}
else {
app.deleteView.model.set(response);
}
}
});
}
}
});
app.PermissionsView = Backbone.View.extend({
el: '#permissions',
template: _.template( $('#tmpl-permissions').html() ),
events: {
'click .btn-add': 'add',
'click .btn-allow': 'allow',
'click .btn-deny': 'deny',
'click .btn-delete': 'delete',
'click .btn-set': 'savePermissions'
},
initialize: function() {
this.model = new app.Permissions();
this.syncUp();
this.listenTo(app.mainView.model, 'change', this.syncUp);
this.listenTo(this.model, 'sync', this.render);
this.render();
},
syncUp: function() {
this.model.set({
_id: app.mainView.model.id,
permissions: app.mainView.model.get('permissions')
});
},
render: function() {
this.$el.html(this.template( this.model.attributes ));
for (var key in this.model.attributes) {
if (this.model.attributes.hasOwnProperty(key)) {
this.$el.find('[name="'+ key +'"]').val(this.model.attributes[key]);
}
}
},
add: function() {
var newPermission = this.$el.find('[name="newPermission"]').val().trim();
if (!newPermission) {
alert('Please enter a name.');
return;
}
else {
var alreadyAdded = false;
_.each(this.model.get('permissions'), function(permission) {
if (newPermission === permission.name) {
alreadyAdded = true;
}
});
if (alreadyAdded) {
alert('That name already exists.');
return;
}
}
this.model.get('permissions').push({ name: newPermission, permit: true });
var sorted = this.model.get('permissions');
sorted.sort(function(a, b) {
return a.name.toLowerCase() > b.name.toLowerCase();
});
this.model.set('permissions', sorted);
this.render();
},
allow: function(event) {
var idx = this.$el.find('.btn-allow').index(event.currentTarget);
this.model.get('permissions')[idx].permit = true;
this.render();
},
deny: function(event) {
var idx = this.$el.find('.btn-deny').index(event.currentTarget);
this.model.get('permissions')[idx].permit = false;
this.render();
},
delete: function(event) {
if (confirm('Are you sure?')) {
var idx = this.$el.find('.btn-delete').index(event.currentTarget);
this.model.get('permissions').splice(idx, 1);
this.render();
}
},
savePermissions: function() {
this.model.save();
}
});
app.MainView = Backbone.View.extend({
el: '.page .container',
initialize: function() {
app.mainView = this;
this.model = new app.AdminGroup( JSON.parse( unescape($('#data-record').html()) ) );
app.headerView = new app.HeaderView();
app.detailsView = new app.DetailsView();
app.deleteView = new app.DeleteView();
app.permissionsView = new app.PermissionsView();
}
});
$(document).ready(function() {
app.mainView = new app.MainView();
});
}());
|
import { css } from 'styled-components';
import { stepToRem, pxToRem } from '../../../helpers/utils/typography';
import { ScreenConfig } from '../../../constants/screen-config';
export var titleModifiersNames = ['primary', 'secondary', 'tertiary', 'quaternary', 'quinary', 'senary', 'septenary'];
export var titleModifiers = [{
name: 'primary',
fontStepOnMobile: 7,
fontStepOnTablet: 9,
fontStepOnDesktop: 12
}, {
name: 'secondary',
fontStepOnMobile: 6,
fontStepOnTablet: 7,
fontStepOnDesktop: 9
}, {
name: 'tertiary',
fontStepOnMobile: 5,
fontStepOnTablet: 6,
fontStepOnDesktop: 7
}, {
name: 'quaternary',
fontStepOnMobile: 4,
fontStepOnTablet: 5,
fontStepOnDesktop: 6
}, {
name: 'quinary',
fontStepOnMobile: 2,
fontStepOnTablet: 4,
fontStepOnDesktop: 5
}, {
name: 'senary',
fontStepOnMobile: 1,
fontStepOnTablet: 2,
fontStepOnDesktop: 4
}, {
name: 'septenary',
fontStepOnMobile: 0,
fontStepOnTablet: 1,
fontStepOnDesktop: 2
}];
var getLetterSpacingFromStep = function getLetterSpacingFromStep(step) {
if (step > 5) return '-0.02em';
if (step > 3) return '-0.015em';
return '-0.01em';
};
var getLineHeightFromStep = function getLineHeightFromStep(step) {
if (step > 8) return '1em';
if (step > 4) return "calc(1em + " + pxToRem(4) + ")";
return "calc(1em + " + pxToRem(2) + ")";
};
var getStyleFromStep = function getStyleFromStep(step) {
return css(["font-size:", ";letter-spacing:", ";line-height:", ";"], stepToRem(step), getLetterSpacingFromStep(step), getLineHeightFromStep(step));
};
export var titleModifierStyles = function titleModifierStyles(prefix) {
return css(["", ""], titleModifiers.map(function (key, index) {
return css(["", "{", ";@media (min-width:", "){", ";}@media (min-width:", "){", ";}}"], prefix + "--" + titleModifiersNames[index], getStyleFromStep(key.fontStepOnMobile), pxToRem(ScreenConfig.S.min), getStyleFromStep(key.fontStepOnTablet), pxToRem(ScreenConfig.L.min), getStyleFromStep(key.fontStepOnDesktop));
}));
};
export var titleHelperModifierStyles = function titleHelperModifierStyles(modifier) {
var modifierIndex = findIndex(function (item) {
return modifier === item;
})(titleModifiersNames);
var modifierDefinitions = titleModifiersNames[modifierIndex];
return css(["", ";@media (min-width:", "){", ";}@media (min-width:", "){", ";}"], getStyleFromStep(modifierDefinitions.fontStepOnMobile), pxToRem(ScreenConfig.S.min), getStyleFromStep(modifierDefinitions.fontStepOnTablet), pxToRem(ScreenConfig.L.min), getStyleFromStep(modifierDefinitions.fontStepOnDesktop));
};
|
'use strict';
function FileService(Utils) {
return {
/**
* Returns merged file data with provided defaults
*
* @param file file data
* @param defaults default file settings to merge with
* @returns Object merged file data with defaults
*/
prepareRequestData: function(file, defaults) {
var output = {
file: file
};
// set translations title and description
if (typeof file.title !== 'undefined') {
output.title = file.title;
}
if (typeof file.description !== 'undefined') {
output.description = file.description;
}
return _.merge(defaults, output);
},
/**
* Returns file extensions pattern for ng-file-upload validator e.g. '.png,.jpg,.jpeg,.tif'
*
* @param type file type
* @returns string type file extensions pattern for ng-file-upload validator
*/
getTypeExtensionsPattern: function(type) {
return '.' + _.join(Utils.Config.fileExtensions[type], ',.');
}
};
}
FileService.$inject = ['Utils'];
module.exports = FileService;
|
'use strict';
// Register `PractitionerListApp.practitionerDetail` component, along with its associated controller and template
angular.
module('PractitionerListApp.practitioner-detail').
component('practitionerDetail', {
templateUrl: 'components/practitioner-detail/practitioner-detail.template.html',
controller: ['$routeParams', 'Practitioner',
function PractitionerDetailController($routeParams, Practitioner) {
var self = this;
self.practitioner = Practitioner.get({"_id": $routeParams._id});
}
]
});
|
import _ from 'lodash';
import radio from 'radio';
import Backbone from 'backbone';
import Marionette from 'marionette';
import AuthBtn from 'behaviors/AuthBtn';
import css from './style.scss';
import tpl from './template.nunj';
import {
APP_CHANNEL,
APP_NOTIFICATION } from 'constants';
export default Marionette.LayoutView.extend({
template: tpl,
attributes: {
'data-view': 'login-view'
},
behaviors: {
auth: {
behaviorClass: AuthBtn
}
}
});
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.