<\/P>
Se você já usou o LabelLayer<\/A> antes para anotar seu mapa, você está familiarizado com o fato de que pode adicionar rótulos que correspondem aos dados do seu mapa. Este é um recurso legal e tenho certeza de que é realmente interessante trabalhar com pseudo-anotações<\/EM> no seu webmap, mas por que parar por aí?<\/P><\/P>
Também é bem fácil usar ícones de fonte no
4.<\/STRONG> Agora você pode atribuir o símbolo ao gráfico e adicioná-lo ao mapa.<\/P>feature.setSymbol(sym);\nmap.graphics.add(feature);<\/PRE><\/P>Aqui está o JavaScript completo para os trechos acima.<\/P>require([\n "esri\/_map", \n "esri\/_symbols\/_TextSymbol",\n "esri\/_tasks\/_query",\n "esri\/_tasks\/_QueryTask",\n "esri\/_symbols\/_Font",\n "esri\/_Color",\n "dojo\/_domReady!"\n], function(\n Map, TextSymbol,\n Query, QueryTask, Font,\n Color\n) {\n var map = new Map("map-div", {\n center: [-122.445, 37.752],\n zoom: 14,\n basemap: "gray"\n });\n\n var treeColor = new Color("#666");\n var treesUrl = "
Killer samples. Thanks for sharing!
Hello Rene, thank you for this post, it was very useful. I took it a step further and added an icon picker and wrote a post about some of the challenges involved, feel free to take a look:
Dynamic Custom Labeling with ArcGIS for Javascript and FontAwesome
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.