Tag Info

New answers tagged

0

If you want to change a style depending on a property of the layer, you can do this by supplying a function as a style context. Here's an example where the colours were stored in a hash array: var jobContext = { getColour: function (feature, styleEl) { var jobSector = feature.attributes[<myProperty>]; return ...


0

With only three digits before the decimal point it is impossible to do any reprojection. This is the Karimnagar district and the Zone IIIa grid: You need the full coordinates for reprojection. The village of Peddapur is too small to find it on Openstreetmap. Geonames finds a village of that name, but Northwest of Hyderabad.


0

Reverse Geocoding Webservices from geonames "Reverse Geocoding" is the process of finding an address, toponym or an other type of resource for a given lat/lng pair. GeoNames offers a wide range of reverse geocoding web services. Find nearby postal codes : finds postal codes and place names for the given lat/lng within a given radius. (supported countries) ...


0

I found a solution: http://jsfiddle.net/XfEmn/ detect the point clicked find the feature closest to this point use the selectFeatureControl to programatically select this feature


0

There're two examples that modify features in the documentation. One is http://ol3js.org/en/master/examples/modify-test.html and the other is http://ol3js.org/en/master/examples/modify-features.html


0

Okay, What does this block of code do? subLayerOptions is just the author's way of storing a set of layer options/parameters that they later set to the layer. It could be SQL/CartoCSS etc. The key bit is, sublayer.set(subLayerOptions); It is saying, whatever CartoDB thought the initial state of that layer should be, forget it, use the settings I have ...


1

You can use Raphael plugin for Leaflet. This enables you to use SVG animations from Raphael framework. http://dynmeth.github.io/RaphaelLayer/ There is an example on using animated lines from point to point using Bezier lines on link above. You can look in the plugin code and make tweaks to functionality provided or add your own by using Raphael features. ...


0

Using JQuery, I am able to accomplish my desired results by simply removing all children from the designated container the map is added to: $('#mapContainer').empty(); I feel this is a crude way to handle this functionality and am hoping someone knows a more elegant way.


3

Figured it out function FindLabel ( [NAME] ) { return [NAME]+'\nNational Forest'; }


1

you can do it using this SQL code SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features FROM (SELECT 'Feature' As type, ST_AsGeoJSON(lg.geom)::json As geometry, ( select row_to_json(t) from (select FIELD_1, FIELD_2, FIELD_N) t ) As properties FROM MY_TABLE_OR_VIEW As lg ) ...


1

To display the map, it is necessary to declare the projection of the data, and the projection you want to be displayed. The geojson data seems to be in EPSG:4326, while the OSM map you load is in EPSG:900913. My own osm map starts with map = new OpenLayers.Map ("map", { controls:[ new OpenLayers.Control.Zoomlevel(), ...


0

You need to convert the coordinates in your JSON object to also be 'unprojected', just like your base image. First loop through the points object and change the coordinates in each point from [x,y] to whatever is returned by map.unproject([x,y]). Then add the JSON object to the map.


0

My reading of your Question says that you are/were seeing this problem on Internet Explorer (mode) 7 and 8 but only on one Windows XP machine running ArcGIS Desktop 10.0. It was not reproducible for you using ArcGIS Desktop 10.0 on Windows 7 or ArcGIS Desktop 9.3 on Windows XP. Internet Explorer 7 and 8 are still listed under the System Requirements of ...


0

You can't solve this problem in general. Fundamentally, if you don't have the location (with boundary) of every infrastructure location you care about, you cannot tell if any given point lies inside an infrastructure location or not. You may be able to solve this for a very small area (e.g. by taking an open data source such as openstreetmap and personally ...


0

Seems like you added code within the infowindow template, unfortunately it breaks the visualization. If you remove it the map will work. Also, If you want to add or customize something in the map (javascript, styles, etc), I encourage you to try CartoDB.js library (https://github.com/CartoDB/cartodb.js). Create your map using a viz.json url and then change ...


0

I load a dynamic kml, with all popup ... dynamic kml is a php file that create a kml structure and where i put all information tha i need. KML is a file that I can define a style and pop-up message, with html format. I can simply add a various kml file to my OpenLayers map with this simple code: var sundials = new OpenLayers.Layer.Vector("KML ...


0

The proxy for JSAPI is built to access services that are secured with token-based authentication This issue on the proxy's GitHub repo page highlights this limitation "Java/.NET : Throw "Error 500-Protocol Error" when passing ArcGIS Server uri with windows authentication" https://github.com/Esri/resource-proxy/issues/7 There's a discussion about making ...


2

It really does depend on what you want the use to do with the web application. I asked a similar question here - Create interactive map with no server 1) If you want to just visually show the data then you could either load the data into a database (postgis, oracle etc) and put a geographic server (geoserver, mapserver, arcgis server) in front of that and ...


2

It's obvious here that you can't expect to get 200 MB from a server to a client in a reasonable amount of time. Your only options are to drastically simplify it (probably will resulting unusable information) or tiling it (either vector or raster tiling should work). What you do depends on what you know and what you want to achieve. Here's what I suggest, ...


0

is the problem that 'evt.layers[0].layer' doesn't resolve within the edit initialization function or that you just can't trigger the query when clicking on the map? if the second, check out this blog post/sample code on querying points and polylines by clicking the map. Querying points and lines on click with the ArcGIS JavaScript API ...


0

I think this is a very useful method but it should be added as addLayer(Layer) and with some small changes to make it handle one layer: addLayer = function(layer) { var isActive = this.active; var currLayers = this.layers; this.deactivate(); if(this.layers) { this.layer.destroy(); this.layers = null; } if ( currLayers != null) { ...



Top 50 recent answers are included