[MS4W-Users] White tiles

TC Haddad tchaddad at gmail.com
Tue Jul 19 13:29:21 EDT 2016


Just guessing: Is OL3 generating any URLs that you can examine? similar to
what you sent earlier? Are the URLs well-formed and containing the correct
info?

If it turns out to be strictly an OL3 based error, you can ask on their
mailing list directly. Jeff recently included an OL3 example in MS4W, so
you might also look at that one extremely closely for other ideas...

On Tue, Jul 19, 2016 at 10:17 AM, Vogt, Robert (RCIS) <Robert.Vogt at rcis.com>
wrote:

> Thanks for the response,
>
> Since I originally asked the question I have had some progress…
>
>
>
> I made some progress and got this layer served up from map server in
> OpenLayers 1
>
>
>
> Javascript to add layer…
>
> msTownship = new OpenLayers.Layer.MapServer("Township",
>
>               MSBaseURL+"/MappingTownship.map&",
>
>               { layers: 'Township', exceptions:
> "application/vnd.ogc.se_xml" },
>
>               { isBaseLayer: false, opacity: 0.9 },
>
>               { tileSize: new OpenLayers.Size(256, 256), buffer: 1 });
>
>             msTownship.setVisibility(false);
>
>
>
> …and map file…
>
> MAP
>
>   IMAGETYPE      PNG24
>
>   CONFIG "PROJ_LIB" "D:/RCIS/Web/MapServerDlls/projlib"
>
>   SIZE           256 256
>
>   FONTSET "D:/RCIS/Web/MapServerDlls/content/fontset.txt"
>
>   IMAGECOLOR     255 255 255
>
>   TRANSPARENT ON
>
>   PROJECTION
>
>     "init=epsg:4326"
>
>   END
>
>                 LAYER
>
>                                 NAME "Township"
>
>                                 TYPE POLYGON
>
>                                 STATUS ON
>
>                                 LABELCACHE ON
>
>                                 PROCESSING 'LABEL_NO_CLIP=1'
>
>                                 CONNECTIONTYPE PLUGIN
>
>                                 PLUGIN "msplugin_mssql2008.dll"
>
>                                 MAXGEOWIDTH .13
>
>                                 CONNECTION
> "server=someserver,someport;uid=someuser;pwd=somepassword;Initial
> Catalog=NATIONALDB;Integrated Security=False"
>
>                                 DATA "shape(geography),TOWNSHIP from
> NATIONALDB.sde.TOWNSHIP USING INDEX TOWNSHIP_SIDX USING UNIQUE TOWNSHIP_ID
> USING SRID=4269"
>
>                                 LABELITEM    "TOWNSHIP"
>
>                                 CLASS
>
>
> STYLE
>
>                                                  OUTLINECOLOR 000 000 255
>
>                                                 WIDTH 3
>
>                                                 END
>
>                                                 LABEL
>
>                                                                 COLOR 000
> 000 255
>
>                                                                 TYPE
> TRUETYPE
>
>                                                                 FONT Arial
>
>                                                                 SIZE 12
>
>                                                                 ANTIALIAS
> TRUE
>
>                                                                 POSITION CL
>
>                                                                 PARTIALS
> FALSE
>
>
> #MINDISTANCE 300
>
>                                                                 #BUFFER 15
>
>                                                 END
>
>                                 END
>
>                 PROJECTION
>
>                                  "init=epsg:4326"
>
>                 END
>
>                 END
>
>
>
> END
>
>
>
> I’m trying to add this same layer in OpenLayers 3 without success…
>
>
>
> var Township = new ol.layer.Tile({
>
>                 name: 'Township',
>
>                 extent: totalExtent,
>
>                 source: new ol.source.TileWMS({
>
>                     url: '
> http://localhost:8080/cgi-bin/mapserv.exe?map=D:/RCIS/Web/Mapfiles/MappingSection.map&
> ',
>
>                     params: { 'LAYERS': 'township', 'TILED': true },
>
>                     serverType: /** @type {ol.source.wms.ServerType} */ (
> 'mapserver')
>
>
>
>                 })
>
>             });
>
>
>
>             control.map.addLayer(Section);
>
>
>
> Seems like since its working in OL1 that I’m probably not adding correctly
> in OL3 but the documentation is not very good, any ideas?
>
>
>
> Thanks for all your help!
>
> -Bob
>
>
>
>
>
> *From:* TC Haddad [mailto:tchaddad at gmail.com]
> *Sent:* Tuesday, July 19, 2016 1:14 PM
> *To:* ms4w-users at lists.ms4w.com
> *Cc:* Vogt, Robert (RCIS)
> *Subject:* Re: [MS4W-Users] White tiles
>
>
>
>
>
> Looking a second time at what you sent, I see reference to 2 different
> projections: epsg 4326 and epsg 4269. I also see reference to Projection
> AUTO in the map file level.
>
>    - Determine the native projection of your data in the database. This
>    is the epsg code to use in the LAYER definition, and as one listing in the
>    metadata definition.
>    - Determine the projection you want to use in your application, and
>    add that to your metadata definition and to the MAP projection.
>    - Eliminate the reference to AUTO by specifying the preferred
>    projection for external access
>
> Confirm that your application is successfully sending the correct type of
> coordinates to Mapserver by examining the URLs being sent
>
>
>
> On Tue, Jul 19, 2016 at 10:07 AM, TC Haddad <tchaddad at gmail.com> wrote:
>
>
>
> Hi Robert,
>
>    - If the tiles are pink - it means there is a mapserver or path error
>    somewhere.
>    - If the tiles are white, it usually means your paths are all correct,
>    but that you are somehow sending / using incorrect extents
>
> So for the second option, as Bob indicated, check all you projection
> specifications very carefully (client side and server side) and make sure
> you are sending mapserver valid extent requests for your data.
>
>
>
> Tanya
>
>
>
> On Tue, Jul 19, 2016 at 6:29 AM, Vogt, Robert (RCIS) via MS4W-Users <
> ms4w-users at lists.ms4w.com> wrote:
>
> I’m not sure what exactly I’m doing wrong…seems like MS4W is installed
> correctly and being called and returning tiles, however the tiles are all
> white.
>
>
>
> This is the information for one of the tiles…
>
>
>
> 1.  *Request URL:*
> http://localhost:8080/cgi-bin/mapserv.exe?map=D:/RCIS/Web/Mapfiles/MappingSection.map&&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=section&BBOX=47.30712890625%2C-109.3798828125%2C47.318115234375%2C-109.368896484375&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A4326&STYLES
>
> 2.  *Request Method:*GET
>
> 3.  *Status Code:*200 OK
>
> 4.  *Remote Address:*127.0.0.1:8080
>
> *2.*       *Response Headers*view source
>
> 1.  *Connection:*Keep-Alive
>
> 2.  *Content-Type:*image/png
>
> 3.  *Date:*Tue, 19 Jul 2016 13:17:32 GMT
>
> 4.  *Keep-Alive:*timeout=5, max=93
>
> 5.  *Server:*Apache/2.4.20 (Win32)
>
> 6.  *Transfer-Encoding:*chunked
>
> *3.*       *Request Headers*view source
>
> 1.  *Accept:*image/webp,image/*,*/*;q=0.8
>
> 2.  *Accept-Encoding:*gzip, deflate, sdch
>
> 3.  *Accept-Language:*en-US,en;q=0.8
>
> 4.  *Cache-Control:*no-cache
>
> 5.  *Connection:*keep-alive
>
> 6.  *Host:*localhost:8080
>
> 7.  *Pragma:*no-cache
>
> 8.  *Referer:*
> http://localhost/applications/mswebapps/webmapview/?growerId=721019&policy=237865&cropYear=2016
>
> 9.  *User-Agent:*Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36
> (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
>
> *4.*       *Query String Parameters*view sourceview URL encoded
>
> 1.  *map:*D:/RCIS/Web/Mapfiles/MappingSection.map
>
> *2.*       *:*
>
> 3.  *SERVICE:*WMS
>
> 4.  *VERSION:*1.3.0
>
> 5.  *REQUEST:*GetMap
>
> 6.  *FORMAT:*image/png
>
> 7.  *TRANSPARENT:*true
>
> 8.  *LAYERS:*section
>
> 9.  *BBOX:*
> 47.30712890625,-109.3798828125,47.318115234375,-109.368896484375
>
> 10. *TILED:*true
>
> 11. *WIDTH:*256
>
> 12. *HEIGHT:*256
>
> 13. *CRS:*EPSG:4326
>
> *14.*    *STYLES:*
>
> *…and this is the corresponding .map file…*
>
> *MAP*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *  IMAGETYPE      PNG24   CONFIG "PROJ_LIB" "C:/Program
> Files/MapServer/projlib/"   EXTENT         -180 -90 180 90   SIZE
> 256 256   FONTSET "D:/RCIS/Web/MapServerDlls/content/fontset.txt"
> IMAGECOLOR     255 255 255   TRANSPARENT ON   PROJECTION      AUTO   END
>                 LAYER                                 NAME "section"
>                               TYPE POLYGON
> STATUS ON                                 LABELCACHE ON
>                                 PROCESSING 'LABEL_NO_CLIP=1'
>                                 CONNECTIONTYPE PLUGIN
>                               PLUGIN "msplugin_mssql2008.dll"
>                                 MAXGEOWIDTH .08
>                               CONNECTION "server=stgissql01.dvcorp.rcis.com
> <http://stgissql01.dvcorp.rcis.com>,5208;uid=Mapping01D;pwd=9GreenSnap#4D;Initial
> Catalog=NATIONALDB;Integrated Security=False"
>                               DATA "shape(geography),SECTION from
> NATIONALDB.sde.SECTION USING INDEX SECTION_SIDX USING UNIQUE SECTION_ID
> USING SRID=4269"                                 LABELITEM    "SECTION"
>                                 CONNECTIONTYPE WMS                 METADATA
>                        "wms_title" "someTitle"
>        "wms_srs" "EPSG:4326"                        "wms_name" "section"
>                "wms_server_version" "1.1.1"
>        "wms_format" "image/png"                "wms_exceptions_format"
> "application/vnd.ogc.se_xml"                "wms_enable_request"  "*"
>                                                    END
>                                 CLASS
>
> STYLE
>                                                  OUTLINECOLOR 255 000 000
>                                                 WIDTH 3
>                                                 END
>                                                 LABEL
>                                                                 COLOR 255
> 000 000
> TYPE TRUETYPE
>                                                                 FONT Arial
>                                                                 SIZE 12
>                                                                 ANTIALIAS
> TRUE
> POSITION CL
> PARTIALS FALSE
>
> #MINDISTANCE 300
>                                                                 #BUFFER 15
>                                                 END
>                                 END
> PROJECTION                                  AUTO                 END
>               END*
>
> *END*
>
>
>
> *Any help is greatly appreciated!*
>
>
>
>
>
> *From:* MS4W-Users [mailto:ms4w-users-bounces at lists.ms4w.com] *On Behalf
> Of *Tim Paysen via MS4W-Users
> *Sent:* Friday, July 15, 2016 5:23 PM
> *To:* ms4w-users at lists.ms4w.com
> *Cc:* Tim Paysen
> *Subject:* Re: [MS4W-Users] FileGDB tip for MS4W 4.0 users
>
>
>
> Thanks--that was a bit more helpful.
>
>
>
> TP
>
>
>
> On Thursday, July 14, 2016 6:07 AM, Jeff McKenna via MS4W-Users <
> ms4w-users at lists.ms4w.com> wrote:
>
>
>
> Hi Tim,
>
> I am saying, as a user of MS4W you will likely not notice any changes
> (in fact, as you can read in the OpenFileGDB driver page, in the section
> "Comparison with the [Esri] FileGDB driver'
> http://www.gdal.org/drv_openfilegdb.html) you will be able to access
> (read) more versions of FileGDB data with this driver.  The only issue
> is that you will not be able to use GDAL (such as through an ogr2ogr
> command) to generate a new .gdb geodatabase/file).
>
> If you still don't follow me, goto your command prompt window and follow
> my steps:
>
>   - cd ms4w
>   - setenv.bat
>   - ogrinfo --formats
>
> That command lists all vector formats that are available in your version
> of MS4W, on your machine.  Notice that for each result, there are some
> brackets, such as "(rw+)" or "(ro)"; the first meaning that you can read
> and also write that format, and the second meaning you can only read
> that format.  You'll notice that many formats are read-only (maybe you
> never realized this before).
>
> So give a re-read to my initial message, and invest some time in reading
> the driver page for any format that you are using (in this case
> http://www.gdal.org/drv_openfilegdb.html).  It may be that for your case
> you need write access (to generate new .gdb files), in which case you
> can contact/nudge the Esri support team directly, and ask when their
> next FileGDB SDK is going to be released - I had seen a thread last year
> where an Esri support person said "likely mid-2015".  So until then,
> we'll use this GDAL-reverse-engineered SDK :)
>
> Maybe this is too much information for you through email - of course I
> am available for providing professional training on these tips, for your
> organization.
>
> Thank you for using and supporting MS4W, it is your financial support
> that helps maintain such an innovative solution.
>
> -jeff
>
>
> --
> Jeff McKenna
> MapServer Consulting and Training Services
> http://www.gatewaygeomatics.com/
>
>
> On 2016-07-14 1:50 AM, Tim Paysen via MS4W-Users wrote:
> > This is a little unclear.  Are you saying that if I go through the GDAL
> > route (I'll have to study up on that a bit) I will only get read access
> > to the ESDR geo data base?  If I want to use the (public US Govt.) data
> > for analysis, this will do me no good(?).  I would still have to lease
> > the ESRI prop;ietqary data?  (Illegal for public data)
> >
> > Tim Paysen
> >
> >
> > On Wednesday, July 13, 2016 9:32 AM, Jeff McKenna via MS4W-Users
> > <ms4w-users at lists.ms4w.com> wrote:
> >
> >
> > Hello everyone,
> >
> > Those already using the MS4W 4.0 alpha releases will notice that FileGDB
> > support is handled through the OpenFileGDB driver (as opposed to past
> > releases that used the Esri SDK).  Read more about the OpenFileGDB
> > driver at: http://www.gdal.org/drv_openfilegdb.html
> >
> > Note that this format is ready-only, through GDAL.
> >
> >    OpenFileGDB - vector- (rov): ESRI FileGDB
> >
> >
> > Someday when Esri releases its SDK for the most recent Visual Studio
> > compiler, we will go back to using its SDK.  You can follow along and
> > provide feedback (or let me know when that SDK is released) directly in
> > the associated MS4W ticket: http://ms4w.com/trac/ticket/2
> >
> > You can always find more information on these SDK's in the GDAL
> > "BuildHints" wiki, which I have helped maintain over the years.  If you
> > yourself have tips then please add them directly in the wiki for
> > everyone.  https://trac.osgeo.org/gdal/wiki/FileGDB
> >
> > Thanks,
> >
> > -jeff
> >
>
>
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> http://lists.ms4w.com/mailman/listinfo/ms4w-users
>
>
>
>
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.ms4w.com
> http://lists.ms4w.com/mailman/listinfo/ms4w-users
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ms4w.com/mailman/private/ms4w-users/attachments/20160719/b4172daf/attachment.html>


More information about the MS4W-Users mailing list