Closed DavidSpriggs closed 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?
Yes or have option to pass in a graphics layer to use, otherwise use the maps graphics layer.
maybe an option like
graphicsLayer: true or <GraphicsLayer>
Adding a graphicsLayer ctor option seems reasonable. As for choices, I think it should either be "default"
or <GraphicsLayer>
.
by default, do you mean not use a graphicsLayer and just add to the map?
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.
checked into API. closing
is it taking location from network or GPS? how can we access location using Mobile GPS?
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.
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/