W
wxysiwei
Unregistered / Unconfirmed
GUEST, unregistred user!
大家看看我的这段代码有什么问题,也不报错但是地图就是显示不出来。图片已经传到了本地,但是在IE中就是不显示。
<%@ page language="java"
contentType="text/html;
charset=GBK"
%>
<%@ page import="java.io.*"
%>
<%@ page import="javax.servlet.http.*"
%>
<%@ page import="java.awt.Color"
%>
<%@ page import="javax.servlet.*"
%>
<%@ page import="com.mapinfo.util.DoubleRect"
%>
<%@ page import="com.mapinfo.mapj.MapJ"
%>
<%@ page import="com.mapinfo.dp.*"
%>
<%@ page import="com.mapinfo.dp.util.*"
%>
<%@ page import="com.mapinfo.graphics.*"
%>
<%@ page import="com.mapinfo.mapj.Layers"
%>
<%@ page import="com.mapinfo.mapxtreme.client.MapXtremeDataProviderRef"
%>
<%@ page import="com.mapinfo.mapxtreme.client.MapXtremeImageRenderer"
%>
<%@ page import="com.mapinfo.mapdefcontainer.MapDefContainer"
%>
<%@ page import="com.mapinfo.util.*"
%>
<%@ page import="com.mapinfo.xmlprot.mxtj.ImageRequestComposer"
%>
<%@ page import="com.mapinfo.mapdefcontainer.FileMapDefContainer"
%>
<html>
<head>
<title>
index
</title>
</head>
<body bgcolor="#ffffff">
<table border="1"
width="500"
height="500"
>
<tr><td>
<%
MapJ myMap = new MapJ ();
myMap.loadGeoset("C://Program Files//MapInfo//MapXtreme-4.7.1//examples//server//data//world.gst","C://Program Files//MapInfo//MapXtreme-4.7.1//examples//server//data","http://localhost:8080/mapxtreme471/mapxtreme"
MapDefContainer mdc = new FileMapDefContainer("C://Program Files//MapInfo//MapXtreme-4.7.1//examples//server//data//local"
myMap.loadMapDefinition(mdc,"world.mdf"
myMap.setDeviceBounds(newdo
ubleRect(0,0,800,600));
ImageRequestComposer imageRC=ImageRequestComposer.create(myMap, 256, Color.blue,"image/gif"
MapXtremeImageRenderer renderer=new MapXtremeImageRenderer("http://localhost:8080/mapxtreme471/mapxtreme"
renderer.render(imageRC);
renderer.toFile("comp.gif"
%>
</td></tr>
</table>
</body>
</html>
<%@ page language="java"
contentType="text/html;
charset=GBK"
%>
<%@ page import="java.io.*"
%>
<%@ page import="javax.servlet.http.*"
%>
<%@ page import="java.awt.Color"
%>
<%@ page import="javax.servlet.*"
%>
<%@ page import="com.mapinfo.util.DoubleRect"
%>
<%@ page import="com.mapinfo.mapj.MapJ"
%>
<%@ page import="com.mapinfo.dp.*"
%>
<%@ page import="com.mapinfo.dp.util.*"
%>
<%@ page import="com.mapinfo.graphics.*"
%>
<%@ page import="com.mapinfo.mapj.Layers"
%>
<%@ page import="com.mapinfo.mapxtreme.client.MapXtremeDataProviderRef"
%>
<%@ page import="com.mapinfo.mapxtreme.client.MapXtremeImageRenderer"
%>
<%@ page import="com.mapinfo.mapdefcontainer.MapDefContainer"
%>
<%@ page import="com.mapinfo.util.*"
%>
<%@ page import="com.mapinfo.xmlprot.mxtj.ImageRequestComposer"
%>
<%@ page import="com.mapinfo.mapdefcontainer.FileMapDefContainer"
%>
<html>
<head>
<title>
index
</title>
</head>
<body bgcolor="#ffffff">
<table border="1"
width="500"
height="500"
>
<tr><td>
<%
MapJ myMap = new MapJ ();
myMap.loadGeoset("C://Program Files//MapInfo//MapXtreme-4.7.1//examples//server//data//world.gst","C://Program Files//MapInfo//MapXtreme-4.7.1//examples//server//data","http://localhost:8080/mapxtreme471/mapxtreme"
MapDefContainer mdc = new FileMapDefContainer("C://Program Files//MapInfo//MapXtreme-4.7.1//examples//server//data//local"
myMap.loadMapDefinition(mdc,"world.mdf"
myMap.setDeviceBounds(newdo
ubleRect(0,0,800,600));
ImageRequestComposer imageRC=ImageRequestComposer.create(myMap, 256, Color.blue,"image/gif"
MapXtremeImageRenderer renderer=new MapXtremeImageRenderer("http://localhost:8080/mapxtreme471/mapxtreme"
renderer.render(imageRC);
renderer.toFile("comp.gif"
%>
</td></tr>
</table>
</body>
</html>