PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Example for using the gglMapParameter variables
gglMapParameter (Example)
Example for using the gglMapParameter variables
Example used to display markers (a square of 50 markers).
MapsAPIKey is string = "google maps key"
// Configure a map
MapGglParams is gglMapParameter
// Define the markers
MarkGgl is gglMarker

FOR i = 1 TO 50
MarkGgl..Size = gglLarge
// Black, White, LightGreen, LightYellow, LightBlue, LightGray, LightRed.
SWITCH i
CASE 1<=*<=12
MarkGgl..Latitude = 47.022356 + (i/30)
MarkGgl..Longitude = 52.423654
MarkGgl..Color = LightBlue
// Letter (modulo 26)
MarkGgl..Letter=Charact(Asc("A") + modulo(i-1,26))

CASE 13<=*<=24
MarkGgl..Latitude = 47.022356
MarkGgl..Longitude = 52.423654 + ((i-13)/30)
MarkGgl..Color = LightGreen
// Digits
MarkGgl..Letter=Charact(Asc("0") + modulo(i-13,10))

CASE 25<=*<=36
MarkGgl..Latitude = 47.022356 + ((i-24)/30)
MarkGgl..Longitude = 52.423654 + (11/30)
MarkGgl..Color = LightYellow
// Letter (modulo 26)
MarkGgl..Letter=Charact(Asc("A") + modulo(i-25,26))

CASE 37<=*<=48
MarkGgl..Latitude = 47.022356+(13/30)
MarkGgl..Longitude = 52.423654 + ((i-37)/30)
MarkGgl..Color = LightRed
// Digits
MarkGgl..Letter=Charact(Asc("0") + modulo(i-37,10))

CASE 49
MarkGgl..Latitude = 47.022356 + (6/30)
MarkGgl..Longitude = 52.423654 + (5/30)
MarkGgl..Color = White
MarkGgl..Letter="W"
CASE 50
MarkGgl..Latitude = 47.022356 + (6/30)
MarkGgl..Longitude = 52.423654 + (6/30)
MarkGgl..Color = White
MarkGgl..Letter="D"
OTHER CASE
Info("Up to 50 markers")
END

// Add the markers
Add(MapGglParams..Marker, MarkGgl)
END

// Various parameters
MapGglParams..Format = gglJPG
MapGglParams..Border = True

IMG_MAP..Width = 600
IMG_MAP..Height = 600
IMG_MAP = GglGetStaticMap(MapsAPIKey, 47.25, 52.6, 10, 600, 600, gglHybrid, MapGglParams)
Minimum version required
  • Version 15
This page is also available for…
Comments
Click [Add] to post a comment