Tag Info

Hot answers tagged

4

For the OpenLayers.Format.GeoJSON feature collection use an OpenLayers.Layer.Vector instance. Examples from the OpenLayers Examples Gallery: http://openlayers.org/dev/examples/geojson.html http://openlayers.org/dev/examples/vector-formats.html http://dev.openlayers.org/docs/files/OpenLayers/Layer/Vector-js.html Use a zoom based strategy for displaying ...


3

Change the order of your js-files. Load OpenLayers before the files within js-folder. <script src="ol-211/OpenLayers.js"></script> <script src="ol-211/firebug.js"></script> <script type="text/javascript" src="js/geocoding.js"></script> <script type="text/javascript" src="js/map1.js"></script> <script ...


3

This was recently asked on the GeoExt mailing list - http://www.geoext.org/pipermail/dev/2011-May/001008.html In a word - no, and there are as yet no ongoing development plans to do so, but it will be done eventually.


3

as i understand from the codes and your explanation, it's come to my mind: in OpenLayers.Popup method, there is a parameter which name is closeBox. this works for: {Boolean} Whether to display a close box inside the popup. if you make it true, the closing button will show in popup, in this case when you click to closing box, it is going to destroy all ...


2

Had the same problem today! Remove the triggerAction: 'all', option and it will work. triggerAction in fact tells the combox to always display all of its values regardless of filters. Documentation is scarce, but this thread describes the possible values for triggerAction: http://www.sencha.com/forum/showthread.php?40428-combo-box-triggerAction


2

If you send in URL only: /geoserver/ows?service=WFS you get this error. Minimal URL should be: /geoserver/ows?service=wfs&request=GetCapabilities if you need capabilities call with this params. If you need GeoJSON request for layer URL should be like this: ...


2

