Add or Load GeoJSON file – Point, Polyline or Polygon map – Leaflet js

Are you looking to create a map interactive application to locate markers with points, or to highlight an area by polygon or to draw or show a river or roads line with polyline? With Leafletjs library and GeoJSON as GIS data, we can easily create a map which we are looking for and render the output in browser. Leaflet js is an opensource small library to create interactive map. GeoJSON is one of the GIS data structure which stores geographic data in JSON format. GeoJSON supports point, line, polygon, multipolyline, multipolygon and Geometry collection which can represent a geometry, feature or a collection of features. A detailed structure of GeoJSON would be written in separate article.

Add or Load GeoJSON file

This Article would let you know how to render and load geoJSON file with the help of leaflet js library. Also you would also get an idea by this article to implement a click event over a GeoJSON file and fetch information associated with the feature of GeoJOSN data loaded as map.

If you are not familiar with Leaflet, I would recommend you to read first the Getting Started tutorial with Leaflet js Library to create map application.

Lets setup a Base Map First i.e loading openstreetmap or osm in leaflet, in a html file:


<!DOCTYPE html>
<html>
<head>
<title>Getting Started - Leaflet js Map interactive library</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script>
</head>
<body>
<div id="map" style="width: 1000px; height: 600px;"></div>
<script>
var newMap = L.map('map').setView([38.9188702,-77.0708398], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href=”http://osm.org/copyright”>OpenStreetMap</a> contributors'
}).addTo(newMap);
</script>
</body>
</html>

Above script would output and render an osm base map. Now lets start adding different features on map one by one with GeoJSON file.

Add or Load GeoJSON file – Load Polygon with leaflet on Map:

Add following script, and replace the ‘usa_adm.geojson’ to the file you are want to render.


// loading GeoJSON file - Here my html and usa_adm.geojson file resides in same folder
$.getJSON("usa_adm.geojson",function(data){
// L.geoJson function is used to parse geojson file and load on to map
L.geoJson(data).addTo(newMap);
});

After adding the polygon layer you may want to view or load the map area covered or extended by the polygon GeoJSON file. i.e On Map load you want to zoom and pan according to the extent or to fit layer bounds. For this, Leafletjs provided a function to calculate the bounding box of the geojson file or layer i.e layer.getBounds(). And also with leaflet map fitBounds function i.e map.fitBounds(“bounding coordinates”). Here is the line which you needs to add to script:


newMap.fitBounds(datalayer.getBounds());

Finally, we are left only adding a click event to get the features data. With the help of Leaflet L.geoJson optional object parameter with key “onEachFeature“, we can add and define click event on every feature of the layer.

Here we would be fetching the attribute data of the feature clicked on Polygon GeoJOSN file. So before writing any script, we need to list out the feature properties list. You can get those properties key name easily if you are familiar with JSON files and structure.

So lets define a function named as onEachFeature and replace the ‘key’ keyword with your actual feature properties key of GeoJSON file:


onEachFeature: function(feature, featureLayer) {
featureLayer.bindPopup(feature.properties.key);
}

So your final leaflet geojson code combines as i.e For adding polygon GeoJSON file on map, with click event and fit to extent functionality.


$.getJSON("usa_adm.geojson",function(data){
// add GeoJSON layer to the map once the file is loaded
var datalayer = L.geoJson(data ,{
onEachFeature: function(feature, featureLayer) {
featureLayer.bindPopup(feature.properties.NAME_1);
}
}).addTo(newMap);
newMap.fitBounds(datalayer.getBounds());
});

As I have loaded a US administrative polygon GeoJSON here, we can see following output as :

Add or Load GeoJSON file – polygon

Add or Load GeoJSON file – polyline on Leaflet Map:

Adding polyline Geojson with leaflet library is same as adding polygon file. So the above code would work for loading polyline GeoJSON file. Just you need to replace the file name with your polyline GeoJSON file and features properties key have to replaced by the actual key name, of which you want to retrive information.

