I want to swap from commercial googlemaps to openstreetmap and cannot find an answer to the following question:
"Old" googlemaps project show paths as "speric projections" - look here:
http://wsprnet.org/drupal/wsprnet/map
I have created a map using openstreetmap and leaflet and can draw the paths using polyline. It works - but they are always "straight lines" and do not look as at googlemaps (see link above). Is there any possibility to get a path like in ge?
Regards
Andreas
What you want to do is show geodetic lines along great circles. There's a Leaflet plugin for this, at https://github.com/henrythasler/Leaflet.Geodesic .
Related
There seem to be a huge difference in details when comparint OSM tiles to HERE tiles for Sweden:
To the left - OSM. To the right, HERE. Same location:
As you can see, the OSM tiles are way more detailed. I havent found a way on here.com to change this. Am I missing something, or are the HERE tiles just less detailed?
The URL I'm using:
https://{0}.base.maps.api.here.com/maptile/2.1/maptile/newest/normal.day/{1}/{2}/{3}/256/png8?
These kind of details as e.g. pedestrian paths or private streets are not supported within the Here Map tile service. But you an at least check here the different map styles in an easier way: https://tcs.ext.here.com/examples/v3/mrs_options
I'm using Leaflet (with omnivore and the MapQuest tile plugins) to display a map with colored polygons. The map and polygons look/work fine, but there are these mysterious blue markers everywhere.
There's nothing in the JS about markers at all, and if I comment out the polygon.addTo(map); line, the markers disappear. So they're definitely related to the polygons, even though they're not directly positioned on the polygons.
Any idea why the markers are appearing, or how I can make them disappear?
SOLVED: It turns out that the problem was that I'm using MSSQL's ".Reduce(n)" function to simplify the polygons (for performance), and if you simplify the polygons too far, the results have "Point(...)" items in them - which leaflet renders as markers!
Now, off to figure out why MSSQL is turning things into points...
Welcome to SO!
Most probably your polygon variable is a Leaflet GeoJSON Layer Group built by the omnivore plugin, and the data you feed it with contains "Point" type geometries.
If you do not specify anything special to handle these points, Leaflet will render them with this default blue marker icon.
In that case, you could simply filter out those point features, whether after omnivore processing (use the ready event) or using a custom GeoJSON Layer Group with its filter option. There should be other posts describing such solutions.
See e.g. Mapbox: Filtering out markers in a Leaflet Omnivore KML layer
If you are not in this case, you would have to provide more information for people to be able to help you. Typically code that you use to build your polygon layer and sample data.
I have a V-Leaflet map.
Depending on what the backend "says" (where/how-many), there'll be marker(s) on this map.
When 2 or more of these markers are closely located and thus overlap,
i'll look to combine them into one marker that refers to them all.
The only way i can think of is the explicit way -- getting the Bounds (org.vaadin.addon.leaflet.shared.Bounds)
of the portion of the map in view and going from there
(calculate how close/apart now those markers are, group/ungroup them accordingly.)
Is there a built-in/quicker way of doing this?
Note: i'm not interested in the mathematical/clustering part of the problem.
checking just not to miss out -- dont wanna redo if this is coded.
TIA.
Sounds like you are looking for V-Leaflet Markercluster extension:
Server side api for Leaflet Markercluster extension
It wraps Leaflet.markercluster plugin:
Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
I made my own google map with historical information (of houses and people in the 50-s in Princenhage, The Netherlands):
https://www.google.com/maps/d/viewer?mid=174YNyi2hs_iVpoU0qLqOPq-YUxI&ll=51.57704585455824%2C4.737584814456795&z=18
Now I would like to add an aerial photograph of 1950 as an extra layer on this map so that my map looks as 'google earth in 1950'.
Is this possible and how to do this?
It is possible but you need to make a baseMap of your aerial photo. If you managed that you can use this example to add the basemap to your viewer:
https://github.com/rcknr/basemap-google-maps
On the map I'm working on, sometimes multiple markers will share the same coordinates. I'm using markercluster which is helpful to view markers that share the same coordinates. The problem is, that the paths(lines) that connect them fall on top of each other. I need to show both lines. Is it possible to have each line side by side or similar? Has anyone ran into this issue before? See the below image which shows what I am trying to accomplish.
Try Leaflet Polyline Offset plugin. Here is demo.