Problems with Search widget

2048
3
Jump to solution
01-14-2016 09:48 AM
Salmon_ArmBC
New Contributor III

I am new at this. I have cobbled together code from various examples. I am trying to create a map with a search widget and in which the popup info comes up in the bar at the bottom. I can't seem to do both.

When parser.parse() is commented out: the search widget appears but the popup information does not appear in the bottom bar

When parser.parse() isn't commented out, the search widget does not appear, but the popup information shows in the bottom bar when I click a feature.

Please see the attached file. What am I doing wrong?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Laura,

  I did some rearranging of your requires and removed connect from your code in favor of dojo on (connect is the old way). The real issue is that you had a div that was a dijit/layout/ContentPane that you were trying to assign the search dijit to but because it was a dijit/layout/ContentPane already you were getting duplicate id error in the parser. to get past that you create a child div inside the dijit/layout/ContentPane and use that child divs id to assign the search dijit to.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Laura,

  I did some rearranging of your requires and removed connect from your code in favor of dojo on (connect is the old way). The real issue is that you had a div that was a dijit/layout/ContentPane that you were trying to assign the search dijit to but because it was a dijit/layout/ContentPane already you were getting duplicate id error in the parser. to get past that you create a child div inside the dijit/layout/ContentPane and use that child divs id to assign the search dijit to.

Salmon_ArmBC
New Contributor III

Thanks Robert! That really helped. I still have a few issue to resolve, but I think I can handle it. Now it looks like this:

Forum_Pic.JPG

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Laura,

   Glad to help. Make sure to mark this question as answered.

0 Kudos