mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2025-07-12 16:36:26 +02:00
bike_group rental end and maps
This commit is contained in:
parent
50b695117a
commit
f09361320e
8 changed files with 131 additions and 55 deletions
|
@ -38,20 +38,21 @@ my %varenv = $cf->envonline();
|
|||
#$bike = "FR1002";
|
||||
|
||||
my $lang = "de";
|
||||
my $dyn_js = "
|
||||
function onLoad() {
|
||||
console.log('hallo');
|
||||
|
||||
if ('geolocation' in navigator) {
|
||||
console.log('geon');
|
||||
/* geolocation funktioniert */
|
||||
} else {
|
||||
console.log('geoff');
|
||||
/* geolocation funktioniert NICHT */
|
||||
}
|
||||
\$( '#no_javascript' ).hide();
|
||||
}
|
||||
\n";
|
||||
my $dyn_js = "";
|
||||
#my $dyn_js = "
|
||||
#function onLoad() {
|
||||
# console.log('hallo');
|
||||
#
|
||||
# if ('geolocation' in navigator) {
|
||||
# console.log('geon');
|
||||
# /* geolocation funktioniert */
|
||||
# } else {
|
||||
# console.log('geoff');
|
||||
# /* geolocation funktioniert NICHT */
|
||||
# }
|
||||
# \$( '#no_javascript' ).hide();
|
||||
# }
|
||||
# \n";
|
||||
|
||||
my $dyn_css = "";
|
||||
my $local_style = "$varenv{metahost}/$dbt->{shareeapp_conf}->{local_style}";
|
||||
|
@ -69,7 +70,7 @@ my %varenv = $cf->envonline();
|
|||
my $html5 = $q->start_html(
|
||||
-title => "shareetest",
|
||||
-lang => '',
|
||||
-onload => "onLoad();",
|
||||
#-onload => "onLoad();",
|
||||
-encoding => "utf-8",
|
||||
-base => 'true',
|
||||
-head => Link(
|
||||
|
@ -86,25 +87,28 @@ my %varenv = $cf->envonline();
|
|||
'copyright' => "",
|
||||
},
|
||||
-script=>[
|
||||
{-language=>'JAVASCRIPT',
|
||||
-src=>"$jquery"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jquery_ui}"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jquery_resize}"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jsscript}"},
|
||||
#{-language=>'JAVASCRIPT',
|
||||
#-src=>"$jquery"},
|
||||
#{-language=>'JAVASCRIPT',
|
||||
#-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jquery_ui}"},
|
||||
#{-language=>'JAVASCRIPT',
|
||||
#-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jquery_resize}"},
|
||||
#{-language=>'JAVASCRIPT',
|
||||
#-src=>"$varenv{metahost}/$dbt->{copri_conf}->{jsscript}"},
|
||||
#{-language=>'JAVASCRIPT',
|
||||
#-src=>"https://unpkg.com/leaflet\@1.8.0/dist/leaflet.js"},
|
||||
{-language=>'JAVASCRIPT',
|
||||
-code=>"$dyn_js"}
|
||||
],
|
||||
-STYLE=>{
|
||||
-code=>"$dyn_css",
|
||||
-src=>[
|
||||
"$local_style",
|
||||
"$style_bootstrap",
|
||||
"$varenv{metahost}/$dbt->{copri_conf}->{style_bootstrap_icons}",
|
||||
"$varenv{metahost}/$dbt->{copri_conf}->{style_jquery_ui}"
|
||||
],
|
||||
#-src=>[
|
||||
#"$local_style",
|
||||
#"$style_bootstrap",
|
||||
#"$varenv{metahost}/$dbt->{copri_conf}->{style_bootstrap_icons}",
|
||||
#"$varenv{metahost}/$dbt->{copri_conf}->{style_jquery_ui}"
|
||||
#"https://unpkg.com/leaflet\@1.8.0/dist/leaflet.css"
|
||||
#],
|
||||
-verbatim=>"\@import url(\"$local_style\");",
|
||||
-media=>'screen'
|
||||
}
|
||||
|
@ -120,6 +124,49 @@ my $uri = "$dbt->{primary}->{sharee_primary}->{primaryApp}/APIjsonserver";
|
|||
#print $q->div({-style=>'margin:15px;'},$q->a({-href=>"/src/scripts/tests/index.pl"},"[ index ]")),"\n";
|
||||
print $q->div({-style=>'margin:15px;'},"sharee API tests", $q->b("operator_key: $operator_key | bike: $bike")),"\n";
|
||||
|
||||
print<<EOF
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet\@1.8.0/dist/leaflet.css"
|
||||
integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ=="
|
||||
crossorigin=""/>
|
||||
|
||||
<script src="https://unpkg.com/leaflet\@1.8.0/dist/leaflet.js"
|
||||
integrity="sha512-BB3hKbKWOc9Ez/TAwyWxNXeoV9c1v6FIeYiBieIWkpLjauysF18NzgR1MBNBXf8/KABdlkX68nAhlwcDFLGPCQ=="
|
||||
crossorigin=""></script>
|
||||
|
||||
<style>
|
||||
#map {
|
||||
height: 500px;
|
||||
width: 750px;
|
||||
}
|
||||
</style>
|
||||
|
||||
EOF
|
||||
;
|
||||
|
||||
print "<div id='map'></div>\n";
|
||||
|
||||
print<<EOF
|
||||
|
||||
<script>
|
||||
var map = L.map('map').setView([47.976634, 7.825490], 13);
|
||||
|
||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=pk.eyJ1Ijoic2hhcmVlYmlrZSIsImEiOiJjbDM3bXdreHIwMnZxM2NtbjVkc2pwNWp4In0.QAwnPXx4yZsbPSm2DvP62w', {
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
maxZoom: 18,
|
||||
id: 'mapbox/streets-v11',
|
||||
tileSize: 512,
|
||||
zoomOffset: -1,
|
||||
accessToken: 'your.mapbox.access.token'
|
||||
}).addTo(map);
|
||||
|
||||
</script>
|
||||
|
||||
EOF
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
print $q->div({-style=>'margin:15px;'},"-------------- $uri --------------------"),"\n";
|
||||
my $authorization = "$uri?request=authorization&user_id=ragu\@sharee.bike&user_pw=xxxxxx&merchant_id=oiF2kahH&hw_id=g89g8o7goguzuzug";
|
||||
print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$authorization"},"[ authorization ]---> $authorization")),"\n";
|
||||
|
@ -218,9 +265,9 @@ print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$bookin
|
|||
my $user_feedback = "$uriop?request=user_feedback&bike=$bike&bike_broken=1&message=testnachricht äöü&authcookie=$coo";
|
||||
print $q->div({-style=>'margin:15px;'},$q->a({-target=>'_blank', -href=>"$user_feedback"},"[ user_feedback ]---> $user_feedback")),"\n";
|
||||
|
||||
print "<div style='text-align:center;'>";
|
||||
print "<iframe width='750' height='500' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://www.openstreetmap.org/export/embed.html?bbox=7.604942321777345%2C47.923934784536236%2C7.979164123535157%2C48.07005002188767&layer=mapnik' style='border: 1px solid black'></iframe><br/><small><a href='https://www.openstreetmap.org/#map=12/47.9970/7.7921'>Größere Karte anzeigen</a></small>\n";
|
||||
print "</div>\n";
|
||||
#print "<div style='text-align:center;'>";
|
||||
#print "<iframe width='750' height='500' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' src='https://www.openstreetmap.org/export/embed.html?bbox=7.604942321777345%2C47.923934784536236%2C7.979164123535157%2C48.07005002188767&layer=mapnik' style='border: 1px solid black'></iframe><br/><small><a href='https://www.openstreetmap.org/#map=12/47.9970/7.7921'>Größere Karte anzeigen</a></small>\n";
|
||||
#print "</div>\n";
|
||||
|
||||
print $q->end_html;
|
||||
1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue