Shows London map on Samsung Ultra 21. +/- doesn't do anything, but zoom gesture works Have you put SetApplicationAttribute(android:usesCleartextTraffic, "true") in manifest project file?Using the example made a small application for B4A.
It works well on the emulator, but, unfortunately, on the device, the "+" and "-" buttons are very small. Clicking on them doesn't work. Gestures works.
What can be change
I have the same.Shows London map on Samsung Ultra 21. +/- doesn't do anything, but zoom gesture works Have
No, I didn't put it in..Have you put SetApplicationAttribute(android:usesCleartextTraffic, "true") in manifest project file?
You are using Javascript in the HTML but did not added any javascript possibility to your app?`WHY?What can be changed?
Are you sure the javascript does work on android in a limited webview? Note that webview is not compareable with a Webbrowser on AndroidUncaught ReferenceError: OpenLayers is not defined in file:/// (Line: 12)
' 28 - Non-ssl (non-https) communication is not permitted by default.
' It can be enabled in B4A v9+ by adding this line to the manifest editor:
CreateResourceFromFile(Macro, Core.NetworkClearText)
Works for me.Are you sure the javascript does work on android in a limited webview?
Tell me how to do it?You are using Javascript in the HTML but did not added any javascript possibility to your app?`WHY?
<html>
<head>
<meta charset="utf-8" />
<title>OpenStreetMap</title>
<link rel="stylesheet" href="https://openlayers.org/api/2.13.1/theme/default/style.css" type="text/css">
<style>html, body, #map {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
</head>
<body>
<div id="mapdiv"></div>
<script src="https://openlayers.org/api/2.13.1/OpenLayers.js"></script>
<script>
map = new OpenLayers.Map("mapdiv");
map.addLayer(new OpenLayers.Layer.OSM());
var lonLat = new OpenLayers.LonLat(${CenterLong}, ${CenterLat})
.transform(
new OpenLayers.Projection("EPSG:4326"),
map.getProjectionObject()
);
var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers);
markers.addMarker(new OpenLayers.Marker(lonLat));
map.setCenter (lonLat, ${zoom});
</script>
</body></html>