Help with Widget

2676
24
Jump to solution
09-16-2015 06:23 AM
TerryGustafson
Occasional Contributor II

Robert,

Can you take a quick look at this. I think I’m close. Here is what the widget is supposed to do. User enters Corridor route and offset and it simply returns a point. When I debug it, it returns “function expected TypeError: Function expected.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Terry,

   You are trying to use the same constructor option you used for a SimpleLineSymbol for the SimpleMarkerSymbol and they are not the same.

Look at the doc for the proper constructor options for SimpleMarkerSymbol

View solution in original post

24 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Terry,

   As this is a whole new widget I branched this into a new Question (as you should have done).

0 Kudos
TerryGustafson
Occasional Contributor II

I’m sorry I should have started a new post.. I changed the following removed the LocPoint =new Point and the mp = with the following

mp = ;

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Terry,

  You Started with the wrong widget as your starting point. You should have started with the CreateRouteSegment widget. Attached is some changes with comments.

0 Kudos
TerryGustafson
Occasional Contributor II

Ok I will take a look at it.. thank you..

0 Kudos
TerryGustafson
Occasional Contributor II

Robert,

I’m close now. Just can’t see why it’s not plotting the point. I created the var point symbol to create the be SimpleMarkerSymbol

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Terry,

Did you set the GP out spatial reference to be the maps?

this.gp.setOutSpatialReference(this.map.spatialReference);

0 Kudos
TerryGustafson
Occasional Contributor II

Yes I added this.. this.gp.setOutSpatialReference(this.map.spatialReference); It creates the point and seems to zoom to an extent.. just does not create a graphic..

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Terry,

   You are trying to use the same constructor option you used for a SimpleLineSymbol for the SimpleMarkerSymbol and they are not the same.

Look at the doc for the proper constructor options for SimpleMarkerSymbol

View solution in original post

TerryGustafson
Occasional Contributor II

I was looking at this page in the api. Should I be looking at something else?

https://developers.arcgis.com/javascript/jssamples/gp_servicearea.html

0 Kudos