Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm trying to find out if it's possible to create custom point markers (from some image files) in Matlab with Mapping Toolbox.

So far, I haven't found anything about this in their documentation. Online searches only yielded:

No. The marker shapes are hard-coded and you cannot add new ones. If you want a custom marker, then at each point you want the marker, you will have to use line() or equivalent to draw the marker or image() or equivalent to draw in an image.

(Source: http://groups.google.com/group/comp.soft-sys.matlab/browse_thread/thread/4fe4e31f191f7080)

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

In documentation there is this page it can interesting you with this paragraph:

You can draw Marker Using Custom Icon and Description Data:

Define location.

lat =  42.299827;
lon = -71.350273;

Specify text in description balloon and name.

description = sprintf('%s<br>%s</br><br>%s</br>',...
                      '3 Apple Hill Drive', 'Natick, MA. 01760', ...
                      'http://www.mathworks.com');
 name = 'The MathWorks, Inc.';

Specify custom icon.

iconDir = fullfile(matlabroot,'toolbox','matlab','icons');
iconFilename = fullfile(iconDir, 'matlabicon.gif');

Draw marker on web map, specifying Description, FeatureName, Icon, and OverlayName. wmmarker creates the web map. In the illustration, note the custom icon and the HTML formatting in the description.

wmmarker(lat, lon, 'Description', description, ...
                   'FeatureName', name,... 
                   'Icon', iconFilename,... 
                   'OverlayName', name);
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.