{"id":309,"date":"2014-04-07T15:14:50","date_gmt":"2014-04-07T15:14:50","guid":{"rendered":"http:\/\/blogs.discovery.wisc.edu\/projects\/?p=309"},"modified":"2014-04-09T15:18:27","modified_gmt":"2014-04-09T15:18:27","slug":"paramecium-test","status":"publish","type":"post","link":"https:\/\/blogs.discovery.wisc.edu\/projects\/2014\/04\/07\/paramecium-test\/","title":{"rendered":"Paramecium test"},"content":{"rendered":"<p><em>Paramecia<\/em>\u00a0Test<\/p>\n<p>The image works as the preview on my computer (when using my external hard drive as a source for the images &#8211; I tried storing images directly on my computer but there was not enough room, so the hard drive is necessary)<\/p>\n<p>I don&#8217;t think I&#8217;m telling it to look in the correct place for the images&#8230;\u00a0Files are uploaded to Box.com, in folders for the different zoom levels:<\/p>\n<div>\n<dl id=\"attachment_529\">\n<dt><a href=\"http:\/\/jwhisenant.files.wordpress.com\/2014\/04\/screenshot-2014-04-07-08-05-17.png\"><img loading=\"lazy\" alt=\"Paramecia folder in Box.com\" src=\"http:\/\/jwhisenant.files.wordpress.com\/2014\/04\/screenshot-2014-04-07-08-05-17.png?w=300\" width=\"300\" height=\"187\" \/><\/a><\/dt>\n<dd>Paramecia folder in Box.com<\/dd>\n<\/dl>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Here is the code I am using:<\/p>\n<p>html, body, #map-canvas {<br \/>\nheight: 100%;<br \/>\nmargin: 0px;<br \/>\npadding: 0px<br \/>\n}<\/p>\n<p>var moonTypeOptions = {<br \/>\ngetTileUrl: function(coord, zoom) {<br \/>\nvar normalizedCoord = getNormalizedCoord(coord, zoom);<br \/>\nif (!normalizedCoord) {<br \/>\nreturn null;<br \/>\n}<br \/>\nvar bound = Math.pow(2, zoom);<br \/>\nreturn &#8216;<strong>https:\/\/app.box.com\/files\/0\/f\/1814786029\/InfocusAnatomy_Paramecium<\/strong>&#8216; +<br \/>\n&#8216;\/&#8217; + zoom + &#8216;\/&#8217; + normalizedCoord.x + &#8216;\/&#8217; +<br \/>\nnormalizedCoord.x + &#8216;.jpg&#8217;;<br \/>\n},<br \/>\ntileSize: new google.maps.Size(256, 256),<br \/>\nmaxZoom: 8,<br \/>\nminZoom: 0,<br \/>\nradius: 32768,<br \/>\nname: &#8216;Moon&#8217;<br \/>\n};<\/p>\n<p>var moonMapType = new google.maps.ImageMapType(moonTypeOptions);<\/p>\n<p>function initialize() {<br \/>\nvar myLatlng = new google.maps.LatLng(0, 0);<br \/>\nvar mapOptions = {<br \/>\ncenter: myLatlng,<br \/>\nzoom: 1,<br \/>\nstreetViewControl: false,<br \/>\nmapTypeControlOptions: {<br \/>\nmapTypeIds: [&#8216;moon&#8217;]<br \/>\n}<br \/>\n};<\/p>\n<p>var map = new google.maps.Map(document.getElementById(&#8216;map-canvas&#8217;),<br \/>\nmapOptions);<br \/>\nmap.mapTypes.set(&#8216;moon&#8217;, moonMapType);<br \/>\nmap.setMapTypeId(&#8216;moon&#8217;);<br \/>\n}<\/p>\n<p>\/\/ Normalizes the coords that tiles repeat across the x axis (horizontally)<br \/>\n\/\/ like the standard Google map tiles.<br \/>\nfunction getNormalizedCoord(coord, zoom) {<br \/>\nvar y = coord.y;<br \/>\nvar x = coord.x;<\/p>\n<p>\/\/ tile range in one direction range is dependent on zoom level<br \/>\n\/\/ 0 = 1 tile, 1 = 2 tiles, 2 = 4 tiles, 3 = 8 tiles, etc<br \/>\nvar tileRange = 1 &lt;&lt; zoom;<\/p>\n<p>\/\/ don&#8217;t repeat across y-axis (vertically)<br \/>\nif (y = tileRange) {<br \/>\nreturn null;<br \/>\n}<\/p>\n<p>\/\/ repeat across x-axis<br \/>\nif (x = tileRange) {<br \/>\n\/\/x = (x % tileRange + tileRange) % tileRange;<br \/>\nreturn null;<br \/>\n}<\/p>\n<p>return {<br \/>\nx: x,<br \/>\ny: y<br \/>\n};<br \/>\n}<\/p>\n<p>google.maps.event.addDomListener(window, &#8216;load&#8217;, initialize);<\/p>\n<div id=\"map-canvas\"><\/div>\n<p>Box.com is much better than the original &#8220;mywebspace&#8221; from UW, with more storage and a much more streamlined uploading system. It does log out periodically, but it is easier to go back and find where I need to pick back up, especially now that the tile images sorted into folders instead of one massive conglomeration.<\/p>\n<p>Cricket is also in progress, and Onion is being re=done, with better representations of cellular organization as far as root nutrient absorption. Even though the onion was supposed to just be a test, I want it to be fully rendered instead.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Paramecia\u00a0Test The image works as the preview on my computer (when using my external hard drive as a source for the images &#8211; I tried storing images directly on my computer but there was not enough room, so the hard &hellip; <a href=\"https:\/\/blogs.discovery.wisc.edu\/projects\/2014\/04\/07\/paramecium-test\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":86,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,3],"tags":[10,26],"_links":{"self":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/309"}],"collection":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":4,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":329,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/309\/revisions\/329"}],"wp:attachment":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}