Closed planemad closed 8 years ago
@mapschool/infdpg14 By now everyone should be well underway with their topics. Don't forget to open an issue ticket here with a link to your repository. Its great that nobody faced any issues so far, looking forward to the outputs.
In the meantime:
Hi Arun,
We are facing issue in adding data to the mapbox data set. The type of data that we have is which connects cities / streets . Is it possible for you to share any video related to it , ll b helpful.
@kunchapu can you help me to understand the problem completely. Can you share sample of the data, or the error that was faced?
@mapschool/infdpg14 just a reminder, i will be posting a final progress chart for the class with the status of all their submissions for explorations and assignments that have been shared on Github so far.
Hi Arun,
This is the error we are getting while adding the data sets.
@SuchismitaNaik it seems like the data is not in a valid format. You can paste the contents of the json here to check for issues: http://geojsonlint.com
Hi Arun,
It worked. I tried with csv file.
Hey Arun , trying to make my map/ style toggle layers . So i followed this tutorial : https://www.mapbox.com/mapbox.js/example/v1.0.0/layers/
I changed the map call function to load my style .
Now for toggling the layers , i don't know what name to add in the addLayer command to call the layers i want , is there a way for me to see the layer name in mapbox studio that i can use the addLayer call ?
All my attempts are leading to 404 errors
Also if i want to calculate the area of styled regions , is there any other function other than leaflet.geodesy ?
@nikhilshivpuja you need to be looking at mapbox-gl.js which is used for the new GL based maps that you see in Studio with smooth zooming. What you want is to follow this example https://www.mapbox.com/mapbox-gl-js/example/setstyle/
If you have a geojson object you can calculate this easily using turf.js http://turfjs.org/static/docs/module-turf_area.html
@planemad while this answers the question partially, I still have no idea how to filter layers that exist in the style we have used.(How do I know the layer name ?, the example given pulls layer from other sources or changes the style being used). Also when i mentioned area calculation, i was wondering if we can calculate the area of selected data, in a specific layer (after using the filters ) .
my git repository right now : https://github.com/nikhilshivpuja/mapbox-cartography-assignment-2
Initial exploration of Goa tourist maps ( only showing the restaurants/shacks/cafe): Goa Map Trial 1 To be added: Filters based on Budget, Cuisine type, Collection based
A map of tourist spots in Delhi (Have taken 20 most famous spots for now, will be adding more)- Repository (with filters) - https://github.com/jamboks/delhi Mapbox link (without filters) - https://a.tiles.mapbox.com/v4/manupriya.p55eaopl/page.html?access_token=pk.eyJ1IjoibWFudXByaXlhIiwiYSI6ImNpaWZ4YWhpOTAyMWR1M2tyYnVrNmtlZHIifQ.8EMsCq5seNFvkumaadMn0g#15/28.6185/77.2190
@nikhilshivpuja the layer names is the same as what you see in the layer panel when you open the style in Studio or the id you are using if adding it via js.
The dynamic area calculation is a little complex. You can only do it for the filtered features visible in the map view or features that you click on.
Make use of https://www.mapbox.com/mapbox-gl-js/api/#Map.featuresAt or featuresIn method to retrieve the geometries of the feature from your map. Once you have a list of features you can iterate through them and see if they match the condition you are looking for. And if they do use, turf.area to calculate the area cumulatively.
Hi Arun, PFA the folder structure of webpage which has the 'TRIVANDRUM TOURIST MAP' (index.html) Features in the map:( Exploration 1)
Some maps
Studio tilesets
Rescoped and tracking on #12
Brief Design and develop a interactive web application on either of the following topics:
Evaluation
Duration 1 Week (Friday January 15)
cc @mapschool/infdpg14