Hot answers tagged mapcontrol
3
With version 10 you need to explicitly initialize the license for the software; so that it knows what level to look for and what to check out. You can see the support doc to get you started. So you will want to have in your form a string to activate your license; then when you dispose of the form to return the license.This .Net sample gives you the major ...
3
Answered my own question. This one was painfully obvious and I don't know why I didn't see it earlier.
Here is the code for looping over the control collection:
function fcnLoopThruControlCollection() {
var mControls = map.controls;
for (var a = 0; a < mControls.length; a++) {
alert(mControls[a].id);
}
}
2
Andreas Hocevar has created an OpenLayers branch (currently in the pull-request queue) that solves this problem.
Rather than using the SelectFeature control, the branch enables the employment of event listeners that do not get in the way of other event intentions such as panning the map while inside one of your vector layers.
Your code may look ...
2
In my opinion there is an issue with layer removal. To my understanding the function OpenLayers.Layer.destroy() will not remove the layer from map; according to the API docs, its mission is "to alleviate cyclic references which the Javascript garbage cleaner can not take care of on its own" (http://goo.gl/LvYxD).
To remove a layer, after calling the ...
2
You can make a custom OpenLayers class that calls the cluster stratergy activate() and deactivate() methods.
A simple example would be:
cluster_strat = new OpenLayers.Strategy.Cluster({
"autoActivate": false,
"autoDestroy": false});
data = new OpenLayers.Layer.Vector("Name", {
strategies: [new OpenLayers.Strategy.Fixed(),
...
1
You seem going to serialize and deserialize Map object. The class which implement IPersistStream interface can serialize and deserialize to byte array, string or text file. Here's a sample code.
//serialize Map object to byte array
IMap pMap = axMapControl1.Map;
IXMLStream pXMLStream = new XMLStreamClass();
IObjectStream pObjStream = new ...
1
I think I encountered a similar issue. In my case, the application was binding just fine, as yours was, but when I tried to use any AxControls (Map, TOC, Toolbar), I got the same error that you did. (Link to my question)
I was unable to resolve the issue with technical support, but found a workaround for my project. If you are using AoInitialize put in ...
Only top voted, non community-wiki answers of a minimum length are eligible
