我正在开发Symfony应用程序(Mapbender3),并且是这个框架的新手(因为我是Codeigniter的一员)。应用程序应该使用ajax请求加载视图页面,但它没有。我检查了控制台,它说:
Failed to load resource: http://localhost/mapbender3/web/app.php/owsproxy/?url=http%3A%2F%2Flocalhost%2Fmapbender3%2Fweb%2Fapp.php%2Fapplication%2Fmopwmaps%2Finstance%2F9%2Ftunnel&TRANSPARENT=TRUE&FORMAT=image%2Fpng&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&LAYERS=cite%3ARoad_Master&SRS=EPSG%3A4326&BBOX=62.69026197435,31.478060912429,70.30973802565,35.521939087571&WIDTH=2400&HEIGHT=1273
the server responded with a status of 500 (Internal Server Error)和一个错误:
GET http://localhost/mapbender3/web/app.php/owsproxy/?url=http%3A%2F%2Flocalhos…60912429%2C67.942541429504%2C35.521939087571%26WIDTH%3D908%26HEIGHT%3D1273 500 (Internal Server Error)
jquery.js:9659我遵循了jquery.js文件中的错误,它是:
xhr.send( ( options.hasContent && options.data ) || null );此外,logs/prod.log指出:
[2015-11-22 07:54:42] request.CRITICAL: Uncaught PHP Exception Exception: "No URL signature provided" at C:\wamp\www\mapbender3\owsproxy\src\OwsProxy3\CoreBundle\Controller\OwsProxyController.php line 95 {"exception":"[object] (Exception(code: 500): No URL signature provided at C:\\wamp\\www\\mapbender3\\owsproxy\\src\\OwsProxy3\\CoreBundle\\Controller\\OwsProxyController.php:95)"} []
[2015-11-22 07:54:42] security.DEBUG: Write SecurityContext in the session [] []请让我知道我必须做些什么来解决这个问题。
发布于 2015-11-22 15:51:49
这不是Symfony错误。由于您使用的是Google Maps API,因此请求需要包括此处定义的身份验证参数:https://developers.google.com/maps/documentation/business/webservices/auth
https://maps.googleapis.com/maps/api/geocode/json
?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA
&client=gme-YOUR_CLIENT_ID
&signature=YOUR_URL_SIGNATUREhttps://stackoverflow.com/questions/33852594
复制相似问题