Android Question Simple OSM Viewer

Sergey_New

Well-Known Member
Licensed User
Longtime User
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 changed?
 

Attachments

  • OpenStreetMap.zip
    3.5 KB · Views: 140

TILogistic

Expert
Licensed User
Longtime User
new api:
HTML:
    <!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.14.1/css/ol.css" type="text/css">
    <style>html, body, #map {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
    <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.14.1/build/ol.js"></script>
    <title>OpenLayers example</title>
  </head>
  <body>
    <div id="map" class="map"></div>
    <script type="text/javascript">
      var map = new ol.Map({
        target: 'map',
        layers: [
          new ol.layer.Tile({
            source: new ol.source.OSM()
          })
        ],
        view: new ol.View({
          center: ol.proj.fromLonLat([${CenterLong}, ${CenterLat}]),
          zoom: ${zoom}
        })
      });
    </script>
  </body>
</html>
1656064198150.png
 
Upvote 0

Sergey_New

Well-Known Member
Licensed User
Longtime User
The example is made with the lightweight free library Leaflet. Please check on your devices. Works on my device :)
 

Attachments

  • OSMMapL.zip
    3 KB · Views: 92
Upvote 0
Top