Tuesday, November 29, 2016

Google maps and user events and import functions.


UI Events

Some objects within the Google Maps JavaScript API are designed to respond to user events such as mouse or keyboard events. For example, these are some of the user events that a google.maps.Marker object can listen to:
  • 'click'
  • 'dblclick'
  • 'mouseup'
  • 'mousedown'
  • 'mouseover'
  • 'mouseout'
https://developers.google.com/maps/documentation/javascript/events

Import functions

GeoJSON

https://developers.google.com/maps/documentation/javascript/examples/layer-data-dragndrop
Data Layer: Drag and Drop GeoJSON
To use this example, drag and drop a GeoJSON file or files from your computer on to the map above. You can also drag text or HTML GeoJSON content from another website or from the sample below.

Une autre avec une URL qui fournit du GeoJSON:
https://developers.google.com/maps/documentation/javascript/importing_data
http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_week.geojsonp
site avec un Cross-origin resource sharing (CORS) d'authorisation.

https://developers.google.com/maps/documentation/javascript/examples/layer-data-dynamic
On peut aussi écrire des lettres avec GeoJson (en fait des polygones)
et jouer avec les événements over et pop-up avec ces polygones-lettres-symboles.

GeoRSS (or KML)

GeoRSS via API flickr
with just one line:
var georssLayer = new google.maps.KmlLayer({
          url: 'http://api.flickr.com/services/feeds/geo/
?g=322338@N20&lang=en-us&format=feed-georss'});
pop-up  with data from flickr (title, URL of the photographer, photo (click-> go to flickr), description) 
In fact it's a KmlLayer. KmlLayer adds geographic markup to the map from a KML, KMZ or GeoRSS file that is hosted on a publicly accessible web server. A KmlFeatureData object is provided for each feature when clicked.

fusion table (to pop-pup)

https://developers.google.com/maps/documentation/javascript/examples/layer-fusiontables-simple

mapping collaboratif

https://developers.google.com/maps/documentation/javascript/firebase
outils firebase de Google

No comments:

Post a Comment