How to highlight points ?

618
2
05-18-2017 06:37 AM
C_Chipniz
New Contributor

Hi

I am new in this froum, thank you for your welcome.

I want to highlight points on a map by sending a request in an URL. The parameters of the URL would be the latitude and the longitude of each point I want to highlight. A little bit like Google Maps, when it displays pins on the map.

How to achieve this ?

Regards.

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

C. Chipniz,

  So you want to add points to the map or do you want to query existing data from a ArcGIS Server Map Service?

0 Kudos
ThomasSolow
Occasional Contributor III

Like Robert posted, it really depends on the specifics of what you want to do.

Do you want to add a point to an existing map and persist that point?  You need to have backend infrastructure set up to do this.

Do you want to visually add a point to a map in the client?  You can do this without making a request, but it won't be persisted anywhere.

Do you want to highlight a point that already exists?  You can visually highlight a point in the client, or you could edit the point on the backend to represent it being highlighted, so anyone who pulls in that map can see what is highlighted.

Since you're new to the API, I'd take a look at esri/Graphic.  Things that are added to the map in the JS API are called graphics.  Graphics consist of attributes (key-value pairs, must be strings/numbers), geometries (the shape of the graphic: polygon, line, point, multipoint, extent (bounding box), or circle), and a symbol (how the geometry is symbolized on the map, the color, fill, etc).  Graphics can be added to a map in the client, without communicating to any service, but often they are added to a map in response to data that is from some other service, whether an Esri service or a list of lng/lats from any server.

Here's a simple example from the 4.XX SDK that adds three graphics with different types of geometry to a 2D map: ArcGIS API for JavaScript Sandbox

0 Kudos