[mapserver-users] WMS in Google Earth
Josh Hevenor
jhevenor at rogers.com
Tue Sep 29 10:28:34 PDT 2009
Thanks Milo (and Bob)
Here is what I have as far as mapfile goes. This is from a dev machine
not open to the public but I can supply a getCapabilities response as
well. Looking at it like this I bet I can remove a bunch of the
scalebar, querymap stuff....
MAP
DEBUG OFF #set off for production purposes!
NAME "COMPANY"
STATUS ON
EXTENT -146.4 52.161287067696 -93.6 97.7368329192244 #unprojected
SIZE 684 561 #NB: overwritten in mapserverparam.js
SHAPEPATH "D:\msMap_data\Export"
SYMBOLSET "mapserverApp.symbols"
FONTSET "mapserverApp.fonts"
TRANSPARENT ON
UNITS dd
IMAGETYPE aggpng24
OUTPUTFORMAT
NAME aggpng24
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGB
EXTENSION "png"
END
###########################################################################################
# WEB INTERFACE (including WMS enabling metadata)
WEB
MAXSCALE 40000000
MINSCALE 100
IMAGEPATH "C:\Inetpub\wwwroot\tmp\"
IMAGEURL "/tmp/"
LOG "C:\Inetpub\wwwroot\tmp\log\MS_ERRORS.LOG"
HEADER "header.html"
FOOTER "templates/footer.html"
TEMPLATE "index.html"
ERROR "/wms/templates/error.html"
EMPTY "/wms/templates/empty.html"
METADATA
WMS_ONLINERESOURCE 'http://ws7/wms/wms.php?'
#WMS_SRS 'EPSG:4326 EPSG:43204 EPSG:2580 EPSG:26908 EPSG:26909
EPSG:26910 EPSG:26911 EPSG:26912 EPSG:26913 EPSG:26914'
OWS_SRS 'EPSG:4326 EPSG:43204 EPSG:2580 EPSG:26908 EPSG:26909
EPSG:26910 EPSG:26911 EPSG:26912 EPSG:26913 EPSG:26914'
#WMS_ACCESSCONSTRAINTS 'none'
#OWS_TITLE 'COMPANY Web GIS Portal'
WMS_FEATURE_INFO_MIME_TYPE 'text/html'
#WMS_ABSTRACT 'This Web Map Service broadcasts metadata about
COMPANY Publications available for review and download.'
# ###
# Increment when new data is available
# ###
ows_updatesequence '1'
# ####
OWS_TITLE 'msMap WMS Service'
OWS_ABSTRACT 'COMPANYs new online spatial tool for creating maps,
querying, and downloading our large database of mineral occurrences,
publications, exploration reports, and other references to geology and
mineral exploration in the NWT.'
OWS_KEYWORDLIST 'GEOLOGY,CHEMISTRY'
OWS_FEES 'GRATUIT-FREE'
OWS_ACCESSCONSTRAINTS 'NONE'
OWS_CONTACTORGANIZATION 'NWT Business Office'
OWS_SERVICE_ONLINERESOURCE 'http://ws7/wms/wms.php?'
OWS_CONTACTPERSON 'co/ Librarian'
OWS_CONTACTPOSITION 'Librarian'
OWS_CONTACTVOICETELEPHONE '+01-555-555-5555'
OWS_CONTACTFACSIMILETELEPHONE '+01-555-555-5555'
ows_addresstype 'Mailing'
ows_address 'Location Business Office'
ows_address 'BOX 1500'
ows_city 'Smallville'
ows_stateorprovince 'Prov'
ows_postcode 'X1X 1X1'
ows_country 'Canada'
ows_contactelectronicmailaddress 'COMPANY at email.com'
OWS_hoursofservice '8:30-4:30 Local Time'
ows_contactinstructions ''
ows_role 'Librarian'
END #METADATA
END #WEB
REFERENCE
IMAGE "refmap2.jpg"
EXTENT -146.4 52.161287067696 -93.6 97.7368329192244
SIZE 80 120
STATUS ON
COLOR -1 -1 -1
OUTLINECOLOR 254 219 67
MINBOXSIZE 10
MAXBOXSIZE 120
MARKER "star"
MARKERSIZE 10
END
PROJECTION
"init=EPSG:4326"
END
LEGEND
STATUS ON
#KEYSIZE 18 12
KEYSIZE 24 16
#IMAGECOLOR 235 250 235
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
POSITION UR
TEMPLATE "legend.html" #doesn't really exist
END
SCALEBAR
STATUS ON
POSITION LR
POSTLABELCACHE TRUE
COLOR 0 0 0
OUTLINECOLOR 166 202 240
TRANSPARENT ON
UNITS KILOMETERS
INTERVALS 4
SIZE 200 6
STYLE 1
LABEL
SIZE TINY
COLOR 0 0 0
ANTIALIAS TRUE
#OUTLINECOLOR 254 219 67
#SHADOWCOLOR 166 202 240
#SHADOWSIZE 3 3
END
END
QUERYMAP
STATUS ON
STYLE Hilite #shows selected features in highlight colour
COLOR 254 219 67 # 0 0 255
END
#
# LAYER DEFINITIONS
#
LAYER
NAME 'References'
DATA '4326References'
STATUS on
DUMP true # VERY IMPORTANT atribute
TYPE Polygon
TRANSPARENCY 100
TOLERANCE 10
TOLERANCEUNITS pixels
HEADER "templates\referencesheader.html"
TEMPLATE "templates\references.html"
METADATA
OWS_SRS 'EPSG:4326'
OWS_TITLE 'References'
WMS_FEATURE_INFO_MIME_TYPE 'application/vnd.ogc.gml'
gml_include_items "all"
gml_exclude_items "geometry"
wfs_featureid 'C_REFER_ID'
ows_title 'References'
END #METADATA
PROJECTION
'init=EPSG:4326'
END
CLASSITEM 'CLASSCODE'
CLASS
NAME 'COMPANY Publications'
EXPRESSION '4'
STYLE
#COLOR 150 180 250
OUTLINECOLOR 255 0 0
#WIDTH 1.5
END #STYLE
END #CLASS
CLASS
NAME 'Industry Reports A'
EXPRESSION '1'
STYLE
#COLOR 150 180 250
OUTLINECOLOR 0 0 0
#WIDTH 1.5
END #STYLE
END #CLASS
CLASS
NAME 'Industry Reports B'
EXPRESSION '21'
STYLE
#COLOR 150 180 250
OUTLINECOLOR 0 255 0
#WIDTH 1.5
END #STYLE
END #CLASS
CLASS
NAME 'Misc References'
EXPRESSION '0'
STYLE
#COLOR 150 180 250
OUTLINECOLOR 0 0 255
#WIDTH 1.5
END #STYLE
END #CLASS
END #LAYER
END #End of Mapfile
Milo van der Linden wrote:
> Hello Josh,
>
> I have three succesfully hosted wms layers withing Google Earth. It
> probably has something to do with the image type not being supported or
> wms parameters missing.
>
> If you want me to help you can send me the metadata and the map section
> snippets of your mapfile.
>
> Josh Hevenor schreef:
>
>> I'm wondering if anyone has had success viewing their mapserver WMS
>> services through Google Earth? I can manually enter a GetMap request and
>> see the image but when I try to list my layers in the Refresh->WMS
>> Parameters section I get an error message stating that "This MWS server
>> has no layers which can be rendered by Google Earth"
>>
>> Are there any common trip-ups that others have experienced? I can post
>> more details if required...
>>
>> josh
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 8.5.409 / Virus Database: 270.13.114/2402 - Release Date: 09/29/09 05:54:00
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090929/c595d197/attachment.htm>
More information about the MapServer-users
mailing list