Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
12a21330
Commit
12a21330
authored
Mar 20, 2016
by
erm0l0v
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Geo widget doesn't work by https #1234
parent
0dcbb130
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
form.js
flask_admin/static/admin/js/form.js
+3
-3
No files found.
flask_admin/static/admin/js/form.js
View file @
12a21330
...
@@ -149,7 +149,7 @@
...
@@ -149,7 +149,7 @@
}
}
}
else
{
}
else
{
// look up user's location by IP address
// look up user's location by IP address
$
.
getJSON
(
"
http:
//ip-api.com/json/?callback=?"
,
function
(
data
)
{
$
.
getJSON
(
"//ip-api.com/json/?callback=?"
,
function
(
data
)
{
map
.
setView
([
data
[
"lat"
],
data
[
"lon"
]],
12
);
map
.
setView
([
data
[
"lat"
],
data
[
"lon"
]],
12
);
}).
fail
(
function
()
{
}).
fail
(
function
()
{
map
.
setView
([
0
,
0
],
1
)
map
.
setView
([
0
,
0
],
1
)
...
@@ -158,8 +158,8 @@
...
@@ -158,8 +158,8 @@
// set up tiles
// set up tiles
var
mapboxVersion
=
window
.
MAPBOX_ACCESS_TOKEN
?
4
:
3
;
var
mapboxVersion
=
window
.
MAPBOX_ACCESS_TOKEN
?
4
:
3
;
L
.
tileLayer
(
'
http:
//{s}.tiles.mapbox.com/v'
+
mapboxVersion
+
'/'
+
MAPBOX_MAP_ID
+
'/{z}/{x}/{y}.png?access_token='
+
window
.
MAPBOX_ACCESS_TOKEN
,
{
L
.
tileLayer
(
'//{s}.tiles.mapbox.com/v'
+
mapboxVersion
+
'/'
+
MAPBOX_MAP_ID
+
'/{z}/{x}/{y}.png?access_token='
+
window
.
MAPBOX_ACCESS_TOKEN
,
{
attribution
:
'Map data © <a href="
http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http:
//mapbox.com">Mapbox</a>'
,
attribution
:
'Map data © <a href="
//openstreetmap.org">OpenStreetMap</a> contributors, <a href="//creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="
//mapbox.com">Mapbox</a>'
,
maxZoom
:
18
maxZoom
:
18
}).
addTo
(
map
);
}).
addTo
(
map
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment