File tree Expand file tree Collapse file tree 2 files changed +24
-3
lines changed
src/Fable.ReactGoogleMaps Expand file tree Collapse file tree 2 files changed +24
-3
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<Project Sdk =" Microsoft.NET.Sdk" >
33 <PropertyGroup >
4- <Version >0.2.1 </Version >
4+ <Version >0.2.2 </Version >
55 <TargetFramework >netstandard2.0</TargetFramework >
66 <GenerateDocumentationFile >true</GenerateDocumentationFile >
77 </PropertyGroup >
Original file line number Diff line number Diff line change @@ -26,7 +26,28 @@ and in your F# code you can create the map like this:
2626 let myMap =
2727 googleMap [
2828 MapProperties.ApiKey googleMapApiKey
29- MapProperties.MapContainer "mapContainer"
29+ MapProperties.MapLoadingContainer "maploadercontainer"
30+ MapProperties.MapContainer "mapcontainer"
3031 MapProperties.DefaultZoom 9
3132 MapProperties.DefaultCenter defaultCenter
32- MapProperties.Center defaultCenter ]
33+ MapProperties.Center defaultCenter ]
34+
35+ ## Markers
36+
37+ If you want to show markers on the map then you can create them like this:
38+
39+ let markers =
40+ locations
41+ |> Array.map (fun location ->
42+ marker [
43+ MarkerProperties.Key location.ID
44+ MarkerProperties.Position (Coordinates.newPos location.X location.Y)
45+ MarkerProperties.Icon (sprintf "Images/markers/%s.png" location.Color)
46+ MarkerProperties.Title location.Title] []))
47+
48+
49+ let myMap =
50+ googleMap [
51+ MapProperties.ApiKey googleMapApiKey
52+ // ..
53+ MapProperties.Markers (unbox markers) ]
You can’t perform that action at this time.
0 commit comments