Select to view content in your preferred language

Change the default highlight symbol and zoom level for URL parameter query results

3408
12
Jump to solution
09-23-2016 03:08 AM
Pin_PointAlerts
New Contributor

Hi,

I am looking to modify the default style symbols for a query result, where the query is generated using URL parameters, eg;

http://localhost/application/?query=LayerNameJSONCode_1234,ATTNAME,ATTVALUE

Right now the basic cyan outline (no fill) exists and I cannot find a way to edit this. Also, the zoom level is 100% surrounding the polygon with no buffer area displayed for local context. We are looking to change the display parameters and zoom levels to that we can link to the correct feature in our application from a URL query via an external application. The major problem for us is that the Cyan is difficult to interpret against neighbouring features.

I've tried tracing the setting back through the MXD, AGOL Map and the Web App Builder (V2). No joy.

Thanks a lot.

BC

Tags (2)
0 Kudos
12 Replies
RobertScheitlin__GISP
MVP Emeritus

Dave,

  One solution would be to expand the extent by a factor.

var resultExtent = jimuUtils.graphicsExtent(features);
map.setExtent(resultExtent.expand(1.2)); //1.2 means expand 20%

else

var resultExtent = jimuUtils.graphicsExtent(features);
map.setExtent(resultExtent).then(function(){
  map.setScale(somescale);
});

But this would be zoom and zoom again.

daveostrander
Occasional Contributor II

Thanks so much! I will experiment with that. You are right might feel a bit jerky.

0 Kudos
daveostrander
Occasional Contributor II

Hi Robert,

Expand is perfect!!! Exactly what I was looking for!  map.setExtent(resultExtent.expand(1.4)); is what I went with. 

******Correct answer******

0 Kudos