Any plans for GoogleMaps?

Dec 15, 2008 at 8:58 AM
Hi

Just wanted to hear if there were any plans on implementing GoogleMaps as an TileProvider? I can see that you have a GooglePlanets folder ind the source, it that it?

Thanks in advance,
Qbus
Developer
Dec 15, 2008 at 3:03 PM
I made one, but Google block the requests to their map tiles
 
I guess you would need to buy a licence from them or something to get it to work...?
Dec 15, 2008 at 4:15 PM
Hmm, I have tryed a component from ComponentOne, where is works. But as far as I know you need at token/password thing, just like Virtual Earth for it to work. They have staging/production environments to just like VirtualEarth. So there should be no need to by license up front?

Another thing, why have to renamed the folder du GooglePlanets? Before is was called GoogleMap?

:)
Coordinator
Dec 16, 2008 at 12:23 AM
We have to seperate out the data providers that are in competition with each other. So far Microsoft have given us access to their services and detials on how to impliment their system.
There is no reason why a Google Maps provider could not be added to the project its just not our main focus and we don't have a good contact within Google to make this happen.
Since we are using Silverlight there maybe some issue there I'm not aware of, we are certainly open and have had there data running without issue in dev.
Dec 16, 2008 at 7:55 AM
Ok thanks for your answers. Just wanted to hear your thought/plans on it :)
Mar 9, 2009 at 10:53 PM
I have a need for Google maps specifically... I have a client who already has an account with them so I can't use Virtual Earth. Since you said you made a Google TileProvider, can I possibly get the source code from you? Or how hard would it be for me to create one myself?
Developer
Mar 10, 2009 at 1:32 AM
Edited Mar 10, 2009 at 1:33 AM
http://code.google.com/apis/maps/faq.html#tos_tiles
Can I access the Maps and Satellite images directly?
You may not access the maps or satellite images through any mechanism besides the Google Maps APIs (such as the creation of your own mapping API or the use of a bulk tile download script). Your application's access to the tiles will be blocked if it accesses them outside of the Google Maps APIs. See section 5.3 of the Google Terms of Use for more details.

http://www.google.com/accounts/TOS

5. Use of the Services by you

5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.


Mar 10, 2009 at 8:05 AM
Here the implementation I used. It were only for a showcase so I don't know if will work, license-wise, in a real application. I have only copied the classes here. In the real application they are in a namespace and seperate classes, but you should be able to put these into your project where you want them.

/// <summary>
    /// A <see cref="MultiScaleTileSource"/> accessing Google Maps' map tiles.
    /// </summary>
    /// <remarks>
    /// Google may temporarily block tile access if it detects abuse.
    /// </remarks>
    public class GoogleMapsMapSource : GoogleMapSource
    {
        /// <summary>
        /// The URI format used for accessing the tiles. It might be necessary to change this if Google changes the tiles URLs.
        /// </summary>
        public static string UriFormat = "http://mt{0}.google.com/mt?v=w2.88&hl=en&x={1}&y={2}&z={3}&s=";

        /// <summary>
        /// Initializes a new GoogleMapsMapSource.
        /// </summary>
        public GoogleMapsMapSource()
            : base(UriFormat)
        { }
    }

public abstract class GoogleMapSource : MultiScaleTileSource
    {
        string _uriFormat;

        /// <summary>
        /// Initializes a new GoogleMapSource.
        /// </summary>
        /// <param name="uriFormat">Uri format to use.</param>
        public GoogleMapSource(string uriFormat)
            : base(0x8000000, 0x8000000, 256, 256, 0)
        {
            _uriFormat = uriFormat;
        }

#pragma warning disable 1591

        protected override void GetTileLayers(int level, int x, int y, IList<object> sources)
        {
            if (level < 8) return;

            sources.Add(new Uri(string.Format(_uriFormat, new Random().Next() % 4, x, y, level - 8)));
        }

#pragma warning restore 1591
    }

/// <summary>
    /// A <see cref="MultiScaleTileSource"/> accessing Google Maps' satellite tiles.
    /// </summary>
    /// <remarks>
    /// Google may temporarily block tile access if it detects abuse.
    /// </remarks>
    public class GoogleMapsSatelliteSource : GoogleMapSource
    {
        /// <summary>
        /// The URI format used for accessing the tiles. It might be necessary to change this if Google changes the tiles URLs.
        /// </summary>
        public static string UriFormat = "http://khm{0}.google.com/kh?v=33&hl=en&x={1}&y={2}&z={3}&s=";

        /// <summary>
        /// Initializes a new GoogleMapsSatelliteSource.
        /// </summary>
        public GoogleMapsSatelliteSource()
            : base(UriFormat)
        { }
    }

/// <summary>
    /// A <see cref="MultiScaleTileSource"/> accessing Google Maps' terrain tiles.
    /// </summary>
    /// <remarks>
    /// Google may temporarily block tile access if it detects abuse.
    /// </remarks>
    public class GoogleMapsTerrainSource : GoogleMapSource
    {
        /// <summary>
        /// The URI format used for accessing the tiles. It might be necessary to change this if Google changes the tiles URLs.
        /// </summary>
        public static string UriFormat = "http://mt{0}.google.com/mt?v=w2p.87&hl=en&x={1}&y={2}&z={3}&s=";

        /// <summary>
        /// Initializes a new GoogleMapsTerrainSource.
        /// </summary>
        public GoogleMapsTerrainSource()
            : base(UriFormat)
        { }
    }
Mar 17, 2009 at 5:07 PM
I can't find in licence agreement where it said that is not possible use google maps with silverlight.

Could someone put the text where said that google maps can only be used with javacript and flash APIs!



Thanks,

Nelson

Mar 17, 2009 at 7:50 PM

Hi nelson,

                I suppose you can use Google maps api with Silverlight (javascript). It might not be very useful.  However, you can’t access the tiles directly from your own code. It has to be Google’s API inside Google’s container, which means it can’t be used as a tile source in DeepEarth, unless you can negotiate a special access license.

For example, if you wished to access a series of tiles directly from a keyhole server like this: http://kh.google.com/kh?v=3&t=trtsqtqsqqqt you would be in violation of their license.

I think section 10 restrictions apply:

http://code.google.com/apis/maps/terms.html

rkgeorge

From: nbilber [mailto:notifications@codeplex.com]
Sent: Tuesday, March 17, 2009 10:08 AM
To: rkgeorge@cadmaps.com
Subject: Re: Any plans for GoogleMaps? [deepearth:42307]

From: nbilber

I can't find in licence agreement where it said that is not possible use google maps with silverlight.

Could someone put the text where said that google maps can only be used with javacript and flash APIs!



Thanks,

Nelson

Read the full discussion online.

To add a post to this discussion, reply to this email (deepearth@discussions.codeplex.com)

To start a new discussion for this project, email deepearth@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com