Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pixel Humain
interop
Commits
2165cce0
Commit
2165cce0
authored
Dec 04, 2018
by
Raph El
Browse files
Modif
parent
e9e2f61a
Pipeline
#3185
failed with stages
in 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
assets/js/init.js
View file @
2165cce0
...
...
@@ -2,6 +2,40 @@
CO.js
********************* */
var
interopObj
=
{
osm
:
{
name
:
"
Wikidata
"
,
color
:
"
grey
"
,
icon
:
"
group
"
,
type
:
"
wiki
"
,
urlImg
:
modules
.
interop
.
assets
+
"
/images/logos/logo-osm.png
"
,
paramsUrl
:
{
// cityFields : ["wikidataID"],
// others : ["textSearch"]
},
getUrlApi
:
function
(
params
){
var
url_osm
=
baseUrl
+
'
/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["name"](poly:"
'
+
geoShape
+
'
");out%20
'
+
endNow
+
'
;
'
;
// if (amenity_filter == null) {
// if (text_search_name !== "") {
// url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["name"~"'+text_search_name+'",i](poly:"'+geoShape+'");out%20'+endNow+';';
// }
// } else {
// if (amenity_filter == "") {
// url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["amenity"="NIMPORTEQUOI"](poly:"'+geoShape+'");out%20'+endNow+';';
// } else {
// if (text_search_name == "") {
// url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["amenity"~"^('+amenity_filter+')"](poly:"'+geoShape+'");out%20'+endNow+';';
// } else {
// url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["name"~"'+text_search_name+'"]["amenity"~"^('+amenity_filter+')"](poly:"'+geoShape+'");out%20'+endNow+';';
// }
// }
// }
var
url
=
baseUrl
+
'
/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["name"](poly:"
'
+
geoShape
+
'
");out%20
'
+
endNow
+
'
;
'
;
if
(
params
.
textSearch
!==
""
)
url
+=
"
&text_filter=
"
+
params
.
textSearch
;
return
url
;
}
},
wikidata
:
{
name
:
"
Wikidata
"
,
color
:
"
grey
"
,
...
...
controllers/actions/IndexAction.php
View file @
2165cce0
...
...
@@ -7,8 +7,9 @@ class IndexAction extends CAction
if
(
Yii
::
app
()
->
request
->
isAjaxRequest
)
echo
$this
->
getController
()
->
render
(
"interop.views.co.index"
);
else
{
//$this->getController()->layout = "//layouts/empty";
$controller
->
render
(
"interop.views.co.index"
);
$this
->
getController
()
->
layout
=
"//layouts/empty"
;
//$controller->render( "interop.views.co.index");
echo
$this
->
getController
()
->
render
(
"interop.views.co.index"
);
}
}
...
...
Write
Preview
Supports
Markdown
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