{"id":67201,"date":"2015-04-06T16:46:50","date_gmt":"2015-04-06T16:46:50","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/display-geojson-features-in-your-qml-app\/"},"modified":"2018-03-26T21:05:00","modified_gmt":"2018-03-26T21:05:00","slug":"display-geojson-features-in-your-qml-app","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app","title":{"rendered":"Display GeoJSON features in your QML app"},"author":5331,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[],"tags":[23451,25721,24621,24631],"industry":[],"product":[36921,36601],"class_list":["post-67201","blog","type-blog","status-publish","format-standard","hentry","tag-arcgis-runtime","tag-geojson","tag-qml","tag-qt","product-api-cqt","product-developers"],"acf":{"short_description":"The ArcGIS Runtime SDK for Java has put out a blog and sample application showing how you can view and interact with GeoJSON features in ...","flexible_content":[{"acf_fc_layout":"content","content":"<p><a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2015\/04\/geojson.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-48257\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2015\/04\/geojson-300x272.png\" alt=\"\" width=\"300\" height=\"272\" \/><\/a>The ArcGIS Runtime SDK for Java has put out a <a href=\"http:\/\/blogs.esri.com\/esri\/arcgis\/2014\/10\/31\/working-with-the-geojson-format-using-arcgis-runtime-sdk-for-java\/\">blog<\/a> and <a href=\"https:\/\/github.com\/Esri\/arcgis-runtime-samples-java\/tree\/master\/geojson\">sample application<\/a> showing how you can view and interact with GeoJSON features in an ArcGIS Runtime application. \u00a0The blog does a great job of explaining the basic principles of GeoJSON, as well as showing how GeoJSON features map to Esri Features. One of the great things about the ArcGIS Runtime SDKs is that the APIs are very consistent between the different SDK products, so this exact same workflow and process is very simple to achieve in Qt with our new QML API.<\/p>\n<p>To see an example of how to do this, <a href=\"http:\/\/www.arcgis.com\/home\/item.html?id=bb24ad984d5740f2bb3391fbaaca2e5f\">download the source<\/a> for a sample project from ArcGIS Online. Please note that this sample is not supported.<\/p>\n<p>In order to consume these features in the QML API, you will need to first include the GeoJsonParser.qml file, which is included in the above link. Then, declare a GeoJsonParser component, and set the source property equal to the path to your .geojson file.<\/p>\n<pre>GeoJsonParser { \n    id: geoJsonParser \n    source: \"\/User\/airports.geojson\" \n}<\/pre>\n<p>The GeoJsonParser will eventually return a list of Graphics (which is a subclass of Feature), each of which contain geometry, attributes, and a symbol. To get this output to display on the map, you will need to declare a GraphicsLayer inside of your map.<\/p>\n<pre>GraphicsLayer {\n    id: gl\n    renderingMode: Enums.RenderingModeStatic\n}<\/pre>\n<p>Inside of the GeoJsonParser, define a signal handler called onFeaturesParsed. This signal handler will implement some JavaScript code to wait for all the features to be parsed, and then to loop through the feature list, and add each item into the GraphicsLayer.<\/p>\n<pre>onFeaturesParsed: {\n    for (var i in featureList) {\n        gl.addGraphic(featureList[i]);\n    }\n}<\/pre>\n<p>Finally, call the <code>loadGeoJsonFeatures()<\/code> function on the GeoJsonParser, and this will begin the parsing. The signal handler will load the Graphics into the GraphicsLayer once the features are parsed and converted. The output app will look something like the following:<a href=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2015\/04\/geojsonqt.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-48259\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2015\/04\/geojsonqt-1024x681.jpg\" alt=\"\" width=\"640\" height=\"425\" \/><\/a><\/p>\n<p>The code sample on ArcGIS Online contains both the implementation, and an example of how to use it. The example shows how you can take it one step further, and add in your own custom symbology, as well as query the feature for attributes. This is a great example of how easy it is to write powerful applications with QML and the ArcGIS Runtime SDK for Qt. Please see the\u00a0<a href=\"http:\/\/geojson.org\/geojson-spec.html\">GeoJSON spec<\/a>\u00a0for further information about GeoJSON, and if you haven\u2019t already downloaded the SDK, you can read more about it <a href=\"https:\/\/developers.arcgis.com\/qt\/\">here<\/a>.<\/p>\n"}],"authors":[{"ID":5331,"user_firstname":"Lucas","user_lastname":"Danzinger","nickname":"Lucas Danzinger","user_nicename":"ldanzinger","display_name":"Lucas Danzinger","user_email":"LDanzinger@esri.com","user_url":"","user_registered":"2018-03-02 00:17:04","user_description":"Lucas is a Product Engineering Lead, dedicating the majority of his efforts to the Qt Maps SDK and advancing the geometry editing capabilities within the Maps SDKs for Native Apps. Outside of his professional pursuits, he enjoys outdoor activities, traveling, and culinary exploration.","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/9941353aad6686462149f10834e13f19b4615b89008d87cd496ba9be49cf55a5?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/9941353aad6686462149f10834e13f19b4615b89008d87cd496ba9be49cf55a5?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}]},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Display GeoJSON features in your QML app<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Display GeoJSON features in your QML app\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-03-26T21:05:00+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app\"},\"author\":{\"name\":\"Lucas Danzinger\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/f1ad3977d3b9ad81493142607e7e5883\"},\"headline\":\"Display GeoJSON features in your QML app\",\"datePublished\":\"2015-04-06T16:46:50+00:00\",\"dateModified\":\"2018-03-26T21:05:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app\"},\"wordCount\":7,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"ArcGIS Runtime\",\"GeoJSON\",\"QML\",\"Qt\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app\",\"name\":\"Display GeoJSON features in your QML app\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2015-04-06T16:46:50+00:00\",\"dateModified\":\"2018-03-26T21:05:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Display GeoJSON features in your QML app\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/f1ad3977d3b9ad81493142607e7e5883\",\"name\":\"Lucas Danzinger\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9941353aad6686462149f10834e13f19b4615b89008d87cd496ba9be49cf55a5?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9941353aad6686462149f10834e13f19b4615b89008d87cd496ba9be49cf55a5?s=96&d=blank&r=g\",\"caption\":\"Lucas Danzinger\"},\"description\":\"Lucas is a Product Engineering Lead, dedicating the majority of his efforts to the Qt Maps SDK and advancing the geometry editing capabilities within the Maps SDKs for Native Apps. Outside of his professional pursuits, he enjoys outdoor activities, traveling, and culinary exploration.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/lucas-danzinger-ab371b37\/\"],\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/ldanzinger\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Display GeoJSON features in your QML app","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app","og_locale":"en_US","og_type":"article","og_title":"Display GeoJSON features in your QML app","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-03-26T21:05:00+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app"},"author":{"name":"Lucas Danzinger","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/f1ad3977d3b9ad81493142607e7e5883"},"headline":"Display GeoJSON features in your QML app","datePublished":"2015-04-06T16:46:50+00:00","dateModified":"2018-03-26T21:05:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app"},"wordCount":7,"commentCount":0,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["ArcGIS Runtime","GeoJSON","QML","Qt"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app","name":"Display GeoJSON features in your QML app","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2015-04-06T16:46:50+00:00","dateModified":"2018-03-26T21:05:00+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/\/uncategorized\/display-geojson-features-in-your-qml-app#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Display GeoJSON features in your QML app"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/f1ad3977d3b9ad81493142607e7e5883","name":"Lucas Danzinger","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9941353aad6686462149f10834e13f19b4615b89008d87cd496ba9be49cf55a5?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9941353aad6686462149f10834e13f19b4615b89008d87cd496ba9be49cf55a5?s=96&d=blank&r=g","caption":"Lucas Danzinger"},"description":"Lucas is a Product Engineering Lead, dedicating the majority of his efforts to the Qt Maps SDK and advancing the geometry editing capabilities within the Maps SDKs for Native Apps. Outside of his professional pursuits, he enjoys outdoor activities, traveling, and culinary exploration.","sameAs":["https:\/\/www.linkedin.com\/in\/lucas-danzinger-ab371b37\/"],"url":"https:\/\/www.esri.com\/arcgis-blog\/author\/ldanzinger"}]}},"text_date":"April 6, 2015","author_name":"Lucas Danzinger","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/ldanzinger","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcGIS Runtime SDK for Qt","tag_data":[{"term_id":23451,"name":"ArcGIS Runtime","slug":"arcgis-runtime","term_group":0,"term_taxonomy_id":23451,"taxonomy":"post_tag","description":"","parent":0,"count":91,"filter":"raw"},{"term_id":25721,"name":"GeoJSON","slug":"geojson","term_group":0,"term_taxonomy_id":25721,"taxonomy":"post_tag","description":"","parent":0,"count":10,"filter":"raw"},{"term_id":24621,"name":"QML","slug":"qml","term_group":0,"term_taxonomy_id":24621,"taxonomy":"post_tag","description":"","parent":0,"count":33,"filter":"raw"},{"term_id":24631,"name":"Qt","slug":"qt","term_group":0,"term_taxonomy_id":24631,"taxonomy":"post_tag","description":"","parent":0,"count":36,"filter":"raw"}],"category_data":[],"product_data":[{"term_id":36921,"name":"ArcGIS Runtime SDK for Qt","slug":"api-cqt","term_group":0,"term_taxonomy_id":36921,"taxonomy":"product","description":"","parent":36601,"count":80,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":765,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=api-cqt","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/67201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/5331"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=67201"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/67201\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=67201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=67201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=67201"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=67201"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=67201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}