Esri / arcgis-dijit-locate-button-js

A simple dijit button that when clicked navigates to the users current location using HTML5 Geolocation if available.
http://esri.github.io/arcgis-dijit-locate-button-js/
Apache License 2.0
4 stars 8 forks source link

GPS symbol layer name incorrect in the legend of a printout #2

Closed DavidSpriggs closed 10 years ago

DavidSpriggs commented 10 years ago

When printing a map that has a gps point on it, the legend has 'Override 1' as the layer name. This is due to the gps graphic being added directly to the maps graphics layer without a renderer. The printing service can only properly render a legend when a renderer is present. To fix, add a graphics layer with a renderer for the gps point. This will also help separate other issue when users try to use the map's graphics layer.

image

Se an example on how to fix this in my simple geolocation widget: https://github.com/DavidSpriggs/ConfigurableViewerJSAPI/blob/master/viewer/js/gis/dijit/GeoLocation.js#L40

You can do a test print here to see the diffrence: http://davidspriggs.github.io/ConfigurableViewerJSAPI/viewer/

image

driskull commented 10 years ago

Hey David, Praveen wanted me to not use a graphics layer since he said it was overkill having a graphics layer for one graphic. I guess in this case you would just need to set the property to not add the graphic and add it yourself to a graphic layer of your choosing.

Does that make sense?

DavidSpriggs commented 10 years ago

Yes or have option to pass in a graphics layer to use, otherwise use the maps graphics layer.

driskull commented 10 years ago

maybe an option like

graphicsLayer: true or <GraphicsLayer>
swingley commented 10 years ago

Adding a graphicsLayer ctor option seems reasonable. As for choices, I think it should either be "default" or <GraphicsLayer>.

driskull commented 10 years ago

by default, do you mean not use a graphicsLayer and just add to the map?

swingley commented 10 years ago

I'm re-thinking this...what if we say the value for graphicsLayer should correspond to an id for a graphics layer? If the widget is created without specifying graphicsLayer, the widget uses map.graphics.

driskull commented 10 years ago

checked into API. closing

ritanshu-goel commented 9 years ago

is it taking location from network or GPS? how can we access location using Mobile GPS?