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