Add or Load GeoJSON file – polyline

Add or Load GeoJSON file – point with Leaflet js on Map:

Adding Point GeoJSON file is same as loading Polygon GeoJSON file. Here is the output you can see for the famous world Cities.

Add or Load GeoJSON file – point

If you find any difficulty in adding or loading GeoJSON file on map with leaflet library, do comment below with your queries.

Google Maps Review Ratings of local Favorites – Know users view

Google maps, One can access map on desktop and on phone as well we have an application for Google maps that we can download from play store. Google map provides us with so many functions like navigation, locations, our history location is also been showed by  Google maps. So adding to the list we have one more new option updated by Google maps that  Google Maps Review Ratings and  “find your favorites” nearby.

So, if you are new to place you will definitely be obliged to thank Google maps for this option. Google is trying to render its services to people in the best way possible no matter if that means being a city guide.

Google Maps Review Ratings – Search Nearby Brief

Now Google maps suggest you the places you can visit, restaurants you can fill your hunger at , or maybe a good pub to enjoy the Saturday night at.

To use this option all you need is a Google map application in your android phone.

Check the following steps to find out your local favorites in the Google map application:-

  • Open your mobile app.
  • Tap on the search bar.

  • Once you tap on the search bar you will find some option

  • Tap on ‘MORE’ icon.
  • Now you will be able to get all the options.

  • Select any option whichever you want. For example:-restaurants.
  • Once you tap on restaurants icon it will give you a list of restaurants nearby you.
  • Tap on the individual restaurant card, doing so lets you check everything about that particular restraunt.

So, it is not only about filling your hunger up but it can be anything else which you need around your location.

Google Maps Review Ratings of LOCAL FAVORITES

while finding your nearby places you can select the places  on the basis of ratings and reviews as google maps will show you the ratings and reviews for every place it shows. Moreover  you can also add the places you had been to and you can review and rate any place you had been to.

Now you know that you can also update the places you had been to ,and also you can rate and review them, but how???

we will show you how to do that, check the steps below :-

Write Reviews and rate the places – LOCAL FAVORITES

suppose you want to rate and review the restaurant you recently been to,  so for that all you need to do is ;

  • Open your Google maps application in your phone.

  • Tap on the search bar.

  • write the name of the place you had been to.
  • click on it .
  • open the card that shows your search

  •  scroll down it to the end .
  • There you will see the option of rate and review.

  • Tap on these stars and it will ask you your review  and you are done with rate and review part.

Sometimes it happens that we do not remember the name of the place but damm you really liked that place and want other too to visit there at least for once. So it is also a very easy task to rate and review that place as Google saves your history locations . so rating and reviewing that way you can take the following steps:-

  • Open the Google maps app in your phone or desktop.

  • On the top left corner of your screen you will see the hamburger  button.
  • Tap that button and you will see the “your contribution” option.

  • Tap on “your contribution” option.
  • once you tap that option scroll it down and you will see “place you’ve visited” in the bold letters .

  • That is the place from where you can do the review  and rate thing for the place you had been to.

Look over Google Maps Tips and Tricks list and also Google Map Gas Station.

Check Ratings and reviews – Local Favorites

Have you ever thought of being to a new place and looking for a good restaurant, but nobody can decide  it without having been to it or maybe having someone who had been to it can help,also this will help to an extent. To check ratings and reviews of local favorites nearby your locations ; following are the steps for it :

  • open the Google Maps application in your phone.

  • Tap on the search options.

  • Choose your option out of all the choices given. for ex :restaurant.
  • Tap on the Restaurant

  • Open the card of any restaurant  out of all the options.

  • once  you open the card scroll it down
  • There you can see the ratings and reviews given  to that restaurant by the people who had been there.

On the basis of these ratings and reviews you can select the best option available. This way it makes so convenient to choose  a good place without wasting your resources. Use Google Maps Review Ratings feature offered by Google maps and I would love to hear how this article helped you!

