Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Dan Roma 18 posts 38 karma points
    Nov 07, 2014 @ 17:37
    Dan Roma
    0

    Displaying Custom Content Items

    I am relatively new to Umbraco and am working on my first site(Umbraco 7). Everything has been going pretty smoothly but I ran into a snafu. I have a page where I am trying to display values on a map with several points of interest on the screen. I am trying to determine the best way to approach this. I did some research and found archetypes and started playing around with that but I'm not sure if this is the best way to approach my problem.

    Essentially, I have a json file on point of interests to display on the map. I created my archetype called Location and a folder named Locations.  Locations consist of a collection of Location and I am hoping to just iterate that list and output it to the screen. Has anyone ran into something similiar?

     

    Regards,

    Dan

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Nov 07, 2014 @ 18:12
    Jan Skovgaard
    0

    Hi Dan and welcome to our :)

    There are several approaches you can take on this.

    But I think what I would do is to generate some JSON based on your locations, which you can then consume where you're calling your map.

    Even though this article has an XSLT approach the thinking behind it should be somewhat the same concept as you need to think about http://24days.in/umbraco/2012/give-me-json/

    You can probably also use some of the thinking Matt describes in this article http://24days.in/umbraco/2012/ajax-paging-using-alttemplates/ - Even though it's about paging but it's also the concept about how you can use Umbraco data with Ajax calls.

    I actually think that you should be able to use Umbraco /Base to get a JSON object, which you can use - You can read more about it here http://our.umbraco.org/documentation/Reference/Api/Base/Index

    Hope this helps a bit :) And keep in mind that the two articles are 2 years old so it's more a conceptual thing rather than the way it's best to implement it using v7. It's the thing about using the alt template to fetch data...but /Base might just cut it without all the other hassle mentioned in the articles - Unfortunately it's been a while since I've gotten my hands dirty.

    Also there are some Google Maps packages in the project section for v7, which could might be of inspiration to you if the source code is available on Github.

    /Jan

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Nov 07, 2014 @ 18:15
    Dennis Aaen
    0

    Hi Dan and welcome to our.

    Is it a score locator that you are working on using Google Map, if so then you could use one of  the several packages for this purpose in Umbraco 7, One of the package could be uMap, have a look here: http://our.umbraco.org/projects/backoffice-extensions/umap

    Another package you could use if it´s a Google map you are after is uLocate: http://our.umbraco.org/projects/collaboration/ulocate

    Hope this could be a solution for you.

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft