iOS Question osmdroid

billyrudi

Active Member
Licensed User
Erel,
why this code don't return nothing?

B4X:
    Dim s As String
s ="    <html><body>"
s = s &  " <div id=""mapdiv""></div>"
s = s &  "  <script src=""http://www.openlayers.org/api/OpenLayers.js""></script>"
s = s &  "  <script>"
s = s &  "    Map = new OpenLayers.Map(""mapdiv"");"
s = s &  "   Map.addLayer(new OpenLayers.Layer.OSM());"
s = s &  "    var lonLat = new OpenLayers.LonLat( -0.1279688 ,51.5077286 )"
s = s &  "         .transform("
  s = s &  "          new OpenLayers.Projection(""EPSG:4326""), // transform from WGS 1984"
s = s &  "            Map.getProjectionObject() // To Spherical Mercator Projection"
s = s &  "          );"
s = s &  "    var zoom=16;"
s = s &  "    var markers = new OpenLayers.Layer.Markers(""Markers"" );"
s = s &  "    Map.addLayer(markers);"
s = s &  "    markers.addMarker(new OpenLayers.Marker(lonLat));"
s = s &  "    Map.setCenter (lonLat, zoom);"
s = s &  "  </script>"
s = s &  "</body></html>"

WebView1.LoadHtml (s)
 
Top