Create Customized Maps with Google Maps – My Map Feature

My Map is one of the new feature offered by the Google Maps, Google maps are trying to satisfy their users by providing the best ease of using the Google Maps. Customization has reached to a level that now it is available in the google maps too. My maps is the tool which helps in making your own customized and personal maps.

Customization of the Maps has never been so easy than this. customization itself is a very much good attribute to hike upon on business and as we all know that we like the things which we can mould according to us, according to our comfort, according to our ease of use ,according to our benefit.

My Maps feature on web Platform – Google Map

Primary Features of My Maps

Let us check the way to use My Maps Feature on web, so as to create your own customized map:

  • To use my maps features of Google Maps open Google Maps in the Web platform google map  my map editor. Or you can do it by navigating to google map and follow this steps:

  • Tap on the hamburger button located left to the search bar.
  • when you tap on the hamburger button you will see ‘your places’ options.

  • Tap on ‘your places’ option.

  • once you tap on the ‘your places’ options you will see the card getting opened for your your places.
  • Tap on the ‘Maps’ option of the ‘your places’ card.
  • once you tap that card you will see the maps you have already created and in the bottom you will see the option to ‘create maps’ and ‘see all your maps’.
  • Tap on either of the option to create your customized map.

  • You will see this ‘create a new Map’ option, tap on it and now you can create your own map.

So, this is how you can make your customized map. Still not satisfied with the level of customization? okay not a big deal for google Maps, adding more features to Customization now you can also add image to your markers. As shown in the above image you can see at the right bottom of the card a camera sign, that means you can also add the image of your choice to that mark.

There are so many things which you can do with your customized Maps , such as :

  • Making Polygons: You can make polygons with the help of ‘draw line’ options by joining them. You can also change the color of the polygon once you save the polygon you can add color to it by tapping on the style icon. We use colors to give every polygon an Identity, You can give blue color to the polygon for water surfaces, green indicates park or garden.
  • Draw lines :  While with the plain lining you can also add the route for four wheeler, two wheeler and for the pedalist as well. You can use styling to color the poly lines also.
  • Label the spots :  you can also add the spots and label them.

  • Add the Marker : as shown in the above image I have marked a location by tapping on the pin.
  • You can also add directions to it:  you can add directions too while creating your customized map.
  • measure the distances: Google Maps customized map also help you in measuring the distances.

Share your Maps:  

You can also share your Maps by tapping on the ‘your Places’ and then tapping on the Maps to see all your Maps when you can see all  your Maps tap on any map and then it will be opened up as shown in the above picture.tap on the share button and then give a name to your Map and fill its description, and then add the name of the people you want to share it with and change the access according to you.

Secondary Features Of My Maps – Create Customized Map

Google Maps’ My Maps features also facilitates you to check map explorer option of Google map:

  • All Maps that you have created, own and the ones which you do not own.

  • Maps you own

  • Maps shared with You

  • Maps not owned by you

  • Maps you have been recently to.

Maps View :

You can also view the maps according to your preferences, you can arrange them in the list or grid order, you can also sort them according to you.

  • List View

  • Sorting

Moreover, you can also ‘Share customized maps’ on Google maps ,for other users to use and explore them and get to know about the various locations. Google Maps are very much known and reachable to anyone across the globe.

Look more Google Map tips and Tricks, So,now make your own map ,showcase your location, let people know more about the places , and enjoy the customization at Google Maps too.

Explore Maps Story – Google Maps My Map Explorer feature

Google Maps has been proving itself since very long, Google Map is one of a kind, location search engine.  Google Maps is the location search engine which is laced with the long list of the features . Google maps offers the best ever features to its users. Starting from the navigation they have now reached up to a very big level and advanced features. Now in addition they have allowed their users to make their maps and share them with the other users. My Maps – Maps Explorer are the very useful features offered by  Google Maps to its users.

This Feature can be used on the web platforms . Google Maps My Maps – Maps explorer features are very useful for the people who are travel freak or may be for the people who loves to know about the different locations of the different countries.

