Using the ArcGIS Map JS SDK, I created a map with a simple marker symbol created on map click. Here is the code:
require(["esri/Map", "esri/views/MapView", "esri/Graphic", "esri/layers/GraphicsLayer"], (Map, MapView, Graphic, GraphicsLayer) => {
map = new Map({
basemap: "streets-vector"
});
const view = new MapView({
container: "map_details",
map: map,
zoom: 16,
center: [INIT_COORDINATES.LNG, INIT_COORDINATES.LAT]
});
graphicsLayer = new GraphicsLayer();
map.add(graphicsLayer);
view.when(() => {
view.on("click", (event) => {
pointGraphic = new Graphic({
geometry: {
type: "point",
longitude: event.mapPoint.longitude,
latitude: event.mapPoint.latitude
},
symbol: {
type: "simple-marker",
size: 50, // how do I set it to 50 meter ? Its unit is pt now
color: [226, 119, 40, 0.5]
}
});
graphicsLayer.add(pointGraphic);
});
});
});
How do I set it to 50 meter ? Its unit is pt
now. Currently, the marker symbol is still 50pt no matter what is the zoom level. I expect the marker will adjust the size based on the zoom level (i.e. always 50 meter)
On the other hand, how do I set the language of the map? I tried to use:
map = new Map({
basemap: "streets-vector",
language: "es"
});
but the map is still showing English language.