PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Displaying a map
GglGetStaticMap (Example)
Displaying a map
WINDEV This example is used to display a map from a physical address.
// Display a map from a physical address

// Variables
Zoom is int
Zoom = 12
gglParameters is gglMapParameter
rLatitude, rLongitude are reals
Localization is gglCoordinate
M1 is gglMarker

// Retrieve the longitude and latitude of a physical address
Localization = GglAddressToCoordinates("3 rue Puech Villa 34000 Montpellier")
rLatitude = Localization..Latitude
rLongitude = Localization..Longitude

// Create the marker for this address
M1..Latitude = rLatitude
M1..Longitude = rLongitude
M1..Color = 0x0000FF
M1..Size = gglSmall
Add(gglParameters..Marker, M1)

// Display this address in an Image control
IMG_MAP = GglGetStaticMap(rLatitude, rLongitude, Zoom, IMG_MAP..Width, ...
IMG_MAP..Height, gglRoadmap, gglParameters)
WEBDEV - Server code This example is used to display a map from a physical address.
// Display a map from a physical address.

// Variables
Zoom is int
Zoom = 12
gglParameters is gglMapParameter
rLatitude, rLongitude are reals
Localization is gglCoordinate
M1 is gglMarker
MyImage is string
MyImage = "MyFile.gif"
ImagePath is string
ImagePath = CompleteDir(fWebDir()) + MyImage

// Retrieve the longitude and latitude of a physical address
Localization = GglAddressToCoordinates("3 rue Puech Villa 34000 Montpellier")
rLatitude = Localization..Latitude
rLongitude = Localization..Longitude

// Create the marker for this address
M1..Latitude = rLatitude
M1..Longitude = rLongitude
M1..Color = 0x0000FF
M1..Size = gglSmall
Add(gglParameters..Marker, M1)

// Display this address in an Image control
fSaveText(MyImage, ...
GglGetStaticMap(rLatitude, rLongitude, nZoom, ...
IMG_Image1..Width, IMG_Image1..Height, gglRoadmap, gglParameters))
IMG_Image1 = "./" + MyImage
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment