Tag Info

Hot answers tagged

3

At first, I thought it was something easy to do, but eventually I've lost almost half a day to come up with a solution. The first version didn't seemed to have a practical use (only proved it is possible), but it paved the way for the second solution, that may constitute a basis for interesting future developments. The map can be panned, clicked and ...


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); } }


3

Please check out following links http://dev.openlayers.org/addins/scalebar/trunk/examples/scalebar.html http://dev.openlayers.org/addins/scalebar/trunk/examples/scalebar-custom.html will be helpful for you.


3

I think I encountered a similar issue at Problem Initializing License for ArcEngine application. 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. I was unable to resolve the issue with technical support, but found a workaround for my project. If ...


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

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(), ...


2

You have to set useCanvas property for every layer you want to export with ExportMap.js. useCanvas: OpenLayers.Layer.Grid.ONECANVASPERLAYER See this example and its source code: Export map as image I have successfully exported WMS , WFS and Vector layers but can't export Google Maps layer. If you can export Google Maps layer then let me know that.


2

Add &format=application/openlayers to your reflector URL, it will give you back the usual preview. Some docs here: http://docs.geoserver.org/stable/en/user/tutorials/wmsreflector.html


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 ...


1

Cast ActiveView as IMap or IPageLayout and see which sticks.


1

EDIT -- For ArcObjects You can get the extent of selected graphics using IGraphicsContainerSelect.SelectionBounds. This will return an IEnvelope which you can use to set the extent on your IActiveView. var graphicsSelect = pGraphicsContainer as IGraphicsContainerSelect; var extent = graphicsSelect.SelectionBounds; activeView.Extent = extent; ...


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

Use a MarkerLineSymbol with a round marker to accomplish this. I can't tell from the code snippet you provided, but I suspect you're using a CartographicLineSymbol and that will only give you line dashes.


1

Have you tried something like L.control.layers([aBaseLayer], [aGeoJsonLayer]).addTo(map); Although you may want to add your layer as a geojson layer: http://leafletjs.com/reference.html#geojson


1

I have a feeling that the original did not work because the map name does not match the infowindow binding: <esri:Map x:Name="MyMap"> Map="{Binding ElementName=My_Map}"



Only top voted, non community-wiki answers of a minimum length are eligible