added admin interface
This commit is contained in:
98
admin/assets/js/pages/maps/google.js
Normal file
98
admin/assets/js/pages/maps/google.js
Normal file
@ -0,0 +1,98 @@
|
||||
$(function () {
|
||||
//Basic Map
|
||||
var basicMap = new GMaps({
|
||||
el: '#gmap_basic_example',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
|
||||
//Markers
|
||||
var markers = new GMaps({
|
||||
div: '#gmap_markers',
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
markers.addMarker({
|
||||
lat: -12.043333,
|
||||
lng: -77.03,
|
||||
title: 'Lima',
|
||||
details: {
|
||||
database_id: 42,
|
||||
author: 'HPNeo'
|
||||
},
|
||||
click: function (e) {
|
||||
if (console.log)
|
||||
console.log(e);
|
||||
alert('You clicked in this marker');
|
||||
}
|
||||
});
|
||||
markers.addMarker({
|
||||
lat: -12.042,
|
||||
lng: -77.028333,
|
||||
title: 'Marker with InfoWindow',
|
||||
infoWindow: {
|
||||
content: '<p>HTML Content</p>'
|
||||
}
|
||||
});
|
||||
|
||||
//Static maps
|
||||
var staticMap = GMaps.staticMapURL({
|
||||
size: [$('#gmap_static_map').width(), 400],
|
||||
lat: -12.043333,
|
||||
lng: -77.028333
|
||||
});
|
||||
|
||||
$('<img/>').attr('src', staticMap).appendTo('#gmap_static_map');
|
||||
|
||||
//Static maps with markers
|
||||
var staticMapWithMarkers = GMaps.staticMapURL({
|
||||
size: [$('#gmap_static_map_with_markers').width(), 400],
|
||||
lat: -12.043333,
|
||||
lng: -77.028333,
|
||||
markers: [
|
||||
{ lat: -12.043333, lng: -77.028333 },
|
||||
{
|
||||
lat: -12.045333, lng: -77.034,
|
||||
size: 'small'
|
||||
},
|
||||
{
|
||||
lat: -12.045633, lng: -77.022,
|
||||
color: 'blue'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
$('<img/>').attr('src', staticMapWithMarkers).appendTo('#gmap_static_map_with_markers');
|
||||
|
||||
//Static maps with polyline
|
||||
var path = [
|
||||
[-12.040397656836609, -77.03373871559225],
|
||||
[-12.040248585302038, -77.03993927003302],
|
||||
[-12.050047116528843, -77.02448169303511],
|
||||
[-12.044804866577001, -77.02154422636042],
|
||||
[-12.040397656836609, -77.03373871559225],
|
||||
];
|
||||
|
||||
var staticMapPolyline = GMaps.staticMapURL({
|
||||
size: [$('#gmap_static_map_polyline').width(), 400],
|
||||
lat: -12.043333,
|
||||
lng: -77.028333,
|
||||
|
||||
polyline: {
|
||||
path: path,
|
||||
strokeColor: '#131540',
|
||||
strokeOpacity: 0.6,
|
||||
strokeWeight: 6
|
||||
// fillColor: '#ffaf2ecc'
|
||||
}
|
||||
});
|
||||
|
||||
$('<img/>').attr('src', staticMapPolyline).appendTo('#gmap_static_map_polyline');
|
||||
|
||||
//Panorama
|
||||
var panorama = GMaps.createPanorama({
|
||||
el: '#gmap_panorama',
|
||||
lat: 42.3455,
|
||||
lng: -71.0983
|
||||
});
|
||||
});
|
||||
119
admin/assets/js/pages/maps/jvectormap.js
Normal file
119
admin/assets/js/pages/maps/jvectormap.js
Normal file
@ -0,0 +1,119 @@
|
||||
$(function () {
|
||||
|
||||
if( $('#world-map-markers').length > 0 ){
|
||||
|
||||
$('#world-map-markers').vectorMap(
|
||||
{
|
||||
map: 'world_mill_en',
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: '#fff',
|
||||
borderOpacity: 0.25,
|
||||
borderWidth: 0,
|
||||
color: '#e6e6e6',
|
||||
regionStyle : {
|
||||
initial : {
|
||||
fill : '#cccccc'
|
||||
}
|
||||
},
|
||||
|
||||
markerStyle: {
|
||||
initial: {
|
||||
r: 5,
|
||||
'fill': '#fff',
|
||||
'fill-opacity':1,
|
||||
'stroke': '#000',
|
||||
'stroke-width' : 1,
|
||||
'stroke-opacity': 0.4
|
||||
},
|
||||
},
|
||||
|
||||
markers : [{
|
||||
latLng : [21.00, 78.00],
|
||||
name : 'INDIA : 350'
|
||||
|
||||
},
|
||||
{
|
||||
latLng : [-33.00, 151.00],
|
||||
name : 'Australia : 250'
|
||||
|
||||
},
|
||||
{
|
||||
latLng : [36.77, -119.41],
|
||||
name : 'USA : 250'
|
||||
|
||||
},
|
||||
{
|
||||
latLng : [55.37, -3.41],
|
||||
name : 'UK : 250'
|
||||
|
||||
},
|
||||
{
|
||||
latLng : [25.20, 55.27],
|
||||
name : 'UAE : 250'
|
||||
|
||||
}],
|
||||
|
||||
series: {
|
||||
regions: [{
|
||||
values: {
|
||||
"US": '#2CA8FF',
|
||||
"SA": '#49c5b6',
|
||||
"AU": '#18ce0f',
|
||||
"IN": '#f96332',
|
||||
"GB": '#FFB236',
|
||||
},
|
||||
attribute: 'fill'
|
||||
}]
|
||||
},
|
||||
hoverOpacity: null,
|
||||
normalizeFunction: 'linear',
|
||||
zoomOnScroll: false,
|
||||
scaleColors: ['#000000', '#000000'],
|
||||
selectedColor: '#000000',
|
||||
selectedRegions: [],
|
||||
enableZoom: false,
|
||||
hoverColor: '#fff',
|
||||
});
|
||||
}
|
||||
|
||||
$('#india').vectorMap({
|
||||
map : 'in_mill',
|
||||
backgroundColor : 'transparent',
|
||||
regionStyle : {
|
||||
initial : {
|
||||
fill : '#f96332'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#usa').vectorMap({
|
||||
map : 'us_aea_en',
|
||||
backgroundColor : 'transparent',
|
||||
regionStyle : {
|
||||
initial : {
|
||||
fill : '#2CA8FF'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#australia').vectorMap({
|
||||
map : 'au_mill',
|
||||
backgroundColor : 'transparent',
|
||||
regionStyle : {
|
||||
initial : {
|
||||
fill : '#18ce0f'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('#uk').vectorMap({
|
||||
map : 'uk_mill_en',
|
||||
backgroundColor : 'transparent',
|
||||
regionStyle : {
|
||||
initial : {
|
||||
fill : '#00ced1'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
1
admin/assets/js/pages/maps/jvectormap.min.js
vendored
Normal file
1
admin/assets/js/pages/maps/jvectormap.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
$(function(){$("#world-map-markers").vectorMap({map:"world_mill_en",normalizeFunction:"polynomial",hoverOpacity:.7,hoverColor:!1,backgroundColor:"transparent",regionStyle:{initial:{fill:"rgba(210, 214, 222, 1)","fill-opacity":1,stroke:"none","stroke-width":0,"stroke-opacity":1},hover:{fill:"rgba(255, 193, 7, 2)",cursor:"pointer"},selected:{fill:"yellow"},selectedHover:{}},markerStyle:{initial:{fill:"#fff",stroke:"#FFC107 "}},markers:[{latLng:[37.09,-95.71],name:"America"},{latLng:[51.16,10.45],name:"Germany"},{latLng:[-25.27,133.77],name:"Australia"},{latLng:[56.13,-106.34],name:"Canada"
|
||||
Reference in New Issue
Block a user