ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Map functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Remark: These functions are also available in prefix syntax (Functions for managing Map controls (prefix syntax)).
The following functions are used to manage Map controls:
MapAddImageAdds a new image to the map displayed in a Map control.
MapAddItineraryAdds an itinerary onto a Map control.
MapAddMarkerAdds a new marker onto a map displayed in a Map control.
MapAddShapeAdds a new shape (polygon, line, circle) to the map displayed in a Map control.
MapChangeStyleChanges the style of the map displayed in the Map control.
MapClosePopupCloses the popup of a marker displayed in the Map control.
MapConfigureGglAPIDeclares additional parameters for the Map control that will be transmitted to the Google API.
MapDeleteAllDeletes the following from a Map control:
  • all markers,
  • all shapes,
  • all images.
MapDeleteImageDeletes an image drawn on the map displayed in a Map control.
MapDeleteItineraryDeletes an itinerary from a Map control.
MapDeleteMarkerDeletes a marker from a map displayed by a Map control.
MapDeleteShapeDeletes a shape drawn on the map displayed in an Map control.
MapDisplayAreaMoves the map displayed in the Map control so that the specified geographic area can be seen in its entirety.
MapDisplayPopupOpens the popup of a marker displayed in a Map control.
MapDisplayPositionCenters the map displayed in a Map control on a geographical position or on a specific location.
MapEndOfMoveStops following the device movement in a Map control.
MapExecuteJSRuns the native code of Google Maps API in a Map control in JavaScript.
MapFollowMovementDisplays the current location of the device in a Map control and updates the location as it moves.
MapGetImageRetrieves the image of a map displayed in a Map control. The markers and the itineraries displayed on this map will also be found in the image.
MapGetJSObjectReturns the instance of the API of Map control.
MapGetPositionReturns the geographical position of the point located in the center of the map currently displayed in a Map control.
MapGetStyleReturns the style used by the map displayed in the Map control.
MapInfoPositionReturns the coordinates (in pixels) of the point corresponding to a geographical position (latitude and longitude).
MapInfoXYReturns the geographical position (latitude and longitude) corresponding to a point in a Map control.
MapItineraryDistanceCalculates the distance of an itinerary in a Map control.
MapLicenseBingIndicates the "Bing map" license key that will be used in the Map controls used in Universal Windows 10 App mode.
MapLicenseGglIndicates the "Google Maps API" license key that will be used in the Map controls (of WINDEV or WEBDEV).
MapLimitAreaLimits the geographic area displayed in the Map control.
MapModifyImageModifies an image drawn on the map displayed in a Map control.
MapModifyMarkerModifies a marker displayed in a Map control.
MapModifyShapeModifies a shape drawn on the map displayed in a Map control.
MapPopupDisplayedIndicates whether the popup of a marker in a Map control is displayed.
The types of variables manipulated by the Map control or one of its functions are the following:
MapCircleThe MapCircle type is used to define the characteristics of a circle to be drawn on the map displayed in a Map control.
MapImageThe MapImage type is used to define the characteristics of an image to be drawn on the map displayed in a Map control.
MapPolygonThe MapPolygon type is used to define the characteristics of a polygon to be drawn on the map displayed in a Map control.
MapPolylineThe MapPolyline type is used to define the characteristics of a line composed of several segments to be drawn on the map displayed in a Map control.
MarkerThe Marker type is used to define the characteristics of a marker that must be positioned on a map displayed in a Map control.
MarkerImageThe MarkerImage type is used to customize the image associated with a marker or a marker cluster displayed in a Map control.
Related Examples:
The Map control Unit examples (WEBDEV): The Map control
[ + ] This example explains how to use the Map control of WEBDEV.
It can be used to display a map that includes markers as well as an itinerary.
The Map control Unit examples (WINDEV): The Map control
[ + ] Using the Map control of WINDEV.
It is used to display a map that includes markers as well as an itinerary.
WM Sports Cross-platform examples (WINDEV Mobile): WM Sports
[ + ] This example is a sport application used to save your performances.
The application calculates the distance, the time, the average speed and the number of calories spent according to the sport.
The run is displayed on a map control via markers and an itinerary.

The example also includes a server part used to synchronize the user data.
This webservice is available in the WEBDEV "WW_Sports" example.
WM Geolocation Cross-platform examples (WINDEV Mobile): WM Geolocation
[ + ] This example explains how to perform proximity searches with geolocation :
- search around me
- search in a city, at a given address, or close to a specific address.
The results are displayed in a looper and in a map with markers.
Minimum version required
  • Version 17
This page is also available for…
Comments
Errors that may occur in Maps not working:
A) in the Google developer environment, a valid credit/debit card must be registered in the billing method of payment. If you do not have a card that has valid usage data, it may also give an error.
B) environment changes may be necessary to create new api key.
C) the api is not ok, because for the maps it has a
Different web and mobile apis, minus watching an updated tutorial.
D) ocorre erro também quando o WX (Windev, Webdev e Windev Mobile) esta desatualizado e usando a versão antiga do internet explorer. Solução mudei pra o google/edge.
E) informeo apikey válido do googlemaps.
Boller
30 Aug. 2023

Last update: 06/22/2023

Send a report | Local help