display a minimal map

4 posts / 0 new
Last post
display a minimal map

Hi Y'all, first post from a mapquest noob here,

I want to display a minimal map in a browser, just to start somewhere. I collated this html from the website which gets parsed in Safari, IE and Chrome but nothing displays, What am I doing wrong?

thanks in advance for your time.



<script src="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.js"></script>
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/>
<div id="map" class="js-map"></div>
L.mapquest.key = 'I have my own key here';

// 'map' refers to a <div> element with the ID map
L.mapquest.map('map', {
center: [37.7749, -122.4194],
layers: L.mapquest.tileLayer('map'),
zoom: 12



Give your map div some

Give your map div some dimensions and you should be good to go.


#map {
width: 800px;
height: 600px;


That did the trick! Thanks!

That did the trick! Thanks!

Cool. Glad to help.
Cool. Glad to help.