10

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)

1 Answer 1

1

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);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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