[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"blog-\u002Fblog\u002Fusing-township-api-with-google-maps":3},{"id":4,"title":5,"author":6,"body":7,"category":1290,"cover":1291,"date":1292,"description":1293,"extension":1294,"meta":1295,"navigation":255,"path":1296,"seo":1297,"stem":1298,"tags":1299,"__hash__":1304},"blog\u002Fblog\u002Fusing-township-api-with-google-maps.md","Display Legal Land Descriptions on Google Maps","Township Canada",{"type":8,"value":9,"toc":1281},"minimark",[10,14,17,20,25,39,56,59,89,93,96,595,602,608,612,622,797,809,816,820,829,1183,1186,1190,1196,1204,1216,1220,1223,1238,1241,1244,1248,1256,1262,1270,1277],[11,12,13],"p",{},"A land agent in rural Alberta gets a request from a client: show me exactly where NW-25-24-1-W5 sits on a map. The client isn't a surveyor. They don't read DLS notation. They need a pin on a Google Map and a visible boundary so they can understand what they're looking at.",[11,15,16],{},"That's a common ask. Oil and gas companies need to show well sites and surface leases to non-technical stakeholders. Agricultural businesses want to display field boundaries for crop insurance and delivery permits. Municipal offices field calls from landowners who want to see their quarter section on a familiar map.",[11,18,19],{},"Google Maps is the default. Everyone knows how to use it. The Township Canada API speaks GeoJSON - which Google Maps reads natively. Connecting the two takes less code than you might expect.",[21,22,24],"h2",{"id":23},"what-the-api-returns","What the API Returns",[11,26,27,28,33,34,38],{},"When you call the ",[29,30,32],"a",{"href":31},"\u002Fapi","Township Canada search endpoint",", it returns a GeoJSON ",[35,36,37],"code",{},"FeatureCollection"," with two features:",[40,41,42,50],"ul",{},[43,44,45,46,49],"li",{},"A ",[35,47,48],{},"Point"," feature at the centroid of the location - for placing a marker",[43,51,45,52,55],{},[35,53,54],{},"MultiPolygon"," feature with the boundary - for drawing the parcel outline",[11,57,58],{},"Both come back in a single request. No second call needed to get the polygon.",[11,60,61,62,64,65,68,69,68,72,68,75,68,78,68,81,84,85,88],{},"The properties on the ",[35,63,54],{}," feature include ",[35,66,67],{},"legal_location",", ",[35,70,71],{},"quarter_section",[35,73,74],{},"section",[35,76,77],{},"township",[35,79,80],{},"range",[35,82,83],{},"meridian",", and ",[35,86,87],{},"province"," - everything you need to populate an info window.",[21,90,92],{"id":91},"searching-and-placing-a-marker","Searching and Placing a Marker",[11,94,95],{},"A basic search call looks like this:",[97,98,103],"pre",{"className":99,"code":100,"language":101,"meta":102,"style":102},"language-javascript shiki shiki-themes material-theme-lighter vitesse-light vitesse-dark","async function searchLocation(query) {\n  const response = await fetch(\n    `https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location?location=${encodeURIComponent(query)}`,\n    {\n      headers: { \"X-API-Key\": \"YOUR_API_KEY\" }\n    }\n  );\n\n  const data = await response.json();\n\n  const centroid = data.features.find((f) => f.properties.shape === \"centroid\");\n\n  if (!centroid) return null;\n\n  const [lng, lat] = centroid.geometry.coordinates;\n\n  const marker = new google.maps.Marker({\n    position: { lat, lng },\n    map,\n    title: centroid.properties.legal_location\n  });\n\n  map.panTo({ lat, lng });\n  map.setZoom(13);\n\n  return { marker, data };\n}\n","javascript","",[35,104,105,135,159,194,200,235,241,250,257,282,287,350,355,379,384,420,425,456,476,484,503,513,518,547,567,572,589],{"__ignoreMap":102},[106,107,110,114,117,121,125,129,132],"span",{"class":108,"line":109},"line",1,[106,111,113],{"class":112},"s5Kfy","async",[106,115,116],{"class":112}," function",[106,118,120],{"class":119},"sljsM"," searchLocation",[106,122,124],{"class":123},"soVBu","(",[106,126,128],{"class":127},"sqOPj","query",[106,130,131],{"class":123},")",[106,133,134],{"class":123}," {\n",[106,136,138,141,145,148,152,155],{"class":108,"line":137},2,[106,139,140],{"class":112},"  const",[106,142,144],{"class":143},"sSC40"," response",[106,146,147],{"class":123}," =",[106,149,151],{"class":150},"siDh9"," await",[106,153,154],{"class":119}," fetch",[106,156,158],{"class":157},"sLdnO","(\n",[106,160,162,166,170,174,177,180,183,185,188,191],{"class":108,"line":161},3,[106,163,165],{"class":164},"sbYkP","    `",[106,167,169],{"class":168},"sTbE_","https:\u002F\u002Fdeveloper.townshipcanada.com\u002Fsearch\u002Flegal-location?location=",[106,171,173],{"class":172},"s8XtY","${",[106,175,176],{"class":119},"encodeURIComponent",[106,178,124],{"class":179},"snCua",[106,181,128],{"class":182},"su_V2",[106,184,131],{"class":179},[106,186,187],{"class":172},"}",[106,189,190],{"class":164},"`",[106,192,193],{"class":123},",\n",[106,195,197],{"class":108,"line":196},4,[106,198,199],{"class":123},"    {\n",[106,201,203,207,210,213,216,220,223,225,227,230,232],{"class":108,"line":202},5,[106,204,206],{"class":205},"suXOh","      headers",[106,208,209],{"class":123},":",[106,211,212],{"class":123}," {",[106,214,215],{"class":164}," \"",[106,217,219],{"class":218},"sQtxO","X-API-Key",[106,221,222],{"class":164},"\"",[106,224,209],{"class":123},[106,226,215],{"class":164},[106,228,229],{"class":168},"YOUR_API_KEY",[106,231,222],{"class":164},[106,233,234],{"class":123}," }\n",[106,236,238],{"class":108,"line":237},6,[106,239,240],{"class":123},"    }\n",[106,242,244,247],{"class":108,"line":243},7,[106,245,246],{"class":157},"  )",[106,248,249],{"class":123},";\n",[106,251,253],{"class":108,"line":252},8,[106,254,256],{"emptyLinePlaceholder":255},true,"\n",[106,258,260,262,265,267,269,271,274,277,280],{"class":108,"line":259},9,[106,261,140],{"class":112},[106,263,264],{"class":143}," data",[106,266,147],{"class":123},[106,268,151],{"class":150},[106,270,144],{"class":143},[106,272,273],{"class":123},".",[106,275,276],{"class":119},"json",[106,278,279],{"class":157},"()",[106,281,249],{"class":123},[106,283,285],{"class":108,"line":284},10,[106,286,256],{"emptyLinePlaceholder":255},[106,288,290,292,295,297,299,301,304,306,309,311,313,316,318,322,325,327,330,332,335,339,341,344,346,348],{"class":108,"line":289},11,[106,291,140],{"class":112},[106,293,294],{"class":143}," centroid",[106,296,147],{"class":123},[106,298,264],{"class":143},[106,300,273],{"class":123},[106,302,303],{"class":143},"features",[106,305,273],{"class":123},[106,307,308],{"class":119},"find",[106,310,124],{"class":157},[106,312,124],{"class":123},[106,314,315],{"class":127},"f",[106,317,131],{"class":123},[106,319,321],{"class":320},"sIOqK"," =>",[106,323,324],{"class":143}," f",[106,326,273],{"class":123},[106,328,329],{"class":143},"properties",[106,331,273],{"class":123},[106,333,334],{"class":143},"shape",[106,336,338],{"class":337},"sVsLi"," ===",[106,340,215],{"class":164},[106,342,343],{"class":168},"centroid",[106,345,222],{"class":164},[106,347,131],{"class":157},[106,349,249],{"class":123},[106,351,353],{"class":108,"line":352},12,[106,354,256],{"emptyLinePlaceholder":255},[106,356,358,361,364,367,369,371,374,377],{"class":108,"line":357},13,[106,359,360],{"class":150},"  if",[106,362,363],{"class":157}," (",[106,365,366],{"class":337},"!",[106,368,343],{"class":143},[106,370,131],{"class":157},[106,372,373],{"class":150}," return",[106,375,376],{"class":337}," null",[106,378,249],{"class":123},[106,380,382],{"class":108,"line":381},14,[106,383,256],{"emptyLinePlaceholder":255},[106,385,387,389,392,395,398,401,404,406,408,410,413,415,418],{"class":108,"line":386},15,[106,388,140],{"class":112},[106,390,391],{"class":123}," [",[106,393,394],{"class":143},"lng",[106,396,397],{"class":123},",",[106,399,400],{"class":143}," lat",[106,402,403],{"class":123},"]",[106,405,147],{"class":123},[106,407,294],{"class":143},[106,409,273],{"class":123},[106,411,412],{"class":143},"geometry",[106,414,273],{"class":123},[106,416,417],{"class":143},"coordinates",[106,419,249],{"class":123},[106,421,423],{"class":108,"line":422},16,[106,424,256],{"emptyLinePlaceholder":255},[106,426,428,430,433,435,438,441,443,446,448,451,453],{"class":108,"line":427},17,[106,429,140],{"class":112},[106,431,432],{"class":143}," marker",[106,434,147],{"class":123},[106,436,437],{"class":337}," new",[106,439,440],{"class":143}," google",[106,442,273],{"class":123},[106,444,445],{"class":143},"maps",[106,447,273],{"class":123},[106,449,450],{"class":119},"Marker",[106,452,124],{"class":157},[106,454,455],{"class":123},"{\n",[106,457,459,462,464,466,468,470,473],{"class":108,"line":458},18,[106,460,461],{"class":205},"    position",[106,463,209],{"class":123},[106,465,212],{"class":123},[106,467,400],{"class":143},[106,469,397],{"class":123},[106,471,472],{"class":143}," lng",[106,474,475],{"class":123}," },\n",[106,477,479,482],{"class":108,"line":478},19,[106,480,481],{"class":143},"    map",[106,483,193],{"class":123},[106,485,487,490,492,494,496,498,500],{"class":108,"line":486},20,[106,488,489],{"class":205},"    title",[106,491,209],{"class":123},[106,493,294],{"class":143},[106,495,273],{"class":123},[106,497,329],{"class":143},[106,499,273],{"class":123},[106,501,502],{"class":143},"legal_location\n",[106,504,506,509,511],{"class":108,"line":505},21,[106,507,508],{"class":123},"  }",[106,510,131],{"class":157},[106,512,249],{"class":123},[106,514,516],{"class":108,"line":515},22,[106,517,256],{"emptyLinePlaceholder":255},[106,519,521,524,526,529,531,534,536,538,540,543,545],{"class":108,"line":520},23,[106,522,523],{"class":143},"  map",[106,525,273],{"class":123},[106,527,528],{"class":119},"panTo",[106,530,124],{"class":157},[106,532,533],{"class":123},"{",[106,535,400],{"class":143},[106,537,397],{"class":123},[106,539,472],{"class":143},[106,541,542],{"class":123}," }",[106,544,131],{"class":157},[106,546,249],{"class":123},[106,548,550,552,554,557,559,563,565],{"class":108,"line":549},24,[106,551,523],{"class":143},[106,553,273],{"class":123},[106,555,556],{"class":119},"setZoom",[106,558,124],{"class":157},[106,560,562],{"class":561},"s7CZa","13",[106,564,131],{"class":157},[106,566,249],{"class":123},[106,568,570],{"class":108,"line":569},25,[106,571,256],{"emptyLinePlaceholder":255},[106,573,575,578,580,582,584,586],{"class":108,"line":574},26,[106,576,577],{"class":150},"  return",[106,579,212],{"class":123},[106,581,432],{"class":143},[106,583,397],{"class":123},[106,585,264],{"class":143},[106,587,588],{"class":123}," };\n",[106,590,592],{"class":108,"line":591},27,[106,593,594],{"class":123},"}\n",[11,596,597,598,601],{},"Call ",[35,599,600],{},"searchLocation(\"NW-25-24-1-W5\")"," and a pin lands on the northwest quarter of Section 25, Township 24, Range 1, West of the 5th Meridian in Alberta - roughly 50 km southeast of Edmonton.",[11,603,604,605,607],{},"The ",[35,606,67],{}," property on the centroid feature gives you the canonical formatted description to use as the marker title or label.",[21,609,611],{"id":610},"drawing-the-boundary","Drawing the Boundary",[11,613,614,615,618,619,621],{},"Google Maps supports GeoJSON directly through ",[35,616,617],{},"map.data.addGeoJson()",". The ",[35,620,54],{}," feature in the search response can be passed in the same call - no coordinate parsing required on your end:",[97,623,625],{"className":99,"code":624,"language":101,"meta":102,"style":102},"function drawBoundary(geojson) {\n  map.data.forEach((feature) => map.data.remove(feature));\n  map.data.addGeoJson(geojson);\n\n  map.data.setStyle({\n    fillColor: \"#1a6b3c\",\n    fillOpacity: 0.2,\n    strokeColor: \"#1a6b3c\",\n    strokeWeight: 2\n  });\n}\n",[35,626,627,644,690,711,715,732,748,760,775,785,793],{"__ignoreMap":102},[106,628,629,632,635,637,640,642],{"class":108,"line":109},[106,630,631],{"class":112},"function",[106,633,634],{"class":119}," drawBoundary",[106,636,124],{"class":123},[106,638,639],{"class":127},"geojson",[106,641,131],{"class":123},[106,643,134],{"class":123},[106,645,646,648,650,653,655,658,660,662,665,667,669,672,674,676,678,681,683,685,688],{"class":108,"line":137},[106,647,523],{"class":143},[106,649,273],{"class":123},[106,651,652],{"class":143},"data",[106,654,273],{"class":123},[106,656,657],{"class":119},"forEach",[106,659,124],{"class":157},[106,661,124],{"class":123},[106,663,664],{"class":127},"feature",[106,666,131],{"class":123},[106,668,321],{"class":320},[106,670,671],{"class":143}," map",[106,673,273],{"class":123},[106,675,652],{"class":143},[106,677,273],{"class":123},[106,679,680],{"class":119},"remove",[106,682,124],{"class":157},[106,684,664],{"class":143},[106,686,687],{"class":157},"))",[106,689,249],{"class":123},[106,691,692,694,696,698,700,703,705,707,709],{"class":108,"line":161},[106,693,523],{"class":143},[106,695,273],{"class":123},[106,697,652],{"class":143},[106,699,273],{"class":123},[106,701,702],{"class":119},"addGeoJson",[106,704,124],{"class":157},[106,706,639],{"class":143},[106,708,131],{"class":157},[106,710,249],{"class":123},[106,712,713],{"class":108,"line":196},[106,714,256],{"emptyLinePlaceholder":255},[106,716,717,719,721,723,725,728,730],{"class":108,"line":202},[106,718,523],{"class":143},[106,720,273],{"class":123},[106,722,652],{"class":143},[106,724,273],{"class":123},[106,726,727],{"class":119},"setStyle",[106,729,124],{"class":157},[106,731,455],{"class":123},[106,733,734,737,739,741,744,746],{"class":108,"line":237},[106,735,736],{"class":205},"    fillColor",[106,738,209],{"class":123},[106,740,215],{"class":164},[106,742,743],{"class":168},"#1a6b3c",[106,745,222],{"class":164},[106,747,193],{"class":123},[106,749,750,753,755,758],{"class":108,"line":243},[106,751,752],{"class":205},"    fillOpacity",[106,754,209],{"class":123},[106,756,757],{"class":561}," 0.2",[106,759,193],{"class":123},[106,761,762,765,767,769,771,773],{"class":108,"line":252},[106,763,764],{"class":205},"    strokeColor",[106,766,209],{"class":123},[106,768,215],{"class":164},[106,770,743],{"class":168},[106,772,222],{"class":164},[106,774,193],{"class":123},[106,776,777,780,782],{"class":108,"line":259},[106,778,779],{"class":205},"    strokeWeight",[106,781,209],{"class":123},[106,783,784],{"class":561}," 2\n",[106,786,787,789,791],{"class":108,"line":284},[106,788,508],{"class":123},[106,790,131],{"class":157},[106,792,249],{"class":123},[106,794,795],{"class":108,"line":289},[106,796,594],{"class":123},[11,798,799,800,802,803,805,806,808],{},"Pass the full ",[35,801,37],{}," from the search response and Google Maps renders both the centroid point and the boundary polygon. The ",[35,804,652],{}," layer handles ",[35,807,54],{}," geometry without any special treatment.",[11,810,811,812,815],{},"If you need to highlight multiple parcels at once - say, a grid of sections across a lease block - call ",[35,813,814],{},"drawBoundary()"," for each one and the polygons stack on the map.",[21,817,819],{"id":818},"showing-parcel-details-in-an-info-window","Showing Parcel Details in an Info Window",[11,821,822,823,825,826,828],{},"When a user clicks the marker, an info window with the parcel breakdown is the natural next step. Pull the details from the ",[35,824,54],{}," feature's ",[35,827,329],{}," object:",[97,830,832],{"className":99,"code":831,"language":101,"meta":102,"style":102},"function attachInfoWindow(marker, geojson) {\n  const polygon = geojson.features.find((f) => f.geometry.type === \"MultiPolygon\");\n\n  if (!polygon) return;\n\n  const p = polygon.properties;\n\n  const content = `\n    \u003Cdiv style=\"font-family: sans-serif; padding: 4px 8px;\">\n      \u003Cstrong>${p.legal_location}\u003C\u002Fstrong>\u003Cbr>\n      Quarter: ${p.quarter_section}\u003Cbr>\n      Section: ${p.section}\u003Cbr>\n      Township: ${p.township}\u003Cbr>\n      Range: ${p.range} ${p.meridian}\u003Cbr>\n      Province: ${p.province}\n    \u003C\u002Fdiv>\n  `;\n\n  const infoWindow = new google.maps.InfoWindow({ content });\n  marker.addListener(\"click\", () => infoWindow.open(map, marker));\n}\n",[35,833,834,855,907,911,928,932,949,953,965,970,988,1006,1023,1040,1068,1083,1088,1095,1099,1133,1179],{"__ignoreMap":102},[106,835,836,838,841,843,846,848,851,853],{"class":108,"line":109},[106,837,631],{"class":112},[106,839,840],{"class":119}," attachInfoWindow",[106,842,124],{"class":123},[106,844,845],{"class":127},"marker",[106,847,397],{"class":123},[106,849,850],{"class":127}," geojson",[106,852,131],{"class":123},[106,854,134],{"class":123},[106,856,857,859,862,864,866,868,870,872,874,876,878,880,882,884,886,888,890,892,895,897,899,901,903,905],{"class":108,"line":137},[106,858,140],{"class":112},[106,860,861],{"class":143}," polygon",[106,863,147],{"class":123},[106,865,850],{"class":143},[106,867,273],{"class":123},[106,869,303],{"class":143},[106,871,273],{"class":123},[106,873,308],{"class":119},[106,875,124],{"class":157},[106,877,124],{"class":123},[106,879,315],{"class":127},[106,881,131],{"class":123},[106,883,321],{"class":320},[106,885,324],{"class":143},[106,887,273],{"class":123},[106,889,412],{"class":143},[106,891,273],{"class":123},[106,893,894],{"class":143},"type",[106,896,338],{"class":337},[106,898,215],{"class":164},[106,900,54],{"class":168},[106,902,222],{"class":164},[106,904,131],{"class":157},[106,906,249],{"class":123},[106,908,909],{"class":108,"line":161},[106,910,256],{"emptyLinePlaceholder":255},[106,912,913,915,917,919,922,924,926],{"class":108,"line":196},[106,914,360],{"class":150},[106,916,363],{"class":157},[106,918,366],{"class":337},[106,920,921],{"class":143},"polygon",[106,923,131],{"class":157},[106,925,373],{"class":150},[106,927,249],{"class":123},[106,929,930],{"class":108,"line":202},[106,931,256],{"emptyLinePlaceholder":255},[106,933,934,936,939,941,943,945,947],{"class":108,"line":237},[106,935,140],{"class":112},[106,937,938],{"class":143}," p",[106,940,147],{"class":123},[106,942,861],{"class":143},[106,944,273],{"class":123},[106,946,329],{"class":143},[106,948,249],{"class":123},[106,950,951],{"class":108,"line":243},[106,952,256],{"emptyLinePlaceholder":255},[106,954,955,957,960,962],{"class":108,"line":252},[106,956,140],{"class":112},[106,958,959],{"class":143}," content",[106,961,147],{"class":123},[106,963,964],{"class":164}," `\n",[106,966,967],{"class":108,"line":259},[106,968,969],{"class":168},"    \u003Cdiv style=\"font-family: sans-serif; padding: 4px 8px;\">\n",[106,971,972,975,977,979,981,983,985],{"class":108,"line":284},[106,973,974],{"class":168},"      \u003Cstrong>",[106,976,173],{"class":172},[106,978,11],{"class":182},[106,980,273],{"class":123},[106,982,67],{"class":182},[106,984,187],{"class":172},[106,986,987],{"class":168},"\u003C\u002Fstrong>\u003Cbr>\n",[106,989,990,993,995,997,999,1001,1003],{"class":108,"line":289},[106,991,992],{"class":168},"      Quarter: ",[106,994,173],{"class":172},[106,996,11],{"class":182},[106,998,273],{"class":123},[106,1000,71],{"class":182},[106,1002,187],{"class":172},[106,1004,1005],{"class":168},"\u003Cbr>\n",[106,1007,1008,1011,1013,1015,1017,1019,1021],{"class":108,"line":352},[106,1009,1010],{"class":168},"      Section: ",[106,1012,173],{"class":172},[106,1014,11],{"class":182},[106,1016,273],{"class":123},[106,1018,74],{"class":182},[106,1020,187],{"class":172},[106,1022,1005],{"class":168},[106,1024,1025,1028,1030,1032,1034,1036,1038],{"class":108,"line":357},[106,1026,1027],{"class":168},"      Township: ",[106,1029,173],{"class":172},[106,1031,11],{"class":182},[106,1033,273],{"class":123},[106,1035,77],{"class":182},[106,1037,187],{"class":172},[106,1039,1005],{"class":168},[106,1041,1042,1045,1047,1049,1051,1053,1055,1058,1060,1062,1064,1066],{"class":108,"line":381},[106,1043,1044],{"class":168},"      Range: ",[106,1046,173],{"class":172},[106,1048,11],{"class":182},[106,1050,273],{"class":123},[106,1052,80],{"class":182},[106,1054,187],{"class":172},[106,1056,1057],{"class":172}," ${",[106,1059,11],{"class":182},[106,1061,273],{"class":123},[106,1063,83],{"class":182},[106,1065,187],{"class":172},[106,1067,1005],{"class":168},[106,1069,1070,1073,1075,1077,1079,1081],{"class":108,"line":386},[106,1071,1072],{"class":168},"      Province: ",[106,1074,173],{"class":172},[106,1076,11],{"class":182},[106,1078,273],{"class":123},[106,1080,87],{"class":182},[106,1082,594],{"class":172},[106,1084,1085],{"class":108,"line":422},[106,1086,1087],{"class":168},"    \u003C\u002Fdiv>\n",[106,1089,1090,1093],{"class":108,"line":427},[106,1091,1092],{"class":164},"  `",[106,1094,249],{"class":123},[106,1096,1097],{"class":108,"line":458},[106,1098,256],{"emptyLinePlaceholder":255},[106,1100,1101,1103,1106,1108,1110,1112,1114,1116,1118,1121,1123,1125,1127,1129,1131],{"class":108,"line":478},[106,1102,140],{"class":112},[106,1104,1105],{"class":143}," infoWindow",[106,1107,147],{"class":123},[106,1109,437],{"class":337},[106,1111,440],{"class":143},[106,1113,273],{"class":123},[106,1115,445],{"class":143},[106,1117,273],{"class":123},[106,1119,1120],{"class":119},"InfoWindow",[106,1122,124],{"class":157},[106,1124,533],{"class":123},[106,1126,959],{"class":143},[106,1128,542],{"class":123},[106,1130,131],{"class":157},[106,1132,249],{"class":123},[106,1134,1135,1138,1140,1143,1145,1147,1150,1152,1154,1157,1159,1161,1163,1166,1168,1171,1173,1175,1177],{"class":108,"line":486},[106,1136,1137],{"class":143},"  marker",[106,1139,273],{"class":123},[106,1141,1142],{"class":119},"addListener",[106,1144,124],{"class":157},[106,1146,222],{"class":164},[106,1148,1149],{"class":168},"click",[106,1151,222],{"class":164},[106,1153,397],{"class":123},[106,1155,1156],{"class":123}," ()",[106,1158,321],{"class":320},[106,1160,1105],{"class":143},[106,1162,273],{"class":123},[106,1164,1165],{"class":119},"open",[106,1167,124],{"class":157},[106,1169,1170],{"class":143},"map",[106,1172,397],{"class":123},[106,1174,432],{"class":143},[106,1176,687],{"class":157},[106,1178,249],{"class":123},[106,1180,1181],{"class":108,"line":505},[106,1182,594],{"class":123},[11,1184,1185],{},"For a land agent showing a client their property, this gives them section-level detail without requiring them to interpret DLS notation. For an O&G field coordinator, it's a quick sanity check before dispatching a crew.",[21,1187,1189],{"id":1188},"authentication-and-getting-an-api-key","Authentication and Getting an API Key",[11,1191,1192,1193,1195],{},"Every request requires your API key in the ",[35,1194,219],{}," header:",[97,1197,1202],{"className":1198,"code":1200,"language":1201},[1199],"language-text","X-API-Key: YOUR_API_KEY\n","text",[35,1203,1200],{"__ignoreMap":102},[11,1205,1206,1207,618,1211,1215],{},"You can get an API key from the ",[29,1208,1210],{"href":1209},"\u002Fapp\u002Fapi","API page",[29,1212,1214],{"href":1213},"\u002Fguides\u002Fapi-integration","API integration guide"," walks through authentication, rate limits, and error handling in detail - worth reading before you go to production.",[21,1217,1219],{"id":1218},"what-this-looks-like-in-practice","What This Looks Like in Practice",[11,1221,1222],{},"A surface lease coordinator at an energy company gets a list of 12 well locations from a regulatory filing - all in DLS format. They need to show the locations to a project manager who uses Google Maps. With the Township Canada API wired in, they can:",[1224,1225,1226,1229,1232,1235],"ol",{},[43,1227,1228],{},"Paste each legal land description into a search box",[43,1230,1231],{},"See the marker and boundary appear on the map",[43,1233,1234],{},"Click the marker to confirm the legal description, section, and province",[43,1236,1237],{},"Hand the map link to the project manager",[11,1239,1240],{},"The API handles the DLS-to-coordinates conversion. Google Maps handles the rendering. The coordinator doesn't need to export a shapefile or open GIS software.",[11,1242,1243],{},"The same pattern works for agriculture: a crop insurance adjuster confirming which quarter section a claim applies to, or a grain company verifying field locations before issuing a delivery permit.",[21,1245,1247],{"id":1246},"going-further","Going Further",[11,1249,1250,1251,1255],{},"This post covers the core pattern - search, marker, boundary, info window. The ",[29,1252,1254],{"href":1253},"\u002Fguides\u002Fgoogle-maps-integration","full Google Maps integration guide"," goes deeper: autocomplete search as the user types, a complete single-file working example, and notes on what the API does and doesn't support with Google Maps (vector tiles, for instance, require a different approach).",[11,1257,1258,1259,1261],{},"If you're earlier in the process and haven't set up API access yet, start with the ",[29,1260,1214],{"href":1213},". It covers authentication, response formats, and how to handle errors cleanly before you build on top of it.",[11,1263,1264,1265,1269],{},"For ",[29,1266,1268],{"href":1267},"\u002Fpricing","pricing"," details - including the free tier and what's available at each plan level - the pricing page has the full breakdown.",[11,1271,1272,1273,1276],{},"The Township Canada API is a good fit if you work with Canadian land data and need accurate DLS boundaries in a mapping context. The ",[29,1274,1275],{"href":31},"API reference"," covers all endpoints, query parameters, and response schemas.",[1278,1279,1280],"style",{},"html pre.shiki code .s5Kfy, html code.shiki .s5Kfy{--shiki-light:#9C3EDA;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .sljsM, html code.shiki .sljsM{--shiki-light:#6182B8;--shiki-default:#59873A;--shiki-dark:#80A665}html pre.shiki code .soVBu, html code.shiki .soVBu{--shiki-light:#39ADB5;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sqOPj, html code.shiki .sqOPj{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#B07D48;--shiki-default-font-style:inherit;--shiki-dark:#BD976A;--shiki-dark-font-style:inherit}html pre.shiki code .sSC40, html code.shiki .sSC40{--shiki-light:#90A4AE;--shiki-default:#B07D48;--shiki-dark:#BD976A}html pre.shiki code .siDh9, html code.shiki .siDh9{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#1E754F;--shiki-default-font-style:inherit;--shiki-dark:#4D9375;--shiki-dark-font-style:inherit}html pre.shiki code .sLdnO, html code.shiki .sLdnO{--shiki-light:#E53935;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sbYkP, html code.shiki .sbYkP{--shiki-light:#39ADB5;--shiki-default:#B5695977;--shiki-dark:#C98A7D77}html pre.shiki code .sTbE_, html code.shiki .sTbE_{--shiki-light:#91B859;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .s8XtY, html code.shiki .s8XtY{--shiki-light:#39ADB5;--shiki-default:#1E754F;--shiki-dark:#4D9375}html pre.shiki code .snCua, html code.shiki .snCua{--shiki-light:#90A4AE;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .su_V2, html code.shiki .su_V2{--shiki-light:#90A4AE;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .suXOh, html code.shiki .suXOh{--shiki-light:#E53935;--shiki-default:#998418;--shiki-dark:#B8A965}html pre.shiki code .sQtxO, html code.shiki .sQtxO{--shiki-light:#E53935;--shiki-default:#B56959;--shiki-dark:#C98A7D}html pre.shiki code .sIOqK, html code.shiki .sIOqK{--shiki-light:#9C3EDA;--shiki-default:#999999;--shiki-dark:#666666}html pre.shiki code .sVsLi, html code.shiki .sVsLi{--shiki-light:#39ADB5;--shiki-default:#AB5959;--shiki-dark:#CB7676}html pre.shiki code .s7CZa, html code.shiki .s7CZa{--shiki-light:#F76D47;--shiki-default:#2F798A;--shiki-dark:#4C9A91}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":102,"searchDepth":137,"depth":137,"links":1282},[1283,1284,1285,1286,1287,1288,1289],{"id":23,"depth":137,"text":24},{"id":91,"depth":137,"text":92},{"id":610,"depth":137,"text":611},{"id":818,"depth":137,"text":819},{"id":1188,"depth":137,"text":1189},{"id":1218,"depth":137,"text":1219},{"id":1246,"depth":137,"text":1247},"tutorial","https:\u002F\u002Fb9bukyyl5yuyveqq.public.blob.vercel-storage.com\u002Fimages\u002Fblog\u002F2026-05\u002F0ec3c43c-dc17-4d88-b57c-ada077ec1d74.jpeg","2026-04-10","Use the Township Canada API with Google Maps to search legal land descriptions, display boundaries, and build location tools for oil and gas, agriculture, and land management.","md",{},"\u002Fblog\u002Fusing-township-api-with-google-maps",{"title":5,"description":1293},"blog\u002Fusing-township-api-with-google-maps",[1300,1301,1302,1303],"Tutorial","API","Google Maps","Developer","kpZDCw1FiLSley_wG5lFIxZ7ZB9qWbzsgdSGPVMiUQI"]