I used map component in iReport. As a default behavior it gets map from google

Is it possible to change map server url? (For example, geoserver, bing, or openstreet server can be used for that)

有帮助吗?

解决方案

for image expression java.net.Url shuold be used and the source will be the request like below

<image>
 <reportElement x="0" y="0" width="104" height="40"/>
 <imageExpression class="java.net.Url">
  <![CDATA["http://localhost:8080/geoserver/wms?request=GetMap&service=WMS&version=1.1.1&layers=topp%3Astates&styles=&srs=EPSG%3A4326&bbox=-14.15104058007,21.731919794922,-57.154894212888,58.961058642578&&width=780&height=330&format=image%2Fpng"]]>
 </imageExpression>
</image>
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top