Select to view content in your preferred language

Marker Symbols

3101
6
Jump to solution
07-29-2014 09:56 AM
jaykapalczynski
Honored Contributor

I got the below code for a marker symbol from JavaScript API examples....

I was wondering if there was a location I could go to to find the "setPath" for a push pin or other graphic symbol?

Is there a list of graphics and their associated numbers?

        var DrawmarkerSymbol = new SimpleMarkerSymbol();

        DrawmarkerSymbol.setPath("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z");

        DrawmarkerSymbol.setColor(new Color("#00FFFF"));

0 Kudos
1 Solution

Accepted Solutions
TimWitt2
MVP Alum

Jay,

You can get the html of symbols here: Marker Symbols

A pushpin for example is this

var pointexample = new PictureMarkerSymbol('http://static.arcgis.com/images/Symbols/Basic/RedStickpin.png', 20, 20);

and use the picturemarkersymbol-amd | API Reference | ArcGIS API for JavaScript‌ class.

Tim

View solution in original post

6 Replies
KevinDeege
Esri Contributor

HI Jay,

I wonder if you could use PictureMarkerSymbol as an alternative?

Esri picture marker symbol generator for JavaScript developers | ArcGIS Blog

0 Kudos
TimWitt2
MVP Alum

Jay,

You can get the html of symbols here: Marker Symbols

A pushpin for example is this

var pointexample = new PictureMarkerSymbol('http://static.arcgis.com/images/Symbols/Basic/RedStickpin.png', 20, 20);

and use the picturemarkersymbol-amd | API Reference | ArcGIS API for JavaScript‌ class.

Tim

jaykapalczynski
Honored Contributor

Thanks Kevin and Tim...thats what I was looking for...especially the site with the images...

Cheers

0 Kudos
AnthonyGiles
Honored Contributor

Jay,

another good site for icons can be found here:

Map Icons Collection | Google Maps Icons, Map Markers, Free POI Icons, GIS Symbols

RobertScheitlin__GISP
MVP Emeritus

Jay,

   Have you seen this site? Icons

You can also generate the path strings from Adobe Illustrator: vector - Photoshop Custom Shape to SVG path string - Stack Overflow

0 Kudos
jaykapalczynski
Honored Contributor

Awesome Robert...Thanks will most likely use these as well.

Only thing I dont see in there is markers for Campgrounds, hiking, Fishing etc.

0 Kudos