Ruby on rails 轨道可以';t显示谷歌地图嵌入API
在我的rails应用程序中,我尝试使用GoogleMaps嵌入式API 当我使用以下各项时,一切正常:Ruby on rails 轨道可以';t显示谷歌地图嵌入API,ruby-on-rails,google-maps,ruby-on-rails-4,google-maps-api-3,Ruby On Rails,Google Maps,Ruby On Rails 4,Google Maps Api 3,在我的rails应用程序中,我尝试使用GoogleMaps嵌入式API 当我使用以下各项时,一切正常: <iframe width="500" height="300" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key=AIzaSyDBvzq5WsidARhAZ0821MB1iAMTPnHiamI&q=3177 shawnee ct,camer
<iframe width="500" height="300" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyDBvzq5WsidARhAZ0821MB1iAMTPnHiamI&q=3177 shawnee ct,cameron park,ca,95682" allowfullscreen>
</iframe>
但它无法识别我的rails对象@job.jobsite.full\u address
。我已经知道有一个地址存储在那里,我用静态映射API测试了它,一切正常
但是,当我尝试渲染贴图时,会出现以下错误:
Google Maps API服务器拒绝了您的请求。无效的请求。
无效的“q”参数
谁能告诉我为什么
@job.jobsite.full_address
在我提供的url中不起作用 请用ruby标记替换您的位置<iframe width="500" height="300" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyDBvzq5WsidARhAZ0821MB1iAMTPnHiamI&q=<%=@job.jobsite.full_address%>" allowfullscreen>
请用ruby标记替换您的位置
<iframe width="500" height="300" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=AIzaSyDBvzq5WsidARhAZ0821MB1iAMTPnHiamI&q=<%=@job.jobsite.full_address%>" allowfullscreen>