Le sésame tant attendu : la clé Google Map API
api key google => ABQIAAAAFyG-m8QhmAV1sRfWzKJDFShSYTp878J79xzYAOhGr
VUYUXOeDpixSM1cRwbCgMk5NXr2AfLPyzYPyUAg
New-York City, USA
On va se servir des coordonnées de NYC comme exemple à placer sur une carte.
Latitude = 40.7143, Longitude = -74.0060 Lat = 40 degrees, 42.9 minutes North Long = 74 degrees, 0.4 minutes West |
C’est à notre avis le meilleur plugin d’insertion de carte google dans WordPress. Il y a toutefois, un inconvénient, on ne peut associer q’une seule carte à un article ou une page. Il est possible de sauvegarder des cartes sous le nom de son choix mais cela ne permet pas en revanche de les appeler directement dans la code, c’est dommage ! Par contre, ce plugin met à votre disposition quasiment toutes les valeurs de l’API Google Map.
N’oubliez apres lactivation du plugin, d’inséré la clé API Google sinon, cela ne fonctionnera pas !
Vous ne pouvez pas appeler la carte par le nom sous lequel vous venez sauvegarder la carte.
[geo_mashup_map name="1-Broome-Street-New-York" height="200" width="490" zoom="17" add_overview_control="true" add_map_type_control="true"] |
Un usage classique du code à insérer pour faire figurer une carte. Automatiquement, la carte selctionné s’affichera dans l’article correspondant ou la page correspondante
[geo_mashup_map height="235" width="600" map_type="G_HYBRID_MAP" zoom="19" add_overview_control="true" add_map_type_control="true"] |
- add_map_control – true or false. Adds zoom/pan controls.
- add_map_type_control – true or false. Adds map type selector controls.
- add_overview_control – true or false. Adds the overview control.
- auto_info_open – true or false. Opens the info window of the most recent or link source post.
- center_lat – decimal latitude. With center_lng, an initial center location for the map.
- center_lng – decimal longitude. With center_lat, an initial center location for the map.
- click_to_load – true or false. Activates the click-to-load feature described above. Default is false.
- click_to_load_text – the text displayed in the click-to-load pane.
- disable_tab_auto_select – For use with the tabbed category index, shows all posts to begin with. Allows the info window to remain open.
- height – the height of the map in pixels
- interactive_legend – true or false. Controls the display of checkboxes in map legend. Default is true.
- legend_format – dl or table. Formats the category legend using a definition list or table. Default is table.
- limit – the maximum number of items to include on a global map or contextual map.
- map_content – global, single, or contextual. Overrides the default content of a map.
- map_control – !GSmallZoomControl, !GSmallMapControl, !GLargeMapControl, !GSmallZoomControl3d, !GLargeMapControl3D
- map_type – G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, G_PHYSICAL_MAP
- map_cat – the ID of the category to display (you can edit the category and look for cat_ID in the address bar)
- marker_min_zoom – hide markers until zoom level, 0 to 20
- name – name for this map. You can then use the name in the for_map parameters of other tags.
- show_future – true or false. Includes future-dated posts. Default is false.
Source : http://code.google.com/p/wordpress-geo-mashup/wiki/TagReference
Ce plugin s’appuie sur les “Customs values” ou “Champs personnalisés” pour attacher une carte google map un article ou à une page. Nous ne sommes pas parvenu à faire fonctionner correctement ce plugin mais toutefois le code semble prometteur.
[google-map-sc address="3501 S.W. 130th Ave., Davie 33330" width="250" height="250" zoom="14"] |
Là encore un code prometteur mais bien des difficultés à la mettre en place et à le faire fonctionner.
[wpgeo_longitude]40.7143[/wpgeo_longitude] [wpgeo_latitude]-74.0060[/wpgeo_latitude] |
Source : http://www.wpgeo.com/