mirror of https://gitee.com/bigwinds/arangodb
Design modification Demo
This commit is contained in:
parent
89ef7605fe
commit
fe0f273cfd
|
@ -48,7 +48,7 @@
|
|||
"frontend/js/lib/joi.browser.js",
|
||||
"frontend/js/lib/md5.js",
|
||||
"frontend/js/lib/ammap/ammap.js",
|
||||
"frontend/js/lib/ammap/maps/js/worldLow.js",
|
||||
"frontend/js/lib/ammap/maps/js/usa2High.js",
|
||||
"frontend/js/lib/ammap/themes/light.js",
|
||||
"frontend/src/ace.js",
|
||||
"frontend/src/theme-textmate.js",
|
||||
|
@ -321,7 +321,8 @@
|
|||
'concat_in_order:default',
|
||||
'concat_in_order:jsCluster',
|
||||
'concat_in_order:htmlCluster',
|
||||
'concat_in_order:htmlStandalone'
|
||||
'concat_in_order:htmlStandalone',
|
||||
'watch'
|
||||
]);
|
||||
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
type: "POST",
|
||||
url: "/_api/cursor",
|
||||
data: JSON.stringify({
|
||||
query: "for a in airports return {Latitude: a.Latitude, Longitude: a.Longitude, _key: a._key}"
|
||||
query: "for a in airports return {Latitude: a.Latitude, Longitude: a.Longitude, Name: a.Name, City: a.City, _key: a._key}"
|
||||
}),
|
||||
contentType: "application/json",
|
||||
processData: false,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,17 +7,19 @@ AmCharts.maps.usa2Low={
|
|||
"projection":"mercator",
|
||||
"leftLongitude":"-124.541947",
|
||||
"topLatitude":"49.390806",
|
||||
"rightLongitude":"-67.118615",
|
||||
"bottomLatitude":"14.052495"
|
||||
"rightLongitude":"-66.95",
|
||||
"bottomLatitude":"25.14"
|
||||
}
|
||||
},
|
||||
"g":{
|
||||
"path":[
|
||||
/*
|
||||
{
|
||||
"id":"US-AK",
|
||||
"title":"Alaska",
|
||||
"d":"M517.54,701.07l2.66,5.08l1.63,-2.17l6.22,0.67l-0.22,2.56l5.63,1.88l3.75,-1.1l7.76,3.46l7.08,1.02l2.83,1.4l4.9,-1.75l5.58,3.23l4,1.49l0,0l-0.02,36.3l-0.02,46.52l3.63,0.22l3.58,2.04l2.57,3.2l3.27,4.72l3.58,-4.01l3.7,-2.35l1.95,3.75l2.48,2.93l3.37,3.18l2.3,4.98l3.76,7.72l6.26,4.21l0.1,4.1l-2.05,3.09l-2.02,-2.41l-3.24,-2.06l-1.04,-5.72l-4.75,-5.42l-1.98,-6.48l-3.53,-0.45l-5.85,-0.17l-4.31,-2.01l-7.61,-7.41l-3.52,-1.38l-6.44,-2.62l-5.1,0.63l-7.24,-3.4l-4.38,-3.2l-4.09,1.59l0.76,5.16l-2.03,0.47l-4.26,1.53l-3.24,2.44l-4.08,1.53l-0.53,-4.26l1.66,-7.26l3.91,-2.33l-1.01,-1.91l-4.69,4.23l-2.51,4.95l-5.3,5.18l2.69,3.48l-3.48,5.05l-3.96,2.9l-3.68,2.09l-0.91,3l-5.75,3.46l-1.16,3.1l-4.31,2.79l-2.53,-0.5l-3.44,1.81l-3.74,2.19l-3.06,2.13l-6.32,1.81l-0.58,-1.06l4.03,-2.98l3.6,-1.99l3.92,-3.56l4.57,-0.74l1.81,-2.71l5.1,-4.01l0.82,-1.36l2.72,-2.41l0.64,-5.25l1.87,-4.17l-4.24,2.15l-1.19,-1.22l-1.99,2.56l-2.4,-3.58l-0.99,2.54l-1.38,-3.54l-3.68,2.85l-2.26,-0.01l-0.32,-4.24l0.67,-2.65l-2.37,-2.6l-4.79,1.4l-3.11,-3.45l-2.52,-1.79l-0.02,-4.27l-2.84,-3.26l1.42,-4.47l3,-4.42l1.31,-4.14l2.98,-0.6l2.53,1.3l2.97,-3.95l2.67,0.71l2.81,-2.57l-0.68,-3.83l-2.06,-1.53l2.72,-3.31l-2.26,0.1l-3.91,1.87l-1.12,1.88l-2.9,-1.88l-5.21,0.96l-5.39,-2.05l-1.55,-3.48l-4.66,-5.13l5.17,-3.76l8.21,-4.47h3.03l-0.5,4.57l7.77,-0.35l-2.99,-5.7l-4.53,-3.57l-2.62,-4.78l-3.53,-4.16l-5.06,-3.13l2.06,-5.29l6.53,-0.33l4.65,-4.71l0.88,-5.14l3.76,-5.14l3.59,-1.25l6.98,-4.93l3.38,0.75l5.67,-6.05L517.54,701.07zM456.2,772.37l2.27,1.58l2.29,-0.85l2.98,2.18l3.66,1.1l-0.3,0.89l-2.79,1.72l-2.8,-1.77l-1.4,-1.48l-3.24,0.48l-0.88,-0.72L456.2,772.37zM478.85,802.58l-2.26,1.14l-2.41,-1.37l-2.23,-2l3.63,-1.27l2.92,0.67L478.85,802.58zM525.13,822.25l-3.68,2.57l-1.88,-1.73l-0.57,-3.18l3.34,-2.44l1.97,-1.05l2.44,0.47l1.56,2.14L525.13,822.25z"
|
||||
},
|
||||
*/
|
||||
{
|
||||
"id":"US-AL",
|
||||
"title":"Alabama",
|
||||
|
@ -68,11 +70,13 @@ AmCharts.maps.usa2Low={
|
|||
"title":"Georgia",
|
||||
"d":"M836.67,622.58L835.64,623.53L834.13,625.7L836.67,627.59L838.31,628.29L840.07,631.88L841.19,633.89L844.47,636.57L845.12,637.98L847.36,639.81L848.46,642.49L851.47,644.75L852.14,647.3L852.7,648.54L852.38,649.36L854.14,650.58L855.06,652.66L855.05,654.77L855.91,655.18L857.53,655.75L853.43,663.83L851.63,670.08L849.64,669.88L847.77,669.08L846.63,669.45L846.61,673.24L845.39,674.21L844.69,672.31L829.4,670.68L819.92,670.17L818.48,667.23L818.02,665.94L817.42,664.54L817.68,662.74L817.91,660.79L817.4,658.71L817.93,655.2L819.49,653.25L818.66,651.26L817.31,647.78L815.08,636.62L812.63,622.5L819.91,622.61L824.94,622.49z"
|
||||
},
|
||||
/*
|
||||
{
|
||||
"id":"US-HI",
|
||||
"title":"Hawaii",
|
||||
"d":"M623.7,739.77l-1.43,1.28l-1.81,-0.44l-2.21,-1.74l0.77,-1.29l1.8,-1.09l2.78,0.05l0.58,0.86L623.7,739.77zM643.57,746.53l1.05,1.96l-2,0.51l-1.26,-0.94l-0.69,0.18l-0.28,0.14l-1.58,-0.03l-1.99,-3.49l1.84,-0.2l1.96,-1.32l1.63,3.01L643.57,746.53zM655.91,750.48l-1.81,1.29l-5.27,-0.73l0.49,-1.53L655.91,750.48zM657.46,752.06l1.52,1.56l2.24,-0.48l3.17,2.07l0.06,1.01l-1.15,0.91l-3.69,0.51l-0.87,-2.55l-1.66,-0.27l-1.01,-1.66l0.5,-0.98L657.46,752.06zM670.32,777l-1.11,1.87l-3.13,-1.37l-0.12,-4.02l-1.93,-4.74l2.79,-3.42l-0.89,-1.99l0.23,-1.2l0.52,-0.21l7.75,3.65l1.38,1.54l0.25,1.65l0.94,0.21l0.45,1.13l1.82,1.55l-3.05,2.65l-3.14,0.76L670.32,777z"
|
||||
},
|
||||
*/
|
||||
{
|
||||
"id":"US-IA",
|
||||
"title":"Iowa",
|
||||
|
|
|
@ -58,6 +58,7 @@ AmCharts.themes.light = {
|
|||
AmGraph: {
|
||||
lineAlpha: 0.9
|
||||
},
|
||||
|
||||
GaugeArrow: {
|
||||
color: "#000000",
|
||||
alpha: 0.8,
|
||||
|
@ -87,15 +88,16 @@ AmCharts.themes.light = {
|
|||
|
||||
// ammap
|
||||
AreasSettings: {
|
||||
alpha: 0.8,
|
||||
color: "#67b7dc",
|
||||
colorSolid: "#003767",
|
||||
alpha: 0.9,
|
||||
color: "#8aa051",
|
||||
colorSolid: "#ff0000",
|
||||
// colorSolid: "#003767",
|
||||
unlistedAreasAlpha: 0.4,
|
||||
unlistedAreasColor: "#000000",
|
||||
unlistedAreasColor: "#ff0000",
|
||||
outlineColor: "#FFFFFF",
|
||||
outlineAlpha: 0.5,
|
||||
outlineThickness: 0.5,
|
||||
rollOverColor: "#3c5bdc",
|
||||
rollOverColor: "#8aa051",
|
||||
rollOverOutlineColor: "#FFFFFF",
|
||||
selectedOutlineColor: "#FFFFFF",
|
||||
selectedColor: "#f15135",
|
||||
|
@ -116,17 +118,17 @@ AmCharts.themes.light = {
|
|||
},
|
||||
|
||||
ZoomControl: {
|
||||
buttonRollOverColor: "#3c5bdc",
|
||||
buttonFillColor: "#3994e2",
|
||||
buttonRollOverColor: "#6A873E",
|
||||
buttonFillColor: "#88A049",
|
||||
buttonBorderColor: "#3994e2",
|
||||
buttonFillAlpha: 0.8,
|
||||
buttonFillAlpha: 0.9,
|
||||
gridBackgroundColor: "#FFFFFF",
|
||||
buttonBorderAlpha:0,
|
||||
buttonCornerRadius:2,
|
||||
gridColor:"#FFFFFF",
|
||||
gridBackgroundColor:"#000000",
|
||||
buttonIconAlpha:0.6,
|
||||
gridAlpha: 0.6,
|
||||
gridAlpha: 0.8,
|
||||
buttonSize:20
|
||||
},
|
||||
|
||||
|
@ -177,7 +179,6 @@ AmCharts.themes.light = {
|
|||
},
|
||||
|
||||
DataSetSelector: {
|
||||
|
||||
color: "#000000",
|
||||
selectedBackgroundColor: "#b9cdf5",
|
||||
rollOverBackgroundColor: "#a8b0e4"
|
||||
|
|
|
@ -8,6 +8,13 @@
|
|||
window.DemoView = Backbone.View.extend({
|
||||
|
||||
//MAP SPECIFIC VARIABLES
|
||||
// svg path for target icon
|
||||
MAPtarget: (
|
||||
"M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,"
|
||||
+ "15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,"
|
||||
+ "6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,"
|
||||
+ "10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z"
|
||||
),
|
||||
MAPicon: (
|
||||
"M23.963,20.834L17.5,9.64c-0.825-1.429-2.175-1.429-3,0L8.037,20.834c-0.825,"
|
||||
+ "1.429-0.15,2.598,1.5,2.598h12.926C24.113,23.432,24.788,22.263,23.963,20.834z"
|
||||
|
@ -60,11 +67,7 @@
|
|||
|
||||
this.airportCollection.each(function(model) {
|
||||
airport = model.toJSON();
|
||||
airports.push({
|
||||
_key: airport._key,
|
||||
Latitude: airport.Latitude,
|
||||
Longitude: airport.Longitude
|
||||
});
|
||||
airports.push(airport);
|
||||
});
|
||||
var preparedData = this.prepareData(airports);
|
||||
this.renderMap(preparedData);
|
||||
|
@ -102,13 +105,12 @@
|
|||
id: airport._key,
|
||||
latitude: airport.Latitude,
|
||||
longitude: airport.Longitude,
|
||||
type: "circle", // CIRCLE INSTEAD OF ICON
|
||||
//svgPath: self.MAPplaneicon, //ICON if wanted
|
||||
svgPath: self.MAPtarget,
|
||||
color: self.MAPcolor,
|
||||
scale: 0.2, //ICON SCALE
|
||||
//TODO: LABEL TEMP. DISABLED BECAUSE OF READABILITY
|
||||
label: airport._key,
|
||||
labelShiftY: 2
|
||||
scale: 0.5,
|
||||
selectedScale: 2.5,
|
||||
title: airport.City + "<br>" + airport.Name + "<br>" + airport._key,
|
||||
rollOverColor: "#ff8f35",
|
||||
});
|
||||
self.keyToLongLat[airport._key] = {
|
||||
lon: airport.Longitude,
|
||||
|
@ -146,19 +148,56 @@
|
|||
AmCharts.theme = AmCharts.themes.light;
|
||||
self.map = AmCharts.makeChart("demo-mapdiv", {
|
||||
type: "map",
|
||||
theme: "light",
|
||||
dragMap: true,
|
||||
creditsPosition: "bottom-left",
|
||||
pathToImages: "img/ammap/",
|
||||
dataProvider: {
|
||||
map: "worldLow",
|
||||
map: "usa2High",
|
||||
lines: self.lines,
|
||||
images: imageData,
|
||||
getAreasFromMap: true,
|
||||
zoomLevel: 2.25,
|
||||
zoomLatitude: 48.22,
|
||||
zoomLongitude: -100.00
|
||||
//zoomLevel: 2.25,
|
||||
//zoomLatitude: 48.22,
|
||||
//zoomLongitude: -100.00
|
||||
},
|
||||
areaSettings: {
|
||||
autoZoom: true,
|
||||
balloon: {
|
||||
/*
|
||||
maxWidth,
|
||||
pointerWidth,
|
||||
pointerOrientation,
|
||||
follow,
|
||||
show,
|
||||
bulletSize,
|
||||
shadowColor,
|
||||
animationDuration,
|
||||
fadeOutDuration,
|
||||
fixedPosition,
|
||||
offsetY,
|
||||
offsetX,
|
||||
textAlign,
|
||||
chart,
|
||||
"l", "t", "r", "b",
|
||||
"balloonColor",
|
||||
"pShowBullet",
|
||||
"pointToX", "pointToY", "interval", "text", "deltaSignY", "deltaSignX", "previousX", "previousY", "set", "textDiv", "bg", "bottom", "yPos", "prevX", "prevY", "prevTX", "prevTY", "destroyTO", "fadeAnim1", "fadeAnim2"]
|
||||
*/
|
||||
adjustBorderColor: true,
|
||||
balloonColor: "#ffffff",
|
||||
color: "#000000",
|
||||
cornerRadius: 5,
|
||||
fillColor: "#ffffff",
|
||||
fillAlpha: 0.8,
|
||||
borderThickness: 2,
|
||||
borderColor: "#88A049",
|
||||
borderAlpha: 0.8,
|
||||
shadowAlpha: 0,
|
||||
fontSize: 10,
|
||||
verticalPadding: 2,
|
||||
horizontalPadding: 4,
|
||||
},
|
||||
areasSettings: {
|
||||
autoZoom: false,
|
||||
balloonText: "",
|
||||
selectedColor: self.MAPcolor
|
||||
},
|
||||
linesSettings: {
|
||||
|
@ -174,6 +213,7 @@
|
|||
this.map.validateData();
|
||||
},
|
||||
|
||||
/*
|
||||
renderDummy: function() {
|
||||
|
||||
// svg path for target icon
|
||||
|
@ -200,7 +240,7 @@
|
|||
var map = AmCharts.makeChart( "demo-mapdiv", {
|
||||
type: "map",
|
||||
"theme": "light",
|
||||
pathToImages: "http://www.amcharts.com/lib/3/images/",
|
||||
// pathToImages: "http://www.amcharts.com/lib/3/images/",
|
||||
|
||||
dataProvider: {
|
||||
map: "worldLow",
|
||||
|
@ -458,7 +498,7 @@
|
|||
}
|
||||
} );
|
||||
}
|
||||
|
||||
*/
|
||||
});
|
||||
}());
|
||||
|
||||
|
|
|
@ -85,3 +85,6 @@
|
|||
|
||||
// Plugin
|
||||
@import 'uploadfile';
|
||||
|
||||
// Demo
|
||||
@import 'demo';
|
||||
|
|
Loading…
Reference in New Issue