Explore Maps Story – Google Map Explorer

The Maps in the explore section of the My Maps features are the ones which are made by the people across the globe and  have shared it.

To explore the Maps across the world all you need to do is to follow the below steps:

  • Open the Google Maps on web  platform and login to it.

  • Tap on the Hamburger button located at the left of search tab.
  • After tapping on the Hamburger button scroll it down and you will see ‘your Places‘ option.

  • Tap on ‘your Places’ option .
  • once you open your places you will find four option ,tap on the last one that is ‘Maps’.

  • Tap on the Maps and you will get ‘see your Maps’ option, tap on it.

  • Once you open the explore option you can see the maps created and shared  over there. Or you can directly open following link if you are already login, you can check the map explorer.

https://www.google.com/maps/d/

Explore Google Map more features. This is just one feature of My Maps from Google Maps. Google Maps allows you to create your customized apps. So,there are more features to your ease offered by Google Maps.

Map makers retiring in March 2017

We all know how much Google has put efforts to make Google Maps the biggest location search engine. Google Maps provide us with so many features like add stop, master navigation, voice navigation, it also helps us to download offline area over wifi such that it will help you to limit your data usage and helps you to save a few bucks. Google maps now allow you to make your own map also as the map maker is graduating to google maps.

Map makers getting close

Earlier Google Maps were not so common to people , but now everyone knows  what google maps are and how can they help us to go to some places, malls, nearby shops and what not. Google map also allows us to make our own map by marking the locations or places you had been to or by making the groups of the places which can help you later to look over the locations.

Map makers graduating to google maps in March 2017

This map maker feature of Google maps is expected to be closed by March 2017. Map maker feature of Google maps allow you to mark your favorite restaurants, or maybe your favorite club and resorts or it could be anything.

Google map maker has shifted to Google maps as they are adding one more feature to Google maps , now users can easily add a place, add information about the place or can edit the existing information about the place, moderate the edits and of course you can also see the status of your edits.

one can continue contributing to the google maps about the local knowledge by joining Local guide community , which can earn you points and rewards for submitting edits and providing other information.

So people , now backup your map maker data before it gets Graduate to Google maps.

So, from April onwards we will not be able to mark our own map or grouping the different entities with different makers on Map Maker.

Google Map – Options to Save, Label and Share Location

Google maps are now providing us with the Few more additional features in addition to the long list of the Features . Now , we have Save ,Label and Share  options in Google Maps. Google maps is providing a new feature every fortnight to its users, adding to it this time they have updated the Google Maps with new options like Save ,Label and share.

Save, Label and Share Location on Google Map

Now, while using Google Maps you should remember that now you can save any place that you have been to and liked it most such that you can use it in future , Moreover if You find any location and want to give your customized name to it you can do that by labeling it, and suppose if you want to share your location or any other place you can do that as well.

Google Maps now allow you to Save, Share and label any location. This feature of Google Maps can also be used on web platforms as well rather than Google Maps mobile application. Google Map also provides direct way to share location or direction to your Android or iOS mobile app.

Lets Check Save, Label and Share Location on Google Map:

  • open the app in your phone.

  • Look for any XYZ location , you can either search it or can take your current location. Or with the help of Nearby feature of Google Map you can search for the desired location.
  • Tap on the card that gets open for that location.

  • once you open that card you will see few options there, they are Save,share and call.
  • For saving the location tap on the star button and it will turn yellow that means the location has been saved.
  • You will find a Share button near to save button , tap on that button and you will get the sharing options for sharing that particular location

  • The last  but not the least is the option for Labeling the location or giving name to any location.
  • you will get the ‘Label’ option when you open the location card.
  • Once you open the location card you  will see three vertical dots above the card .

  • Tap on these three vertical dots and the first option you will see is ‘add label’.
  • Tap on add label and you can give a name to it.

Now that you have already done labeling and saving part, so now you will see the location card  is showing ‘saved and labelled’ for that particular location.

