gis - geojson to maps using Google Maps API -


I am trying to project my geographic data on the map. This is when I came to this doctor from Google.

  https://developers.google.com/maps/documentation/javascript/datalayer   

Does anyone working with Google Maps API Meaning of this code segment:

  // Load a geoogen from the server similar to our demo, map.data.loadGeoJson ('https://storage.googleapis.com/maps- devrel / google.json ');   

What does it mean to load a GeoJSON from the same server as our demo? My geographical file is in my local drive (C :). How can I modify the code so that my JSN file is full?

Thank you.

If you assign your HTML file to a file: // -URL, Are loaded with examples. file: ///.c: /myfile.html , you should be able to use map.data.loadGeoJson ('file: /// C: /mydata.json') .

However, keep in mind that this works only when you are loading your HTML / Javascript and data of that same origin.

ToS does not allow you to host API scripts, you may have to setup a local webserver for testing. You can control cross-all access by setting HTTP headers.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -