2

I'm new to CartoDB but hoping to use it to display various types of real estate data on my website. That said I've been playing around with some of the sample code (Google Maps V3 integration example - https://github.com/CartoDB/cartodb.js/blob/develop/examples/gmaps.html) and cannot get this data to display within my website (see test page - https://metropolisiq.com/MapTest). I've tried the same code within Dreamweaver and it works fine. Not sure what the issue is, but perhaps it relates to the differences between Dreamweaver and my website:

  1. My site is encrypted (HTTPS)
  2. My site was built using the Joomla CMS.

How do I solve this?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Jan 8, 2014 at 20:16

1 Answer 1

3

Your site is running over HTTPS which requires some changes to your code.

Update the .css file source,

<link rel="stylesheet" href="https://d3voyrscnb0slx.cloudfront.net/cartodb.js/v3/themes/css/cartodb.css" />
<!--[if lte IE 8]>
 <link rel="stylesheet" href="https://d3voyrscnb0slx.cloudfront.net/cartodb.js/v3/themes/css/cartodb.ie.css" />
<![endif]-->

Next, update the cartodb.js source,

<script src="https://d3voyrscnb0slx.cloudfront.net/cartodb.js/v3/cartodb.js"></script>

Update the google maps source,

<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>

Finally, update the viz.json createLayer method to an HTTPS url and tell it to use HTTPS

cartodb.createLayer(map, 'https://documentation.cartodb.com/api/v2/viz/2b13c956-e7c1-11e2-806b-5404a6a683d5/viz.json', {https: true})

I think that will fix it for you.

answered Jan 8, 2014 at 21:54

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.