POST
|
Hey Isaiah, Not sure if you already found the solution, but I fixed this in my code using this, search.on("load", function () { //push all the sources var sources = search.sources; sources.push(addSources("ABC","ABC","eg : ABC",1)); sources.push(addSources("XYZ","XYZ","eg: XYZ",1)); search.set("sources", sources); //Adding the placeholder here, as the search bar is loaded with sources only at this point of the execution //Hence, we can modify the CSS only after this point. $("#search_input").attr('placeholder','Search Tree Data'); }); You cannot modify the CSS anywhere in the code. It has to be modified only when the search bar has been loaded with all its sources. I tried adding a $document.ready(function(){}); or adding the css at the end of the body. Nothing worked because we are using a different javascript library/toolkit here - Dojo. Hence, we can only performs operations based on how the data is loaded or when call backs are called in Dojo. and not in normal HTML javascript to jQuery.
... View more
11-30-2015
02:20 PM
|
0
|
0
|
1075
|
POST
|
Hi Thejus, Firstly, thank you for answering my question. I am exactly doing as what you replied. What I wanted to know was how does the search zoom to the first result and open a popup automatically. The rest of the results are obtained as arrays which we need to process later and create popups on each click. Is there any simpler way to do it than what i have done above? If you need any further details about the code I will provide that to you. Also, in the code above, I am creating a point based on the data in the result set and displaying it. Is there a more efficient way to do this? Thanks, Meghna
... View more
11-16-2015
02:13 PM
|
0
|
0
|
365
|
POST
|
Though I have accomplished the task at hand, i wish to find a more efficient way to do this. If esri have provided a way to highlight the first search result on performing a search, why is there no way to highlight the second, third ..etc result? Why do i have to manually create an anchor tag to do this? If there is a simpler way to perform this kindly let me know! My Current method: I am currently retrieving all the results after the search is complete in the following function and storing it in a global variable: search.on("search-results",function(search_results){ //access and store in global variable - allResults } For each of the data in allResults, I create a href link, [<span class='link' onclick='searchTreeNum("+counter+");return false;'>] I zoom in and popUp the infoTemplate manually. This is done in the following function , where counter represents the index in the allResults that it must generate the popup for : function searchTreeNum(counter){ var feature = allResults[counter]; map.graphics.clear(); map.infoWindow.hide(); var gs = new GeometryService(geometryLayerUrl); var bf = new BufferParameters(); var p = new Point(feature.geometry.x,feature.geometry.y,feature.geometry.spatialReference); bf.geometries = [ feature.geometry ]; bf.distances = [ 5 ]; bf.unit = esri.tasks.GeometryService.UNIT_FEET; bf.spatialReference = feature.geometry.spatialReference; bf.outSpatialReference = map.spatialReference; gs.buffer(bf, function(bufResults) { var g = new Graphic(bufResults[0], pointType2, feature.attributes, ""); map.graphics.add(g); var mp = webMercatorUtils.webMercatorToGeographic(p); map.infoWindow.setTitle(title); map.infoWindow.setContent(contentInfoWindow); map.infoWindow.show(p,map.getInfoWindowAnchor(mp)); map.setExtent(bufResults[0].getExtent()); }); }
... View more
11-15-2015
09:55 PM
|
0
|
2
|
2344
|
POST
|
H Jason, My post (click the link) pertains to what you are talking about in this thread . I want to modify the Text field in a combobox but however I cannot do that as i get an error . Could let me know if this issue has been fixed ? If not how do I go about modifying the text field? I tried using objComboBox.Text=WrittenText objComboBox.Value=WrittenText But both throw an error! Thanks, Meghna
... View more
09-29-2015
07:45 AM
|
0
|
0
|
615
|
POST
|
Thanks Nicola, I will look into this. I have a doubt however! I read 2 forums 1) ArcPad Developer Help - Concepts (I read on this forum that the comboBox.Text only returns a value but it cannot be set.) 2) GeoNet Forum Comment made by a user known as "jason.tipton.gis: "So, long story short, comboBox.value = x or comboBox.text = x probably should be something to avoid. Therefore, you have to use comboBox.ListIndex to change the selection. It seems you can always say x = comboBox.value or x = comboBox.text, but not the other way. And yes, I have logged a bug." From these 2 , I Infer that we cannot set the text field of a combobox in ArcPad but we read its contents. Is that correct? Is there any way to set the contents somehow? Also I am not familiar with building a mobile geodb axf , I will look into it and post back on this thread if i have any doubts! Hope you can help me out?
... View more
09-29-2015
07:40 AM
|
0
|
0
|
264
|
POST
|
Hi, I am working on having a filter feature in the combobox in ArcpPad,i.e based on the text entered by the user in the "Text" field , I want to show only those options that contain that text as a substring. I have completed performing this action but once a user enters a text, and i update the list, the text entered by the user gets deleted. So now if i want to set the text field of the combobox back to the data entered by the user, it prevents me from updating the text field. I get the error "Class does not support automation" How do i modify the contents of this Text Field? Let me know if you need more data to debug this issue.
... View more
09-29-2015
07:24 AM
|
0
|
2
|
2769
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|