How do you make geojson data for a custom google map - google-maps

I think the question says it all, I have a custom google map and want to put some geojason shapes on it.
In an ideal world scan them from a sheet of paper perhaps using a pre existant image.
Just looking and gimp might be a way forward.
Still though I'll leave this question open as might be useful for others.
Richard

The simplest way is to use the Data layer Look at the example in google maps api.
Basically, you use the loadGeoJson method and pass it a valid geojson file's url
map.data.loadGeoJson('https://storage.googleapis.com/maps-devrel/google.json');
This means that, whatever shapes you have already drawn in another source will have to be converted to geoJson format.
There are a lot of converters that can translate from-to KML, SHP, WKT, GPX and geoJson, but you still need to get from plain images to one of those formats.

In the end I ripped some code out from here.
http://blog.sallarp.com/geojson-google-maps-editor.html
Applied to my own map and got the coordinates that I needed and then had to play around with the json job done.
Feel that there should have been a program that made this all easier but can't have it all!
Richard

Related

How to parse a PDF using AS3? (air)

is there a way to parse a pdf using AS3 via Air in mobile?.
I don't need the full content of the PDF, only some data, is that possible?.
Edit for clarification:
I got a PDF file that was originally created based on a XML, what I'd need is to be able to retrieve that XML. Or at least, to find a string inside that PDF so I can make a call to a web service.
Original:
There's nothing native in AS3 for this kind of stuff but AlivePDF. It won't let you traverse things like XML so much, as it seems like you're trying to do by taking a small bit of a PDF, but it will let you create pdf's, add pages and change fonts etc.
You weren't entirely clear on what you're attempting to achieve, if you update your question a with a bit more detail we may be able to help a bit more.
Edit:
From the refined question, AlivePDF is not what you're after as it's really only for PDF generation. I'm assuming you're after a method to traverse the document like you would XML, by looking for a tag and extracting the information. I've not found a way to do this other than iterating through the document and searching manually which probably isn't what you're after.
After some searching I found an as3-pdfreader which doesn't seem to be complete at the moment. However on the Project Home the roadmap says parsing pdf files is complete, I've not been able to try it out yet though.

Preferred layer to create track (line) on openlayers

Currently using openlayers as map ui on my web app. The problem is i confused with many different layer type supported on Openlayers (which mean good btw). So anyone can suggest a suitable layer for this?
My goal is simple, i just want to create a layer which contain line as "tracking line" (let's call it "track") like what we can see here:
OpenStreetMaps Example
Right now currently using PointTrack and GeoRSS to display the track layer, also i have considered using KML layer now since it more versatile.
The consideration to take:
It must be fast enough to render on all browsers (especially IE8)
It loads data from other source (such as kml or xml file)
Refreshable
Styleable (size,color,etc)
PS: attach a sample if available
I would prefer to use OpenLayers.Layer.Vector in this situation. It's very flexible when it comes to styling features and you have full control over the contents of the layer(refreshable).
It doesn't matter in what format you have your data as you can read many different formats with OpenLayers.Format.* classes. So you use whatever format you need to create features and add then add them to you Vector layer.
How fast it renders data depends on how much data you have. IE tends to perform poorly when you throw a lot of vector data to the map.
You can see basic example here
EDIT: If you need to display a lot of data on a map then you probably would consider using WMS layer.
There is similar problem and solution to it described here.
Your data is rendered on server and is sent to the client as an image. You loose some flexibility comparing when you do everything on the client though.

Is it possible to draw charts with json data?

Is there any good article that gets me started with Google Visualization API which i ll be using in my application for drawing charts with JSON data. Any suggestion.
EDIT:
I was going through this question Iterating over json object for drawing a column chart?. This is what exactly i am trying to do? Any good ex?
Have you looked at Google's own page for the API? http://code.google.com/apis/visualization/documentation/gallery.html It has a lot of very good examples demonstrating different features.
If that's not enough, try the Chart Wizard that allows you to interactively build your chart data and then just copy the source code: http://imagecharteditor.appspot.com/ (for static image charts)
The navigation is a little confusing due to static vs. dynamic charts. Plus there are widgets, etc. But the examples and source code is there, so just look carefully around.

Google Maps for Absolute Dummies

I just signed up for a Google Maps API key and was hoping for a wizard style application for setting up the map (not a static one), unfortunately I was immediately blinded by science!
Can anyone point me to a tutorial where I can find out how to create a simple google map and place a callout bubble including am image of the office and address details.
Give this a try
http://econym.org.uk/gmap/
The documentation for Google maps is pretty fantastic. That's how I learned to use it.
There's a section for Basics in the docs. That might be a good place to start.
If all you're looking to do is show a map with an infowindow, you might want to take a look at the embedding options here:
http://maps.google.com/help/maps/getmaps/quick.html
It'll let you easily embed a map on your site, without to much science!
Shameless self-promotion
If you are happy to use C# this may or may not help - Lookup on all postcodes on a webpage, and plot them with Google maps. It doesn't really need much ASP.NET/C# knowledge beyond the basics.

Which map api would best support fictionally defined maps?

I am researching the feasibility of setting up a mapping tool for my alliance in an online game.
The game is not based in the real world so I am not interested in the content of the map tools available, just the functionality.
Minimally, I would like the map to display information about where allied cities are located in the world. Ideally, I'd like to be able to display information about desired trades, levels of development, and military actions. All this should be editable by the map users.
I've been looking at the google maps API and it appears that I could use it to serve my ends by using my own map tiles with a custom defined map object and some custom overlays, but it looks like it would be a lot of work to set up.
Is there another tool that would be better suited to this task?
A List Apart has an article from the creators of EveryBlock.com. They use a full open-source stack (client side library, tile cache, map generator) as an alternative to Google Maps. That sounds like it has exactly what you need.
I would argue that the Goole Maps API approach is not as difficult as you imagine. The API provides a very nice interface to define custom tilesets to render your own maps.
This interface is actually quite simple to use. There is a detailed description of it here. When you create a GMapType object you can specify a vector of urls to your own image tiles, label images and fundamentally change the display paradigm.
There are quite a few examples of this on the web:
George R R Martin's Game of Thrones. I found the javascript they have written pretty clear.
The Oblivion Gameworld (as Matt mentioned).
World of Warcraft Gameworld
I reckon this is a really powerful way of implementing your own maps on the web.
There is a google map implementation of the Oblivion gameworld - this might serve as a reference.
Wouldn't defining your own overlay with a KMZ file in Google Maps work?