Is there a way to sort the list of maps?
Is there a way to filter the list?
Thanks,
cucinellij
searchType : 'Web Map', sortField : 'uploaded', sortOrder : 'desc',
sortField: The allowed field names are title, uploaded, type, owner, avgRating, numRatings, numComments and numViews.
sortOrder: Values: asc | desc
I think I understand.
If you replace lines 142 and 143 on "/scripts/home/local.js" which has this code// BUILD LIST ITEM html += '<li><a title="' + data.results.snippet + '" href="'+obj.arcgispath+'home/item.html?id=' + data.results.id + '">' + data.results.title + '</span></a></li>';
with this:if(data.results.url){ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+ data.results.url + '">' + data.results.title + '</span></a></li>'; } else{ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+obj.arcgispath+'home/item.html?id=' + data.results.id + '">' + data.results.title + '</span></a></li>'; }
that will open the layers list with the application URL in a new window like you're doing with the featured maps. Some of them are just items and don't have a URL I see so they will just open in ArcGIS.com. You may be able to change that.
Any other thoughts on this?
Hey xander,
What are you trying to do exactly?
You had it right. I want the featurelayers to open with the application URL and not arcgis. The code provided doesn't seem to fix it.
If you look and Cleveland Wards as a specific example it's under both fetaurelayers and featuremaps. If opened under featuremaps it opens as http://www.clevelandgis.com/gallery/map.html?webmap=XXXX
If opened under featurelayer it opens as http://www.arcgis.com/home/item.html?id=XXXX
Thanks..
if(data.results.url){ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+ data.results.url + '">' + data.results.title + '</span></a></li>'; } else{ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+obj.arcgispath+'home/item.html?id=' + data.results.id + '">' + data.results.title + '</span></a></li>'; } }
if(data.results.url){ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+ data.results.url + '">' + data.results.title + '</span></a></li>'; } else{ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="map.html?webmap=' + data.results.id + '">' + data.results.title + '</span></a></li>'; } }
Oh ok. try replacing this:if(data.results.url){ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+ data.results.url + '">' + data.results.title + '</span></a></li>'; } else{ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+obj.arcgispath+'home/item.html?id=' + data.results.id + '">' + data.results.title + '</span></a></li>'; } }
with this:if(data.results.url){ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+ data.results.url + '">' + data.results.title + '</span></a></li>'; } else{ // BUILD LIST ITEM html += '<li><a target="_blank" title="' + data.results.snippet + '" href="map.html?webmap=' + data.results.id + '">' + data.results.title + '</span></a></li>'; } }
I'm just changing the link to go to "map.html?webmap="
If you change line 26 to "perRow : 2," on "/scripts/home/local.js" it should fix that display error.
It's currently added a class "endRow" to every third item which is removing the padding. If you change it to 2, it should only add it to the 2nd item on each column. Or you can remove the endRow class from global.css. That's another option.
Hope that helps.
Just when I thought my questions were answered...
For featurelayer: searchType : 'Web Map' returns both Web Map and Web Mapping Applications on the featurelayer list. I can't seem to isolate just the web maps on the feturedlayers list.
However, if I try searchType : 'Web Mapping Application' it does isolate my flex apps on both the featuremaps and featurelayer. web map are not shown at all.
if(data.results.url){ // BUILD LIST ITEM // html += '<li><a target="_blank" title="' + data.results.snippet + '" href="'+ data.results.url + '">' + data.results.title + '</span></a></li>'; }
YES it does, thanks very much. i know this is an 'unsupported' template. but you go to great lengths to help make it work for everyone, thanks for your assistance.