Discussion group for the members and faculty of the NEH Funded Institute for Digital Archaeology Method & Practice (http://digitalarchaeology.msu.edu) organized by Michigan State University’s Department of Anthropology and MATRIX: The Center for Digital Humanities and Social Sciences
Northern Indigenous Copper Database
June 24, 2016 at 4:51 pm #733
Well, I’ve definitely made some progress. I spent a good chunk of yesterday trying to integrate various examples of parsing csv into geojson into my existing code, with absolutely no progress. This morning, I decided to take the code from the example that Dan posted above, and set it up in a completely seperate repository, and modified it just in terms of the map focal point and zoom and linking to my .csv data file. It ended up successful, and is currently sitting at https://wanderer33third.github.io/maptest/index.html . (Neha, this code has the markerclustering integrated into it, so you might be interested in looking at it. Once I got it working on its own, I tried to pull it into my existing code, with limited success. I was able to get it to import the .csv file and display the data, but the map tiles and imagery for the marker points seems to have a broken link now. Im wondering if its an issue with different versions of the links to mapbox, but I’ve definitely overcome a significant hurdle by at least getting Omnivore to work. Thanks all
June 25, 2016 at 3:24 pm #735
- This reply was modified 2 years, 4 months ago by Matthew Pike.
Apologies for jumping in here a little far into the thread. You mentioned that you tried bringing the working omnivore example script into your own existing code and that there were a few issues with broken-looking images and tiles.
Is that existing code in a repository on GitHub? If so, which one? I’d like to take a look at it and see if any of your issues are some of the ones I helped Maria with via Slack.June 27, 2016 at 2:36 pm #736
No apologies necessary, any help is appreciated. My repository is at https://github.com/wanderer33third/MINeS/tree/master and there is a link to my Github hosted site in the readme file. I have been trying to fix the broken links, and I have gotten the map tiles to work again, but now the csv doesn’t appear to be loading anymore. I also have the original code that Dan had posted that I modified for my data in a seperate repository at https://github.com/wanderer33third/maptest . This is what I have been trying to integrate into my rough framework, with limited success.June 27, 2016 at 3:23 pm #737
DanJune 27, 2016 at 3:31 pm #738
That’s fantastic!! I figured there was something relatively minor that I was missing, but I could not for the life of me figure it out. Thanks, it looks great. What I am envisioning for my final product to have done before the Institute reconvenes is to have photographs and information for the objects from each site pop up in the sidebar in my “Exploring the Archaeology” tab. I’m imagining that when I click on a marker on the map, a small popup with the site name will appear over the marker, and a scrolling photo album of the artifacts from that site will appear in the sidebar.
I’m certainly open to suggestions that will work better as well. I’ve realized that the more I work with this, the more I appreciate features that work easily rather than the idealized one in my head. Thanks again!June 27, 2016 at 3:41 pm #739
I thought the code you were using might still be build upon ieldran, but I can see you’re doing things a bit differently, so my notes from Maria won’t be useful here.
Glad Dan sent you a pull request to incorporate the markercluster stylesheets and script. That was the one thing that stuck out at me. After getting them working, your popups will likely need to be redefined with column names from whichever .csv file you’re using.
One final note about MarkerCluster: I believe, if you use this plugin, calling the icon-specific markers built into standard mapbox may no longer work. If you want custom icons for your pins, I’d start here: http://stackoverflow.com/questions/22308868/leaflet-markercluster-custom-icons-popupsJune 27, 2016 at 3:43 pm #740
What you want is reasonable simple, might not sound it, but it is. You have an error in your code at the moment, where you are looking for a field entitled title. You don’t have that in your csv.
DanJuly 1, 2016 at 6:53 pm #741
Ok, so I have fixed the field that omnivore was looking for in the .csv, the ‘title’ tag was a holdover from the old code. So now the popups with the site name and number are enabled. I also looked at some of the custom markers, although at the moment those are a low priority, since I’ve got markers that are now working.
***(edit)*** – I no longer have the next problem, but I’ll leave it here in case it helps someone. All i had to do to fix this was change the class of my <div> from “tab content” to “tab-content”. I guess the little things matter quite a bit.
I have also figured out the reason for a problem I was having trouble with. In my “experimental Archaeology” tab, and in my “geology” tab, I have an embedded video and placeholder text that are stuck low on the page. I have realized that they are being restricted by the size of the map in the “exploring archaeology” tab. The top of the video is aligned to the bottom of the map, even though they are in two different, independent (supposedly) tabs. When I moved my map <div> to the bottom of my code as a test, then the video and text were up at the top of their respective tabs, and the map was pushed lower on the screen (restricted from being higher by the video). Im assuming there is an issue with the code governing how my tabs and <div>s are working, but Im not sure where to start to fix it.
Other than that issue, I’m now going to start figuring out how to link the map with photos and text on the sidebar. I imagine this will involve loading images and additional .csv files with artifact information onto github, and linking them to the markers. I’ll start looking around the internet for code to ‘inspire’ me, but if anyone has any suggestions for places to start, that would be great. Thanks all for your help, I feel like I’ve gotten more done this week than I have in a while.
July 19, 2016 at 6:37 pm #751
- This reply was modified 2 years, 3 months ago by Matthew Pike. Reason: fixed the issue
I’ve been working on my current task for 2 weeks now, and I don’t seem to have made any progress. I have found a few examples of incorporating linked information from a .csv file in a sidebar that is linked to a leaflet marker, but the coding skills seem to be beyond me at this point to integrate them into my project. Honestly, I am starting to see the appeal of Bootleaf as a template rather than trying to add functionality piece by piece, which is what I am realizing I have been doing.
In a nutshell, I just want associated metadata to pop up in the sidebar, along with photographs of artifacts, when I click on a leaflet marker. Ideally I want to make the interaction 2-way, so that I can select sites from a sidebar list as well. I am somewhat regretting not starting with Bootleaf as a template, because it has very close to the functionality that I am visualizing, including the potential for a search function to search through metadata to create filtered lists. (http://bmcbride.github.io/bootleaf/).
I am torn between trying to cherry-pick the functionality that I want and integrate it into my existing code, and just replacing everything within my map-div with a modified Bootleaf. I’m not sure which would be my most expedient option at this point, especially with the next MSUDAI meeting creeping up on us. Any suggestions would be greatly appreciated. Thanks allJuly 24, 2016 at 6:40 pm #764
So I have found a few examples of what I am trying to do that I thought I would post.
The first one in particular seems like a good way to change the generic Bootstrap Carousel to one where the images are loaded from from a folder (presumably that is housed in a Github repo, which I haven’t loaded yet).
I’m visualizing that there are two separate functions that I need to incorporate now –
- the loading of artifact images into a carousel from a github folder
- an onClick function linked to the leaflet marker that will call the correct artifacts image folder for the sidebar carousel
Although the internet examples have been somewhat helpful in understanding what the structure needs to be, the level of competency has been above my head so far.
July 29, 2016 at 1:43 pm #797
- This reply was modified 2 years, 3 months ago by Matthew Pike. Reason: added another example
Thought I was headed down the right track, I’ve been researching off and on for the past few days how to create a dynamic image carousel using Bootstrap, and thought I had found a decent solution using .php on a post in StackOverflow.
Unfortunately, after getting set up to try and implement it, I was informed by Github’s 404 error page that .php files are unsupported as a gh-page (for some reason I’m sure, although it is a bit beyond me).
You must be logged in to reply to this topic.
active 7 months, 2 weeks ago
active 7 months, 2 weeks ago
active 7 months, 3 weeks ago
active 1 year, 2 months ago
active 1 year, 2 months ago
active 1 month, 2 weeks ago
active 2 months ago
active 8 months, 3 weeks ago
active 9 months ago
active 1 year, 1 month ago