1) Use geoset <% const cmapxcourier = "mapinfo.mapxcourier" const cmapxstate = "mapx.state.5" const cmapXObject = "MapXObject" const cmapxcourierObject = "mapxcourierObject"
Set session (cmapxcourierObject) = server.createObject (cmapxcourier) set session (cmapxcourierObject) .getmapxfrombroker ("anqing", 15000)
'Set session (cMapXObject) = Session (cMapXCourierObject) .GetMapXFromNewServer ( "HelloWorld") Session (cMapXObject) .ExportMap server.mappath ( ".") "/ Output.gif", 2' attention to be destroyed objects Set Session ( CMapXObject) = Nothing set session (cmapxcourierObject) = Nothing%> 2) Do not use Geoseet, dynamically create layer, generate special map <% const cmapxcourier = "mapinfo.mapxcourier" const cmapxstate = "Mapx.State.5" const cmapXObject = "MapXObject" const cmapxcourierObject = "mapxcourierObject"
DIM Objds Dim StrdsName Dim Objlyr
'Get the mapp object set session (cmapxcourierObject) = server.createObject (cmapxcourier) set session (cmapxbobject) = session (cmapxcourierObject) .getmapxfromnewserver ("")
'Add the layer set objlyr = session (cmapxObject) .Layers.add ("Road_regular.tab")
'Create the dataset strdsname = "road_regulars" set objds = session (cMapxObject) .DataSets.add (MidatasetLayer, ObjlyR, strdsname)
'add the theme objds.themes.add
'Center the map session (cMapxObject) .bounds = session (cmapxObject) .Layers.Bounds session (cmapxobject) .title.visible = false
'Export The Current Map To a Jpeg Which IS Type 3 and Display On The Page Session (CMAPXObject). EXPORTMAP Server.MAppath (".") "/ Output.jpg", 3' Note To destroy the object in time SET session (CMapXObject ) = Nothing set session (cmapxcourierObject) = Nothing%> html>