Tag Info

Hot answers tagged

3

Convert your GPX track to a GeoJSON with QGIS. Let's say your GeoJSON looks like this. The GeoJSON has an attribute elevation with the value of the elevation. var yourGeoJSON = [ { "type": "Feature", "properties": { "id": 2, "elevation": 50 }, "geometry": { "type": "LineString", "coordinates": [ [ 11.836395263671875, 47.75317468890147 ], [ ...


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


2

You need to keep track of your markers in an array. var markerArray = []; Every time you add a marker you push it to the array. var marker = new L.marker(...); markerArray.push(marker); Then if you wanted to apply some event listener to each of the markers you just iterate over that list. for(var i=0;i<markerArray.length;i++){ ...


2

title description marker-size marker-symbol marker-color stroke stroke-opacity stroke-width fill fill-opacity Mapbox.js uses the simplestyle spec. That's where you can find out more about defaults and accepted values. Adding a dashed line is a little more complicated, see dashArray in the leaflet documentation which will work with mapbox.js.


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(), ...


1

It makes use of the Leaflet function getCenter(). The function returns the geographical center of the map view. BBoxfinder has the same thing. Looking into the source code I found the following: // Add in a crosshair for the map var crosshairIcon = L.icon({ iconUrl: 'images/crosshair.png', iconSize: [20, 20], // size of the icon ...


1

The Leaflet.js project is open source. Just go to its GitHub repo and poke around. You'll quickly find that there is no WebGL component. However it does make use of hardware-accelerated CSS3, which can be disabled globally: http://leafletjs.com/reference.html#global


1

You can use OSM2world to pass 2D data from OpenStreetMap (map.osm) to 3D objects (map.obj), then use another converter (convert_obj_three.py) to convert it into a threejs JSON model (map.js), and then use it in a threejs scene. You can see how here: https://www.youtube.com/watch?v=S6LbKH6NnZU


1

http://osm2world.org/ works without WebGL, but uses Java instead of js. Designed for output of Openstreetmap buildings data, it should be adoptable for other 3D data as well. The output is a slippy map similar to leaflet: http://maps.osm2world.org/


1

The closest I've seen is the work of Mike Bostock. He has a really cool map which has a kind of oblique projection. But there's nothing that makes it easy. D3 does my head in with respect to setting up projections. You can make amazing things if you work at it though.


1

This is one of the primary use-cases for ViziCities (3D cities in the browser powered by OpenStreetMap), although the data layers aren't currently working yet. Perhaps something to consider for the future: https://github.com/robhawkes/vizicities Disclaimer: I'm the developer of ViziCities


1

I'm a little out of my depth using Javascript, but as nobody else answered yet I just want to check that you saw the leafletjs.com page on styling markers here. Please forgive me if I've missed something more subtle about your question.


1

You can use Eclipse if you want but it isn't necessary. Type "mvn package" means open console and in folder where you downloaded mbtiles4j. (Folder where pom.xml file resides) type mvn package. mvn is Apache Maven which is build program. Before that you have to change the properties and write where mbtiles file resides as described in mbtiles4j readme. ...


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

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



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