Skip to content
Permalink
Browse files

New translation string for Navigation button

  • Loading branch information...
uprel committed Nov 1, 2019
1 parent 172a68d commit b0b32bd4401d29123295b04c13706b7b02fa1b5d
@@ -61,7 +61,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Bruk kart CRS",
tableUseExtent: "Bruk gjeldende kartutsnitt",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**::
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -63,7 +63,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Uporabi območje sloja',
exportUseMapCrs: "Uporabi projektni koord. sistem",
tableUseExtent: "Prikaži samo elemente znotraj trenutnega prikaza",
style: "Stil"
style: "Stil",
navigation: "Navigacija"
};

/**
@@ -64,7 +64,8 @@ var TR = {
exportLayerExtent: 'Use layer extent',
exportUseMapCrs: "Use map CRS",
tableUseExtent: "Only show features in map extent",
style: "Style"
style: "Style",
navigation: "Navigation"
};

/**
@@ -793,6 +793,8 @@ Gui.showXMLFeatureInfoResults = function (results) {
var filesAlias = Eqwc.settings.qgisFilesFieldAlias ? Eqwc.settings.qgisFilesFieldAlias : 'files';
filesAlias = filesAlias.toUpperCase();

html += '<a href="javascript:Map.openNavigation();" data-theme="e" data-inline="true" data-mini="true" data-role="button">'+TR.navigation+'</a>';

//add button
if (typeof(Editor) == 'function' && mobEditor.layer) {
html += '<a href="javascript:mobEditor.addPointOnClickPos();" data-theme="a" data-inline="true" data-mini="true" data-role="button">'+TR.editAdd+'</a>';
@@ -1016,3 +1016,19 @@ Map.featureInfoOnLocation = function() {
Map.lastClickPos = location;
}
};

Map.openNavigation = function() {

var destination = new ol.geom.Point(Map.lastClickPos);
var destWgs = destination.transform(projectData.crs,'EPSG:4326');
var url = "https://www.google.com/maps/dir/?api=1&";
var params = {};
params.destination = destWgs.getCoordinates().reverse().toString();

//if (Map.geolocation) {
// params.origin = Map.geolocation.getPositionRaw().reverse().toString(); //wgs84
//}

//console.log(url+ $.param(params));
window.open(url+ $.param(params), '_blank');
};
@@ -51,8 +51,8 @@ function goMobile($lang, $scanner) {
}
?>
<!-- OpenLayers 3 -->
<script src="client_mobile/lib/ol3/ol.js?v=4.6.5a"></script>
<!-- <script src="client_mobile/lib/ol3/ol-debug.js?v=4.6.5a"></script>-->
<!-- <script src="client_mobile/lib/ol3/ol.js?v=4.6.5a"></script>-->
<script src="client_mobile/lib/ol3/ol-debug.js?v=4.6.5a"></script>
<link rel="stylesheet" href="client_mobile/lib/ol3/ol.css?v=4.6.5" />

<script type="text/javascript" src="client_mobile/eqwc_mobile_load.php"></script>

2 comments on commit b0b32bd

@uprel

This comment has been minimized.

Copy link
Owner Author

uprel replied Nov 1, 2019

This adds also Navigation button in Mobile client that opens Google Maps with directions

@uprel

This comment has been minimized.

Copy link
Owner Author

uprel replied Nov 1, 2019

Revert changes in index.php (for debugging only)

Please sign in to comment.
You can’t perform that action at this time.