OpenMapTiles server and Leaflet - leaflet

I have an OpenMapTiles Server already running and serving vector tiles that are used in a Leaflet based application, together with mapbox-gl.
Layer with the vector map is added to the leaflet map with code like:
mbgl = L.mapboxGL({
attribution: '\xA9 OpenMapTiles \xA9 OpenStreetMap contributors',
accessToken: 'xxxxx',
style: 'url-of-style'
}).addTo(map);
However, this requires that the device and browser allows WebGL and that is causing trouble because there are still many users with systems not compatible with WebGL.
Is there some way to overcome this drawback? For instance, is it possible for OpenMapTiles server to serve raster maps and use them somehow with Leaflet directly or with the help of mapbox-gl? I have already tried this in several ways but without success, so I wonder if it is even possible.
Any ideas will be welcome.

Related

When I use openlayers3 to embed a map with Openstreetmap, what API of Openstreetmap is being used?

I need to use openlayers3 to embed a map in webpage, and I am using tiles from openstreetmap.org, so what API of openstreetmap am I using? The data API or the Image API of something like that?
Also, what license should I use?
OpenLayers, Leaflet and similar libraries display tiles in the background. These are just images.
The license of these tiles depends on the tile server you are using. If you are using tile.openstreetmap.org then take a look at the OSM tile usage policy and Copyright. The latter page states:
The cartography in our map tiles, and our documentation, are licensed
under the Creative Commons Attribution-ShareAlike 2.0 license (CC
BY-SA).
Note that this applies only to the tiles provided by tile.openstreetmap.org. Other tile servers will have other licenses and other tile usage policies.
Don't confuse this with raw OSM data which is licensed under Open Data Commons Open Database Lizenz (ODbL). However since you are only going to display tiles the ODbL doesn't apply to you.

OpenStreetMap tiles by here's api

I am writing mobile application with apache cordova engine.
I need tile and geocoder(reverse geocoder) server, for this reason I want to use here-api.
I need something as OSM, with buildings, street names... etc.
How I need request to get this type of tiles?
Or, Is it possible to get OSM tiles by here's servers?
Basically I need tiles of Armenian.
Thanks and Regards.
You cannot get OSM tiles via HERE servers. I believe you are looking for this:
https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html
And then this:
https://developer.here.com/rest-apis/documentation/geocoder/topics/quick-start.html
You'll have to sign up for a plan before you can use it though:
https://developer.here.com/plans/api/consumer-mapping

Open Street Map API - Open Layers / MapQuest

I try to understand what is what but I am a bit confused :
OpenStreetMap is free to use map . Possible APIs for this map are :
-OpenLayer
-MapQuest
Why OpenLayer use MapQuest code in OpenLayer example :
http://openlayers.org/en/v3.1.1/doc/quickstart.html
<script type="text/javascript">
var map = new ol.Map({
target: 'map',
layers: [
new ol.layer.Tile({
source: new ol.source.MapQuest({layer: 'sat'})
})
],
view: new ol.View({
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
zoom: 4
})
});
</script>
Maybe this question is strange but I'd like to know why one API use expresion from others?
You are mixing up APIs with frameworks, services and companies.
MapQuest is a company. MapQuest Open provides various services based on OSM data, for example routing, geocoding and tiles. Consequently MapQuest Open offers various APIs for these services, too, but these APIs are not for interacting with raw OSM data directly.
OpenLayers is a javascript library for displaying maps in web browsers, similar to Leaflet. OpenLayers and Leaflet don't belong to OSM in any way, they just support displaying OSM among other maps. Both have their own API for constructing and displaying interactive maps but mostly these APIs are neither for interacting with raw OSM data directly. OpenLayers and Leaflet can be used to embed all kind of map tiles, for example the one provided by MapQuest Open or even Google Maps.
OSM, in contrast, offers APIs for editing and retrieving raw map data. There is the regular editing API which is mainly for editing raw map data, but not for retrieving it. If you want to retrieve specific features then take a look at the Overpass API instead and the nice interactive frontend overpass turbo.
Also take a look at the list of OSM-based services in the OSM wiki as well as OSM software.

Map rendering using OpenStreetMap

Does OpenStreetMap just provide GIS data? To render maps and have a browser based UI to show maps with data, would a developer need to use something like Mapnik?
OpenStreetMap provides data yes, and you'll need specific tools to make map with them. You first need to put the data in a true GIS format, which OSM is not. Think about PostGIS, an osm2pgsql tool is designed for that. Then, you'll need a rendering tool, i.e. a cartographic engine. You can use Mapnik or MapServer. Tilemill or Kosmtik can help you designing your map styles.
Take a look here.
yo can export data form OpenStreetMap and render your own map.
Take a look at
http://www.slideshare.net/jones139/rendering-openstreetmap-data-using-mapnik
http://www.slideshare.net/artemp/mapnik-sotm-2007
There's a fuller list of rendering libraries for OpenStreetMap data here, both free and commercial.
http://wiki.openstreetmap.org/wiki/Renderer
Disclosure: I am the developer of one of them.
OpenStreetMap provides map data out to a wide sprawling ecosystem of different downloads and tools offering developers different map-making and map using possibilities. Here is a diagram I drew which captures some of this:
So the data comes out of the core of OpenStreetMap, in the form of 'planet downloads', one big unwieldy blob of XML (and diffs), but from there it fans out into a range of other offerings to developers, many of which are provided by 3rd parties. Taken together "OpenStreetMap & Friends" provide lots of possibilities.
If you are inclined to run your own rendering system, then yes, Mapnik is a good choice. Powerful and scaleable (most successful OSM tile servers run Mapnik), but takes a bit of setting up. You normally load OSM XML data into PostGIS, and run mapnik from that (tutorials on switch2osm.org)
If you are not inclined to run your own rendering system (for more lightweight web development tasks this seams reasonable!) you don't have to! You can configure LeafletJS or OpenLayers or others to fetch map tiles from a tile server run by somebody else. There are many providers. See the providers list on switch2osm.org and the Tile Servers list.

using external maps with bing map

can i use bing map platform with an external mapping source ?
for example, i want to use bing map siverlight client with my own map files instead of the provided maps. (some areas coverage is insufficiant with bings provided mapping)
Thanks.
Another useful tool you may want to utilize if you don't have ArcGIS Server is MapCruncher, which will take a raster image, allow you to georeference it and produce Virtual Earth compatible tiles.
If you need to display vector data, you can either convert it to a format like KML or use a product called SharpMap to render tiled images.
I am assuming that since this was tagged ESRI, that you want a method to use ESRI products for your data sources... There are a lot of ways you can create your own tiles and use them in Bing Maps. If you have ESRI ArcGIS Server, you can use the ESRI JS API to add your own services to Bing Maps.
you can rewrite TileSource class and override GetUri method