How to use leaflet "openstreetmap" with flutter? - flutter

I need help to integrate leaflet maps in flutter. The project I'm working on requires showing custom markers, animations, routes and drawings on the map. But I can't find any documentation or tutorials explaining this in flutter.

You can use flutter_map package for that. That's one of two most widely used maps packages (next to google_maps_flutter, which is obviously only for Google Maps).
https://github.com/johnpryan/flutter_map
It features all things that you need AFAIR.

You may check out the below Flutter Maps widget which allows you to render tiles from different services like OpenStreetMaps, Azure Maps, etc.
https://pub.dev/packages/syncfusion_flutter_maps
It has the features you have requested like markers, adding animations, drawing routes on the maps, highlight a region, etc. Check the below links for more details.
https://help.syncfusion.com/flutter/maps/markers
https://help.syncfusion.com/flutter/maps/vector-layers/polyline-layer#adding-polylines

Related

How to bind bing maps in Flutter?

I Used google Maps in Flutter and it works out of box for us. I am able to do with the help of documentation like how to use google maps in Flutter But i want to Use Bing Maps in Flutter and all properties like current loc. ,Drawing polylines,custom marker,popUp on marker. Can someone suggest me where to learn thiese things or any other suggestions??
I'm not aware of any Bing Maps map control for Flutter. One option might be to use the open source Flutter map control: https://github.com/fleaflet/flutter_map
Details on how to directly access Bing Maps tiles can be found here: https://learn.microsoft.com/en-us/bingmaps/rest-services/directly-accessing-the-bing-maps-tiles
The open source Flutter Map control has an example that uses Azure Maps as well, which is another Microsoft mapping platform to consider.

OpenStreetMap for flutter

I want to use OSM in flutter .but I cannot add it to flutter and i want to use any free maps like this.
I don't wanna pay for APIs .what should I do?
Is there any way to add OSM To flutter.
it takes couples of day and I can't add any map to my app!
You should use the flutter_map package, like quoci said in the comments.
It allows you to view maps from any source that gives a URL as an access method. There are plenty of setup instructions and examples on the package's readme page for you to get started.
You can even use Google Maps' Static Tiles API URL (which, don't quote me on this part, I think is legal to use without payment).

List of all available Tile Layers for leaflet

I can't seem to find this anywhere - there's examples with open street maps, and hints to using mapbox but otherwise I'm wondering what other maps and url's are available?
This one gives a lot of examples (taken from above comments gis.stackexchange link) : https://leaflet-extras.github.io/leaflet-providers/preview/
The must is that you can preview everything.
There is definitely no such exhaustive list of Tile Providers, but there are plenty other resources listing quite a bit of options.
Strangely, it indeed looks like they cannot be found under such an explicitly stated question yet.
Here are a few:
R leaflet Language of the map : Can we specify to use English language
How to use a different tile provider in openlayer3
on GIS Stack Exchange: https://gis.stackexchange.com/questions/184125/alternative-basemaps-for-leaflet/268290
and of course the official Leaflet plugins page, which has a section for basemap providers: https://leafletjs.com/plugins.html#basemap-providers
The main reference with very nice live preview is the leaflet-providers demo page (although you do not need to use that plugin at all in the end):
https://leaflet-extras.github.io/leaflet-providers/preview/
An extension to Leaflet that contains configurations for various free1 tile providers.
And with the note (emphasis mine):
What do we mean by free?
1 We try to maintain leaflet-providers in such a way that you'll be able to use the layers we include without paying money. This doesn't mean no limits apply, you should always check before using these layers for anything serious.

react-leaflet with original leaflet plugins

It is more theoretical question, rather than some problem.
I'm planning to develop some wrapper for leaflet (encapsulate work with leaflet for other developer teams with some API in/out), and I'm wondering if to use react-leaflet or to use native leaflet library.
There is very long list of available plugins for leaflet, and as far as i see only +-10 of them implemented for react-leaflet.
From your experience, does all the original leaflet plugins works fine with react-leaflet? How often do you encountered with problem and which one are not working at all?
It should be possible to create a custom component for any react-leaflet extension.

How to download OpenStreetMap tiles from CloudMade?

how to download cloudmade map tiles? i have to download tiles with different zoom levels? how save these tiles to database for later loading? any sample code available? any help is appreciated..
There are different options available to you.
First, you can use the Javascript "Web Maps API". This is useful if you are wanting to show the maps on a website. It will download the required tiles and display them appropriately, and give you the interface to pan and zoom the map. See their pages at http://developers.cloudmade.com/projects/show/web-maps-api
Second option is if you want to access the map tiles directly. They call it their HTTP Maps API. You will need to make the calcuations of which tiles to download, how to arrange them etc for your own application. Have a look at http://developers.cloudmade.com/projects/show/tiles
Finally, although you don't mention it in your question, I see the question is tagged with "iphone" and other related things. Perhaps you want to look at their iPhone SDK, which is similar to the Web Maps API. See http://www.developers.cloudmade.com/wiki/iphone-sdk/Examples for examples on how to use it.