Anyone have any experience using Leaflet with SpiderBasic?
https://leafletjs.com/
Or have some examples of converting the javascript to use with SpiderBasic?
Maps with SpiderBasic
Re: Maps with SpiderBasic
Wow
Thanks Peter, that's exactly what I was looking for.
(Note: the LeafletDemoGoogleMaps displays a blank screen but the other examples are excellent)
Thanks Peter, that's exactly what I was looking for.
(Note: the LeafletDemoGoogleMaps displays a blank screen but the other examples are excellent)
Re: Maps with SpiderBasic
Fix:Paul wrote:Note: the LeafletDemoGoogleMaps displays a blank screen
Code: Select all
EnableExplicit
XIncludeFile "Leaflet.sbi"
Enumeration
#Window
#LeafletGadget
EndEnumeration
Procedure Main()
OpenWindow(#Window, #PB_Ignore, #PB_Ignore, 900, 900, "LeafletGadgetDemo", #PB_Window_ScreenCentered | #PB_Window_SizeGadget)
ContainerGadget(#LeafletGadget, 0, 0, WindowWidth(#Window), WindowHeight(#Window)) : CloseGadgetList()
Leaflet::BindGadget(#LeafletGadget)
Protected myMap = Leaflet::GetMap(#LeafletGadget)
; create a tilelayer
Protected tileLayer
tileLayer= Leaflet::NewTileLayer(Leaflet::#TileLayerType_GoogleMapHybrid)
; tileLayer = Leaflet::NewTileLayer(Leaflet::#TileLayerType_GoogleMapRoadmap)
; tileLayer = Leaflet::NewTileLayer(Leaflet::#TileLayerType_GoogleMapSatellite)
; tileLayer = Leaflet::NewTileLayer(Leaflet::#TileLayerType_GoogleMapTerrain)
Leaflet::AddItem(myMap, tileLayer)
; adjust the zoom
Leaflet::SetAttribute(myMap, Leaflet::#Zoom, 16)
; center to a specific position
Leaflet::PanTo(myMap, Leaflet::LatLng( 48.486520, 7.693640 ) )
EndProcedure
Leaflet::Init(@Main())