MapQuest Tiles and Copyright over HTTPS

5 posts / 0 new
Last post
ray.maynard
MapQuest Tiles and Copyright over HTTPS

Hi

 

One of our sites is using HTTPS, and calls MapQuest in the background for maps, hybrids and satelite images using Leaflet.

We see lots of warnings and a few errors as the https traffic is redirected in MQ to be over http. The tiles render but with warnings, the image for the copyright give error as it is from an 'unsafe script' because of http. At present this is not a problem, but site security want to insist that all internet resources are over https. 

Any suggestions welcomed.

 

Ray

 


ray.maynard
Sample messages from F12 in

Sample messages from F12 in Chrome (Similar in ie).

Lots of warning messages like:

Mixed Content: The page at 'https://tpms.xxxxxxx.co.uk/sdslite/train.sdslite/ibsxmlpr.p?docid=sds_co...' was loaded over HTTPS, but requested an insecure image 'http://ttiles03.mqcdn.com/tiles/1.0.0/vy/map/17/64896/42766.jpg'. This content should also be served over HTTPS.

 

 

A few Error messages like:

Mixed Content: The page at 'https://tpms.xxxxxxxx.co.uk/sdslite/train.sdslite/ibsxmlpr.p?docid=sds_c...' was loaded over HTTPS, but requested an insecure script 'http://coverage.tt.mqcdn.com/coverage?format=json&loc=-1.76,52.88,-1.74,...'. This request has been blocked; the content must be served over HTTPS.


MQBrianCoakley
Hi Ray,
Hi Ray,   Make sure the url including the plugin is https too. The https version of the plugin should load https tiles. The user guide in the Developer Network should be doing the same thing.

ray.maynard
 

 

Thanks Brian.

I am referencing with https://www.mapquestapi.com/sdk/leaflet/v2.s/mq-map.js?key=MY KEY 

It generates js like:

COVSERVER=MQCOPYRIGHT="https://coverage.tt.mqcdn.com";
MQCOPYRIGHT_PATH="/coverage";
MAPSERVER="ttiles01-s.mqcdn.com,ttiles02-s.mqcdn.com,ttiles03-s.mqcdn.com,ttiles04-s.mqcdn.com".split(",");
MAPSERVER_TILEPATH="/tiles/1.0.0/vy/map";
MQTILEMAP="https://ttiles0{$hostrange}-s.mqcdn.com/tiles/1.0.0/vy/map/{$z}/{$x}/{$y}.{$ext}";
MQTILEMAPEXT="jpg";
MQTILEMAPHI=4;
MQTILEMAPLO=1;

Which looks good to me, But when I publish and acces via https, then F12 I get lots of warnings like below:

I published a sample page at https://cssmapping.azurewebsites.net/CSSSamples/CSSbasicDrawSearchRouteA...

 

Mixed Content: The page at 'https://cssmapping.azurewebsites.net/CSSSamples/CSSbasicDrawSearchRouteA...' was loaded over HTTPS, but requested an insecure image 'http://d.tiles.mapbox.com/v4/mapquest.streets/17/37488/50143.png?access_tok…hIjoiY2Q2N2RlMmNhY2NiZTRkMzlmZjJmZDk0NWU0ZGJlNTMifQ.mPRiEubbajc6a5y9ISgydg'. This content should also be served over HTTPS.


MQBrianCoakley
The MapQuest Leaflet plugin
The MapQuest Leaflet plugin should come directly from mapquestapi.com, not from local servers. It is not intended to be hosted locally. Make sure it's coming from https://www.mapquestapi.com and you should be good to go.