OnMapShowing()

void OnMapShowing(inCallback, inQuestionIndex, inIteration)

Description

This callback function is called when map is shown in a location question, click here to learn more on location questions

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inCallback IMapCallback The parameter you would like to show and set to the map
inQuestionIndex Int The question index
inIteration Int Iteration Index

 

Return Type

void

 

Example

For example adding 2 locations called 'KSP' and 'Japanika' that will be shown on the map when surveyor will open it and setting the zoom level to be 8:

function OnMapShowing(inCallback, inQuestionIndex, inIteration){
inCallback.AddMarker(CreateMapMarker(CreateCoords(32.1746225,34.9264295),"KSP"));
inCallback.AddMarker(CreateMapMarker(CreateCoords(32.170772, 34.928223),"Japanika"));
inCallback.setZoomLevel(8);
}

inCallBack Parameters

  • inCallback.setMapCenter(CreateCoords(GetGPSLocation().Latitude, GetGPSLocation().Longitude))
  • inCallback.setZoomLevel(X) - enter the zoom level as a number e.g.: 8, 10, 15 etc.
  • inCallback.setSatellite(true/false)
  • inCallback.AddMarker(CreateMapMarker(CreateCoords(Lat, Long),"inName"));
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.