Hi,
One our customer wants to view kml files prepared by google earth in our map. Is there a way to import data such files.
Not : I can't attach the file, it says me File type is not allowed.
Thanks,
Ayhan Gonul
Hi,
One our customer wants to view kml files prepared by google earth in our map. Is there a way to import data such files.
Not : I can't attach the file, it says me File type is not allowed.
Thanks,
Ayhan Gonul
Ayhan,
We have a KML FeatureSource and Layer and Style in alpha right now but it is not released. If you can send the file we can see if it will work. To attach it zip it up and try and post it here. If that does not work then e-mail it to support@thinkgeo.com and ask them to send it to David.
David
Ayhan,
The file you sent us is supported by our KML extension API. We have not released the KML extension yet formally but we are going to create a community project and release an alpha version there. When the sample is ready we will update this thread and you can download it and use your own data. Thanks for sending us the data, it was useful in moving this post forward.
David
Ayhan,
We have created a sample and posted it on the Map Suite Code Community, link below. Here you will find a sample and the source included if you run into any issues. We have tested this with your file and it seems to run fine. I think it only supported KML and not KMZ but that is just unzipping KMZ to get the KML. Let me know if you have any other questions.
code.thinkgeo.com/projects/show/kmlextension
David
Thanks David, I wiil try it.
Ayhan
If you have any comment or suggestion on the Code Community project we recommended you, let us know. Thank you.
David,
I couldn't try the sample because it is desktop edition and we have only web edition.
Thanks,
Ayhan
We just published the Web version, KML Extension Web. Please check it out in the Code Community: code.thinkgeo.com/projects/show/kmlextensionweb
Thank you.
Val,
I just tried the sample, it shows me the map but not image. Is there a special way for doing this?
Thanks,
Ayhan
With the references of WebEdition.dll and MapSuiteCore.dll, you should be able to run the web app as is and it should show as you see in the screenshot. If you are doing anything different, let us know and we will try to guide you. Thank you.
Val,
I am not trying anything different, I am trying the sample in the code community and I referenced WebEdition.dll and MapSuiteCore.dll. The project works but does not show the screenshot.
Thanks,
Ayhan
The screenshot that I get
The only thing you have to do after downloading the file for the C# Web solution, unzipping it and opening it is to set the following references:
-MapSuiteCore.dll for the KmlExtension project.
-MapSuiteCore.dll and webedition.dll for the KmlExtensionWeb project.
Also, are you sure you have kml_samples.kml in the App_Data folder?
It is not going to let you run the app anyway if you don't have those references. And it should look like that:
I don't see why this is not showing normally on your side. We are going to need more info. Thank you.
Val,
I don't know why but I did everythink you said me. Also I reinstalled operating system but the result is same as before.
Now My operating system is Windows 7 ultimate edition 32 bit (Turkish).
I have Visual Studio 2008 and also 2010
Thanks,
Ayhan
Ayhan,
We will have a core guy from the Web Team looking at your issuetomorrow and testing with the environment you described. Thank you for your patience.
Ayhan,
We reinstalled the OS on a new machine. The OS is Windows 7 Enterprise 32 Bit. The Formats and Location are Turkish(Turkey). It’s just installed the VS2008 and 2010 Team System Development Edition and .net 3.5 SP1. We did the test with the code community sample, but all works fine. Can you try the Desktop Sample to check it works fine?
Thanks,
Johnny
Johnny,
I can not try Desktop Edition sample because we do not have Map Suite Desktop Edition. I am trying everything for that problem but the result same as before… sorry about that.
Thanks,
Ayhan.
Ayhan,
I have a few things to confirm with you:
1. Please make sure replace the MapSuiteCore.dll referenced by KmlExtension.
2. Can you try the GetAllFeatures method of KmlFeatureSouce to make sure there are some features returned?
3. Can you try adding the DrawingFeatures event to KmlFeatureLayer, and then check the features drawn are not null. Here are sample codes:
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
layer.DrawingFeatures += new EventHandler<DrawingFeaturesEventArgs>(layer_DrawingFeatures);
void layer_DrawingFeatures(object sender, DrawingFeaturesEventArgs e)
{
Collection<Feature> featureToDraw = e.FeaturesToDraw;
}
Any results please let us know.
Thanks,
Johnny
Johnny,
1 - I referenced MapSuiteCore.dll again
2 - Returns 20 InternalFeatures
3- the features drawn are null
Thanks,
Ayhan