[MS4W-Users] Getting tiles to OpenLayers
Jeff McKenna
jmckenna at gatewaygeomatics.com
Mon May 23 16:30:51 EDT 2016
I would install MS4W at the root (e.g. E:/ms4w) and retry your mapfile
with the shp2img commandline utility. In terms of Apache, MS4W's Apache
is pre-configured for mapserv.exe which lives in /ms4w/Apache/cgi-bin/.
I am not sure why you have a path of E:/RCIS/Web/MapServerDlls/
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
On 2016-05-23 5:15 PM, Vogt, Robert (RCIS) wrote:
> I just found this in the system log...
>
> Faulting application name: mapserv.exe, version: 0.0.0.0, time stamp: 0x573a24bb
> Faulting module name: S\Web\MapServerDlls\mapserv.exe!msIO_setHeaderEnabled, version: 6.3.9600.18233, time stamp: 0x56bb4ebb
> Exception code: 0xc0000139
> Fault offset: 0x00000000000ecdd0
> Faulting process id: 0x1db8
> Faulting application start time: 0x01d1b51c75e06556
> Faulting application path: E:\RCIS\Web\MapServerDlls\mapserv.exe
> Faulting module path: S\Web\MapServerDlls\mapserv.exe
> Report Id: b391b5e3-210f-11e6-8106-0050569e553b
> Faulting package full name:
> Faulting package-relative application ID:
>
> Is there anywhere I can see a more detailed reason mapserv.exe is faulting?
>
> -----Original Message-----
> From: MS4W-Users [mailto:ms4w-users-bounces at lists.ms4w.com] On Behalf Of Jeff McKenna via MS4W-Users
> Sent: Monday, May 23, 2016 3:22 PM
> To: ms4w-users at lists.ms4w.com
> Cc: Jeff McKenna
> Subject: Re: [MS4W-Users] Getting tiles to OpenLayers
>
> Hello,
>
> Glad to hear you are up and running with MS4W. For OpenLayers questions, I've found the OpenLayers mailing list to be an excellent resource (subscribe at https://lists.osgeo.org/listinfo/openlayers-dev).
> I prefer this way of searching their list:
> http://osgeo-org.1560.x6.nabble.com/OpenLayers-Dev-f3888596.html
>
> I'm not familiar with your "pass-through" stuff, but I'm sure the OpenLayers experts on the OpenLayers-dev mailing list would know more.
>
> If you want to start with a working WMS mapfile with OpenLayers3 in MS4W, here is a short tutorial:
> http://ms4w.com/trac/wiki/MapCacheOpenLayers3
>
> -jeff
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services http://www.gatewaygeomatics.com/
>
>
> On 2016-05-23 11:51 AM, Vogt, Robert (RCIS) via MS4W-Users wrote:
>> Good morning,
>>
>>
>>
>> I am pretty new at this so please excuse me if I seem less than
>> knowledgeable about this. J
>>
>>
>>
>> I have gone through the documentation to get ms4w set up and believe I
>> have it running, I am also upgrading from OpenLayers to OpenLayers3 and
>> am having a difficult time translating how my new map will get the
>> custom base layer from my server.
>>
>>
>>
>> The code I currently have relies on a "passthrough" website that points
>> at mapserv.exe and passes the path of the .map file it's trying to get,
>> this doesn't seem to be working...
>>
>>
>>
>> My current code looks like this....
>>
>>
>>
>> map = new OpenLayers.Map({
>>
>> div: "divMap",
>>
>> controls: [new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.Navigation({ documentDrag: true }),new OpenLayers.Control.TouchNavigation({dragPanOptions: {enableKinetic: true}})],
>>
>> numZoomLevels:20
>>
>> });
>>
>> wms = new OpenLayers.Layer.WMS();
>>
>>
>>
>> msBase = new OpenLayers.Layer.MapServer("Base",
>>
>> http://dvfmweb2/mapserver/mapserv.exe?map=E:/RCIS/Web/Mapfiles/MappingBase.map&",
>>
>> { layers: 'Base', exceptions: "application/vnd.ogc.se_xml" },
>>
>> { isBaseLayer: true, opacity: 0.9 },
>>
>> { tileSize: new OpenLayers.Size(256, 256), buffer: 1 });
>>
>>
>>
>> map.addLayers([msBase])
>>
>>
>>
>>
>>
>>
>>
>> ...MapFile looks like this
>>
>>
>>
>> MAP
>>
>> IMAGETYPE PNG24
>>
>> CONFIG "PROJ_LIB" "E:/RCIS/Web/MapServerDlls/projlib/"
>>
>> EXTENT -180 -90 180 90
>>
>> SIZE 256 256
>>
>> FONTSET "E:/RCIS/Web/MapServerDlls/content/fontset.txt"
>>
>> IMAGECOLOR 255 255 255
>>
>> TRANSPARENT ON
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "WaterLn"
>>
>> TYPE LINE
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> MAXGEOWIDTH .02
>>
>> CONNECTION "server=Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),FULLNAME from
>> NATIONALDB.sde.Water_ln_vw USING UNIQUE WATER_LN_ID USING SRID=4269"
>>
>> LABELITEM "FULLNAME"
>>
>> CLASS
>>
>> STYLE
>>
>> COLOR 000 102 204
>>
>> OUTLINECOLOR 102 178 255
>>
>> WIDTH 2
>>
>> END
>>
>> LABEL
>>
>> COLOR 000 153 000
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> ANTIALIAS FALSE
>>
>> POSITION AUTO
>>
>> PARTIALS FALSE
>>
>> MINDISTANCE 2000
>>
>> MINSCALEDENOM 20.00
>>
>>
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "Water"
>>
>> TYPE POLYGON
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> CONNECTION "server= Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),FULLNAME from
>> NATIONALDB.sde.Water_vw USING UNIQUE WATER_ID USING SRID=4269"
>>
>> LABELITEM "FULLNAME"
>>
>> CLASS
>>
>> STYLE
>>
>> COLOR 000 102 204
>>
>> OUTLINECOLOR 102 178 255
>>
>> WIDTH 2
>>
>> END
>>
>> LABEL
>>
>> COLOR 000 153 000
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> ANTIALIAS FALSE
>>
>> POSITION AUTO
>>
>> PARTIALS FALSE
>>
>> MINDISTANCE 2000
>>
>> MINSCALEDENOM 20.00
>>
>>
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>>
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "ZipCode"
>>
>> TYPE POLYGON
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> MAXGEOWIDTH .12
>>
>> CONNECTION "server= Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),ZIPCODE from
>> NATIONALDB.sde.ZIPCODES USING INDEX ZIPCODES_SIDX USING UNIQUE
>> ZIPCODES_ID USING SRID=4269"
>>
>> LABELITEM "ZIPCODE"
>>
>> CLASS
>>
>> STYLE
>>
>> OUTLINECOLOR 0 0 0
>>
>> WIDTH 3
>>
>> END
>>
>> LABEL
>>
>> COLOR 132 31 31
>>
>> OUTLINECOLOR 255 255 255
>>
>> OUTLINEWIDTH 3
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> #ANTIALIAS FALSE
>>
>> POSITION AUTO
>>
>> PARTIALS TRUE
>>
>> #MINDISTANCE 600
>>
>> #BUFFER 15
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "Counties"
>>
>> TYPE POLYGON
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> MAXGEOWIDTH .50
>>
>> CONNECTION "server= Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),CNTY_NAME_UC from
>> NATIONALDB.sde.COUNTY USING INDEX S15_idx USING UNIQUE COUNTY_ID USING
>> SRID=4269"
>>
>> LABELITEM "CNTY_NAME_UC"
>>
>> CLASS
>>
>> STYLE
>>
>> OUTLINECOLOR 051 025 000
>>
>> WIDTH 3
>>
>> END
>>
>> LABEL
>>
>> COLOR 051 025 000
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> ANTIALIAS TRUE
>>
>> POSITION AUTO
>>
>> PARTIALS FALSE
>>
>> #MINDISTANCE 600
>>
>> #BUFFER 15
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "States"
>>
>> TYPE POLYGON
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> CONNECTION "server= Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),ST_NAME_MC from
>> NATIONALDB.sde.STATES USING INDEX S11_idx USING UNIQUE STATES_ID USING
>> SRID=4269"
>>
>> LABELITEM "ST_NAME_MC"
>>
>> CLASS
>>
>> STYLE
>>
>> OUTLINECOLOR 000 153 000
>>
>> WIDTH 3
>>
>> END
>>
>> LABEL
>>
>> COLOR 000 153 000
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> ANTIALIAS FALSE
>>
>> POSITION AUTO
>>
>> PARTIALS FALSE
>>
>> MINDISTANCE 2000
>>
>> MINSCALEDENOM 20.00
>>
>>
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "MajorRoads"
>>
>> TYPE LINE
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> MAXGEOWIDTH .30
>>
>> CONNECTION "server= Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),FULLNAME from
>> NATIONALDB.sde.Major_Roads_vw USING UNIQUE MJR_ROADS_ID USING SRID=4269"
>>
>> LABELITEM "FULLNAME"
>>
>> CLASS
>>
>> STYLE
>>
>> OUTLINECOLOR 000 000 000
>>
>> WIDTH 3
>>
>> END
>>
>> LABEL
>>
>> COLOR 255 000 000
>>
>> OUTLINECOLOR 255 255 255
>>
>> OUTLINEWIDTH 3
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> MAXSIZE 8
>>
>> #REPEATDISTANCE 600
>>
>> MINDISTANCE 1000
>>
>> #ANTIALIAS FALSE
>>
>> POSITION AUTO
>>
>> PARTIALS TRUE
>>
>> MINDISTANCE 600
>>
>> #BUFFER 15
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "AllRoads"
>>
>> TYPE LINE
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> MAXGEOWIDTH .04
>>
>> CONNECTION "server= Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),FULLNAME from
>> NATIONALDB.sde.All_Roads_vw USING UNIQUE ALL_ROADS_ID USING SRID=4269"
>>
>> LABELITEM "FULLNAME"
>>
>> CLASS
>>
>> STYLE
>>
>> OUTLINECOLOR 000 000 000
>>
>> WIDTH 3
>>
>> END
>>
>> LABEL
>>
>> COLOR 255 000 000
>>
>> OUTLINECOLOR 255 255 255
>>
>> OUTLINEWIDTH 3
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> MAXSIZE 7
>>
>> ANGLE AUTO
>>
>> #REPEATDISTANCE 600
>>
>> MINDISTANCE 1000
>>
>> #ANTIALIAS FALSE
>>
>> POSITION AUTO
>>
>> PARTIALS FALSE
>>
>> MINDISTANCE 600
>>
>> #BUFFER 15
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> END
>>
>> LAYER
>>
>> GROUP "Base"
>>
>> NAME "Highways"
>>
>> TYPE LINE
>>
>> STATUS ON
>>
>> LABELCACHE ON
>>
>> PROCESSING 'LABEL_NO_CLIP=1'
>>
>> CONNECTIONTYPE PLUGIN
>>
>> PLUGIN "msplugin_mssql2008.dll"
>>
>> MAXGEOWIDTH .80
>>
>> CONNECTION "server= Some SQL Connection;Initial
>> Catalog=NATIONALDB;Integrated Security=False"
>>
>> DATA "shape(geography),FULLNAME from
>> NATIONALDB.sde.Highways_vw USING UNIQUE HWY_ID USING SRID=4269"
>>
>> LABELITEM "FULLNAME"
>>
>> CLASS
>>
>> STYLE
>>
>> OUTLINECOLOR 000 000 000
>>
>> WIDTH 3
>>
>> END
>>
>> LABEL
>>
>> COLOR 255 000 000
>>
>> OUTLINECOLOR 255 255 255
>>
>> OUTLINEWIDTH 3
>>
>> TYPE TRUETYPE
>>
>> FONT Arial
>>
>> SIZE 12
>>
>> SIZE 12
>>
>> #ANTIALIAS FALSE
>>
>> POSITION AUTO
>>
>> PARTIALS TRUE
>>
>> MINDISTANCE 600
>>
>> #BUFFER 15
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> AUTO
>>
>> END
>>
>> END
>>
>> END
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> I'm not sure if this is the right way to do it for OL3 or if there is a
>> better way?
>>
>>
>>
>> Any help is greatly appreciated!!
>>
>>
More information about the MS4W-Users
mailing list