As you can see this is a tutorial example map. It works strangely on my own website. The Florida location is now shifting down a little bit. In fact, all of the dots shift down a little bit.
How do I implement it? I simply copy the js code. And use wp_enqueue_scripts to include the cartodb.js and my own js. Since the map not shows up if I use width: 100%; height: 100%;
so I explicitly set the px in css file like this:
#casemap{width: 1000px; height: 600px; background: black;}
Here is my php code.
<?php /* Template Name: Casemap */
get_header(); ?>
<header class="page-header">
<h1 class="page-header-title"><?php the_title(); ?></h1>
</header>
<div id='casemap'></div>
<?php get_footer(); ?>
PS, No JS error in my browser console.
Here is the tutorial website: http://ift.tt/1s3HqIE
Here is url to the tutorial code: http://ift.tt/1EZos81
Aucun commentaire:
Enregistrer un commentaire