{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2026-10-06T14:21:18Z","object_id":{"id":2769,"is_a":["text","documentation","reference","module"],"name":"doc_external_4_mod_geomap","title":"mod_geomap","uri":"https:\/\/zotonic.com\/id\/2769"},"seq":1}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"subject":{"objects":[{"created":"2026-10-06T14:21:18Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-10-06T14:21:18Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-10-06T14:21:18Z","object_id":{"id":2599,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_api_and_integration","title":"API and integration","uri":"https:\/\/zotonic.com\/id\/2599"},"seq":3},{"created":"2026-10-06T14:21:18Z","object_id":{"id":2603,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_configuration","title":"Configuration","uri":"https:\/\/zotonic.com\/id\/2603"},"seq":4},{"created":"2026-10-06T14:21:18Z","object_id":{"id":2609,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_geolocation","title":"Geolocation","uri":"https:\/\/zotonic.com\/id\/2609"},"seq":5},{"created":"2026-10-06T14:21:18Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2771,"is_a":["text","documentation","reference","model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2771"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_external_4_m_geomap","page_url":{"en":"https:\/\/zotonic.com\/docs\/2771\/m_geomap","x-default":"https:\/\/zotonic.com\/docs\/2771\/m_geomap"},"preview_url":null,"resource":{"version":17,"pivot_location_lat":null,"title":"m_geomap","is_authoritative":true,"body":"<p>Expose GeoMap configuration and country-map data to templates and model GET\nrequests.<\/p>\n<h2>Model paths<\/h2>\n<table class=\"table\"><thead><tr><th>Path<\/th><th>Result<\/th><\/tr><\/thead><tbody><tr><td><code>provider<\/code><\/td><td>Configured map provider.<\/td><\/tr><tr><td><code>google_api_key<\/code><\/td><td>Configured Google Maps API key.<\/td><\/tr><tr><td><code>location_lat<\/code><\/td><td>Configured initial latitude.<\/td><\/tr><tr><td><code>location_lng<\/code><\/td><td>Configured initial longitude.<\/td><\/tr><tr><td><code>zoomlevel<\/code><\/td><td>Configured initial zoom.<\/td><\/tr><tr><td><code>countries<\/code><\/td><td>Country GeoJSON enriched with visible country resources.<\/td><\/tr><tr><td><code>nearby<\/code><\/td><td>Empty map; resource lookup is not implemented on this path.<\/td><\/tr><tr><td><code>locations<\/code><\/td><td>Empty map; resource lookup is not implemented on this path.<\/td><\/tr><\/tbody><\/table>\n<p>Configuration reads return the stored <code>mod_geomap<\/code> value without a model-level\nfallback. Templates choose their own defaults, for example:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{{ m.geomap.location_lat|default:0 }}\n<\/code><\/pre>\n<p>These reads have no administrator-only ACL check, including <code>google_api_key<\/code>.\nUnknown paths return <code>{error, unknown_path}<\/code>. GET model callbacks return\n<code>{ok, {Value, Rest}}<\/code>, retaining unused path segments.<\/p>\n<h2>Country data<\/h2>\n<p><code>countries<\/code> reads <code>priv\/data\/internet_users_2005_choropleth_lowres.json<\/code> from the\n<code>zotonic_mod_geomap<\/code> application. The decoded geometry is cached in the site&#39;s\ndepcache for one day, or until the cache is flushed. Resource values and\nvisibility checks are applied separately on every request. No copy in the site\ndirectory is needed. After replacing the data file, flush the site&#39;s depcache\nto load the new geometry immediately.<\/p>\n<p>The model searches up to 1,000 resources in category <code>country<\/code>, checks their\nvisibility, and groups them by <code>address_country<\/code>. It combines their IDs and\ntitles with <code>map_color<\/code> and <code>map_value<\/code> for matching country features. Missing\ncolors default to <code>#ccc<\/code>, and missing values to an empty binary. If the category\ndoes not exist, no resource values are added. Sint Maarten&#39;s <code>sx<\/code> country code\nis grouped with Saint Martin&#39;s <code>mf<\/code> geometry.<\/p>\n<p>For nearby resource queries, use the <code>geo_nearby<\/code> search supplied by <code>mod_geomap<\/code>;\nthe <code>nearby<\/code> and <code>locations<\/code> model paths do not implement that search.<\/p>","slug":"m_geomap","doc_module_config":[],"is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"5cd128c8a09c78291c1386b27e3f120d9b2291f9aaedb2129b49a61f9af54f58","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"external_module_id":{"id":4,"is_a":[],"name":null,"title":null,"uri":"https:\/\/zotonic.com\/id\/4"},"git_url":"https:\/\/github.com\/zotonic\/zotonic_mod_geomap","category_id":{"id":322,"is_a":["meta","category"],"name":"model","title":"Models","uri":"https:\/\/test.zotonic.com\/id\/322"},"doc_source_path":".\/src\/models\/m_geomap.erl","publication_start":"2026-10-06T14:21:18Z","github_url":"https:\/\/github.com\/zotonic\/zotonic_mod_geomap","pivot_location_lng":null,"doc_source_kind":"external","name":"doc_external_4_m_geomap","is_unfindable":false,"is_published":true,"pivot_geocode":null,"external_module_title":"GeoMap","created":"2026-10-06T14:21:18Z","uri":null,"doc_status":"current","is_dependent":false,"is_external_module":true,"publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"e6d27c20d16c273462eb8b6b0dfac4556a9ba391","creator_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"modified":"2026-10-06T14:35:28Z","title_slug":"m_geomap"},"uri":"https:\/\/zotonic.com\/id\/2771","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2771"}},"status":"ok"}