Maptitude GISDK Help

GetSample()

Summary

Gets a sample object indicating how features in a layer or selection set display on a map.

Syntax

sample = GetSample(string layer_set)

Argument

Contents

layer_set

Name of the input layer or selection set

Returns

A sample point, line, or area object, depending on the type of the layer, showing how a feature in the layer is displayed for the layer or selection set. The sample has the graphic on the left and the name of the layer or selection set on the right

Notes

Example

// Get a sample of how a State feature is displayed

smp1 = GetSample("States|")

// Get a sample for the selected States and remove the selection set name

smp2 = SetSampleText(GetSample("States|Selection"), null)

Error Codes

Error Type

Meaning

NotFound

The layer or set does not exist

See Also

Function

Summary

GetThemeSamples()

Gets sample objects indicating how features in a theme display on a map.

SamplePoint()

Creates a sample point object for use in a menu or dialog box

SampleLine()

Creates a sample line object for use in a menu or dialog box

SampleArea()

Creates a sample area object for use in a menu or dialog box

SaveSampleTomage() Saves a sample object to an image file.

SetSampleText()

Creates a sample object based on an input sample with the specified text for use in a menu or dialog box

 

 

©2025 Caliper Corporation www.caliper.com