Skip to content

Instantly share code, notes, and snippets.

@nikolaswise
Created February 4, 2014 21:34
Show Gist options
  • Save nikolaswise/8812786 to your computer and use it in GitHub Desktop.
Save nikolaswise/8812786 to your computer and use it in GitHub Desktop.
simple symbol simple marker simple
require([
"esri/map",
"esri/request",
"esri/geometry/Point",
"esri/symbols/SimpleMarkerSymbol",
"esri/graphic",
"dojo/domReady!"],
function(Map, request, Point, SimpleMarkerSymbol, Graphic) {
window.map = new Map("mapDiv", {
center: [-122.68,45.53],
zoom: 11,
basemap: "gray"
});
var strokejson = {
"color":[0,0,0,255],
"width":1,
"type":"esriSLS",
"style":"esriSLSSolid"
};
var symboljson = {
"color":[255,255,255,64],
"size":12,
"angle":0,
"xoffset":0,
"yoffset":0,
"type":"esriSMS",
"style":"esriSMSCircle",
"outline": strokejson
};
window.point = new Point(-122.68, 45.53);
var thisPoint = {
"geometry": point,
"symbol": symboljson
};
var finishedPoint = new Graphic(thisPoint);
map.on('load', function () {
map.graphics.add(finishedPoint);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment