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


4

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


4

You can either define vector_term as global variable or pass it as argument in loadKMLTMINT function. To pass as parameter the function definition should be function loadKMLTMINT(terminalcode,vector_term) {


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


3

You should use a following way: var legendPanel = new GeoExt.LegendPanel({ ... map: map, defaults: { showTitle: false, baseParams: { FORMAT: 'image/png' } } });


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

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

Is your vector layer in the Google Mercator projection (900913)? I believe your vector layer has to be in the same coordinate system as the Google Map tiles.


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

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

Point WMS Feature Layer??? You can't analyse WMS layer. OpenLayers sees it as a bunch of png files. If WMS comes from Postgis you can send newly drawn polygon via AJAX to database and make intersection using source data.


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


2

You can listen to the Layer's loadend event like this: layer.events.register("loadend", layer, function (e) { //<<---Do your process here });


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

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

The solution was to use only "protocol.options.url = newUrl;" instead of protocol.destroy(); or protocol.read();, a complete explanation is here


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

Because Geoext2 they remove override-ext-ajax.js, but you can mortify urls like this printCapabilities.createURL="./ProxyHost.ashx?url="+printCapabilities.createURL; printCapabilities.printURL="./FTProxyHost.ashx?url="+printCapabilities.printURL; printCapabilities is from http://localhost:8080/geoserver/pdf/info.json?var=printCapabilities. It works ...


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



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