[Geomoose-users] [Geomoose-developers] Bing Maps integration

Bob Basques Bob.Basques at ci.stpaul.mn.us
Tue Sep 22 14:52:25 EDT 2009


Jay, 


Here are three different MapFiles for reprojecting the BING map data to
Our coordinate system (Ramsey County [Yes it's a custom projection])
Should give you an idea of how to use MapServer to do the reprojection
on the WMS from the BING server for your own uses.  If you want to use a
generic and BING compatible projection, just run a WMS getCapabilities
against their server to find out what they can export for, on of which
is EPSG:4326, these are from their beta service. 


#1  BING Aerial layer 


MAP 


  NAME 'BINGAERIAL' 
  SIZE 800 650 
  EXTENT 593133.398829 170094.734526 593893.148973 170712.010326 


  STATUS ON 
  UNITS FEET 
  IMAGETYPE JPEG 


  PROJECTION 
"init=epsg:200068" 
  END 


  LAYER 
    NAME "BINGAERIAL"   
    TYPE RASTER 
    STATUS DEFAULT 
    CONNECTION "http://integrate.onterrasys.com/BingMapsWMS/? (
http://integrate.onterrasys.com/BingMapsWMS/? )" 
    CONNECTIONTYPE WMS 
    METADATA 
        "wms_srs" "EPSG:4326" 
 "wms_name" "BingMap" 
        "wms_style" "Aerial" 
        "wms_server_version" "1.1.1" 
        "wms_format" "image/jpeg" 


"ows_title" "Bing Aerials" 
"gml_include_items" "all" 
    END 
    PROJECTION 
    "init=epsg:4326" 
    END 
  END #layer 
END 


----------------------- 
#2 Aerial with Labels. 


MAP 
  NAME 'BINGAERIALWITHLABELS' 
  SIZE 800 650 
  EXTENT 593133.398829 170094.734526 593893.148973 170712.010326 


  STATUS ON 
  UNITS FEET 
  IMAGETYPE JPEG 


  PROJECTION 
"init=epsg:200068" 
  END 


  LAYER 
    NAME "BINGAERIALWITHLABELS"   
    TYPE RASTER 
    STATUS DEFAULT 
    CONNECTION "http://integrate.onterrasys.com/BingMapsWMS/? (
http://integrate.onterrasys.com/BingMapsWMS/? )" 
    CONNECTIONTYPE WMS 
    METADATA 
        "wms_srs" "EPSG:4326" 
 "wms_name" "BingMap" 
        "wms_style" "AerialWithLabels" 
        "wms_server_version" "1.1.1" 
        "wms_format" "image/jpeg" 


"ows_title" "Bing Aerial with Labels" 
"gml_include_items" "all" 
    END 
    PROJECTION 
    "init=epsg:4326" 
    END 
  END #layer 


END 


----------------------------------- 
#3 Roads 


MAP 
  NAME 'BINGROAD' 
  SIZE 800 650 
  EXTENT 593133.398829 170094.734526 593893.148973 170712.010326 
  STATUS ON 
  UNITS FEET 
  IMAGETYPE JPEG 


  PROJECTION 
"init=epsg:200068" 
  END 


  LAYER 
    NAME "BINGROAD"   
    TYPE RASTER 
    STATUS DEFAULT 
    CONNECTION "http://integrate.onterrasys.com/BingMapsWMS/? (
http://integrate.onterrasys.com/BingMapsWMS/? )" 
    CONNECTIONTYPE WMS 
    METADATA 
        "wms_srs" "EPSG:4326" 
 "wms_name" "BingMap" 
        "wms_style" "Road" 
        "wms_server_version" "1.1.1" 
        "wms_format" "image/png" 


"ows_title" "Bing Road" 
"gml_include_items" "all" 
    END 
    PROJECTION 
    "init=epsg:4326" 
    END 
    DEBUG on 
  END #layer 


END 






>>> Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us> wrote:



Thanks Duck for your thoughts…. 



                



I agree that there would be some time investment required to go to Lat
Long….just a batch reprojection of 20 or so layers….minor code change… 



But it might better well serve me to invest that little time before I
invest a bunch of time to incorporate all my additional code into 2.0. 
That and the learning curve to absorb the new code structure….At least
this way I am up and running…. 



                



In their example on the their webpage they have it 4326…what other
projection should I attempt to use? What are my other options if any? 



What would recommend… 



                



Have you done this yet… 



                



Will changing from this: 



width=1000&height=1000 &bbox=-105,35,-100,40 



                



To this work in this case? 



WIDTH=%WIDTH%&HEIGHT=1000&height=%HEIGHT%
&bbox=-%MINX%,%MINY%,%MAXX%,%MAXY% 



                



Thanks Again 



                Subject: Re: [Geomoose-developers] Bing Maps integration 

              



Sure it'd be possible but you'd have a helluva lot work to do
reprojecting things.  And I'm not sure that Bing maps REALLY works in
4326, I'm sure they have it reprojected to something reasonable for
viewing. 




                      



From: 

Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>
To: Dan Little <danlittle at yahoo.com>;
"geomoose-developers at lists.sourceforge.net"
<geomoose-developers at lists.sourceforge.net>
Sent: Tuesday, September 22, 2009 11:49:01 AM
Subject: RE: [Geomoose-developers] Bing Maps integration 




But I am on the right path correct…..this is possible correct 




                                              




GM 2.0 




So I can do this no sweat in GM2.0 




                                              




GM 1.6 




What if I changed the projection in my 1.6 app to Lat Long would it be
possible then? 




                                              




THanks 




                                              




From: 

Dan Little [mailto:danlittle at yahoo.com]
Sent: Tuesday, September 22, 2009 11:35 AM
To: Jay Kapalczynski; geomoose-developers at lists.sourceforge.net
Subject: Re: [Geomoose-developers] Bing Maps integration 


                        



Are you trying to do this with GM1.6? If so, you're a bit SOL, 2.0 has
all this capability but for the most part, GM1.6 is intended for single
projection mapping. 





                                                          




From: 

Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us>
To: "geomoose-developers at lists.sourceforge.net"
<geomoose-developers at lists.sourceforge.net>
Sent: Tuesday, September 22, 2009 11:29:05 AM
Subject: [Geomoose-developers] Bing Maps integration 


I am trying to consume Bing aerials (not pbliques)…dont know if this is
even possible….but I was told it was…just consume the WMS service 
I am trying this…and hitting a wall..,... 
I assume the projection is off to begin with…lat long below I think… 
                                  
http://integrate.onterrasys.com/WMSforWebMaps/ 
                                  
                                  
<map title=”TESTING” default=”false” zindex”-1”> 
http://integrate.onterrasys.com/onterrawms_latlon?service=WMS&version=1.1.1&request=GetMap%20&layers=OnTerraWMS&styles=Aerial&transparent=FALSE&exception=&format=image/jpeg&srs=EPSG:4326&width=1000&height=1000%20&bbox=-105,35,-100,40
(
http://integrate.onterrasys.com/onterrawms_latlon?service=WMS&version=1.1.1&request=GetMap%20&layers=OnTerraWMS&styles=Aerial&transparent=FALSE&exception=&format=image/jpeg&srs=EPSG:4326&width=1000&height=1000%20&bbox=-105,35,-100,40
) 
</map> 
                                  
I tried to replace this: 
width=1000&height=1000 &bbox=-105,35,-100,40 
                                  
With this 
WIDTH=%WIDTH%&HEIGHT=1000&height=%HEIGHT%
&bbox=-%MINX%,%MINY%,%MAXX%,%MAXY% 
                                  
Still nothing… 
                                  
Has anyone tried this yet…..if I have to set my GeoMOOSE app to lat long
then I will….. 
Thoughts? 
                                  
THanks 



                                              




                

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20090922/d7269a88/attachment.html


More information about the Geomoose-users mailing list