Select to view content in your preferred language

Help with Widget

3993
24
Jump to solution
09-16-2015 06:23 AM
TerryGustafson
Frequent Contributor

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 Emeritus

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 Emeritus

Terry,

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

0 Kudos
TerryGustafson
Frequent Contributor

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 Emeritus

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
Frequent Contributor

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

0 Kudos
TerryGustafson
Frequent Contributor

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 Emeritus

Terry,

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

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

0 Kudos
TerryGustafson
Frequent Contributor

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 Emeritus

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

TerryGustafson
Frequent Contributor

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