Tag Info

New answers tagged

0

If I were you, I'd throw away the PDF form. I doubt you'll get it working with GPS coordinates getting in there, unless you copy paste them in. What you might like to look into is the following two products, both of which support offline data collection with nice forms: Open Data Kit, a free Android only tool with a web-based backend and Google Fusion ...


1

For future seekers of ol knowledge, I found the answer using the SelectControl control, which has a hash of attributes including two booleans that were pertinent to my problem: 'box' and 'multiple'. The docs are here: http://dev.openlayers.org/releases/OpenLayers2.10/doc/apidocs/files/OpenLayers/Control/SelectFeature-js.html#OpenLayers.Control.SelectFeature ...


1

Try parsing the JSON like this: var json = { "st_asgeojson": { "type":"LineString", "coordinates":[ [23.4582348,37.5062675], [23.4577141,37.5066109], [23.4572601,37.5070038], [23.4566746,37.507301], [23.455698,37.5076256], [23.4549737,37.5079214], ...


2

You will need to add a new interaction. Assuming that... this.mapRaster = ol.Map This should work this.mapRaster.on('singleclick',function(e){ var iconFeature = new ol.Feature({ geometry: new ol.geom.Point(e.coordinate), }); iconFeature.setStyle(_self.iconStyle); _self.rasterVectorSource.addFeatures([iconFeature]); Make the ...


1

You can save your marker positions , your current map view coordinates etc.. into the localstorage of the browser . Localstorage is supported by nearly all modern browsers , you can check availability of local storage here .


1

Found the solution. The problem highlightFeature function with display whole info.update(layer.feature.properties) aka info0, info1, info2... so I need to write a specific highlightFeature for each layer like that : function highlightFeature0(e) { var layer = e.target; layer.setStyle({ weight: 3, color: '#666', dashArray: '', fillOpacity: 0.5, ...


0

This problem is known as Too many markers. See this article: https://developers.google.com/maps/articles/toomanymarkers for possible solutions. They list a few.


0

Try looking into Dojo Mobile instead because ESRI JSAPI is built on top of that. jQuery mobile may take a bit more work to get working for this purpose. I have not tried it myself, but have had good experiences with Dojo Mobile and ESRI JSAPI.


2

http://jsfiddle.net/a6pp9vwz/9/ working for me. Console log said "$ not defined". $ is a jQuery class, so you need a jQuery environment to enable AJAX requests. You can enable jQuery in JSFiddle in the "Frameworks & Extensions" tab.


0

thank you for your attention, i am newbie with geotiff and i'm sorry about my questions, i cant install php-gdal,and cant work with that , i think this plug in is for linux OS , but i worked on SRTMGeoTIFFReader and this is what i give i just want the coordinate of 4 corner of my geotiff pic like this : Corner Coordinates: Upper Left ( 69.7357061, ...


2

If I am understanding you correctly, you've copied the esri.css file from the js.arcgis.com server to your local server. This won't work because that esri.css file references images and possibly other resources on the js.arcgis.com server. It references those relative to the location of the css file. The css file is on your server but those required images ...


1

No, if you are loading leaflet tile layers, it is not possible to change their style once loaded. The key difference between your code and the example code you linked to is that the example code renders geoJSON data directly in the browser. Notice this line of code: var featureLayer = new L.GeoJSON(); //... map.addLayer(featureLayer); You are loading ...


1

The docs are great, look at the LayerGroup part. There is a method eachLayer that does exactly what you want: featureLayer.eachLayer(function (layer) { // do something with marker layer // layer.feature is probably defined, to create marker, do something like this layer.bindPopup(createPopupContentFromFeature(layer.feature)); }); You can do similar ...


1

There are always multiple ways to skin this configurable cat. ;) I can think at least three approaches: Assuming you want your content at the bottom of the left sidebar, you can do this today in config/viewer: panes: { left: {}, myContent: { id: 'myContent', placeAt: 'left', region: 'bottom', style: 'height: 220px ...


0

I just wanted to share that I was having a similar issue, except no tool buttons were showing. When I removed "compact" from the following: <script type="text/javascript" src="http://js.arcgis.com/3.11compact/"></script>it works as expected.


0

You could likely do this if you supplied the dates in for your segments in CartoDB, selected only the data you need, and you can then color it using CartoCSS. For example, you could have data such as this in CartoDB: the_geom name type col_date_start col_date_end color Row 1: (geometry) a polygon 0101 ...


0

there is a php extension called php-gdal I found some install instructions: https://www.drupal.org/node/2133103 the main site: https://github.com/geonef/php5-gdal helpful? http://dl.maptools.org/dl/php_ogr/php_ogr_documentation.html I looked at scruss' suggestion: ( How to read GeoTIFF using PHP? ) and downloaded the code to take a look at. I'm not ...


0

In the Web AppBuilder for ArcGIS (Developer Edition), after modifying the configuration of the Coordinate Widget in a local application and ensuring that you've saved your work, the settings can be found/manipulated here apps\[number]\widgets\Coordinate\config_Coordinate.json Hope that helps!


0

I figured out the issue was with the buttons content pane being registered twice. I assume this was due to a parsing issue. I changed parseOnLoad:true to false and manually parsed the data onload. This resolved the issue.


0

I noticed this from the "What's new in Version 3.11" tab. New methods getTool and getUnit on Measurement class. New events measure-start and measure on Measurement class. Updated event measure-end on Measurement. New events tool-change and unit-change on Measurement class. Measurement widget enhancements: New developer events and methods to support ...


2

First, when working with CMV, you should start with the unminified versions of the configuration files that will make it much easier to work with. The latest release is here. With respect to your question, you can use a function to create the popup template. Here's an reformatted example of your code reusing the same template for 3 different sublayers - 2 ...


1

I don't even think being able to extract the T and V, if possible, is gonna be reliable cross-browsers. Might just be a browser interpretation thing. In any case, if you have access to it, I would just add your own attribute when you're creating the layer: var foo_layer = new ol.layer.Vector(...); foo_layer.layer_type = 'vector'; Then you can use it later ...


2

I'm not familiar with CMV, there are a few JavaScript mistakes in your code if that's the exact code you're using. Firstly, you cannot use a variable (myArray[i]) as a name for JSON object key. Please see this tutorial and this reference. You should've gotten an error for this, I would've guessed... Secondly, you cannot put Dojo's define in a loop. You ...


12

If you are interested in an implementation look at jsts a Javascript implementation of the much used Java Topology Suite library -- depending on whether you prefer reading Javascript or Java, I suppose. A general idea of how the algorithm works. For points, it is trivial, you simply buffer them by a given radius. If you have multiple points, you will have ...


1

In my MPSuperShape product, it is possible to apply a buffer to a convex polygon. This is performed by moving the vertices outwards on the line that bisects the two edges at that vertex. The distance is chosen using trigonometry so that the edges both move out a user-specified distance. This works well but acute vertices can extend disproportionately. Ie. ...


0

Converting geographic (latitude-longitude) coordinates to plane (X-Y or row-column) coordinates is a matter of map projection. Your main constraint is probably the projection which is already being used to map the other features (runways, terminals, etc). That is, if they are already recorded/stored/displayed in some flat X-Y system, then you need to ...


1

From the Leaflet Polygon examples, here is one way with a Switch Statement: var states = [{ "type": "Feature", "properties": {"party": "Republican"}, "geometry": { "type": "Polygon", "coordinates": [[ [-104.05, 48.99], [-97.22, 48.98], [-96.58, 45.94], [-104.03, 45.94], [-104.05, 48.99] ]] } }, { "type": ...


1

Until somebody finds a better solution, here what I would do ... As you noticed, leaflet is using pixel position to set zIndex (in Marker.js) pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round(); this._zIndex = pos.y + this.options.zIndexOffset; What I suggest is to undo leaflet zIndex using setZIndexOffset() Say you want ...


0

Here are some NodeJS / Javascript packages I found on GitHub: https://github.com/beatgammit/node-coordinator https://github.com/proj4js/mgrs https://github.com/proj4js/proj4js


0

The problem is solved. First, I changed echo $datafile to echo '<script type="text/javascript">imageUrl = "'. $datafile. '"; </script>'; This js variable is echoed in the html output page. Then, it was possible to call the js variable, imageUrl. There, was another problem with the image display. I was hiding the image layer div using ...


0

I bump this post. The answer given by Moshii works only if you use a custom version of OpenLayers (the same as here), because in a standard version of OpenLayers 2 such as 2.13, the ONECANVASPERLAYER does not exist in OpenLayers.Layer.Grid, same for useCanvas. The possibility of using canvas for WMS Layer was actually an experimentation as you can read ...


0

Attach to the keydown and keyup events. When the "draw-end" event fires use the "IsShiftDown" to see if the shift was being held down. require(["dojo/on", "dojo/domReady!"], function(on) { var IsShiftDown = false; on(document, "keydown", function(event) { if(event.keyCode == 16) IsShiftDown = true; }); on(document, ...


2

Here is a very simple demo of this concept: https://dotnetfiddle.net/KhMIxV What you are going to want to do is make it so that your array in the controller can be translated to an array in javascript. This process is facilitated through serialization. The most common way (and one which should be available to your controller inherently) is through JSON.Net, ...


1

I ended up writing a Leaflet plugin, Leaflet.draw.topology, to accomplish this task. The only thing not implemented in the plugin is geometry validation, though in the future it certainly could be. It is currently handled server side with PostGIS.


2

I got the solution. If you want, just do the following... //Styles to switch off the roads var stylez = [{ "featureType" : "road", "stylers" : [{ "visibility" : "off" } ] } ]; //Satellite var ghyb = new OpenLayers.Layer.Google( "Google Hybrid", { ...


0

I resolve it! The problem was that there was a Chile's Layer that it was taking too much time to load (47 sec) and then the legend also was trying to load. The solution was to load the legend after the webpage it was loade with this code: document.onreadystatechange = function() { if (document.readyState === 'complete') { loadLegendLayers(); } ...


0

IMO the wms service used by OL cannot be changed in this detail. It will be more likely that you need to create your own basemap using TileMill or something else. But I am not an expert in OL / Gmaps


0

you have a couple of js bugs on your page... window.onload=function() { var formref=document.getElementById("switchform") indicateSelected(formref.choice) } there is no element with id = "switchform". try fixing that. and maybe try putting this: <script language="JavaScript"> $(document).ready(function() { $(".topnav").accordion({ ...


3

I think your first solution, to project the Lat/Long coordinates to your preferred state plane is the right way to go. However, I'm not sure what you mean by "a Geometry Service". Do you mean you're using a 3rd-party web method to perform the coordinate transformation? If so, I would discourage that, as there's not a good reason to have such a dependency in ...


1

If you want to remove the grayscale map from the start just delete: "Grayscale": grayscale, From var baseMaps = { "Grayscale": grayscale, "Streets": streets }; If you want to remove the layer on a click you call it as a method on the map object. Like so: map.removeLayer(grayscale) To remove it from the control you first have to assign ...


2

In Python: import json #(geojson also fine) json_data=open('a.geojson') data = json.load(json_data) print len(data['features'])


5

If you have GeoJson that looks like that on the wikipedia page var json={ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [102.0, 0.6] }, "properties": { "prop0": "value0" } }, { "type": "Feature", "geometry": { "type": "LineString", ...



Top 50 recent answers are included