Tag Info

New answers tagged

0

I found out solution using ImageOverlay from leaflet for creating Ground Overlays as below : http://leafletjs.com/reference.html#imageoverlay


0

Actually, reading between the lines of the article you quote, indicates it might be possible. Since OpenLayers is also a web based slippy tile viewer (with vectors) if it can do it, then it makes sense that Lealfet can. Yes, true, it is best if what you are overlaying is vector and markers: ...


0

Got it. For a demo look at the CodePen Demo: http://codepen.io/DrYSG/pen/zJsiG Here are the JS and the CSS snippets that do the relevant work: L.Control.Command = L.Control.extend({ options: { position: 'topleft', }, onAdd: function (map) { var controlDiv = L.DomUtil.create('div', 'leaflet-control-command'); L.DomEvent ...


2

Combining tile layers in different projections is problematic I haven't tried, but I think this it is not possible to combine tile layers in different projections. Assume that your map is shown in EPSG:3857 and you have one tile layer in EPSG:3857 as a base layer. You now want to add another layer of images on top (that's what a tile layer basically is), ...


1

I ended up solving this. I also figured out you can add arbitrary options and access them later. That is useful for assigning unique ids to markers: for (i = 0; i <= points.length-1; i++) { testmarker[i] = L.marker([points[i][0], points[i][1]], {icon: unselectedIcon, id: i}); testmarker[i].on('click', function(e) { ...


2

Try to change the layer CRS with Rightclick ->Set CRS for layer to EPSG:3857. You can load openlayers plugin with Google or Openstreetmap background to see if it fits there. For Geojson export, the target CRS must be EPSG:4326. You have to set that manually when using Rightclick->Save As....


1

This basically depends about experience with libraries. OpenLayers is a one large size file library with lots of classes for several use cases. Leaflet is smaller so it has less features. Tracking of the drivers cars using a tablet through my web app. If you intend to use tablet devices you can also switch to native APIs of your system like Android and ...


1

Your question is very open ended and doesn't really have a definitive answer. You should check out this question for some good arguments for and against. A lot of people use OpeLayers because of the huge amount of flexibility, but some people avoid it because it can be quite big (it should be pointed out that you can deploy 'Lite' versions). On the leaflet ...


2

Adding on what R.K. is saying, your best bet is to refine your postgis query to build the entire GeoJSON object. This should explain how: http://www.postgresonline.com/journal/archives/267-Creating-GeoJSON-Feature-Collections-with-JSON-and-PostGIS-functions.html


1

According to the docs, ST_AsGeoJSON() returns the geometry as a GeoJSON element. It does not return a whole GeoJSON object. Here is an example of a full GeoJSON object: { "type": "Feature", "id": "OpenLayers.Feature.Vector_314", "properties": {}, "geometry": { "type": "Point", "coordinates": [ 97.03125, ...


1

Another answer ;) To have event everywhere you right click in Leaflet map Go on web page http://leafletjs.com/examples/geojson-example.html Type in the console //Right click on the map activated map.on('contextmenu', function(e) { alert(e.latlng); }); //Right click on the different layers var layers_and_features = map._layers; for (var lay in ...


1

You could always 'cheat' and pull the layer from the pixel point on the rendered image that's returned (if you're using an html5 browser and tags). Then pull out the R, G,and B pixel values to reverse-determine the number...


-2

You can't have relative urls off line, you need to have a file protocol (file://) absolute url, you can right click on an image and open it in a browser to get the url path. var map = L.map('map_canvas'); map.setView([50, 10.0], 6); var layer = L.tileLayer('file://c://path/to/your/data/map/{z}/{x}/{y}.png', { maxZoom: 16 , tms: true}); ...


0

You can start here with this Leaflet plugin. Probably create or edit a marker to your liking. Is the text coming from feature attributes?


0

I have got the same feature in my project and I use the leaflet-control-bing-geocoder: https://github.com/sa3m/leaflet-control-bing-geocoder1 Bing allows you to use its geocoding service outside Bing Map but you will need a key to access to it. There is a free trial of 90 days then you will have to purchase a public or enterprise license. This key allows ...


0

The mismatch, is due to the different projections used for the coordinates. In Leaflet, the Map is in EPSG:3857, while the coordinates used for various things are in LatLong (EPSG:4326). In OpenStreetMaps Layer in Qgis, the map and the coordinates both are in EPSG:3857. So when you see in QGIS, these coordinates are in EPSG:3857 with units meters. You ...


0

I can suggest to take a look at http://docs.geoserver.org/stable/en/user/tutorials/cql/cql_tutorial.html#cql-tutorial filtering. Hope it helps!


0

I'd say check the API documentation for both. For me it seems that OpenLayers offers an extensive bunch of features, however the development/debugging time is longer. Leaflet is sexier and much more easy going rather than the OL, however if you want to do a lot with your map, I think someday you might need a feature which is not implemented in Leaflet yet! ...



Top 50 recent answers are included