Now that we have learnt how to use these features in Google Maps application , let us see how we can do it on the web platform.

Save, Label and Share Location on Google Web Map application

You already know how to use these features in Mobile application , but lets say you are in the office can not use phone in front of the boss , then Google Maps web Platform will help you use these features .

Lets check how to use these features on web:

  • open Google Maps on the desktop and sign in to it.
  • Tap on the current location or search for any location.
  • once the card opens for that location you will see options like save,share,send to phone and Nearby.
  • when you tap on save it will be saved such that you can use it in future.
  • You can share it by tapping on the share button.

Moreover, you can also send the location to your phone, and also search for the nearby places of that location.

So this is how we can use all these features Of Google Maps. Save,Share and Label Features can help one to save location for future and can share locations with others through different kind of  means, and lastly you can also add labels to the locations. 

How this article was helpful for you do let us know by commenting below in the  comment box.

Google Maps – Routing – Avoid Tolls, ferries, Highways or Motorways

Google is one of the biggest search engine and Google maps are also one of the biggest location search engine. Google Maps are helping the people worldwide through their services and making them travel easily with different Routing options. Here we have given a brief description of Making Routes with option like – Avoid Tolls, ferries, Highways or Motorways in between route.

Google maps allow you to use your voice for navigation, allows you to measure distance and time, you can add stop in between your route, you can find the local favorites nearby you, you can rate and review the places nearby you, and what not.

In addition to it Google maps has also introduced one more feature  that helps you to avoid any route which may consists of ferries,tolls, highways. Check all features, tips and tricks of Google Map.

Google Maps – Routing – Avoid Tolls, ferries, Highways or Motorways

For avoiding ferries,tolls,highways or motorways you can follow the below mentioned steps:

  • Open the Google maps phone application in your phone.
  • Tap on the directions button.
  • Once you tap on the directions button it will ask you to fill up your current location and destination.

  • Fill up the current location and destination
  • Beside the location bars you will find 3 vertical dots.
  • Tap on those dots.

  • In the bottom you will find the ‘Route Options’.
  • Tap on the route options and you will see some options with checkbox.

  • check the box for any option you want.
  1. If you want to avoid motorways then check the box for it.

2. if you want  to avoid tolls then check the box for tolls.

3. if you want to avoid the ferries check the box for ferries

or if you want to avoid all of them then check the box for all of them

Moreover it is not only about the mobile app you can also do it on web platforms as well. You can also look over how to measure straight line distance between two points on Google Map.

Google Web Map Application – Routing – Avoid Tolls, ferries, Highways or Motorways

For using ‘route options’ on web follow the below steps:

  • open the google maps on web
  • tap on the directions button
  • fill up the locations.
  • beneath the locations bars you will find the ‘options’ written there.
  • Tap on it to see your options for route options.

So, Google maps are making  lots of changes over a period of time for their users , such that you can use it with ease and comfort. Do tell us how much ease of use does “route options” feature of Google Maps get you.

Google Maps Add Stop in Navigation

Google is really putting its efforts to make Google Maps one of its kind. Google has upgraded Google maps to a map loaded with so many features . Google has not left any thing to lace Google maps with. Google has already introduced the live traffic congetsion viewer, WIFI only feature, voice navigation , and what not on Google Map?

Now , Google has come up with the very new  brand feature of Google maps that adds up to a very platonic change to google maps, that is a very important one as well. this feature helps you to plan a trip with multiple destinations,that means if you want to travel to a particular place while finishing off some work en route to the place you can add those place as well in between and google will help you to finish off this work by making a route for you .

Add stop feature of Google Maps is not limited to the mobile application only you can use it on the web also.

Add Stop in between two locations – Navigation Google Map

