Select to view content in your preferred language

How do I add a legend to the following map? http://jsbin.com/?html,output

1106
8
03-07-2017 07:56 AM
ManishaTewari
Emerging Contributor

Any help or a link to a source on creating legends will be greatly appreciated.  tahnsk in advance.

0 Kudos
8 Replies
thejuskambi
Frequent Contributor

Which map are we talking about?

Please be more descriptive about the issue you are facing. Below are some point that you can add to you post which will make the other developers understand the problem and provide you solutions.

  • Provide a brief background what you trying to achieve.
  • Provide the version of API you are using.
  • Provide the error information, if you are getting any.
  • Try to add some code about what you have tried so far, or the part where the error occurs.
ManishaTewari
Emerging Contributor

Thanks so much-

Here is the map-

http://jsbin.com/hobege/edit?html,output

here is what I’m trying to do-

Add magnitude-dependent styling for the earthquakes

- Add a title to the plot -

-Add labels that indicate the number of earthquakes of various sizes

- Add a legend for the styling

-Add a legend. Create your own custom legend.

Thanks again

0 Kudos
thejuskambi
Frequent Contributor

Hello Manisha

Does you application has anything to do with ArcGIS or ArcGIS JavaScript API? It doesn't look like you are using it.

0 Kudos
ManishaTewari
Emerging Contributor

I would like to be able to use ArcGIS Javascript. Is it possible?

0 Kudos
thejuskambi
Frequent Contributor

Yes it is possible, but you would have to build the map, using ArcGIS JS API, and not just the Legend.

0 Kudos
ManishaTewari
Emerging Contributor

Ok, I have to learn that. I’m a newbie to scripting and taking a class for visualization, for which I was asking for help.

Thanks so much for your patience.

Regards,

Manisha

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Manisha,

  So the first thing you do is learn about using the esri JS API.

Look at a sample like this:

https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_legend 

then you replace the map service url with one for earthquakes like this one:

https://igems.doi.gov/arcgis/rest/services/igems_haz/MapServer/3 

0 Kudos
ManishaTewari
Emerging Contributor

Hi Richard,

All this is very new to me. Was trying to do this for a HW assignment for a class that I’m taking on visualizations. Have to start with 101 of ESRI JS API.

But thank you so much for providing the link.

Regards,

Manisha.

0 Kudos