Hello ThinkGeo,
When I use below code, I can successfully see the point on Google's site, and this works great.
We took Google Enterprise License ID and when I set Google Authorized Enterprise Client ID, I don't see google map displaying on the map...Google gave us a clientid to use in applications and we haven't got any private key to use ..So my question without the private key will this work??? Or Do you see any problem with code.
*********************************
//Code below doesn't work with using Google Authorize Enterprise Key..What i'm passing is clientid
GoogleMapsOverlay google = new GoogleMapsOverlay();
google.clientID="XXXXXXXX";
**********************************
//Code below works great without using Google Enterprise key..
GoogleMapsOverlay google = new GoogleMapsOverlay();
google.MapType = GoogleMapsMapType.Hybrid;
Map.Overlays.Add(google);
Map.MapUnit = GeographyUnit.Meter;
Map.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean);
Map.CurrentExtent = new RectangleShape(-10000000, 10000000, 10000000, -10000000);
var proj = new Proj4Projection
{
InternalProjectionParametersString = Proj4Projection.GetEsriParametersString(4326),
ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString()
};
proj.Open();
double Longitude = -96.80;
double Latitude = 33.50;
Vertex googleMapVertex = proj.ConvertToExternalProjection(Longitude, Latitude);
SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay();
InMemoryMarkerOverlay m = new InMemoryMarkerOverlay();
m.FeatureSource.Projection = proj;
proj.Close();
InMemoryFeatureLayer inMemoryFeatureLayer = new InMemoryFeatureLayer();
inMemoryFeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimpleCircleStyle(GeoColor.StandardColors.Red, 12);
inMemoryFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
inMemoryFeatureLayer.InternalFeatures.Add(new Feature(googleMapVertex));
LayerOverlay dynamicOverlay = new LayerOverlay();
dynamicOverlay.Layers.Add("PointsLayer", inMemoryFeatureLayer);
Map.Overlays.Add("DynamicOverlay", dynamicOverlay);
Map.Refresh();