Wandering for a way to do it?? I will show it to you,just follow the below steps:

  • Open the Google maps application in your phone or on web.

  • Tap on the action overflow or direction button associated at the top left corner on web and on the bottom right of the Phone application.
  • Fill up the current location and final destination.

  • Now, before tapping  the navigation key tap on the sliding option associated beside the location bars.

  • Choose the add stop option by tapping on it
  • Now , it will show one more location bar beneath the final destination bar.

  • you can add the location for that stop.
  • once you add the location for that stop it will again show the next bar to add another stop.

 

  • That is how you can add as many  stop as you want.
  • At last after adding all the stops you can Tap the Navigation key.

Once, you tap the navigation key, Google Maps will show you the route for your final destination inclusive of your added stops.

Now, Google has facilitated you with the so many features and this “Add Stop ” feature is a very major part of the Google Maps helping people with navigations .

Google Maps – Master Navigation – Find Distance and Travel Time

Google Maps stands out of all its competitors , it has made a very big difference in the individual’s lives, they have made a ease of travelling for the people who travels long distances and to the new places frequently. As we know Google has made many changes in its maps. Google has made so many amendments in the Google Maps on a very frequent basis, such that people can use it with lots of ease and comfort.

Google Maps New feature – Master Navigation

Adding to it Google maps has also introduced the Master Navigation feature for Google Maps users. This feature will help you to get the distance and time it will take to reach a place, considering real time traffic and predict the time. Now here the exciting thing about this feature of the Google maps is that it will show the distance according to the route you take and the transit as well!! So,the twist is that it will show the time it will take to reach you there by a car, if you are not feeling like driving a car and want to go for a bike ride you can do that too as google maps will show you the time it will take you to reach there, and if you are a health conscious and prefer to not pollute the environment with the toxic fuels Google maps will help you with this too; yes you read it right that Google Maps will show you the distance, different routes and the time you have to spare to reach that particular place also.

It is not limited to the Phone application only, you can use “master navigation” feature of the Google Maps on desktop or web also. You can also look over 35+ cool features of Google Map.

Master navigation – working procedure

Let’s check how Master Navigation works.

  • For using this feature you need to have either Google Maps application if you want to use it in your phone or you can use it on web.

  • Tap the action overflow button. You will find it in the bottom right corner in the phone application, and if you are using it on web then you will find it in the top left corner near the search bar.
  • Once you tap on that button it will ask you to add your current location and the destination.

  • Now, you are done with filling up the locations it will give you information about the time and distance for different transits.
  1. when you are travelling via car :

2. when biking mode is on :

3. when willing to  walk :

4. If you want to travel by bus :

Moreover, you can also define your route and can ask Google Maps to avoid highways, ferries and tolls to save a few bucks. A detailed article to avoid highways and tolls can be checked here.

This is all about the new feature of Google Maps Master Navigation. Do let us know your experience of using this feature of google maps by commenting below in the comment box.

Use Google Map Voice Navigation option – New Feature

Google maps are the best navigation tool available across globe till date. People use it for many purposes like navigation, for knowing traffic situations, locations, to find nearby place, upcoming events and what not? Have you ever thought of how to use Google map while your hands are busy controlling steering wheel?  Obviously you will not be able to operate Google map while driving. That is the reason behind they introduced Google Map voice option for Navigation.

Google Map Voice Navigation – Make your voice count

Through voice option you can command any place to Google and it will show it to you and will navigate you to that location. This way it becomes very convenient to use Google map even when you are busy driving the car.

Check out the following instruction to use your voice for navigation:-

  • Open your Google map application in your phone.
  • Above you will see the  search bar.
  • On the right corner of search bar you will see a microphone icon.
  • Tap that icon and give the voice command to Google.
  • Google map will respond according to the command given by you.

You can give Google commands like  ‘where do I turn next?’,  ‘where is the next Gas station?’ and so on. You can mute or unmute the voice guidance given by Google Maps.

You can even ask for different routes, or toggle traffic by voiceCheck Google Map different tips and tricks.

This feature of Google maps is a very important one. How do you get help with this option of Google maps navigation, do mention below in the comment box.

Exit mobile version
%%footer%%