jiyanliang 发表于 2013-1-29 23:47:50

arcgis mobile map cache(from esri website)

question:

I've set the URL to my mobile map service wsdl in my map control, but I keep getting the "NotConnectedText" property message.

How do I create a map cache?

The documentation says this:
"You can create a map cache by simply connecting to the web service and panning and zooming or by using the Extractor sample that is available for download on ArcScripts. "

I have not looked at the script yet.

Using ArcMap I tried panning and zooming to create the map cache, but no files were created. I looked in the map cache directory associated with the map service on the server.

Any suggestions?

Thanks!

answer 1:
The Mobile ADF does not use the cache created by the server.

Since the Mobile ADF can fully function when disconnected from the server it needs to create a client side "mobile map cache".

Given your other post, you seem to be having problems with the web service itself. Please take a look at my post to the other thread. If you cannot access the WSDL through your web browser it is most likely a server configuration problem (user access most likely).

Please keep us up to date on your progress! Hope this helps,

answer 2:

Now we need to take a look at how you are creating and opening the cache.

Here is some sample code. Are you doing this? After you successfully open the cache you will also need to fill it with data. You can do this on the Extent_Changed event of the map (I posted this in another thread as well).

Please let me know how this goes for you.

Thanks,

Jeff






//To create a new map cache and then open it
if (!mapCache1.Exists)
    mapCache1.Create();
mapCache1.Open();

//To get data from the web service and store it in the cache
private void map1_ExtentChanged(object sender, EventArgs e)
    {
      if (map1.IsValid)
      mapCache1.GetDataAsync(map1, false, null);

    }
页: [1]
查看完整版本: arcgis mobile map cache(from esri website)