php - Why isn't the image being displayed? -
i'm trying static image bing maps pushpins , showing location of individuals. i'm using imagery api bing supplies , using simple example code i'm getting ";?>
instead of image.
<html> <head> <title>driver locations</title> </head> <body> <?php $latitude = "40.59507828"; $longitude = "-73.78302689"; $key = ""; $imagerybaseurl = "http://dev.virtualearth.net/rest/v1/imagery/map"; $pushpins = "&pp="; $mapsize = "?mapsize=800,600"; $ppstyle = ";47;"; $imageryset = "road"; $juliecp = $latitude.",".$longitude; $juliepp = $juliecp.$ppstyle."julie"; $zoomlevel = "15"; $latitude = "40.90421779"; $longitude = "-73.86591633"; $markcp = $latitude.",".$longitude; $markpp = $markcp.$ppstyle."mark"; //http://dev.virtualearth.net/rest/v1/imagery/map/road?mapsize=800,600&pp=40.59507828,-73.78302689;47;julie&pp=40.90421779,-73.86591633;47;mark&key=$key echo "<img src='".$imageryurl = $imagerybaseurl."/".$imageryset."?mapsize=800,600".$pushpins.$markpp.$pushpins.$juliepp."&key=".$key."'>"; ?> </body> </html>
i think url have : http://dev.virtualearth.net/rest/v1/imagery/map/road?mapsize=800,600&pp=40.59507828,-73.78302689;47;julie&pp=40.90421779,-73.86591633;47;mark&key=$key
denied.
the result :
{"authenticationresultcode":"nocredentials","brandlogouri":"http:\/\/dev.virtualearth.net\/branding\/logo_powered_by.png","copyright":"copyright © 2015 microsoft , suppliers. rights reserved. api cannot accessed , content , results may not used, reproduced or transmitted in manner without express written permission microsoft corporation.","errordetails":["access denied. may have entered credentials incorrectly, or might not have access requested resource or operation."],"resourcesets":[],"statuscode":401,"statusdescription":"unauthorized","traceid":"8782486bb4cc49388954a152f95ce666|hk20271556|02.00.196.1900|"}
the message : this api cannot accessed , content , results may not used, reproduced or transmitted in manner without express written permission microsoft corporation.
you need give credentials used it. have ?
Comments
Post a Comment