I think mistake in your store. You not determinete fields but try to get it in your columns. Try this store = new Ext.data.Store({ url: '<your_servlet_url>', reader: new Ext.data.JSONReader({ record: 'kad', //its your json record name fields: [ {name: 'kad_status', type: 'string'}, {name: 'kad_id', type: ...


2

OpenLayers is not built on ExtJS in the same way ArcGIS Javascript API is built on top of dojo. I would instead compare GeoExt with dojox.geo.openlayers. If your question is which framework is better I can say that dojo documentation has vastly improved thanks to SitePen and that dojo provides the tools to create MVC instead of an actual MVC architecture ...


2

Adding the OpenLayers.ProxyHost will only proxy requests that OpenLayers itself makes and won't proxy requests from the GeoExt framework. But actually you do not need to use a proxy as you can put the request for the Print Capabilities into your page's header as a script tag like this: <script ...


2

Have you tried with apostrophes? For me, this works: Ext.Loader.setConfig({ enabled:true, disableCaching: true, paths: { 'Ext': '/lib/extjs-4.1.1/src' ,'Ext.ux' : '/lib/extjs-4.1.1/examples/ux' // 'Ext' : 'http://cdn.sencha.io/ext-4.1.1-gpl/src' //,'Ext.ux' : 'http://cdn.sencha.io/ext-4.1.1-gpl/examples/ux' ,'GeoExt' : ...


2

I am pretty sure that GeoExt does not work together with ExtJS 4 yet. You should use ExtJS 3.4.0 like GeoExt does in this MapPanel example. You also need to add the ext-base.js which you can see in the above mentioned example. Update: GeoExt does currently only work with ExtJS 3, but GeoExt is planing a code sprint that targets: developing GeoExt ...


2

If you want to stay in the standards based world (rather than rolling your own AJAX based protocol) then look at using a WFS to request the points from the server using a filter based on your polygon. See http://dev.openlayers.org/releases/OpenLayers-2.12/examples/wfs-filter.html for an example


2

You need to listen to the featureadded event of the vector layer, and then get the geometry there. Have a look at the following JavaScript code: var map; function init(){ map = new OpenLayers.Map('map'); var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'}); var ...


2

It can't work because you have : Ext 4.2.0 Openlayers 2.12 GeoExt 1.1 and if you carefully read http://geoext.org/tutorials/quickstart.html#getting-geoext you have Download the latest Ext 3.x from the ExtJS website Furthermore, read http://blog.opengeo.org/tag/extjs4/ to confirm


1

As a fix, here is what I did. Combined the map definition and tree definition in a single file and required some GeoExt classes explicitly in Application.js Ext.define('OPS.Application', { name: 'OPS', extend: 'Ext.app.Application', requires: [ 'OPS.Global', 'GeoExt.tree.LayerContainer', ...


1

Regarding the comment about two separate labels (one for the "rest of the map" and one for the labels): this is what I thought of as well, and it should be fairly easy to implement: var url = "http://myserver.com/wms"; var background = new OpenLayers.Layer.WMS( "Base Map", url, {layers: 'background'} ); var labels = new OpenLayers.Layer.WMS( ...


1

To create subnodes set leaf to false: { text: "Root, group: true, children: [{ text: Buildings, leaf: false, expanded: true, children: [{ text: "Buildings Layer 1", layer: "MyTest:BuildingsSHP", ...


1

There's an unselectAll() function in the SelectFeature Control. Here's an example (untested): action = Ext.create('GeoExt.Action', { tooltip: "Unselect All", icon: 'Images/unsel.png', handler: function() { selectControls = map.getControlsByClass("OpenLayers.Control.SelectFeature") for(var i=0; i<selectControls.length; i++) { ...


1

It seems you are using openlayers library to load your mapping tiles. In openlayers there are two transitions that are currently implemented Default & Resize. Default is used when no transition is specified while resize effect resamples the current tile and displays it stretched or compressed until the new tile is available. Sample Code: var ...


1

Define the map as an OL Map separately, then assign it to the mappanel. Works for me. var map; map = new OpenLayers.Map(); ... items: [{ xtype: "gx_mappanel", map : map, // <--- add this id: "mappanel", layers: [basemap], extent: "-5,35,15,55" }] ... map.AddControl(yourControlHere); @Mapperez solution ...


1

The answer lies in the LayerLegend.js file (not obvious): when a new element is made in the legend, the title is determined by different tests: if 'legendTitle' has been set in the defaults, this title will be used the attribute 'hideTitle' (boolean) of the layer record (not the OpenLayers.Layer object, but the GeoExt.data.LayerRecord object) is checked, ...


1

I made applications with OpenLayers and ExtJS 4. GeoExt was limited to ExtJS 3 when I began. But it will always lag behind the latest developments. Another reason was that I was not so free with the design of the GUI elements, GeoExt has good easy to use solutions but limits the creativity. It depends on your purpose. If you want to tailor your webmap to the ...


1

Since GeoExt is based on OpenLayers + Extjs. So basically what you are trying to do is make your own GeoExt like thing. If you want to use Extjs, because of its better display functions. Using GeoExt will be your best choice. If you do not need Extjs, Openlayers can be used like using javascript. Using or not using Extjs, depends on how comfortable you ...


1

GeoEXT and OpenLayers or any JS library and OpenLayers are not directly connected. You can find many, many examples at OpenLayers relying on pure HTML and OpenLayers. These are usually single use cases, but it should get you going.


1

Before you figure out which one to use, you need to understand the difference between jQuery and ExtJs. jQuery includes features like DOM Manipulation, Event Handling, AJAX and allows it to be Extended through plugins. On its own, it includes very little UI components. ExtJs on the other hand is a complete framework, which includes all of the above, and ...


1

The best is to get the geometry from the database and use that to center the point in the map. To center it you need to do: var pointCenter = new OpenLayers.LonLat(//here the way you get the geometry); map.setCenter(pointCenter); If you have a combo box, you could use a function in a handler to call some urls pointing to your php script, or simply add ...


1

JavaScript is such a pain in the ass to debug! I can't find the problem in your code but here are some points that will help you to find it: Get the non minified version of Ext. Put some "console.log('>> function x start')" , "console.log('<< function x end')" in your code. As a final resource place "debbuger;" at the start. Since it's a generic ...


1

I make in my programs this solution (code below), using 'ux.GMapPanel' (GMapPanel.js) : items: [{ xtype: 'gmappanel', name: 'map', zoomLevel: 16, width: '100%', height: 360, gmapType: 'map', mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'], ...


1

It has been long time after question but; You don't need a CSS file for GeoExt2. It is enough to show GeoExt2-loader.js directory in your index.html file. For example my app like this <html> <head> <title>MY APP</title> <link rel="stylesheet" type="text/css" href="ext41/resources/css/ext-all-gray.css"> ...


1

I've found a solution for my problem. thanks to Alexandre DubĂȘ : map.events.on({"moveend": function(e) { alert("map moveend"); }, "zoomend": function(e) { alert("map zoomend"); }, scope: map}); So whenever the zoom or extend of my map changes, I will be able to save the extend information...



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